POINTER variable

martin3885

Member
Join Date
Aug 2005
Location
Saarland
Posts
144
How can I declare a UDT with variable of a type POINTER? What value should I place in initial value(Anfangswert in German)(I think in English it is initial value, I work with german version of Step7)
 
You have to create another UDT to describe the layout of the pointer and then include this UDT in your first UDT

For example, I use the following UDT for an any pointer:

Code:
TYPE UDT190

  STRUCT	
   byS7Valid : BYTE ;   //0=null pointer, 10Hex=Valid S7 pointer
   byType : BYTE ;  //type, e.g 01=bool, 02=byte, 03=char etc. 0=null pointer
   iNumberOfItems : INT ;   //number of items of the type specified
   iDataBlockNumber : INT ; //data block number
   dwAreaPointer : DWORD ;  
  END_STRUCT ;  
END_TYPE
 

Similar Topics

Hello! Is it possible to copy pointer's pointing address to any variable at Siemens step7? I mean I have pointer address to db block with...
Replies
14
Views
15,650
Hello everybody, I have a problem with a indirect addressed Any Pointer. With a block move. The code below works fine but I want a Variable...
Replies
2
Views
1,542
Hello all, I need to store the pointer-address of a database in an “ANY” variable. How can I do this? Example: When a variable is equal to 11...
Replies
6
Views
2,698
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
570
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,646
Back
Top Bottom