how to switch on a light on webvisu, when user is login ?
Thanks for your help.
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.
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:
Thank you very much . But I haven't go VisuElems.currentusergroup is variable....Library VisuElems is install.
Log in to post a comment.