Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. cesar.loayza
  2. PLCnext Engineer
  3. Tuesday, 04 May 2021
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
Attachments (1)
Accepted Answer
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
cesar.loayza Accepted Answer Pending Moderation
0
Votes
Undo
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.
  1. one week ago
  2. PLCnext Engineer
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.