Tag write slower from gateway tag event than from Vision trigger

I modified the parameter update script to take a parameter that decides whether the writes occur through system.tag.writeAsync or system.opc.writeValues. When called from the client, it will use the tag.writeAsync but when run from the gateway tag event it will use opc.writeValues.

I am not totally happy with how the function works when using the opc.writeValues. I seem to be having timing issues with the opc.writeValues. I have two lines of code that call the function.

  1. Write the 1379 parameters into the PLC PARAM_xxxxxxx tags
  2. Write a 1 into the PLC Parameter_Update bit which triggers PLC logic to move the parameters

Does the opc.writeValues lump separate calls together or are the values from each separate call written in order? It seems sometimes when I execute the code that all of the parameter tags might not be written before the 2nd step occurs.

I setup the loggers as you requested. I set the script up so that the gateway tag change event call would use the tag.writeAsync. Below is a screen capture of the log. There is an timeout error that occurs. I made sure to turn off the other gateway scripts (HMI watchdog timers) so that there is no collision that occurs.

(Note: I see that there is a filter but is there a way to only download the filtered log data?)

I have a feeling that to dive into this issue deeper I am going to need to call customer service and get someone to work with me.

They're written in order. The first call won't return until a write success/failure indication was received from the PLC for every request required.

It sounds like you've got some timing issues... somewhere... but it's not clear where.

You'll probably have to work with support because this will likely require a lot of back and forth with logging changes and log files, and someone who can actually see your scripts and setup.

Plus I'm leaving for vacation, so my participation here is about to go to zero.

The fix for this was just merged and should end up in the 8.1.32 release.

The cause was quickly identified once support was contacted and the logging/loggers I asked for towards the beginning of the thread were enabled...

2 Likes