Copying UDT to a DINT?

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
I'm trying to reverse engineer a client's program. They are sending Logic Command and Speed Reference over DeviceNet to a PowerFlex 40P VFD.

The output is a DINT. The first word (0-15 bits) are the logic command. The next word (16-31) are the speed reference.

However the vendor who wrote the program decided to use a COP to copy their UDT of 16 bools and an INT directly into the Output DINT. I don't quote understand how Logix knows what bit is part of what word.

Here are some screenshots. The UDT is equivalent in size to a DINT, but I can't seem to figure out which part of the UDT corresponds to what bit when copied. Notice the INT is smack dab in the middle of the structure. Also the bits don't seem to match up (whether I go from MSB or LSB) per the PowerFlex documentation.

PS: It's in Italian :)

UDT.jpg Output.jpg
 
You are not looking at the UDT, you are looking at the tags which are arranged alphabetically, not by the order in the UDT. Look at the UDT definition.
 
DOH!

That was it. Makes sense now. Thanks Bernie. Can't believe I missed that.
 

Similar Topics

Hello all! Is it possible to COP a SINT array to a UDT structured the same as a SINT array, except all BOOL bits? I have a module that has an...
Replies
5
Views
3,174
I created a UDT with recipe parameters and have created several Recipe tags using that UDT as a data type, as well as an "Active_Recipe" tag. if...
Replies
1
Views
1,751
Hi All, In RSLogix 5000 (or Studio 5000), is there a way to easily copy all the tag values from an UDT instance to another UDT instance (same UDT...
Replies
2
Views
2,345
I have an application where I am allowing the user to edit 4 different XY value tables using 2 columns of numeric indicators on the Panelview. I...
Replies
4
Views
3,748
I'm not super familiar with the Micrologix line of processors, but I am pretty familiar with RSLogix 500. I'm trying to simply copy a string to...
Replies
4
Views
305
Back
Top Bottom