Arrays in RS5000 v17 using udts

Join Date
Oct 2009
Location
Mich
Posts
2
I need help in creating Arrays in RS5000 v17 using udts.
I am very new to RS5000 and do not have the savy to pull this off by myself.
I need to create an HMI that is 100 percent driven from the PLC.
I need help in the most common and effective way of doing this task.
Can someone please explain, and maybe give me an example to follow.
Your help would be greatly appreciated.
Karl Douglas
Sr. Controls Engineer
Crystal Engineering Solutions
32355 Howard Street
Madison Heights, Michigan 48071
Phone: 248-588-1390
Fax: 248-588-1391
CELL: 248-797-8198
[email protected]

[FONT=&quot]www.crystaleng.com[/FONT]
 
From what I can tell you want to create an array of a UDT type. The first thing you need to do is create your UDT. Once you have that you can create an array using that UDT as the data type.

Now, what this has to do with 100% control of an HMI I'm not sure. How you use that array once you have it is up to you.

Keith
 
I need to know how to broadcast it to the HMI. I have the udt written with all the ascii strings that the hmi will display, my problem is how to get them there.
My udt name is "u_HMI_Station_Action.L5X"
What do I need to do to send it????
Karl
 
Last edited:
A UDT is like a native data type (INT, DINT, STRING) except that it is User-Defined (meaning you customize the structure).

Just because there is an INT data type, does not mean there is an INT tag available on the controller. This applies to your UDT. In order for your HMI application to see your UDT, you need to create a tag of the data type.

So if your UDT is named:
"u_HMI_Station_Action"

When you create a tag, you should be able to select "u_HMI_Station_Action" from the data type list (you can also then choose to make it an array of your UDT if you wish).

Since you already have your custom .L5K file, make sure you import it to the project. Right click the UDT folder and "Import Data Type"

Now go to the Controller (or Program) tags screen and create a tag as normal, then select your UDT from the list.

You must use members of that structure as you would their natural data type. (IE: If My_UDT.SpareBit is a Boolean, I can only use it that way).

EDIT: Forgot to crop my screens, whoops.

Notice I have a Custom UDT named CM_Ain, and in my screen I made a tag called My_UDT and set it as type CM_Ain.

Import.jpg Tag.jpg
 
With your HMI software, you'll set up tags that point to specific data points on your PLC. This usually occurs through some database of tags which talk through an OPC server (or RSLinx).
 
And more than likely, your HMI will not support the UDT as a single entity. Let's say you have a UDT defined as 5 strings (members String1 to String5) and you then create an array of 10 of these called MyUDT. The Data structure will be as follows:

MyUDT[0].String1
MyUDT[0].String2
MyUDT[0].String3
MyUDT[0].String4
MyUDT[0].String5

all the way to


MyUDT[9].String1
MyUDT[9].String2
MyUDT[9].String3
MyUDT[9].String4
MyUDT[9].String5

Your HMI will not have one tag to bring all that data in (well, if it's Wonderware you could use a supertag but you still have to define all the sub-elements). Your HMI will still need 50 string tags with each tag pointing specifically to the string you need (ie MyUDT[6].String2).
 

Similar Topics

Two questions for GE/Emerson e.g. PACSystemsRX3i (CPE330): 1. Is it possible to use 2D arrays inside a function as a local member? (I can only...
Replies
0
Views
49
Hi. This is pretty basic but I'm struggling to find an efficient solution. I have a float value of let say 666.555 that I want to move / split...
Replies
3
Views
214
Hello. I've been using the answers in this forum for a while now, so thank you. Usually I can find the answer I'm looking for with a basic...
Replies
8
Views
760
Hello, first time poster here! A belated "thank you" for the direction I've already received from this forum! So, can I do this? Move value 1...
Replies
6
Views
724
My first real attempt at utilising the AOI function in Compactlogix. The issue I'm having is, I have an array of INT[400], but in my AOI I'm only...
Replies
1
Views
463
Back
Top Bottom