login and webvisu

  • galexis

    galexis - 2019-11-14

    how to switch on a light on webvisu, when user is login ?
    Thanks for your help.
    Bets regards

  • marks

    marks - 2019-12-10

    I'm doing this one on one project, and it works well:

    // provide a readable user name, if there isn't one
    HMI.currentUser := WSTRING_TO_STRING( VisuElems.CurrentUserName );
    IF ( LEN( HMI.currentUser ) <= 0 ) THEN
    HMI.currentUser := 'None';
    _loggedIn := ( HMI.currentUser <> 'None' );

    Use _loggedIn as a Boolean variable driving a lamp/indicator state.

    Good luck,


  • dkugler

    dkugler - 2019-12-10

    Originally created by: D. Kugler

    You can set the property "Variable" of the lamp directly to the following: VisuElems.CurrentUserGroupId<>0
    UserGroupID 0 belongs to User "None" and appears if nobody is logged in.
    Don't forget to set the checkbox "Use CurrentVisu variable" in the General Settings of the Visualization Manager!
    The UserGroupID's are shown in the Visualization Manager:

    IMG: UserGroupID1.JPG

    IMG: UserGroupID2.JPG

    IMG: UserGroupID.JPG

  • galexis

    galexis - 2020-01-17

    Thank you very much . But I haven't go VisuElems.currentusergroup is variable....Library VisuElems is install.


Log in to post a comment.