[Logix] UDT for MSGs between Control and Compact AB PLC

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hi guys,

Quick question for you; I am working on some MSGs between PLCs at the water treatment plant I'm working on (no produce/consume tags, MSG only). When I first created the MSGs between the well pumps and the tank sites, I was brand new to AB so I manually packed and unpacked all the data, but now that I know more I'm thinking a UDT might be more efficient; was wondering what you guys would suggest; do I spend the time setting up the UDT, or should I just manually pack my BOOL, DINT, and REAL manually? It's probably not going to matter but the reason I ask is for efficiency; I use UDTs for all the equipment in the PLCs (pumps, sensors, etc) and I usually only need one or two BOOLs for each piece of equipment to be sent (pump run bits, alarm bits, etc). It seems rather wasteful to send all that data back and forth when only a few bits are typically needed (each pump is 304 bytes for example). Would it be worth manually packing the MSGs to save comms time, or am I overthinking this?

Thanks!
 
Last edited:
Depends on how much it changes. I prefer UDTs simply for clarity sake. So I'll adapt them based on the project and the comm needs. Downside is they are harder to change when commissioning and you realize you need to pass additional info.

However, if you have an established method of handling your messaging, then manually packing the data outside of that logic allows you to standardize some code from project-to-project which might have value. You can reserve for future expansion w/o much added overheat.

I doubt you'll gain much in terms of efficiency.
 
Thanks for commenting. I think I'll stick with manually packing, I made a list of everything I need to move between two panels and it's actually pretty minimal; would take more time to deal with the UDT instead of just manually doing it. In the future, I'll try UDTs.
 
I typically create a UDT with a connection status, DINT called BitData for 32 BOOL's, and array of REAL's. Give myself plenty of spare space, and then life is nice and easy at both ends.

The connection status doesn't really come into play with MSG instructions, but that way if you ever use produced/consumed you can use the same UDT and you don't have to worry about heartbeat monitoring.
 
I use UDT for messaging a lot these days. I try to keep the UDT size so it fits in one message transmission to keep the traffic down. Usually a half second is fasted enough for most data between PLCs. I also add a handshaking word. Basically a ring counter in each PLC, then test it at both ends to make sure its updating. Then alarm/stop if its not.
 
I use UDT for messaging a lot these days. I try to keep the UDT size so it fits in one message transmission to keep the traffic down. Usually a half second is fasted enough for most data between PLCs. I also add a handshaking word. Basically a ring counter in each PLC, then test it at both ends to make sure its updating. Then alarm/stop if its not.

I've been meaning to look into a scheme that does "handshaking", but I've been a bit busy and it's been low priority. Would you mind describing in more detail your method?
 
What you are referring to is more known as a "Heartbeat" than a "Handshake", for monitoring the connection status between two controllers.

There are many ways to try to achieve this but here are a couple of examples from Rockwell themselves which I've posted before...

http://www.plctalk.net/qanda/showthread.php?t=96377

If packing up MSG data into a UDT then I would follow the Produce/Consume model in name by creating a similarly named tag "Connection_Status" at the beginning of the UDT which can simply be your integer tag you use for any of the above linked Heartbeat methods.

Regards,
George
 
What you are referring to is more known as a "Heartbeat" than a "Handshake", for monitoring the connection status between two controllers.

There are many ways to try to achieve this but here are a couple of examples from Rockwell themselves which I've posted before...

http://www.plctalk.net/qanda/showthread.php?t=96377

If packing up MSG data into a UDT then I would follow the Produce/Consume model in name by creating a similarly named tag "Connection_Status" at the beginning of the UDT which can simply be your integer tag you use for any of the above linked Heartbeat methods.

Regards,
George

Thanks a bunch! Will check that link and read up.
 

Similar Topics

Hello, Wondering if the following setup would work. 1. Local PLC on the network has an array of 25 REALs 2. Supervisory PLC on the network needs...
Replies
14
Views
1,815
I have a task that could easily be solved using a 2-dimensional array using a ControlLogix processor, V32+. Basically it will loop through two...
Replies
23
Views
4,331
Can I not access locally defined UDT data? Scope.. Task>Prog1>Parameters and Local Tags(Test1 = real)(UTD.Test2 = real) #To access the local...
Replies
10
Views
1,495
Hi there, I am doing work for a customer who has a UDT that uses parameters like this: PLC_REG_TO_SEND.GROUP_15.1234_DINT[1].0 I believe these...
Replies
5
Views
1,794
Hello, I'm writing an interface program to a machine and because the bit data is packed into 16 bit variables, it's nicer to create an UDT to...
Replies
16
Views
4,921
Back
Top Bottom