At a Glance
Let us suppose
we want two PLC stations to communicate on a Fipway network. Station
1 must send the data (20 bytes located in %MW70:10
) to station 2, which receives it in a table located in %MW80:10
. Each PLC has a management table starting with the address %MW90
.
For station 1, the word %MW93
must contain the length of the data to be sent, or 20 (10 words
to be sent).
For station 2, the word %MW93
is
set to 0 before the exchange, in order to see the number of characters
received at the end of the exchange.
The DATA_EXCH
function requires both PLCs to be programmed, one to send, the other
to receive.
Illustration
The two stations are connected via a Fipway network:

Transmission Programmed in Station 1
Programming in ST:
IF RE(%I0.3.2) AND NOT %MW90.0 THEN
(* initialization of the data to send *)
%MW93:= 20;
(* communication function *)
DATA_EXCH(ADDR(’{20.2}APP’),2,%MW70:10,%MW90:4,%MW80:1);
END_IF;
Request parameters:
Parameters |
Description |
---|---|
|
|
2 |
Type of communication: transmission |
|
Data to send |
|
Management table |
|
Reception zone for responses. Here, there is no data to receive, but a word must nevertheless be reserved (compulsory). |
Reception Programmed in Station 2
IF RE(%I0.3.4) AND NOT %MW90.0 THEN
(* initialization of the data to receive *)
%MW93:= 0;
(* communication function *)
DATA_EXCH(ADDR(’{20.1}APP’),3,%MW70:1,%MW90:4,%MW80:10);
END_IF;
Request parameters:
Parameters |
Description |
---|---|
|
|
3 |
Type of communication: reception |
|
Data to send. Here there is none, but at least one word must be reserved. |
|
Management table |
|
Reception zone: 10 words are provided from station 1. |