Sending signals
Basically, a distinction is made between broadcast signals with no specification of the receiver and non-broadcast signals in which a channel is specified explicitly as the receiver. The signals are identified by a unique number, whereby it is permitted to send signals with identical signal numbers.
In the case of non-broadcast signals, one or more NC-channels are specified as the receiver explicitly. If several receivers are specified for one signal, this acts in the same way as multiple transmission of the same signals to the individual channels.
Example:
#SIGNAL [ID4711 CH1 CH2 CH3]
acts in the same way as
#SIGNAL [ID4711 CH1]
#SIGNAL [ID4711 CH2]
#SIGNAL [ID4711 CH3]
These signals are valid only for a WAIT of the addressed receiver and are used up if the consumption counter (COUNT) is not specified for a WAIT of the receiver channel. If a consumption counter is specified, the period of validity can be prolonged accordingly.
Unlike this situation, broadcast signals can be received by a WAIT of any channel. If no consumption counter (COUNT) is specified in the case of broadcast signals, these are not used up by a WAIT, i.e. they persist until they are explicitly cleared (see #SIGNAL REMOVE). If a consumption counter is specified, just as many WAIT requests are possible until the signal is used up as is the case with non-broadcast signals.
#SIGNAL [<mode>] [ID<sgn_nr> [COUNT<expr>] { P[<idx>]=<param>} {CH<chan_nr>} ] (non-
modal)
<mode> Synchronization mode
Valid | 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>Signal number; must be unique system-wide. Positive integer.
COUNT<expr> Consumption counter; defines how frequently a signal can be retrieved with #WAIT. Positive integer
P[<idx>] = <param> Signal parameter. The parameters are entered in the parameter array of the signal in accordance with the specified index.
Index | Significance |
---|---|
<idx> | Range for maximum possible number of parameters: |
CH<chan_nr> Channel number; positive integer
Valid | Significance |
---|---|
1...Max. number of channels(2) | Number of the channel for which the signal is destined. |
--- | If no channel number is specified, a (broadcast) signal is sent to all available signal receivers of the system. |
(1)see [6]-6.45
(2)see [6]-2.4
Programming example
(Signal 812, Synchronization on DEC-level, Broadcast)
N500 #SIGNAL [ID812]
(Signal 4711, Synchronization on DEC-level, to channel 2)
N100 #SIGNAL [ ID4711 CH2 ]
(Signal 4711, Synchronization on DEC-level,
for 10 #WAIT-queries, Broadcast)
N100 #SIGNAL [ ID4711 COUNT10 ]
(Signal 815, Synchronization on IPO-Ebene,
twice to channel 2 and once to 3)
N200 #SIGNAL SYN [ ID815 CH2 CH2 CH3 ]
(Signal 911, Synchronization on DEC-level, to channel 3)
(1. signal parameter V.A.MESS.X, 2. signal parameter P200,
3. signal parameter 944)
N260 P200 = 924
N300 #SIGNAL [ IDP100 CH3 P[0]=V.A.MESS.X P[1]=P200 P[2]=944 ]