Cannot declare Output Variable in Method

Hi, I am using PLCnext Engineer version 2021.3 I am trying to create a ‚method‘ and I am able to declare Input and Local variables but cannot declare Output variables. I should be able to create variables declared as Outputs but the Usage list only has ‚Input‘ and ‚Local‘ available to choose. Could you please let me know why is this happening? Thank you in advance

Hi Cesar, Methods, like functions, do not have output variables in the same way as function blocks. Like with functions, on methods there is a „Signature“ tab where you can specify the type of the one-and-only return value from the method. This return value can be a user-defined type, like a structure, so that is a way of getting multiple return values from a single method. Hope this helps. ~ Martin.

Hi Martin, Thank you for the reply, I was confused on how to create a user defined function block so it is all clear now.