SourceForge Logo

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 program.
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:
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.