Im using a pointer as input for a FB and for convenience I like to use 'referenced' variable internally.
I use this setup in methods which works because internal variables are instantiated for each call. In a FB these variables are instantiated and initiated for the first call only. Is there a pragma/attribute available that changes this behaviour to mirror a 'method'-call?
Im using a pointer as input for a FB and for convenience I like to use 'referenced' variable internally.
I use this setup in methods which works because internal variables are instantiated for each call. In a FB these variables are instantiated and initiated for the first call only. Is there a pragma/attribute available that changes this behaviour to mirror a 'method'-call?
Last edit: pernockham 2024-10-31
Do you mean VAR_TEMP?
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_vartypes_var_temp.html
Never seen VAR_TEMP before, but seems to be what I was looking for! Thank you!!