@ Geospark
1) Yes, they are
2) Non-zero Value
@ Operaghost
Now I can set the outputs, thanks!
But if I set them they reset themselves after some seconds. (Because of the Handshake I think) How can I use them without that they reset themselves?
http://img5.fotos-hochladen.net/uploads/screenshot047bv5d1toluw.jpg
As information: I took latched push buttons so it should work.
Ok, OG got there before me but that's what I was wondering as well, you had no Handshake control tag assigned.
As OG mentioned, you MUST use the Handshake to unlatch the button back to state 0. But, you MUST create a
separate Handshake control tag.
You have assigned the same tag, "
HMI_Test_2\FT_Greifer", to both the
Value and
Handshake control tags. This will not work I'm afraid.
I'll explain how the Handshake control works for a latched button...
When you press a latched button it changes from the unlatched state 0 to latched state 1 and writes the state 1 value, default = 1, to the Value control tag. When you want to unlatch the button, i.e. the Value control tag, you must use the Handshake control tag to do so.
To determine how the Handshake control tag unlatches the button, under the "General" tab you select which type of reset, or unlatch, you require for the latched button. This can be "Non-zero Value" or "Zero to Non-zero transition".
Yours is set to the default "Non-zero value".
Using "Latch reset type:" = "
Non-zero Value":
Handshake control tag must normally =
0
When a latched button is pressed, it changes from state 0 to state 1 and writes the state 1 value to the Value control tag. Once your logic requires the Value control tag to be unlatched, i.e your button unlatched, you programatically write a "Non-zero Value" to the Handshake control tag, usually a "1". This resets the button back to the unlatched state 0 and writes the state 0 value to the Value control tag.
You must also programatically reset the Handshake control tag back to "0" to prevent continuous unlatching.
Using "Latch reset type:" = "
Zero to Non-zero transition":
Handshake control tag may =
any value
Again, once the latched button is pressed, the state 1 value is written to the Value control tag. When unlatching, the Handshake control tag must be seen to change from a "Zero to Non-zero" value. The difference with this type of reset is that the Handshake control tag can be any value before an unlatch is required. If the Handshake is "0", to unlatch you simply have to write "1", or any non-zero value.
If the Handshake is "1", or any non-zero value, you have to first write "0", then transition back to "1", or any non-zero value to unlatch.
When you navigate to a screen on the HMI, that has a latched button or buttons, the application attempts to read the Handshake tag to decide which state the button should be at:
If using "
Non-zero Value" -
Navigate to screen and...
a) If Handshake = 0 and button unlatched, state = 0
You may then press the button to latch, state = 1
b) If Handshake = 0 and button latched, state = 1
The button is already latched, state = 1
c) If Handshake = 1 then button is held unlatched, state = 0
So c) will hold the button in an unlatched state, even if you press the button, it will not latch.
If using "
Zero to Non-zero transition" -
Navigate to screen and...
a) If Handshake = 0 and button unlatched, state = 0
You may then press the button to latch, state = 1
b) If Handshake = 0 and button latched, state = 1
The button is already latched, state = 1
c) If Handshake = 1 and button unlatched, state = 0
You may then press the button to latch, state = 1
From c) note that the non-zero Handshake control tag value of "1" will not hold the button unlatched. Only a transition from zero to non-zero will unlatch. So, again you have to write "0" first, then back to non-zero value, usually "1".
Also note, once you navigate away from a screen with a latched button, the application does not continuously read the Handshake control tag. So it's value can be anything, regardless of your latch reset type, while not viewing that screen. Only when you navigate back will the Handshake control tag value be once again evaluated.
So...because you have assigned the same tag to both control tags, and assuming they are both = "0", when you press the button you are writing a state 1 value of "1" to both the Value and Handshake control tags. Because you are using "Non-zero Value" resetting, as soon as the Handshake control tag is written a "1", the button unlatches to state 0 and writes a "0" back to both control tags. You are latching, then unlatching your button each time you press it.
I hope that's clear enough?
G.