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

  1. seg_rolgar
  2. PLCnext Technology & PLCnext Controls
  3. Wednesday, 09 June 2021
Hello,
I am having issues to store what I read from modbus register. I am reading a modbus register and have the value in the arrRegisterValue[1], however, I can't store this into a local variable.
How can I do that?
I have tried with the next:
word_received := udtExample.udtMB_TCP_FC3.arrRegisterValue[2];
word_received := MOVE(udtExample.udtMB_TCP_FC3.arrRegisterValue[2]);

Thanks in advance

Best regards,
Accepted Answer
seg_rolgar Accepted Answer Pending Moderation
0
Votes
Undo
Hi, Ok, problem is solved! My fail was I have an IF-ELSE condition that never fullfil!
Both methods are valid.
seg_rolgar Accepted Answer Pending Moderation
0
Votes
Undo
I forgot to say that I am reading two registers, arrRegisterValue[1] and arrRegisterValue[2] and I need to save into variable both.
  • Page :
  • 1


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