Logix5000 UDT Resize and Copy

keshik

Lifetime Supporting Member
Join Date
Jun 2011
Location
Portland, OR
Posts
408
Hello,

I'm using Logix5000 v24. I've got a large array of an UDT that I'm using for a recipe. I recently added a few more tags to the recipe UDT and am noticing weird behavior when I perform a CPS instruction with it. These new tags were added to the end of the UDT list, not the middle. I have another instance of this UDT that I'm using as a working copy (to edit on the HMI and to run the program with).

When I issue a CPS command the UDT elements that were added later are sometimes not copied over (they have the value of 0.0 - they're REALs). Is there a good way to force the UDT array to recompute the length of the UDT so that it copies the whole thing over (I assume that this is what the issue is).

To summarize the tags:
recipeArray : recipeUDT[100]
recipeWorking : recipeUDT

To summarize the logic:
Code:
recipeWorking = CPS recipeArray[10], length 1
OR
Code:
recipeArray[10] = CPS recipeWorking, length 1


Thanks in advance.
 

Similar Topics

Hello, I'm trying to copy the entire value of a UDT base tag to an element of an array of another UDT containing an element of the first UDT...
Replies
7
Views
1,674
Can't seem to delete some UDTs that are not used and will never be used. Delete is grayed out when right clicked. No members of the data type...
Replies
6
Views
3,045
I've noticed that for nested UDT's in RSLogix5000 (v20), only the top-level description is passed through. Can this be changed so that the...
Replies
0
Views
1,813
Does anyone know if there is a way to reference the number of elements in UDT programmatically in a COP statement so I don't have to update the...
Replies
8
Views
5,585
Hello, I have a UDT in my main RSLogix5000 program called "Servo", it consists of the following; Servo Axis01 I have an L5X (rung export)...
Replies
4
Views
4,726
Back
Top Bottom