MSG reads from Micrologix - best practice

radfahrer

Lifetime Supporting Member
Join Date
Nov 2006
Location
Boston
Posts
156
I have a system where I need to read ~10 floats from an F file in a Micrologix that has 110 values, but the ones I need are scattered throughout the file (ie I need index 1,15,30,45,54,etc.). Does anyone know if it's more efficient to read all of them in one MSG instruction and just select the ones I need afterwards, or should I configure 10 MSG's and read them one by one? This is over Ethernet I/P.



Normally I would map them in the Micrologix to a contiguous array, but this is an OEM skid, and I'm not allowed to update their code, hence trying to figure the best way to do these reads.


Any tips appreciated...


-G
 
I believe it will be more efficient to read them all rather than hammer the comms port with multiple reads. It will be simpler on your side too, just one message with error handling and an interval timer. Comment the whole group on your side, so that someone doesn't come along later and think they are "spares".

I think the max number of integers you can read in one MSG from a Micrologix is an odd number like 103, from a SLC it is slightly more. I am not sure if that means for floats, you can only read half that many. In case you have issues with the MSG length, be prepared to break into two messages.

What type of hardware are you using to perform the MSGs? There could be limitations on whether or not you can even specify floats...
 
Last edited:
Definitely read them in blocks; the connection overhead far exceeds the extra data.

If the desired data all fits into one MSG instruction, great. Otherwise split into as many as you need.

If it were me, I would read the whole data file in two MSGs, and designate the local storage registers or array tags so that the element offsets match.
 
An Ethernet "packet" over CIP is 500 bytes of data, so that is equivalent to 500 SINTs, 250 INTs, 125 DINTs, or 125 REALs,

So a MSG read of 110 "Floats" from the Micrologix should fit into one ethernet packet, and it would not matter if you read 1 or 125 values, there would be no "hit" on the comms overhead.

Even if the data read was more than one packet, the messaging instruction would cope with it by requesting multiple packets until the data transfer was completed.

Summary : read the whole Float data-table, and just use the values you want.
 
Last edited:
Thanks for the info

Thanks a bunch for the info. This project also needs me to do some writes to their system, and in that case, I probably can't do the entire table, as will overwrite the addresses I'm not using. Will need to see if I can convince this OEM to actually set up their PLC for remote control (as opposed to just giving me a list of the internal registers they are using in their local control logic) with a dedicated table for me to write to.


-G
 

Similar Topics

Hello again. SoI need to read data from another controller every 60 seconds. I put in a TON and I get one read. I want to reset the same timer...
Replies
4
Views
3,132
Just for my own sake, wouldn't it be easier and make more sense for Target PLC's to do a message read and not have the Master do a write? That...
Replies
10
Views
3,870
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
106
I have an 1769-L16ER that I use to test code and I just found that I can't create MSG tags at the local program scope - they have to be done at...
Replies
4
Views
195
I have a client who periodically experiences network communication issues. Sometimes when I VPN into the site, their SCADA systems will flash comm...
Replies
2
Views
191
Back
Top Bottom