3/13/2016 2:48 AM | |
Joined: 1/12/2011 Last visit: 6/3/2024 Posts: 1 Rating:
|
Hello, I have similar question here,can you please help! I'd like to know if I can send the Real(floating) values out to my client through S7 - OPEN MODBUS / TCP . I have a data block(i.e. DB1089) which has Bool, INT.Real . data ; how can I expose this data block structure for my customer in order to read the data on a Modbus TCP connection. Thanks a lot Farshad ------------------------------------------------------------------------------------------ |
Last edited by: Min_Moderator at: 3/14/2016 2:42:24 PMNew subject after splitting |
|
3/13/2016 9:13 PM | |
Joined: 9/27/2006 Last visit: 9/10/2024 Posts: 12282 Rating:
|
Hello Farshad; Please read the manual for the version of Open ModbusTCP you will be using, and look at the Address Mapping section that is available there. In the extract you will find as attachment, you will see hoe the redundant driver for Open ModbusTCP describes the correspondence between Modbus addresses and Siemens DBs. Note that the starting address of each type of Modbus address available (i.e. coils and holding registers) must be defined in the block for the client od the driver (FB REDCL in this case). So you are responsible for establishing the correspondence. Note also that Modbus only works with 16-bit registers, so transferring a REAL value (32-bit IEEE format) will require you to send 2 contiguous Modbus registers and reassemble them as REAL values in your partner. This is a very standard way of dealing with such issues. For a brief but very helpful description of Modbus (Modbus RTU in this case but many issues apply to Modbus/TCP in the same fashion) I can recommend our friend smiffy's excellent document: Modbus General Description https://support.industry.siemens.com/tf/ww/en/posts/66876/
So basically: you will have to define the DBs that will serve as Modbus transfer areas in your S7 PLC, copy the values you want to exchange from your original work DB to these "Modbus" transfer sections, and program your Open ModbusTCP functions to send these registers to your partner. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 3/14/2016 6:40:31 PM |
|
Follow us on