Hello, I am trying to insert an IF statement in a program I am trying to make using the teach pendant. I find AND OR etc but not IF in the Inform pulldown menu instruction list. Would someone please tell me where to find it? I have the Expanded Instruction set on. thank you, Dan
XRC IF Statement Insertion when programming
-
Mustangdan -
January 6, 2013 at 5:56 AM -
Thread is marked as Resolved.
-
-
IF is not an instruction, it is a tag. Only certain instructions can be conditioned with "IF". They are CALL, JUMP, RET, and PAUSE (PSTART and PWAIT by option). All other instructions can be conditioned but have to be packaged correctly. To get the "IF" once you have one of these instructions on the edit buffer line press SELECT. The screen name (top left) should say detail edit. Toward the bottom there is the word CONDITION. To the right of CONDITION is UNUSED. Select on unused. In the drop down select on IF.
-
95devils,
It is as you said. Thank you very much!
-
From NX100 and on, you get IF THEN ELSE , as statements. That means that you can write
IF BOO1 = 1 THEN
SET B000 0
ENDIFBut on older controllers, that is not a possibility...
-
From NX100 and on, you get IF THEN ELSE , as statements. That means that you can writeIF BOO1 = 1 THEN
SET B000 0
ENDIFBut on older controllers, that is not a possibility...
That instruction is part of the DX Structured Language. That was considered a software option, then became a US standard. Not all DX controllers have that turned on, most do though. It was not available on NX as far as I know.
-
95devils is correct, Structured language (IF...THEN...ELSE, FOR...NEXT, WHILE....ENDWHILE and SWITCHCASE....CASE...DEFAULT) only available on DX100 controllers. Standard on both U.S. and Canadian DX100 controllers, may be a purchasable software option elsewhere worldwide....
-
In Europe its standard as well