User Management

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

    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

    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

      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

       
  • m.prestel

    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

    sedoerr - 2020-12-14

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

     
    • suyash

      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

    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

     

Log in to post a comment.