Most efficient use of OPC Pushbuttons

  1. Momentary with a fast tag group?

  2. One Shot with the PLC resetting

  3. Standard with an On Action Script to write the Tag and have the PLC reset.
    a. Custom Property bound to OPC tag and set Custom Property to 1
    b. Use Write Blocking of the tag
    c. Use System.opc write to the tag

I like 2 for the simplicity, but dislike the way the button changes state with dashed lines to show that it's 'writing'. Even changing the text to the same as the static button label, I still find the hashed lines distracting for an operator.

I've been using 3a so far as I like to keep my widgets with exposed properties for maintenance purposes. I dislike having to search through scripts to see where something is done.

I dislike 1 due to OPC failures and 'sticky' buttons. Another question, however, is that can you use a momentary with the PLC still resetting the button? I've used that combo in other HMIs with no issues, but reading through some historical posts, it seemed like the PLC resetting the OPC tag before the OPC server acknowledged the write could cause some issues.

I recommend "3a", from those choices. (Set the bidirectionally bound custom prop to jython True, not 1, if you wish to be faithful to the real datatypes typically exposed.)

However, I recommend:

  1. Like 2 or 3a, but have the PLC echo the bit to another tag. Have a gateway tag change event monitor that, and when True, reset the button bit. That ensures the bit is on for one OPC round trip, but no more. This typically make the timing compatible with option #2. And it implements my regular advice to only write variables from one direction.

Generally yes, and for problematic momentary buttons, probably a good idea. (You must be using Vision, as Perspective doesn't have a momentary button.) But if you are going to reset elsewhere, just use a Standard button. (KISS)

I like #2 except just use a typical button. Having the PLC reset the command is simple and clean IMO.

Yes sorry, Vision.....I keep forgetting to specify that.

That would be any of the option 3's then, since the typical button doesn't have a value property. You could use the set tag feature in scripting, but I prefer creating a custom value property for that purpose.