Command Descriptions
209
Example:
WHILE(IN=b1X0)
; While input 1 = 1, input 3 = 0, execute commands between WHILE & NWHILE
T5
; Wait 5 seconds
TPE
; Transfer position of encoder
NWHILE
; End WHILE statement
ONCOND
On Condition Enable
Type
On Condition (Program Interrupt)
Syntax
<a_><!><%>ONCOND<b><b><b><b>
Units
n/a
Range
b = 0 (disable), 1 (enable) or X (don't change)
Default
0
Response
ONCOND: *ONCOND0000
See Also
FSHFD,
ONIN, ONP, ONUS, ONVARA, ONVARB, [ SS ], TSS
Product Rev
GT6K 6.0
GV6K 6.0
The
ONCOND
command enables the
ONIN
,
ONUS
,
ONVARA
, and
ONVARB
commands. When enabled, the
expressions specified in the
ONIN
,
ONUS
,
ONVARA
, and
ONVARB
commands will be continuously evaluated.
If any of the expressions ever evaluate true, a GOSUB will be made to the
ONP
program/subroutine.
ONP
,
ONIN
,
ONUS
,
ONVARA
, and
ONVARB
should be defined before enabling the On Condition. If
ONP
is not
defined first, the error message
*UNDEFINED
LABEL
will appear.
ONCONDbbbb
: First
b
=
ONIN
Enable
Second
b
=
ONUS
Enable
Third
b
=
ONVARA
Enable
Fourth
b
=
ONVARB
Enable
When ON conditions WILL NOT interrupt immediately
: These are situations in which an ON
condition does not immediately interrupt the program in progress. However, the fact that the ON condition
evaluated true is retained, and when the condition listed below is no longer preventing the interrupt, the
interrupt will occur.
•
While
a
WAIT
statement is in progress
•
While a time delay (
T
) is in progress
•
While a program is being defined (
DEF
)
•
While a pause (
PS
) is in progress
•
While a data read (
DREAD
,
DREADF
, or
READ
) is in progress
•
While motion is in progress due to
GO
,
GOWHEN
,
HOM
,
JOY
,
JOG
, or
PRUN
and the continuous
command execution mode is disabled (
COMEXCØ
).
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
2ONINxxx1
; 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).
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...