212
Gemini GV6K/GT6K Command Reference
ONVARA
On Variable 1 Condition Gosub
Type
On Condition (Program Interrupt)
Syntax
<a_!><%>ONVARA<i,i,i>
Units
See below
Range
±
999,999,999.99999999
Default
+0.0,+0.0,+0.0
Response
ONVARA: *0.0,+0.0,+0.0
See Also
ONCOND, ONP, ONVARB, VAR, VARI
Product Rev
GT6K 6.0
GV6K 6.0
The
ONVARA
command specifies the low and high values which will cause a branch to the ON program
(
ONP
). If the value of variable 1 is less than or equal to the first
i
, or greater than or equal to the second
i
, a
GOSUB is performed. The subroutine or program that the GOSUB branches to is selected by the ON
program (
ONP
) command. If the third field is non-zero, integer variables (
VARI
) are used for the
comparison.
The
ONVARA
command must be enabled using the
ONCOND
command before any branching will occur. Once
a branch to the
ONP
program occurs, the
ONVARA
command will not call the
ONP
program while the
ONP
program is executing, eliminating the possibility of recursive calls. After returning from the
ONP
program,
variable 1 must be reset to a value within the low and high values before another branch to the
ONP
program, resulting from the value of variable 1, will be allowed.
Multi-Tasking
: Each task has it own
ONP
Program and its own set of On conditions.
Example:
DEF bigmov
; Define program bigmov
D20
; Sets move distance to 20 units
GO1
; Initiate motion
END
; End program definition
ONP bigmov
; Set ON program to bigmov
ONVARA0,12
; On VAR1 <= 0, or VAR1 >= 12 GOSUB to ONP program
ONCOND0010
; Enable ONVARA condition
ONVARB
On Variable 2 Condition Gosub
Type
On Condition (Program Interrupt)
Syntax
<a_><!><%>ONVARB<i,i,i>
Units
See below
Range
±
999,999,999.99999999
Default
+0.0,+0.0,+0.0
Response
ONVARB: *0.0,+0.0,+0.0
See Also
ONCOND, ONP, ONVARA, VAR, VARI
Product Rev
GT6K 6.0
GV6K 6.0
The
ONVARB
command specifies the low and high values which will cause a branch to the ON program
(
ONP
). If the value of variable 2 is less than or equal to the first
i
, or greater than or equal to the second
i
, a
GOSUB is performed. The subroutine or program that the GOSUB branches to is selected by the ON
program (
ONP
) command. If the third field is non-zero, integer variables (
VARI
) are used for the comparison.
The
ONVARB
command must be enabled using the
ONCOND
command before any branching will occur. Once
a branch to the
ONP
program occurs, the
ONVARB
command will not call the
ONP
program while the
ONP
program is executing, eliminating the possibility of recursive calls. After returning from the
ONP
program,
variable 2 must be reset to a value within the low and high values before another branch to the
ONP
program, resulting from the value of variable 1, will be allowed.
Multi-Tasking
: Each task has it own
ONP
Program and its own set of On conditions.
Example:
DEF bigmov
; Define program bigmov
D20
; Sets move distance to 20 units
GO1
; Initiate motion
END
; End program definition
ONP bigmov
; Set ON program to bigmov
ONVARB0,12
; On VAR2 <= 0, or VAR2 >= 12 GOSUB to ONP program
ONCOND0001
; Enable ONVARB condition
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...