ANY pointer repitition factor

SD_Scott

Member
Join Date
Feb 2006
Location
South Carolina
Posts
176
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"
 
The repetition count is the quantity of the type specified in the any pointer.

In your first example, there is 1 DINT

In your second example UDTs are always shown as a number of bytes
 
Last edited:

Similar Topics

I have a word in some DB which I want to load to AR1 and use as a pointer. In order to do this I need to write L DBxy.DBW xy SLD 3 LAR1 I...
Replies
3
Views
533
I am trying to access the value of a pointer via OPC UA in Codesys. I can share it directly and in a struct but I cant access the value of it when...
Replies
5
Views
1,610
Why does my deconstruction of the input pointer only work with its own instance DB not inside the multi instance FB...See .doc The pointer at the...
Replies
8
Views
2,342
Hi All, in many library function of TiaPortal some data must be write using the pointer format........ eg.: P#DB90.DBX0.0 WORD 10 is it...
Replies
5
Views
2,818
I have a very strange issue and I cannot figure out why it is not working. I read input of type pointer and store it to local temp type any. I...
Replies
4
Views
1,930
Back
Top Bottom