Command Descriptions
211
the
ONP
program will not be called again until after it has finished executing. After returning from the
ONP
program, the condition that caused the branch must evaluate false before another branch to the
ONP
program 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
2ONIN.4-1
; When input #4 on I/O brick 2 is activated,
; GOSUB to the ONP program
ONCOND1000
; Enable ONIN condition
;
; Now that the ONP program named bigmov is defined, if input #4 becomes
; active during normal program operation, the program will GOSUB to
; the ONP program (bigmov).
ONUS
On a User Status Condition Gosub
Type
On Condition (Program Interrupt)
Syntax
<a_><!><%>ONUS<b><b><b>...<b><b> (16 bits)
Units
n/a
Range
b = 0 (disable), 1 (enable) or X (don't care)
Default
0
Response
ONUS: *ONUS0000_0000_0000_0000
See Also
INDUSE, INDUST, ONCOND, ONP
Product Rev
GT6K 6.0
GV6K 6.0
The
ONUS
command specifies the user status bit pattern, defined using the
INDUST
command, which will
cause a branch to the ON program (
ONP
). If the bit pattern occurs, a GOSUB is performed. The subroutine
or program that the GOSUB branches to is selected by the ON program (
ONP
) command.
The
ONUS
command must be enabled using the
ONCOND
command before any branching will occur. Once a
branch to the
ONP
program occurs,
ONUS
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, the user
status bit pattern specified by the
ONUS
command must evaluate false before another branch to the
ONP
program, resulting from the
ONUS
status bits, will be allowed.
Multi-Tasking
: Each task has it own
ONP
Program and its own set of On conditions.
Example:
INDUSE1
; Enable user status
INDUST1-5A
; User status bit 1 defined as axis status bit 5
INDUST2-3A
; User status bit 2 defined as axis status bit 3
3INDUST3-5J
; User status bit 3 defined as input 5 on I/O brick 3
INDUST4-14A
; User status bit 4 defined as axis status bit 14
2%INDUST16-2I
; User status bit 16 defined as system status bit 2 for task 2
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
ONUSxxx1
; On user status bit #4 (axis status bit 14) GOSUB to
; the ONP program
ONCOND0100
; Enable ONUS condition
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...