3.5
Insertion of the Function Blocks into the Program
Content of
MODBUS library
Insertion of the
MODBUS FBs
OPEN MODBUS / TCP communication via CP343-1 and 443-1
2XV9450-1MB00; Manual edition 4.3
The following blocks are required for the Modbus communication:
•
MODBUSCP
•
MB_CPCLI
•
MB_CPSRV
In order to exchange data with MODBUS devices, you need the function
blocks MODBUSCP, MB_CPCLI, MB_CPSRV and AG_CNTRL if applicable.
To be able to insert this into your project you have to copy the function block
from the library. For that, open the library "Modbus_TCP_CP" by selecting
the menu item File
Open.
In the dialog box "Open Project" select the tab "Libraries". Select the library
"Modbus_TCP_CP" using the Browse-Button and click "OK".
This opens the library. Open the folder "CP 300" or "CP 400" according to
your Configuration by double clicking it. Select the function blocks and copy it
via "Edit
Copy". Then change back to your project .
In the Step7 project, in your opened S7 300/S7 400-Station, select the CPU.
Double click "S7-program", and then "Blocks".
This will open the "Blocks" folder.
Select "Edit
Paste". This will insert the block into your program.
Commissioning
3-10