one of the innovations of the SP1 for STEP7 V12 (Released for Delivery at http://support.automation.siemens.com/WW/view/de/76276623) is the inclusion of new instructions, for MODUBS TCP communication with S7-1500.
Here there is a very simple sample project (not tested) to illustrate how it works.
In the follow post (from 09/06/2014) I post a second file (tested) with two very simple sample projects to illustrate how it works:
· S7-1500 as MODBUS server with S7-1200 as MODBUS client
· S7-1500 as MODBUS client with S7-1200 as MODBUS server
· There is two ways to build a MODBUS TCP communication:
• With configured connection (defined in Network View), and that uses a communication DB with structure TCON_Configured.
• With programmed connections (defined directly in the communication definition DB), and that uses a communication DB with structure TCON_IP_v4.
A simple way to build a TCON_IPv4 DB is to place, in your program a block TSEND_C, and use the properties of the block to create and configure the DB. After that you can delete the TSEND_C call, the TSEND_C block and its respective instance DB and just uses the create connection DB to MODBUS TCP proposes.
You can create alternatively to create an usual DB and inside to create a variable with the data type TCON_IP_v4 (type this name directly to the data type field).When to configure this DB, take in account:
o As server, Active Established should be “False” and remote port should be “0”
o As client, Active Established should be “Ture” and remote port should be set with the server port number· MB_DATA_PTR could has absolute or symbolic address:
o Absolute address (M area or S7-300/400 compatible DB’s) is designed for a pointer (for example P#M0.0 byte 10). When used with DB’s, the DB could have any data type structure.
o Symbolic address (optimized DB – default for S7-1500). In this case it is allowed array of word or integer data types.
Thanks to Mr TomEPE and Mr dajiru for this tip
|=== Edited by Pegaia @ 6/9/2014 12:39 PM [GMT ] ===|
=== Edited by Pegaia @ 6/9/2014 12:37 PM [GMT ] ===
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040