keshik
Lifetime Supporting Member
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:
OR
Thanks in advance.
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
Code:
recipeArray[10] = CPS recipeWorking, length 1
Thanks in advance.