CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Feb 18, 2020 7:40 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: login and webvisu
PostPosted: Thu Nov 14, 2019 6:58 pm 
Offline

Joined: Fri Jun 26, 2015 6:23 pm
Posts: 50
Hi,
how to switch on a light on webvisu, when user is login ?
Thanks for your help.
Bets regards


Top
   
 Post subject: Re: login and webvisu
PostPosted: Tue Dec 10, 2019 8:57 pm 
Offline

Joined: Thu Oct 18, 2018 2:11 am
Posts: 4
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';
END_IF
_loggedIn := ( HMI.currentUser <> 'None' );

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

Good luck,

Mark


Top
   
 Post subject: Re: login and webvisu
PostPosted: Tue Dec 10, 2019 11:32 pm 
Offline

Joined: Thu Aug 04, 2016 4:21 pm
Posts: 55
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:


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: login and webvisu
PostPosted: Fri Jan 17, 2020 1:40 pm 
Offline

Joined: Fri Jun 26, 2015 6:23 pm
Posts: 50
Thank you very much . But I haven't go VisuElems.currentusergroup is variable....Library VisuElems is install.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited