Waiting for signals

Analogously to sending signals, it is possible to wait for a corresponding SIGNAL with the WAIT command. A broadcast WAIT waits only on a broadcast SIGNAL with the same signal number. A WAIT synchronized on decoder/interpolator level takes up one separate SIGNAL in each case.

#WAIT [<mode>] [ID<sgn_nr> { P[<idx>]=<param> } { CH<chan_nr> } [ AHEAD ] ] (non-modal)

<mode> Synchronization mode

Valid
modes

Significance

---

Synchronization on decoder level (basic setting).

This synchronization is required for instance if it is necessary to synchronize with parameters or variables.

SYN

Synchronization on interpolator level.

This synchronization is required in the case of real-time requests, e.g. synchronization of two machining units of a multi-column machine

ID<sgn_nr> Number of the signal with which synchronization is to occur (for which the system waits). Positive integer.

P[<idx>] = <param> Signal parameters as real number. While waiting for the signals also parameters can be transmitted by the signal senders from different channels. They are assigned to the specified parameters or variables (<param>).

Index

Significance

<idx>

Range for the maximum possible number of parameters:
0...Max. number of signal parameters(1)

After the complete acknowledgement of the waiting condition (receiving of all required signals) it is checked, wether all programmed parameters have been evaluated and stored. An error message is created if this check is negative.

Waiting for signals 1:

Signal parameters are currently evaluated only on decoder level. This means, for example a #WAIT SYN[... P[0] = ... ] is not allowed.

CH<chan_nr> Channel number:

Valid values

Significance

1...Max. number of channels(2)

Number of the channel from which a signal is anticipated.

---

If no channel number is specified, the system waits for a signal of any user.

AHEAD Key word for the execution of a „flying“ WAIT. Is used for the reduction of waiting time because of the buffer effect of the Look-ahead (up to 70 blocks in advance). At synchronization on interpolator level output of WAIT at once. As a result, at the following acknowledgement check (SIGNAL) the next traverse block can be executed without any interruption.

(1)see [6]-6.45

(2)see [6]-2.4

Programming example

(Wait mark 4711, Synchronization on DEC-level, SIGNAL 4711 from any channel) 
N200 #WAIT [ID4711]
(Wait mark 815, Synchronization on IPO-level, SIGNAL 815 from channel 2 and 3)
N100 #WAIT SYN [ID815 CH2 CH3]
(Wait mark 911, Synchronization on DEC-level, from channel 3)
(1. signal parameter V.P.SIGNAL, 2. signal parameter P200)
N300 #WAIT [IDP100 P[0]=V.P.SIGNAL P[1]=P200 CH3]
N350 P20 = 10 * V.P.SIGNAL * P200

Programming example

Waiting for signals with evaluation of parameters (in channel 3):

%channel1 
N10 #SIGNAL [ID 110014 P[0] = 1234 CH3]
N20 M30
%channel2
N10 #SIGNAL [ID 110014 P[1] = 200 CH3]
N20 M30
%channel3
N10 P1 = 1 (Stores value from channel 1
N20 P2 = 1 (Stores value from channel 2
N30 XP1 YP2
N40 #WAIT [ID 110014 P[0] = P1 P[1] = P2 CH1 CH2]
N50 XP1 YP2
N60 M30