Modbus Buffer Question

scantime

Member
Join Date
Apr 2014
Location
US
Posts
25
I am in the process of trying to create a Modbus buffer in a Schneider M340 PLC. My intent was to have all of the tags with Modbus addresses in one place, and then assign in one section with the := operator. I realized after completion it may not be that simple, as I can (and do) already read and write to a Modbus address in the PLC. I am essentially trying to do the following:

PLC_Program_Tag := Tag_With_Modbus_Address
Tag_With_Modbus_Address := PLC_Program_Tag

Which I know will not work.

I'd like to be able to read from, and write to the Tag_With_Modbus_Address. Any ideas?
 
take a look to read_var and write_var blocks, there is also others blocks for writing/reading to/from modbus slave.
 
It is a common performance improvement to group the Modbus addresses together just like you are trying to do. Maybe you want it for another reason, but under very heavy loads this can have a significant performance improvement.

When you declare the tag variables in the editor, did you know you can assign a Modbus address here as well? So PLC_Program_Tag_xxx would be located, as in identified by either tag name in the program or memory address, with the memory address allowing for direct Modbus access over a network. It looks like you describe a pure PLC tag, unlocated, and linking this to a located tag, so this seems to work for you.

What you describe is commonly done with the RSLogix5K series of controllers because of the way they update during a scan (asynchronous). Schneider is always synchronous, so it's technically not necessary except maybe you want to do it for other reasons.

After all of this, if you execute your first line at beginning of scan and the second line at end of scan, not sure why it won't work. You would copy over all variables to a local store, use them, and then copy them back to the IO block at the end. However, IO block won't change during the scan so you really don't need to worry about that. As a server for Modbus operations, the network clients will only see the value from the end of the last scan no matter which method you choose. Server communications (reads or writes) can be shown to be executed at the end of each scan, and only then.
 

Similar Topics

Hello Everyone, I am using a raC_Opr_NetModbusTCPClient AOI module, as below,. So, I need some assistance to restrict in reducing the poling...
Replies
2
Views
114
I want to communicate my Q series PLC with Factory IO using GX works 2 software, I want to use modbus as server and the ips are as follows plc...
Replies
0
Views
83
Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
10
Views
346
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
125
Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
11
Views
292
Back
Top Bottom