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

Defining local variables that can be independent with several users.

Automa
2023-09-04
2023-10-21
  • Automa - 2023-09-04

    Hi, I am looking for a way to define a local variable that will be multi user independent. This is so several user can connect at the same time select frames independent of each other.

     
  • rickj - 2023-10-21

    You need to create an array with one element for each possible user. I usually define these arrays in the root screen.

    FrameIndex : Array [0..MaxUsers] OF INT;
    

    Then use the global CurrentClientId (defined by one of the VISU libraries) to index the array element used to select the frame.

    FrameIndex[CurrentClientId]
    
     

Log in to post a comment.