Siemens S7/TIA v18: WinCC Removing action associated with F-Key

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
I'm making a meal of this, my brain's not in gear.
Also, I'm new to S7 TIA/WinCC so excuse my ignorance...

See redacted pic.

Pressing F7 (SAVE icon) causes the values (mm) in the big boxes to be corrected by adding a correction factor, and that value gets displayed in the small box underneath it. - see pic

That works fine - but as it stands, the operator can keep pressing F7 and the correction factor will be applied again and again and again...which is not what I want. It needs to be a one-shot SAVE.

After the first press of F7, I want:
"STORE ZEROED VALUES" to change to "SAVED"
SAVE icon to disappear
F7 function to be disabled (so further saves are not possible)

Can anyone help?
Happy to expand on the above if unclear.
Thanks
p.s. the Event Release key is just the 'Resetbit' of the Press key.

F7 save button.png
 
Last edited:
I have never used the later TP panels but a few thoughts come to mind.
Perhaps there is a function to disable the key on a bit from the PLC i.e. if M0 was the trigger bit then maybe there is a way of disabling the key i.e. M1 in the key configuration.
Then in your PLC when M0 goes true and the data is stored set a bit i.e. M1 the HMI then reads the status & disables the key, then you need to reset it perhaps when you start your test or sometime before requiring the operator to store the data reset it. If the OP panel does not have this ability (either disable or hide the key) then just use the stored bit (M1) in your PLC code i.e. AND NOT M1 AND M0 Store values, so effectively, before the operator presses the store key the bit M0 is false so allows the store code to run, set this bit where you are storing the data so next scan the bit M1 will be true & will not allow the data copy again. So in short regardless if it is a bit that disables or hides the operator panel key or the disable is done in the plc by not allowing the data to be copied it is virrtually same logic.
Reset before store, set on store in effect creates it's own oneshot so can only happens once.

Store once.png
 
I have never used the later TP panels but a few thoughts come to mind.
Perhaps there is a function to disable the key on a bit from the PLC i.e. if M0 was the trigger bit then maybe there is a way of disabling the key i.e. M1 in the key configuration.
Then in your PLC when M0 goes true and the data is stored set a bit i.e. M1 the HMI then reads the status & disables the key, then you need to reset it perhaps when you start your test or sometime before requiring the operator to store the data reset it. If the OP panel does not have this ability (either disable or hide the key) then just use the stored bit (M1) in your PLC code i.e. AND NOT M1 AND M0 Store values, so effectively, before the operator presses the store key the bit M0 is false so allows the store code to run, set this bit where you are storing the data so next scan the bit M1 will be true & will not allow the data copy again. So in short regardless if it is a bit that disables or hides the operator panel key or the disable is done in the plc by not allowing the data to be copied it is virrtually same logic.
Reset before store, set on store in effect creates it's own oneshot so can only happens once.

That's brilliant. I'm sure I can do something based on your example.
I seem to be spending an inordinate amount of time just trying to find the functionality in the software at the moment.
Shame there's nobody in the office who can help, so it ends up being me fishing around - and asking questions on here, of course.
Cheers
 
How about, whenever the correction factor is non-zero and an F7 press (or release) is detected, once the correction factor has been added, then the PLC could change the correction factor to zero?

Then repeated F7 events would have no effect (i.e. adding 0.0 does not change any value), or the code could even ignore F7 events when the correction factor is 0.0.

Of course, this requires somehow entering a non-zero value for the correction factor the next time this is needed.

P.S. this is essentially the same approach @parky is suggesting, but I am using the correction factor as the "memory" for the one-shot algorithm.
 
How about, whenever the correction factor is non-zero and an F7 press (or release) is detected, once the correction factor has been added, then the PLC could change the correction factor to zero?

Then repeated F7 events would have no effect (i.e. adding 0.0 does not change any value), or the code could even ignore F7 events when the correction factor is 0.0.

Of course, this requires somehow entering a non-zero value for the correction factor the next time this is needed.

P.S. this is essentially the same approach @parky is suggesting, but I am using the correction factor as the "memory" for the one-shot algorithm.
I like it, not a bad idea... However, these correction factors are to be retained in memory, even if PLC's switched off and on.
Good thinking though.
 
@DR: Yes this is something I have done before, essentially zeroing the stored value so the operator is aware that after pressing the store key it shows up.
Again it does produces a oneshot in it's own right. The values will be retained it's just that at the point the operator is asked to store the data it will be zero, as this operation is something the operator has to do then I don't see the problem.
 
The penny's dropped.

I think you're right, it will work.
If I use a MOV command to make a copy of the correction value, then use the temp to apply the correction. Once the save is complete, set the temp to zero. The original will still hold the correction value for future use.
Cheers both!
 
I like it, not a bad idea... However, these correction factors are to be retained in memory, even if PLC's switched off and on.
Good thinking though.


Then retain them in memory, but have another intermediate variable that is written with the stored value whenever you do a reset (presumably another button?), and overwrite with the 0.0 to the intermediate value when you trigger the add.

But at that point it would be uglier than using a bit to handle the one-shot behavior.
 
Not sure what or how you need to control the interaction between operator & the steps but I would personally use a sequence variable this serves a number of functions the step sequence will increment the sequence variable & use compares, the variable can also be used as a message text field on the HMI to tell the operator what to do next, it also fubctions as a oneshot i.e. sequence step 10 move xxx to variable, incremnt seq to 20, this acts as a oneshot it also useful if the operator makes a mistake youb can then step the sequence back if required. (not a real example) consider the following:
Seq. step 0 = IDLE (Message "IDLE")
Seq. Step 10 = Place part (Message "Place Part & conform")
Seq. Step 20 = Test part (Message "Test Part & confirm")
Seq. Step 30 = Reading Error (Message "confirm & go back to Test part") (goes back to 20
Step 40 = Store data (Message "Data Stored"
Using the Seq. variable serves two fubctions, gives you a sequence, also displays operator messages.
Not sure the functions on the HMI but I bet it has some text list where the value in a variable will display a particular message.
See attached, probably different but this Beijers HMI has what they call message libraries where you can display text based on the value in a variable

Messages.png
 
...
Not sure the functions on the HMI but I bet it has some text list where the value in a variable will display a particular message.
See attached, probably different but this Beijers HMI has what they call message libraries where you can display text based on the value in a variable


The older MPs at least had text lists that can be used similarly. I'm *pretty sure* that feature followed to the Comfort Panels but didn't dig too far into those programs before I left my last location. I don't have access to Portal any more, so I can't confirm or test.
 
Most HMI's I have used have this feature, even used it on Scada systems but used SQL to interogate a database where fields were populated with text there were over a thousand text fields for the process, again easy to use, the sequence variable means it is easy to follow especially if you document it well just a glance at the list gives you the idea of how the program flows, easy to debug as the seq. variable has the step number, easy to step back very useful where you need to step back to complete an operation & can add extra steps (always step in large groups i.e. 10 or 100) then there are plenty of spare steps should you need to add another one.
 

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
670
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
466
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,639
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,110
Back
Top Bottom