[Bug-15121]8.0.5 Nightly - Critical Tag behaviour in embedded views

Hi,
I have been running into some problems on 8.0.5-b20190927.
Is it normal that an input component writes to a tag the moment you open a view?

Normal:
How to replicate:

  1. Drag a numeric input field into a view.
  2. Bind it to a tag and make it bidirectonal.

    Behaviour: Expected
  3. Nothing happens when you open the view.
  4. System only writes when there is a change to the input component.

The above is fine, this is what I want the component to do.
Below is what seems to me to be a critical bug or a unwanted function in embedded views:

How to replicate:

  1. Make a view
  2. Drag an input numeric into that view and make a input/output parameter, and bind the value of the numeric entry field, bidirectonally.



    Embed that view into the page u want to be viewed.

When you save and open that view in chrome or other explorer, the value of that tag gets written to instantly. Is this normal? This is what I believe caused many of my templates to crash when upgrading from 8.0.3 to 8.0.4, I now tried with 8.0.5 and I just discovered this write thingy.

Is there someway you can turn the writing off when opening a view? Or atleast wait until the tag has been read first? I have witnessed some tags getting written to with a null value, this has made me disable ALL write properties in my tags/udt’s until this is sorted out, as for me its critical that this does not happen.

See picture below from the gateway logs, this is just from changed from 1 page and changing back into the view with the embedded view:

On another note, when using expression bindings in popup views, everything seems to be normal:


All values get read, and they only write when I change the value. They get updated if I change the tag in the PLC instantly, as expected.

The big problems occur when I open large HVAC systems, then I get some “Exception Caught” errors.



Am I doing something wrong regarding the embedded views or is this a bug?

It looks like a bug to me. We are trying to replicate it here.

Hi @lasse,

We have duplicated this issue. Thank you for alerting us to it.

Garth

No problem, it’s what this forum is for :relaxed:

Is there any workaround that can be done meanwhile, besides dragging the input component directly into the ‘main’ view?

You can try enabling the Persistent option on the parameters that is documented here (it pertains to parameters as well as session properties). In my testing of it, it looks to resolve the issue on load.

Garth

I tried enabling persistent on the “bidirectional” value on the parameters of the embedded view.
But after I change the parameter, and reload the page, or go to another page and come back to that page, the value get reset.

In the image below, the value of the bidirectonal tag at the moment of “binding” it was 20 (its the SP parameter, below the highlighted one in tag browser), and setting it to “persistent” at 20. When I load the view it stays at 20, I can the change it to 22, eveything seems good. But if you go to another page and them come back, the value will “stick” to the value it was when you enabled persistent and saved. In my case it was 20.

Just wanted to let you know that we’re working on a fix for this. In the meantime, as a work-around, I’d recommend re-configuring your inner views so that the bidirectional tag binding is configured directly on the edit field, without passing the value through to the inner view as an in/out parameter.

To make the view “generic”, you could pass a tag path (as a string) in as an input parameter instead, and use an indirect tag binding on the inner view’s edit field.

2 Likes

Ok, looks like we’ve got this issue fixed.
To be clear, this wasn’t actually an 8.0.5 regression; this issue has been in Perspective all along. The fix will be in 8.0.6 starting with the nightly tonight.

2 Likes

Yeah. Just a coincidence that I discovered it now. Ty for the temp fix.