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

User Management

suyash
2020-12-14
2020-12-14
  • suyash - 2020-12-14

    Hello!

    I implemented user management in my project that I am running on Raspberry Pi. When I login to a certain user(say admin), It gets logged in successfully, but continuously flickers the visuelems.CurrentUserName between admin and ''(no user).

    FYI,
    1) I have not used auto logout.
    2) I have not written/forced the visuelems.CurrentUserName or visuelems.CurrentUserGroupId variables anywhere in my project
    3) I am running my Visu task cyclic at 200 ms and priority = 5

    I am not able to figure out the reason for this. Requesting for any guidance for the same.

    Best Regards,
    Suyash

     
  • m.prestel - 2020-12-14

    Hello @suyash,

    please attach an example project so it would help everyone understand the issue better.

    Best regards,
    Marcel

     
  • sedoerr - 2020-12-14

    Do you have more than one Webvisu connected with your PLC?

     
    • suyash - 2020-12-14

      I use it on 3 devices (not simultaneously), but it is giving the same problem when only 1 client is connected.
      I also disconnected my only client and viewed it(on VNC) on localhost .
      Also tried reducing the 'Maximum Number of Visualisation Clients' from 100 to 10.
      Still no positive effect.

       
  • suyash - 2020-12-14

    Dear Marcel,

    I deleted all my confidential part of the project and attached the project here.
    The .bmp files are not attached, hence the images on the buttons will appear blank.

    The I have attached a screenshot pointing to the login rectangle, which when clicked pops up the login popup
    User names and passwords are -
    operator: ope
    service: ser
    admin: 1994

    Best Regards,
    Suyash

     
  • m.prestel - 2020-12-14

    Hello @suyash,

    this problem occurs since you are accessing VisuElems.CurrentUserName outside of the visu task.
    Curing the visu cycle VisuElems.CurrentUserName will correctly contain the username of the logged in user.
    After the cycle (between the 200ms interval) VisuElems.CurrentUserName will contain the username of the last client.
    This will not be correct for the first client.

    The solution is to call a function in the color variable (see attached screenshots)

    Best regards,
    Marcel

     
    πŸ‘
    1

    Last edit: m.prestel 2020-12-14
    • suyash - 2020-12-14

      Dear Marcel,

      Bravo! Thanks a lot!!
      Did not have the slightest idea that the user management part would be dynamic , different for every client ..

      Best Regards,
      Suyash Thatte

       

Log in to post a comment.