Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Problem using Parameter Manager

tbarham
2006-10-09
2006-10-10
  • tbarham - 2006-10-09

    I have many variables I need to keep track of, so I decided early on that using structures would be the best way to organize things. I have several arrays of structures defined as global variables:

    VAR_GLOBAL
      Comp : ARRAY[0..UBound_CompNum] OF struct_Component;         (* Non-retentive component variables *)
      CompR : ARRAY[0..UBound_CompNum] OF struct_Component_Retentive;   (* Retentive component variables *)
      stGlobal :  struct_Component;     (* just for testing *)
    END_VAR
    

    Now I want to figure out how to use parameter manager to allow sharing these variables over the CAN network. I've successfully created a "Template parameter list" based on a structure, and I can even create an "Instance parameter list" using that template -- but only if the "Base Variable" is in a POU. For example, if I define a structure "stComp" in PLC_PRG, then I can use "PLC_PRG.stComp" as the base variable for a new instance parameter list. However, if I instead define "stComp" as a Global variable, then I can NOT use "stComp" as the base variable. What am I doing wrong?

    IMG: ThisDoesNotWork_2.jpg

    IMG: ThisWorks.jpg

     
  • tbarham - 2006-10-10

    Well, it looks like I have the global variable problem solved. Simply by putting a period in front of the global variable name it was accepted as the "base variable".

    But now that I have that set up, I'm not getting any communication of the variables between the two PLCs. I've set up identical templates and instances in the Parameter Manager section for both PLCs -- with one having all components as "read only" and the other having all components as "write only". How do I initiate a transfer of data? I initially guessed that transfer was automatic and happened whenever a variable was changed or maybe requested -- but that doesn't appear to be the case.

    Is this just another case of me missing something really simple?

     

Log in to post a comment.