SD_Scott
Member
I'm trying to view the number of bytes in an ANY pointer. If I have an array that consistes of DINT data, the number shows up as 1 byte. If I creat a UDT with one DINT and use that in an array it shows up correctly as 4 bytes.
L P##SourceData //Load ANY type pointer
LAR1 //Load it in AR1
L W [AR1,P#2.0] //Rep.factor
T #Length //Xfer to #Length
This array shows only 1 byte as the length of 1 DINT
Array_Of_Data ARRAY[0]
DINT
This shows 4 bytes as the length of 1 DINT
Array_Of_Data ARRAY[0]
"Test_UDT_2"
L P##SourceData //Load ANY type pointer
LAR1 //Load it in AR1
L W [AR1,P#2.0] //Rep.factor
T #Length //Xfer to #Length
This array shows only 1 byte as the length of 1 DINT
Array_Of_Data ARRAY[0]
DINT
This shows 4 bytes as the length of 1 DINT
Array_Of_Data ARRAY[0]
"Test_UDT_2"