Siemens S7/TIA v18: Screen idle / Lock screen implementation......

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
Hi,

Can anyone help me on this?

I want to implement a "screen lock" (HMI is KTP1200 Basic).

e.g. if the person who's logged in, leaves the screen idle for say 30 minutes, a simple screen lock page appears, with the text "Screen locked by <user>, Enter Password to continue".

When p/w is entered, the user is returned to the screen they were on prior to the screen locking. i.e. just like with your PC/laptop.

Do I need to change anything on this page? See pic.

User Administration.png
 
I created this SR block, the output of which is a Boolean which tells me when the Login Screen should be activated.

Is there some way I can use this output to make the Login Screen (which is Screen #1 in my case) to become active?

Thanks

SR block to activate logic screen.png
 
Cancel all that...It was a lot simpler that I thought.

I changed it so that the User is automatically logged off after X minutes of screen idle time.

Then I can use ActivateScreen to do what I want, based on the UserChange trigger.

ActivateScreen.png
 
Last edited:
Cancel all that...It was a lot simpler that I thought.

I changed it so that the User is automatically logged off after X minutes of screen idle time.

Then I can use ActivateScreen to do what I want, based on the UserChange trigger.

Hmm, that didn't work :(

Basically, what happens is this:
1. Nobody logged on: GroupNumber=0
2. User logs on: GroupNumber=1
3. UserChange is activated and Login screen reappears, i.e. User logged off again! Go back to 1.

And so on, and so on, stuck in a cycle :(
 
Dont add the last action Activatescreen to the event userchange.
As you have found out any user activity will trigger all the actions.
Instead, use GroupNumber to show or hide a pop-up with the login button.
 
Could you not look at the user log in value if it is 0 then make that equal a bit to trigger say a popup screen i.e. the screen name variable usually has a value i.e. 1 to 10 if you have 10 screens, in the plc use the bit to set a screen value to a screen you create with the message i.e. log in.
Have done something similar in my case, there were buttons to change screen as normal but at some point i.e. in doing a calibration the engineer needed to log in. he would select cal screen, when he did a calibration the screen was automatically selected by the PLC say from current screen (4) to screen 5 by putting the screen number in the screen variable, not sure about the TP HMI but others have the ability to change the screen from the plc as well as buttons.
If it can these are the steps you need to take:
Set a PLC tag for the screen number (or name but that is more difficult to check).
Create your special popup or screen where you configure the message (can only be closed when logged on) perhaps a message saying user logged off please log on.
Operator can then close popup,
In plc check if it is on the screen (say10) and no logon i.e. 0 change screen to your popup or what ever Say 11). once person logged on PLC checks it's on screen 11, and logon is not 0 plc forces HMI screen number back to 10.
 
Interesting you should mention calibration, @parky, because this project involves calibration/measurement of machined components.

Anyway I think I've got it sussed now (famous last words!)

Rather than explicitly invoking the Log In screen (see post #5 above), I am passing the value of the Next screen I want (Next_Screen, Int) from the PLC to the HMI.

Not the neatest solution for sure, but it works .

Many thanks, much appreciated.

Network 47.png ActivateScreen by TAG.png
 
Last edited:
Yes, it will depend on what you want to achieve, it is often easier to use PLC code when you want to automatically change screens.
some functions that would be useful do not seem to be incorporated in HMI for example: a customer had a Beijers E series with keyboard rather than the touch screen, they wanted to fit a touchscreen as the operators kept destroying the keypad membrane, I did warn them about it would be more exspensive to replace touch screen elements than keyboards & could not guarantee it would improve the reliability, howevr, it was insisted on.
When I took the project, converted it realised that the keyboard version had boxes on the screen like pushbuttons above the actual buttons, however, these were just fields with the button function, the original programmer made some of them flash colour when the operator needed to press them.
Trouble is the pushbutton (effective touch area) could not be flashed, so had to put a clear touch area round what was the original field on the old HMI.
It would have been nice to have touch buttons with 2 variables i.e. 1 for the touch & one for the colour change or flash. but hey not a major issue instead of replacing the existing Made up button graphic with a nice pre-made touch button just left them & put the touch field over the button graphic.
 
Yes, it will depend on what you want to achieve, it is often easier to use PLC code when you want to automatically change screens.
some functions that would be useful do not seem to be incorporated in HMI for example: a customer had a Beijers E series with keyboard rather than the touch screen, they wanted to fit a touchscreen as the operators kept destroying the keypad membrane, I did warn them about it would be more exspensive to replace touch screen elements than keyboards & could not guarantee it would improve the reliability, howevr, it was insisted on.
When I took the project, converted it realised that the keyboard version had boxes on the screen like pushbuttons above the actual buttons, however, these were just fields with the button function, the original programmer made some of them flash colour when the operator needed to press them.
Trouble is the pushbutton (effective touch area) could not be flashed, so had to put a clear touch area round what was the original field on the old HMI.
It would have been nice to have touch buttons with 2 variables i.e. 1 for the touch & one for the colour change or flash. but hey not a major issue instead of replacing the existing Made up button graphic with a nice pre-made touch button just left them & put the touch field over the button graphic.

Nice one, sounds like an eminently pragmatic solution to the problem.
 

Similar Topics

Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi again, When the "REPORT" button is pressed (on a different screen), it takes the operator to the...
Replies
7
Views
666
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
465
General Question: The PLC and HMI that I've been working on (a laser measurement system) is soon to be transported to the site where it will be...
Replies
2
Views
701
Hi, I'm not sure how to do this... Basically, I want to restrict the user input values for this tag to be in the range 20.001 to 25.0. I...
Replies
17
Views
1,634
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,108
Back
Top Bottom