OPC "Start Button" in Perspective

What is the best way to implement a start button in Perspective? This button will control an OPC tag connected to an AB controller. In Vision, I'd have used a momentary button with an ONS instruction in the PLC. The bit could get stuck, but it wouldn't be a major issue like it could be for a hold-to-jog function, and the bit would only be written from Ignition, never the PLC, avoiding a potential race condition.

I can think of a couple possible solutions:

  1. Use the Perspective One-shot button. Reset the bit in the PLC.
    • Writing from multiple sources seems to go against the conventional wisdom (at least here on the forums)
      • Does this open up the possibility for a race condition?
  2. Use the Perspective One-shot button. Set a handshake bit in the PLC. Monitor the handshake bit and use an Ignition script to reset the One-shot bit.
    • Only writes from one source.
    • Feels more complicated than it should be.
    • Most confident that the PLC received the command.
  3. Use any component to fire a script (Button is probably the logical choice for this). Set the tag or OPC value in the script, wait some fixed time then reset the tag or OPC value.
    • Only writes from one source.
    • Most similar to the Vision solution I'm familiar with.
    • Still seems more complicated than I'd expect.

I don't mind embracing complexity if it leads to a better outcome, but I wonder if there's an obvious way I'm not seeing. Thanks in advance for any thoughts or feedback.

The "set from Ignition/reset in PLC" pattern is problem for OPC subscriptions--the polling that occurs with random synchronization to the write operation. If you use system.opc.write*() to set the bit, and don't care about reading it, then the PLC reset paradigm is fine.

In other words, just don't use a tag.

1 Like

Fwiw, we've never had an issue with scada writing, plc resetting methodology. Our scan rates are always 500ms or more though, and from memory optimistic writes is on with timeout of 2s or similar

2 Likes