Special note on pushbuttons
Real pushbuttons are frequently used in combinations of On and OFF buttons and
some set/reset logic that holds the last state. The advantage over a single
switch is, that there can be more than one button and additional sources for
the comman. Usually, a fault condition may internally "press stop" in a PLC
If it were for multiple buttons only, VISUAL could easily inplement this
by putting the set/reset logic into the spreadsheet and copying the state to
the PLC. But this would not work when other conditions come into play
which are only "known" to the underlying PLC program.
To implement it, when you press a hmiPushButton element, the following happens
between hmiViewer, spreadsheet and PLC driver:
1.The HMI viewer sets the corresponding cell to 1. But it doesn't
set the sourceType field to soSetByHMI as all other elements would do.
Instead it sets it to the special value soPushButton.
2.The calculation thread detects the change in value and marks it as changed.
3.The PLC driver encounters the change mark and sends the value to the
PLC. After doing so, it resets the cell's value to 0 and
sets the sourceType field to soPushBAck(ackknowledge).
4.The calculation thread detects the change in value and marks it as changed.
5.The PLC driver encounters the change mark and sends the value to the
Thus in the first cycle, a one was send and int the second a 0. This immitates
exactly the behaviour of a real pushbutton wired to the PLC's input.
For this procedure to work, it is strictly necessary, that the HMI viewer
and the PLC driver connect to the same cell. You may not use the value
from HMI viewer in a formula and then pass the result to the PLC driver.