Probleme with Event script in UDT

Hello,

I’m running V7.8 on windows server 2012.
I created a UDT with the following Data type parameters parameter


I’m indexing the PresentVAlue with a Kepware server to Bacnet/IP devices with an alarm and two events. each event
increment or decrement an Alarm for each site (Alarme memory tag)


The problem I’ve got is[color=#4040FF] Alarme [/color]memory tag is not update automaticaly, the only way to update this value is to refresh the provider into the tag browser as soon as I refreshed it the good value is displayed


my scan class for this memory tag is the default class.

Do you have any idea what’s going on or i need to check ?

Regards

Not completely sure, but tag scripts are scoped to the gateway, so you will need to specify the full path, including the tag provider.

Thanks Jordan for your answer, but I tested the script with the two following tagpath

tagpath = ‘[.]…/…/Alarme’

tagpath= ‘Sites/02_/Alarme’

and the result was the same, automatic refresh didn’t work

I’m also tested in the the script console the system.tag.read and system.tag.write with ‘tagpath= ‘Sites/02_/Alarme’’ and it’s run perfectly
so I’m wondering if it’s not an asynchronous problem with tag Event script ?

You also need to specify the tag provider.

example: [default]Sites/02_/Alarme

Scripts that are scoped in the gateway (like tag scripts) have no idea what the default tag provider is on your project (because it doesn’t use them) :wink:

Apologies, I went right over this part without noticing. :blush:
If it gives the correct value after refreshing, I think your script is working okay.

Have you tried binding a display component to the memory tag and see what it does?

yes and I,ve got the same problem, to refresh the display I need to open a new window and then the component binds to the memory tag is refreshed properly, I also check to be sure that the tag is reference to the right scan class (direct mode) with a slow rate of 5 sec.

Ok so to refresh the value we must use the following script

QV = system.tag.read("[.]../../Alarme")
[color=#00BF00]QV[/color] = QV.value + 1
system.tag.write("[.]../../Alarme",QV)

instead of

QV = system.tag.read("[.]../../Alarme")
[color=#FF0000]QV.value[/color] = QV.value + 1
system.tag.write("[.]../../Alarme",QV)

my understanding is probably the timestamp is not updated so it could explain why the value is not refreshed automaticaly,

Thank you to Sam from the Ignition support team to help me :thumb_left: