Siemens SIMATIC S5 Manual page 119

Interface of the programmable controller
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Data Transfer with PLC-to-PLC Connections
Programmable Controller 2
Proceed as follows:
Assign parameters in the DB1 of programmable controllers 2 as described in section 6.2.
Program the individual blocks as described in the following section.
Transfer blocks DB1, OB1, FB1, DB21 and DB22 to programmable controller 2.
Cyclical Program for Station 2 (Programmable Controller 2)
Programmable controller 2 is to transmit data to programmable controller 1 and to receive data from
programmable controller 1.
Function block L2-SEND in programmable controller 2 triggers the data transmission.
L2-SEND is called up in function block FB5 of programmable controller 1.
Function block L2-RECEIVE triggers the data reception in programmable controller 2.
L2-RECEIVE is called up in function block FB105.
FB5 and FB105 are called up in organization block OB1. The transmit data are stored in data block
DB21. The received data are stored in data block DB22. Status byte 'Send' is flag byte 21. Status
byte 'Receive' is flag byte 22.
Significance of the Parameters for FB5 and FB105:
ANST:
Input Parameter Bit (trigger bit 'Transmit')
A transmit request is triggered by bit ANST.
completed without error, FB5 resets bit ANST. If triggering of a transmit request ends
with an error message in STBS or PAFE, the transmit request is repeated automatically.
EMPF:
Input Parameter Bit (enable bit 'Receive')
Receiving is enabled by bit EMPF. You set bit EMPF. When the job is completed
without error, FB105 resets bit EMPF. If receiving ends with an error message in STBR
or PAFE, the receive procedure is repeated automatically.
OB1 for PLC 2
SEGMENT 1
0000
:
0001
: JU
0002 NAME
: S 2=>1
0003 ANST
: F 5.0
0004
:
0005
: JU
0006 NAME
: R 2<=1
0007 EMPF
: F 6.0
0008
:BE
6-10
0000
FB 5
FB 105
You set bit ANST.
Explanation
Transmit to station 1.
Trigger bit 'Transmit'
Receive from station 1
Enable bit 'Receive'
S5-95U, SINEC L2
When the job is
EWA 4NEB 812 6112-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinec l2S5-95u

Table of Contents