Is there a pragma for init/instantiation of local variables in FB (like in Methods)

pernockham
2024-10-31
2024-11-05
  • pernockham - 2024-10-31

    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
  • pernockham - 2024-11-05

    Never seen VAR_TEMP before, but seems to be what I was looking for! Thank you!!

     

Log in to post a comment.