Studio5000 UDT. How to copy to DINT or other datatype??

hardaysknight

Lifetime Supporting Member
Join Date
Dec 2015
Location
Southeast USA
Posts
117
The PLC program I'm monitoring has a UDT of alarm booleans. 36 in total. What I'm trying to do is monitor a few rungs, and also monitor a possible flickering alarm. Now normally, I'd have these alarms latch in so we can catch them, but this program is complicated and full of custom AOIs and UDTs and making 36 latch rungs is tedious, so I figured that maybe there's an easier way. What I'd like to be able to do is copy the Alarm UDT to a DINT or another datatype, so I can put it in line with a few other test rungs I'm watching to see what number alarm boolean is turning on.



I realize there are other ways to do this, but this would also be a learning experience for me as I rarely ever use or see UDTs


Attached is a picture of the Alarm UDT setup, and a picture of what I'd ideally like to be able to do.

UDT.png Test Rung.png
 
Probably a better way than 36 rungs, but if it'll work best for you just build them in excel. Break the following into three columns. Do the first and second row then click and drag to auto fill all 36. Don't forget the leading space on SOR and before OTL. Concatenate that entire range starting at top left and fending at bottom right. Copy that concat result and paste as plain text somewhere then copy and paste into command line in logix. All 36 rungs done in a minute. I used a bool array for the test bits so you only have to define one tag.

Three columns broken up.

SOR XIC Alarm_History.NO_1
OTL Test_Alarm[1
] EOR
 
Last edited:

Similar Topics

Hello, I have been looking for a reference for the order that a UDT is copied in the COP instruction. More specifically - I have a set of code...
Replies
5
Views
550
Hi all, Working on a project in Studio 5000 setting up a UDT to read an Input Instance from an EIP device. I have everything set up and it's...
Replies
2
Views
889
I have a Structure in my project which has a few nested UDTs. They are ultimately of type DINT. What I would like to do is copy the values out of...
Replies
5
Views
2,252
Is there a way to organize the tags that aligns with the UDT instead of alphabetically? See attached. I'd like the 'Tag' values to go from 0 to...
Replies
5
Views
2,003
Hello Everyone, I'm new to programming and was looking for some assistance. As a quick overview there is a SCADA system that sends commands to...
Replies
8
Views
2,334
Back
Top Bottom