User-Defined Data Type Help Needed

JoseM

Member
Join Date
Jul 2011
Location
Texas
Posts
381
Guys, I need some advice. I'm trying to use for the first time "UDT" on a CLX processor. I have this pneumatic valve with an E/P transducer that I'm going to control to modulate water flow going into a holding tank.

I've never done this before and I'm trying to figure out which members I need to add to the "UDT DATA" table. I'm using a 1794-OF4I and when I configured it to the Flex I/O adapter, it shows to have 8 input Bytes and 10 output Bytes.

I’m trying to configure those up into the UDT array. Can you guys offer me some assistance please.
 
First of all, manuals are your friends:

http://literature.rockwellautomation.com/idc/groups/literature/documents/in/1794-in037_-en-p.pdf

Starting at page 3 there is a comprehensive definition of the input and output data.

To setup your UDT you have to decide from what perspective you want to look the data it will represent. I see two possibilities here.
You can create the UDT as the module, basically recreating the tables shown in the manual, or, and that's what I would go for, pick all values that are bound to a channel and create an array of the resulting UDT. The Output word 5 makes that a little tricky, but nothing that a BTD can't handle. Adding comments to the module data helps me a lot identifying what my UDT has to look like. It further helps when you need to change the configuration or troubleshoot the module a year later.

Hope that didn't confused you more then you were before. Look and the manual and see what you can come up with. Maybe someone else here has a perfectly matching UDT, you shouldn't be the first to use this module ;)
 
I just fiddled around with this for a while, trying to add this module to a 1794-AENTR...
When I configured the module the following module-defined datatypes were created:

Input Data: AB:1794_OF4I:I:0
Output Data: AB:1794_OF4I:O:0
Configuration: AB:1794_OF4I:C:0

You can create tags (or a UDT that combines them into one structure) with these datatypes and map them to the respective In/Output data of your ADN. Dont know for sure if this is the way to go though, never had to do it before...
 
Last edited:
Okay, so the manual for this module is going to list what address is what. You will then create tags from those addresses. I'm not sure exactly what tags you will need.

For instance:
Do you need to look at status bits to throw an alarm if the coms drop out to the card? Is it vital? Etc.

If you only need the data then find out which addresses hold the data from the ADC. Then make a new tag of the same data type and alias it to the data you need from the incoming card. Then you are able to use the tags you made in your logic.

Note that it is not necessary to create additional tags to hold the data from the card, but I prefer that method for clean/readable code. Also if you ever have to change the input you just change where your alias is pointing to and you are done.

If I remember right, for some reason you can't create a UDT and alias it directly to the addresses in the tag editor. You would make a UDT and then have logic to copy over the data you need for the UDT. A UDT is essentially a class in computer programming terms and has to be "fed" the data it needs to work with.
 
This is what I have being able to piece together,

Inputs
Ch0_ReadBack (1:I.Data[26].0-15)
Ch1_ReadBack (1:I.Data[26].16-31)
Ch2_ReadBack (1:I.Data[27].0-15)
Ch3_ReadBack (1:I.Data[27].16-31)

Outputs
Ch_Config (1:0.Data[3].0-15)
Ch0Data (1:0.Data[3].16-31)
Ch1Data (1:0.Data[4].0-15)
Ch2Data (1:0.Data[4].16-31)
Ch3Data (1:0.Data[5].0-15)
 
Last edited:
I'm not sure what the readbacks are for, but you most likely want output data. The readbacks would be used for something like a PID, or if you have logic that reads the current value of the output to determine something else.

Here is an example RSS file I made with the FlexIO module you are using with an example of using alias tags and using a UDT and some explanations on why you may want to use one or the other.

Remember a UDT is the framework for a tag. It tells you what is in the tag, what kind of data, etc so that it can all be stored in the processor's memory. Chances are you don't need a UDT for this module, just aliased tags.
 
The email rejected the attachment, go ahead and try again.

You have to extract the contents of the zip file to get the RSS file inside of it.
 
Last edited:
sparkie, I cannot open this zip file. It's faulting out every time I try. I did it in several computers with the same result. Sorry for being a pain. So the email didn't work, [email protected]
 
Hi sparkie,

I know how to extract files from a Zip folder. The issue is that its giving me a fault that says that the folder is empty. Again, I hate to be a pain but perhaps I don't have the feature to download files from this forum because I'm a "Free Member"? That would explain the reason why it's not cooperating.

Did you try again to send it to my email, [email protected]? Thank you so much for the assistance and patience.
 
Last edited:
Sorry about that. I had an incorrect setting with 7zip. Here is a file I tested before I uploaded this time.
 
... perhaps I don't have the feature to download files from this forum because I'm a "Free Member"?
That limitation doesn't exist.

I downloaded the file, uncompress and compress it in a new one. If you're using Win7 or superior, try unblocking the file (properties --> general --> unblock).
 
Here is the application where I want to use some of these options like UDT, AOI and PID. I will be very grateful for some explanation of the procedure to set up a PID module in CLX.

Level_Control.PNG
 

Similar Topics

Hi all, is there an easy way to reset a user defined shift register to 0? i have a data type containing 8 bools for an array of 10 and would like...
Replies
12
Views
3,185
Hello everybody. Currently I am doing a project for my masters degree in EE, and one of my tasks is displaying data log on a user defined web...
Replies
0
Views
2,694
Hi, I am a complete newbie to PLC programming. I have been asked to create a database for program modules which in future can be useful in saving...
Replies
1
Views
1,964
hello every one as i am new to this forum i want to know detial of udt in rslogix 5000 does all tags in udt get in my program? if i have to write...
Replies
6
Views
15,971
Is there a command that you can use against a UDT that will fill it with zeros? Of course the UDT has dint, bool and strings... EX: FLL...
Replies
14
Views
11,275
Back
Top Bottom