Data transfer to the PLC
7.2 Control program example
3WL/3VL circuit breakers with communication capability - PROFIBUS
162
System Manual, 03/2011, A5E01051353-02
Step 2 Assignment with parameters
All parameters must be set customer-specifically.
Note
Function codes mode
B#16#04 (UNFREEZE);B#16#08 (FREEZE);B#16#10 (UNSYNC);B#16#20 (SYNC)
CALL "DPSYC_FR"
REQ := M95.0 //Triggered by program sequence
LADDR :=W#16#7FF //Diagnostics address of the master (CPU) in HEX
GROUP :=B#16#1 //Distribution list – groups to be addressed
MODE :=MB97 //Function code (e.g. B#16#10 = SYNC)
RET_VAL:=MW98 //Acknowledgment of the standard block
BUSY :=M 96.0 //Acknowledgment still active
Note
P#DB20.DBX 60.0 BYTE 28 represents a pointer for storing the read data:
P# = ID pointer
DB20 = data block to be used
DBX60.0 = offset (here 60 bytes)
BYTE = ID for repetition factor type
28 = repetition factor (diagnostics length → 28 bytes)
However, this data block must first be generated!
The precise sequence of the diagnostics is included in Chapter Data library (Page 175).
Determine group assignment
A group assignment is required for the functions "SYNC/FREEZE". Commands can be
executed on several nodes simultaneously via this assignment.
Double-click on the PROFIBUS line used. A dialog box opens in which the nodes can be
assigned to the groups.
On the "Group Properties" tab, several groups with different functions can be named and
configured here. Each slave then has to be assigned to the desired groups on the "Group
Assignment" tab.