JS Function
Jump Sense detects whether the arm stopped prior to completing a Jump, Jump3, JumpTLZ , or Jump3CP instruction which used a Sense input or if the arm completed the move.
Syntax
JS
Return Values
Returns a True or a False.
- True: When the arm was stopped prior to reaching its target destination because a Sense Input condition was met JS returns a True.
- False: When the arm completes the normal move and reaches the target destination as defined in the Jump instruction JS returns a False.
Description
JS is used in conjunction with the Jump and Sense instructions. The purpose of the JS instruction is to provide a status result as to whether an input condition (as defined by the Sense instruction) is met during motion caused by the Jump instruction or not. When the input condition is met, JS returns a True. When the input condition is not met and the arm reaches the target position, JS returns a False.
JS is simply a status check instruction and does not cause motion or specify which Input to check during motion. The Jump instruction is used to initiate motion and the Sense instruction is used to specify which Input (if any) to check during Jump initiated motion.
Note
JS Works only with the Most Recent Jump, Jump3, JumpTLZ, Jump3CP Instruction:
JS can only be used to check the most recent Jump instruction's input check (which is initiated by the Sense instruction.) Once a 2nd Jump instruction is initiated, the JS instruction can only return the status for the 2nd Jump instruction. The JS status for the first Jump is gone forever. So be sure to always do any JS status check for Jump instructions immediately following the Jump instruction to be checked.
See Also
JT, Jump, Jump3, Jump3CP, JumpTLZ, Sense
JS Function Example
Function SearchSensor As Boolean
Sense Sw(5) = On
Jump P0
Jump P1 Sense
If JS = TRUE Then
Print "Sensor was found"
SearchSensor = TRUE
EndIf
Fend