hi all
I have a FB with IN/OUT variable.
Inside the FB, I want to get the address of the IN/OUT variable.
If I use __SYSTEM.VAR_INFO, I get the address of the FB copy rather than 'external' variable.
Not knowing exactly what you want to accomplish, you can try to use
VAR_INPUTMyVar:POINTERTOBOOL;END_VAR
MyVar contains the address of your referenced variable, and MyVar^ dereferences it allowing you to access the value. If this doesn't meet your needs, could you add more detail on what you are trying to accomplish?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi all
I have a FB with IN/OUT variable.
Inside the FB, I want to get the address of the IN/OUT variable.
If I use __SYSTEM.VAR_INFO, I get the address of the FB copy rather than 'external' variable.
This give me the address of MyVar but I actually want the address of the variable passed to MyVar
Any clues please??
thanks, ph
Last edit: ph0010421 2025-01-24
Not knowing exactly what you want to accomplish, you can try to use
MyVar
contains the address of your referenced variable, andMyVar^
dereferences it allowing you to access the value. If this doesn't meet your needs, could you add more detail on what you are trying to accomplish?to get the address just use ADR( )
variables defined in a VAR_IN_OUT block are references pointing to the passed variables.
thanks...I changed to I POINTER which is perfect.