S5-95U, Second Serial Interface
Computer Link with 3964(R) Transmission Protocol
3.5
Sample Program for Computer Link
This section deals with the structure of a PLC program for transmitting data via a computer link.
Example:
This example describes the program of an arbitrary communication partner. In can be used for an
S5-95U for which high priority is set in DB1 and a communication partner for which low priority is
set.
The data to be transmitted is stored in data words DW 1 to DW 5 of DB207. A data block length of
10 bytes must therefore be entered in DB207.
Proceed as follows:
Establish the ready state at the communication partner.
Switch the S5-95U on and carry out an overall reset of the PLC (PLC in STOP).
Parameterize the computer link in DB1 of the S5-95U as described below.
Program the individual blocks as described below.
Do not forget to generate the relevant DB for the position of the parameter set!
Transfer DB1 and the PLC program to the S5-95U.
Set the mode selector of the PLC to RUN.
The structure of this sample program is shown in the diagram below ( Figure 3-9).
Figure 3-9 Program Structure of a Computer Link
OB1
FB207 and
FB208 are
called up
cyclically
FB207
Send data
DB207
Send
mailbox
DB208
Receive
mailbox
FB208
Receive data
DB1
enters the
relevant
parameters
for the
computer link
in system data
words 48 to 55
DB206
Parameter
set for
computer link
EWA 4NEB 812 6095-02
3-15