Technical data
52
Manual – MOVI-PLC® advanced DH.41B Controller
5
Process data exchange with MOVI-PLC® advanced DHF41B
Operating Characteristics on PROFIBUS-DP
Control example
for Simatic S7
The data exchange process with MOVI-PLC
®
advanced DHF41B is controlled using
Simatic S7 in accordance with the selected process data configuration either directly us-
ing load and transfer commands or by means of special system functions, SFC 14
DPRD_DAT and SFC15 DPWR_DAT.
STEP7 sample
program
In this example, the MOVI-PLC
®
advanced DHF41B control card is configured with the
process data configuration 10 PD on input addresses PEW512... and output addresses
PAW512....
A data block DB3 is created with about 50 data words.
When SFC14 is called, the process input data is copied to data block DB3, data words
0 to 18. When SFC15 is called after the control program has been processed, the
process output data is copied from data words 20...38 to the output address PAW 512....
Note the length information in bytes for the RECORD parameter. The length information
must correspond to the configured length.
Refer to the online help for STEP7 for further information about the system functions.
For additional information on programming and configuration, refer to the
README_GSD6007.PDF file included with the GSD file.
//Start of cyclical program processing in OB1
BEGIN
NETWORK
TITLE = Copy PI data from the DHF41B control card to DB3, words 0...18
CALL SFC 14 (DPRD_DAT) //Read DP slave record
LADDR := W#16#200 //Input address 512
RET_VAL:= MW 30 //Result in flag word 30
RECORD := P#DB3.DBX 0.0 BYTE 20 //Pointer
NETWORK
TITLE =PLC program with drive application
// PLC program uses the process data in DB3 for data exchange
// with the DHF41B control card
L DB3.DBW 0 //Load PI1
L DB3.DBW 2 //Load PI2
L DB3.DBW 4 //Load PI3
// etc.
L W#16#0006
T DB3.DBW 20 //Write 6hex to PO1
L 1500
T DB3.DBW 22 //Write 1500dec to PO2
L W#16#0000
T DB3.DBW 24 //Write 0hex to PO3
// etc.
NETWORK
TITLE = Copy PO data from DB3, words 20...38 to DHF41B control card
CALL SFC 15 (DPWR_DAT) //Write DP slave record
LADDR := W#16#200 //Output address 512 = 200hex
RECORD := P#DB3.DBX 20.0 BYTE 20 //Pointer to DB/DW
RET_VAL:= MW 32 //Result in flag word 32
This sample program is a free service that demonstrates only the basic approach to
generating a PLC program as a non-binding sample. SEW is not liable for the contents
of the sample program.
00
I