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.
- Write the 1379 parameters into the PLC PARAM_xxxxxxx tags
- 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.