opc.ReadValue scan time?

Question,

For Iginition tags, they are updated based on a scantime and the OPC quality will set to bad if it can’t get updated within this time (based on stale threshold).

What about when I script with opc.ReadValue()? What scantime or stale threshold value will affect this ReadValue? Is there an OPC scantime setting in the device or server? I can seem to find this anywhere.

I know that if ReadValue cannot get a good quality return, it will display bad quality. I’m just not sure based on what scantime and stale threshold it uses

Any help would be appreciated.

Axelf911

It has absolutely nothing to do with scan times or stale threshold settings.

system.opc.readValue is just a read call to whatever node on whatever OPC server you point it at - whether or not the quality comes back good or bad depends on if the server was able to successfully read it or not.

[quote=“Kevin.Herron”]It has absolutely nothing to do with scan times or stale threshold settings.

system.opc.readValue is just a read call to whatever node on whatever OPC server you point it at - whether or not the quality comes back good or bad depends on if the server was able to successfully read it or not.[/quote]

I am using the Ignition OPC-UA Server. Are there any settings on the Server regarding the time it would take for it to determine if the quality is bad, or something along the lines of scantime?

I am looping through a db list and doing many opc.ReadValues one at a time. Should I be careful to put a delay between ReadValues() calls to the same PLC?

On each device there’s a communication timeout setting that controls how long a PLC has to respond to a request, but without seeing the logs it’s hard to say if that’s the cause of any bad quality.

Also, if possible, you should read multiple values at once using system.opc.readValues(). It’s much more efficient, especially if all the values are from the same device.