6/28/2012 6:03 PM | |
Joined: 5/3/2012 Last visit: 6/23/2024 Posts: 161 Rating: (2) |
Hello everyone. I found this sample https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&lang=es&objid=10805265&subtype=133100&caller=view But I think this sample has modbus rtu slave communication, I need sample modbus rtu master communication with et200s. I found the other sample, but is with cp341, I think de promam is similar, but I change fb7 for fb2, and fb8 for fb3, is correct. https://support.automation.siemens.com/WW/llisapi.dll?query=sample+cp341+modbus&func=cslib.cssearch&content=adsearch%2Fadsearch.aspx&lang=en&siteid=cseus&objaction=cssearch&searchinprim=0&nodeid0=45182055 Thank you. |
Last edited by: David1981 at: 6/28/2012 6:04 PM |
|
6/29/2012 7:59 AM | |
Posts: 327 Rating: (28) |
Greetings This is the correct sample:https://support.automation.siemens.com/WW/llisapi.dll?aktprim=0&lang=en&referer=%2fWW%2f&func=cslib.csinfo&siteid=cseus&groupid=4000003&extranet=standard&viewreg=WW&nodeid0=10805265&objaction=csopen It has examples for both master and slave. But I think you would benefit more from reading the manual of ET200SI card, especially from chapter 3.5 "Modbus Master Driver". I had tought time finding useful samples few months ago when I needed to read some data over Modbus. Modbus works quite simply. To read data from Output registers of slave, you just need to use FB3 (S_SEND_SI) to send a portion of DB formated like in chapter 3.5.7 (Function Code 03 - Read Output Registers). Then you use FB2 (S_RECV_SI) to read slave's response and put it in same place in DB. Built-in help of S7 is also useful, just press F1 on these two functions. Best regards
|
This contribution was helpful to1 thankful Users |
6/29/2012 10:21 AM | |
Joined: 5/3/2012 Last visit: 6/23/2024 Posts: 161 Rating: (2) |
Hello everybody, I mistook, if you download this link: https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&lang=es&objid=10805265&subtype=133100&caller=view You can seeone sample of master modbus rtuand slave modbus rtu, I was seeing of code and it was both types, in step 7 v11 (tia portal) software. Thank you and sorry. |
This contribution was helpful to1 thankful Users |
2/12/2013 2:59 PM | |
Joined: 8/29/2007 Last visit: 8/20/2024 Posts: 4 Rating: (0) |
Hello David1981, This example contains only Modbus Slave.
Mr.Cube |
9/23/2016 2:02 PM | |
Joined: 9/3/2014 Last visit: 3/13/2019 Posts: 4766 Rating: (122) |
New question published by Eden Silveira is split to a separate thread with the subject ET200s as a Master connected to two or more Slaves. Best regards |
Follow us on