NO Momentary pushbutton stays high

I have some NO momentary push buttons in my application that will set the tag high but wont reset the tag low after the button is release.
On the command line for the button the tag is set while down and reset while up. Normally the push button works fine, but the odd time, maybe once every two weeks, the tag in the PLC remains high. The tag is only referenced in the HMI so I know there isnt anything in the PLC latching it. The PLC is TwinCat and I am using 7.1 for Indusoft. Any ideas?
  • Go in the command of you button and click on config and activate the release function.

    Check the help file for the command function.
  • The problem with momentaries in a HMI is that you cant guarantee that the PLC will see it within the time frame.

    The following methodology gives you momentary like functionality and also includes an implied acknowledgement

    Use a set command in indusoft to set the bit high and in the PLC use a reset coil to set it low after it has been acted on, which in turn will set it low in the HMI.

    the implied acknowledgement works like this,

    if the HMI has set the bit and it remains high for too long then the PLC has probably not received and reset it so you probably have a comm error
  • I spoke with tech support and they suggested to remove my buttons that used the set on press and reset on release. They suggested that I use a momentary button.
    I went through the display can did what they suggested. I haven't had the issue with the PLC bits remaining high anymore but now I am experiencing long delay times on the buttons. Using the previous button method of set and reset, the buttons reacted as soon as they were pressed and released. now with the new method, I need to keep my finger on the button for over a second before the PLC bit goes high. The same is true when I release the button, it remains high in the PLC for about a second before going low.

    It almost seems to be a scan rate issue yet the only difference was the button configuration from set/reset to momentary.

    any ideas?
  • Between the Indusoft software and PLC there are several software and hardware layers each of which has a lag associated with it.

    Because of this momentary buttons just don't work the way you would expect with a simple control panel, but the method I outlined completely solves this problem

    Maybe I didn't explain this method well enough before.


    Indusoft
    1) Operator presses button
    2) Button sets Bit High
    3) HMI driver sends high bit to PLC

    PLC
    5) PLC receives bit high from HMI driver
    6) PLC code acts on bit high and process it
    7) Immediately after processing it PLC code resets bit to low, so effectively bit is high in PLC for only one pass.
    NB one pass bits can be hard to spot in a plc, for debugging use trace or tie it to a counter that will increment when the bit is high.


    Indusoft
    8) HMI driver reads bit low.

    By doing it this way you guarantee that the length of time the momentary bit is high is exactly right for any system lag, plus you know that its only active in the PLC for one cycle, plus you can use it to measure you latency between PLC and HMI, plus you can add some code to the HMI that monitors the bit for handshaking/confirmation.
  • Incidentally normally I abhor the use of SET and RESET coils in a PLC ladder.

    This is mostly because they are usually used inappropriately or in worst case scenarios overused, however this is one of the rare exceptions where use of a RESET coil is appropriate.
  • Maybe us Okies are just slow but why not

    On Down : Value = 1
    On Up : Value = 0

    This way you control the length of the momentary operation. Cool