Example of an Exchange from a Slave to a Slave Application
(Original Document)
At a Glance
The Slave transmits a communication function to the slave application (Ad2).
Transmission
The PLC sender generates an unsolicited data request:
SEND_REQ(ADDR('0.0.1.7'), 16#00FC, %MW100:10, %MW130:4, %MW120:1)
Parameters of the request:
Parameters
Description
ADDR(‘0.0.1.7’)
  • 0 : rack
  • 0 : module
  • 1 : channel 1
  • 7 : transmitting address Ad1
16 #00FC
unsolicited data request
%MW100 = 16#FE 00
destination slave address (Ad2 = 11)
%MW101 = 16#FE 05
%MW102 = 16#00 0B
%MW103 to %MW109
application data to transmit
Reception
The PLC data receiver:
IF RE(%I0.3.4) AND NOT %MW100.0 THEN
(* initialization of the data to receive *)
%MW103:= 0;
(* communication function *)
DATA_EXCH(ADDR('0.0.1.11'), 3, %MW110:1, %MW100:4, %MW120:10)
END_IF;
Parameters of the request:
Parameters
Description
ADDR(’0.0.1.11’)
  • 0 : rack
  • 0 : module
  • 1 : channel 1
  • 11 : address Ad2
3
receive mode
%MW120 = 16#FE 00
xx: exchange number of the transmitter function
%MW121 = 16#FE xx