Momentary Button Bug?
-
Hi,
Here's the markup of the start stop for a pump. They are linked to image of a button. Picture attached. I could not replicate it, so I don't think it was Mango, but I wanted to double check.
<!--pump5 start--> <ma-get-point-value point="point" point-xid="PLC1_e5_start"></ma-get-point-value> <ma-switch-img id="76156244-402f-41ee-8327-b17d70fbcb94" style="position: absolute; left: 1349px; top: 535px; width: 80px; height: 80px;" src-false="/rest/v2/file-stores/default/Start.png" src-true="/rest/v2/file-stores/default/Start-depressed.png" ma-momentary="" ma-momentary-start="point.setValue(true)" ma-momentary-end="point.setValue(false)" point-xid="PLC1_e5_start"></ma-switch-img> <!--pump5 stop--> <ma-get-point-value point="point1" point-xid="PLC1_e5_stop"></ma-get-point-value> <ma-switch-img id="5260d0ff-65e1-4adb-9fe4-76ecb9b12fda" style="position: absolute; left: 1349px; top: 619px; width: 80px; height: 80px;" src-false="/rest/v2/file-stores/default/Stop.png" src-true="/rest/v2/file-stores/default/Stop-depressed.png" ma-momentary="" ma-momentary-start="point1.setValue(true)" ma-momentary-end="point1.setValue(false)" point-xid="PLC1_e5_stop"></ma-switch-img>
These have momentary button function where the point writes a 1 for the duration of the click, however long, and goes back to 0 when released. This was done with the help of this forum. We fixed bugs like if it was clicked, held, and dragged away and released, it still went back to 0.
Couple of the points shown in the picture of the history, you can see that it was set back to 0 after the momentary 1, then goes back to a 1 without indication that it was set by a user, and stays that way until I was notified and changed it back to a 0 using the detail page.
Any ideas? These are huge pumps (some of them 600hp) and these controls are critical...
-
Hi sbaik,
What kind of point is it? To me, that sounds like the button release tried to set it back to 0, but there was perhaps a transport exception and so that write didn't make it to the device. If you have the write error events above 'Do not log' for the data source you would be able to find a record of the failure in the events.
-
@phildunlap said in Momentary Button Bug?:
Hi sbaik,
What kind of point is it? To me, that sounds like the button release tried to set it back to 0, but there was perhaps a transport exception and so that write didn't make it to the device. If you have the write error events above 'Do not log' for the data source you would be able to find a record of the failure in the events.
@phildunlap Where do I set the write error events? I'm not seeing it in the data source or the points.
-
What kind of data source is it? It's in the data source's edit page. Below the name / xid / configuration of the data source are its event types and the alarm levels.
-
@phildunlap They are Modbus I/P. I don't see anything that happened to that device during that time that it was stuck (2/17 9:33pm.) but there are a lot of events. Most of them are "Exception from modbus master: socket closed, or Bad file descriptor (ioctl FIONREAD failed)
-
I would have expected the point name for the point to appear in the event message for a write error.
I haven't seen the "Bad file descriptor (ioctl FIONREAD failed)" before so far as Modbus IP. Did you get a bunch of these or just one?
Edit: There will also be a message logged at INFO level from the data source about an "Error setting point value" with a stack trace of why in the ma.log file.
-
@sbaik said in Momentary Button Bug?:
Couple of the points shown in the picture of the history, you can see that it was set back to 0 after the momentary 1, then goes back to a 1 without indication that it was set by a user, and stays that way until I was notified and changed it back to a 0 using the detail page.
Any ideas? These are huge pumps (some of them 600hp) and these controls are critical...I highly recommend you re-think your design. You should not be doing this sort of logic on a dashboard. This is logic that belongs in a PLC. I have pointed this out to you before -
https://forum.infiniteautomation.com/topic/3522/momentary-button/8
there should be some logic in the PLC to prevent the pumps from running continuously should the "I've lifted the mousebutton" message fail to get back to the PLC for one reason or another. e.g. a 1 second timer that is reset on every positive edge writen in from the SCADA system.
-
I realize this is a bit old, but I want to point out that the relationship of momentary buttons and SCADA HMIs have a long and disturbing history. Not that they shouldn't be available, because they absolutely should, but understanding their use and characteristics is VERY important. In an electrically physical sense they make the most sense. You push and things happen, You let go and things stop happening. With variation of course, but as an example that is typical.
In SCADA HMIs, exactly what happens is highly dependent on the creators; both the Software vendors and HMI creators. My personal experience is to use them lightly and have a solid plan. Do not flip bits across a network with a momentary button. Instead start scripts that react to inputs, can verify control commands, retries, emergency stop events and time out features or any other rich programming options. If I am flipping bits, I like to use internal points, because I know there will not be a communication issue. Then the script can read that point, again with no worries of network failures. The logic does not have to be in the PLC, but the logic has to be robust if it is not in the PLC. IMHO it all depends on the use case to determine how it should be handled.
Be careful with momentary buttons on an HMI, know exactly how the software treats them and plan and test. At worst this is a safety issue, but it could also be a $$$ issue. As in lost $$$.
Having said that, I was very pleased to see this functionality in Mango. Thanks @Jared-Wiltshire for creating this feature.
-
Update on a really old thread. There was just no option for me to change anything on the PLC side as mentioned before but figured out a workaround.
The problem was that the pump could not be started if the stop bit held the 1 (or stopped if the start bit held the 1) You can visibly see a stuck button if the bit held the 1. The same button could be pressed again to attempt to write a 0 at release.
But instead of explaining that process, I am having the momentary of the start write a 0 to the stop and the stop will write a 0 to the start. This ensures the end user uses the buttons as intended without having to worry about stuck button or held bits. Seems to work fine.