The await event instruction is as follows:
Instruction
|
Instruction code
|
Icon
|
Await event
|
05
|
|
This instruction is used to await an event within a Time Out (in ms), defined in the parameter F. If an event does not appear within this Time Out period, the await command is then deactivated. If F parameter is defined at 0, the wait is without a time limit.
With an infinite machine, the G05 instruction is also used to await the crossing of a number of modulo.
The choice is determined by the bit 13 value of parameter M:
Event Associated with the Command
The event associated with command G05 can be:
-
a rising or falling edge (depending on the choice made in the Event field in the configuration screen) on dedicated event input, associated with the channel which controls the axis,
-
a rising edge of the EXT_EVT bit (%Qr.m.c.10) generated by the program,
-
a number of modulo crossings (for an infinite machine). For example, awaiting 10 modulo crossings with activation of the event task:
SMOVE (AXIS_CH0,1,90,05,0,10,16#2000) AXIS_CH0 of type T_AXIS_STD
The G05 instruction can activate an event task on detection of an event, if bit 12 of parameter M is set at 1.
The TO_G05 bit is set to 1 when the Time Out has elapsed without an event being detected. For example, an event waits with a Time Out period of 1.5 s and with activation of the event task:
SMOVE (AXIS_CH0,1,90,05,0,1500,16#1000) AXIS_CH0 of type T_AXIS_STD