Waiting for signals (#WAIT)
In analogy to sending signals, it is possible to wait for a corresponding #SIGNAL with the #WAIT command. A broadcast WAIT waits only for a broadcast SIGNAL with the same signal number. Each #WAIT uses its own #SIGNAL.
Syntax: |
#WAIT [<mode>] [ ID=.. { P[<idx>] = <param> } { CH=.. } [ AHEAD ] ] |
<mode> | Synchronisation mode. Permitted identifiers: ---: Synchronisation at decoding level (initial state) For example, this synchronisation is required if it is necessary to synchronise to parameters or variables. SYN: Synchronisation at interpolator level. This synchronisation is required in the case of real-time requests, e.g. synchronisation of two machining units on a multi-column machine |
ID=.. | Number of the signal for which the system is waiting. Positive integer. |
P[<idx>] = <param> | Signal parameter as real number. (Important: In the equation, the left-hand value is assigned to the right-hand value.) When a signal parameter is read, a check is made whether the transferred signal parameter at index <idx> was adopted in the ‘target variable (<param>). If this is not the case, error ID 21549 is output. <idx>: Range for maximum possible number of parameters: 0 .. 11 (max. number of coupling pairs (1)) |
Notice | |
Signal parameters can only be evaluated at decoder level. This means, for example, a #WAIT SYN [... P[0] = ... ] is not allowed. |
CH=.. | Channel number from which a signal is expected. If no channel number is specified, the program waits for a broadcast signal from any user. |
AHEAD | Keyword for execution of a "flying” WAIT. Used to reduce waiting times because of the buffer effect of the look-ahead function (up to 70 blocks in advance). If synchronised at interpolator level, WAIT is output at once. As a result, the following acknowledgement check (SIGNAL) is flying, i.e. a change can be made immediately to the next motion block without interruption. |
(1) see [6]-6.45
(2) see [6]-2.4
Programming Example
Waiting for signals
any channel)
SIGNAL 815 from channels 2 and 3)
(the signal is received)
Programming Example
Wait for signals with adoption of parameters (in channel 3):