[This is for 8.1.15, Perspective]
In my quest to make the perfect skeuomorphic HMI with working jog buttons, I had thought that the Perspective session was losing mouse events. But in after some experimentation I am coming to the conclusion that the issue is not with Perspective, but with the OPC UA link between Ignition and the PLC.
My system design for a jog button object (built in its own view) is basically:
- The View the button is built in has an isPressed View Parameter
- Mouse Down event writes True to isPressed
- Mouse Up event writes False to isPressed
- An instance of the button is created from an embedded view on the main view
- On the button instance, the isPressed view parameter is bound to a PLC bool tag (and I have checked overlay opt-out and bidirectional options)
- The PLC tag is in its own Tag Group called UserControls set with
o Mode: Direct
o Rate: 100 ms
o Data Mode: Subscribed
o Read After Write: False
o Optimistic Writes: True
What I am noticing is if I press the button and hold for longer than the Tag Group’s Rate, then the system works as expected. The tag in the PLC is set on button press and cleared on button release.
But if I press and release faster than the Tag Group’s Rate, then while the isPressed View Parameter get set to false, the tag value in the PLC never gets reset back to false. This was really noticeable when the rate was set to 1 second.
In my original design the button view parameter was set as bidirectional (two ended arrows on view parameter definition.) Because the PLC tag was never reset the button continued to appear to be pressed. When I made that parameter write only, isPressed (and my button animation) worked as fast as I could click the button.
So it seems that the false value is not being propagated to the PLC. I vaguely remember seeing some old thread about OPC UA writes potentially being re-ordered in the GW causing issues like I am seeing, but I can’t find that topic again.
Is there anything else I can do to optimize the system to better behave under rapid mouse clicks? I can keep lowering the Tag Group’s Rate, but that is simply the equivalent of sticking my fingers in my ears and going “can’t hear you, can’t hear you”.
I could rebuild the jog button interface in the PLC to have a “click on” and an a “click off” input and have my Perspective button set each bit separately, and have the PLC clear them. But I want to avoid doing that for now.
I’m also guessing that as the issue seems to be in the OPC UA section of Ignition, that swapping to a Vision based system would not solve my problem.