In fanuc TP programming, I watched the video for Branching.In that video, they mentioned JMP LBL [],CALL are non-conditional statements, and wait,if,select are conditional statements. But how wait is a conditional statement. Anyone can explain that.
TP programming
-
MANIKANDAN_S -
April 25, 2024 at 7:19 PM -
Thread is Unresolved
-
-
MOM
April 25, 2024 at 7:31 PM Approved the thread. -
A wait command is usually halting program execution until a certain "condition" is met. For example, waiting until a certain amount of time has passed, or waiting until an input is turned on.
-
-
I already know that and use it, but my doubt is about that classification.it is conditional or non condition.
-
WAIT instruction is implicit IF statement:
if condition is satisfied then proceed else remain waiting. -
Wait can also have a timeout jump label.
-
What parameter could be used to declare the desired timeout duration? Looking for something like $timeout_ in order to set dynamically in routines.
-
$WAITTMOUT
-
And
$WAITTMOUT = 1000 (is a 10 second wait, that's the tough part)
WAIT DI [1] = ON or Di[2] = ON TIMEOUT, LBL[1]
JMP LBL[2]
LBL[1]
"what to do if no DI in 10 seconds"
LBL[2]
"one of the 2 DI's came on"
-
I already know that and use it, but my doubt is about that classification.it is conditional or non condition.
A WAIT instruction is certainly conditional. What you are doing is telling the program, "wait here until a certain condition is met."
WAIT DI[1] = ON means "wait until I see this input come on."\
WAIT 3.0 sec means "wait until 3 seconds have gone by."
Hope this helps.