UDT's for Dummys

MDavidson

Member
Join Date
Mar 2007
Location
Vancouver
Posts
23
Hi All
I am embarking on my first project using RS logix 5K (ver. 15.02). The customer has a format in place, and has graciously forwarded a copy of the sample program for me to copy / modify / mangle.
Included in their program is the UDT's they wish me to use. When attempting to import the UDT's and modify them to suit the process, I found that the Data Type in their sample had the same name as the UDT, while the sample I imported showed as DINT, when I selected the afore-mentioned named DATA TYPE I was informed that my array size exceeds 2MB.
What small animal am I supposed to sacrifice to make this error go away!?
Regards Mike
 
I prefer snowy egrets.

Sometimes users will create a tag that coincidentally has the same name as a UDT, as an example of that UDT's usage. That's no problem.

It sounds like you are creating an array of tags which are of a UDT type, and RSLogix 5000 is objecting to the size of that array. Tag arrays, as the software has advised you, can't be more than 2 MB in size. It doesn't matter if the array elements are DINTs or INTs or EXHAUST_PORT_SHIELDs.

Could you post a little more detail, like the actual name of the UDT and maybe a screenshot of it ?
 
Hi Ken,
Thanks for responding. In the customers project the UDT is called "CONVEYOR". It has a variety of elements to it and the descriptor screen states its size as 3724 bytes. I suspect that the issue is the way I am implementing the UDT in my program.
What I have been doing is pulling the UDT into the Controller Tag List and renaming it to suit the section of machine I am controlling. However when I go and look at the indivdual elements in the newly named UDT, the naming structure has changed from the listing done by the original programmer.
Instead of PE01, PE02, etc., I get CONVEYOR.0, CONVEYOR.1, etc. When I compare the two UDT's the only difference I can see is the name of the data type. In the original program the data type is identified as the original UDT (CONVEYOR), in my program the cut and pasted UDT's data type is identified as DINT.
When I attempt to change the data type to match, and yes there is a data type in the draw down list called "CONVEYOR", I get the oversize error.

Regards
Mike

PS. Sorry I have never done a screen shot, is there a link to learn this technique?
 
Why are you changing the UDT name???

The variables you create that use the UDT should be the identifying text, the UDT shold remain the same and named the same. The only reason to create new UDT's is if the contained structure changes. Even then if the changes are small it may be worth having just one that fits all.
 
Hello MDavidson;

is there a link to learn this technique

At the top of the page, there is a FAQ link; there you could have found this:

http://www.plctalk.net/movies/display-pictures.html

Basicaly, the trick is to capture the picture you wish to display from your screen. Easiest is to use the PrintScreen key on your keyboard, once you see what you want to show on the forum; then open Paint and Edit/Paste the screen you have captured; edit the picture so it fits within the limits imposed by the site, and save as a jpg format. Then display as shown in the tutorial above.

For example:

FAQ_PLCsNet.jpg



Hope this helps,
Daniel Chartier
 
A nice screen capture utility i use is MWSnap, you can capture parts of a screen and adjust quality on saving and save as jpg,tiff,bmp and png.
 
If you open up the UDT definition under Data Types - User Defined, does it have a valid size? If not, it has another UDT embedded within it that you don't have defined.
 
Thanks to DOUGRB.
There are 33 UDT's in the customer supplied project, and there are elements of at least 6 different UDT's embedded in the CONVEYOR UDT. Once I imported all of the UDT's the problem went away.
I was not trying to change the name of the UDT, I was trying to create a named data set using the UDT template. The problem arose when the data type CONVEYOR had undefined elements.

Regards
Mike
 
As a final note, the imported UDT showed as an identical size when the UDT data type was opened, even though some of the elements had yet to be defined. The error did not show until the UDT template was actually implemented in the Controller Tag window, I found that to be a little misleading on the first pass.


Mike
 
Thanks a gig for the tip. I normally use alt+prtscr but looks like this MWSnap will be more useful.
Well here's a tip from me too. for backing up my files, i use FileSync. If anybody wants it I'll post it later on, just let me know. It's a shareware and works for 98, 2000, XP, very handy for synchronizing files.
 

Similar Topics

Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
94
I am trying to copy an array of real numbers into a UDT with a real data type element. I have attached a snip below showing my COP instruction...
Replies
4
Views
199
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
124
Does anybody have any samples of how to "Create and Use" UDT's in CCW Developer Edition? (I am using v22) I can't find any information from...
Replies
3
Views
300
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
544
Back
Top Bottom