writeBlocking function issue

Hi,

so normally writeBlocking function works pretty well, but I found in our archive history, that once writeBlocking took about 30 seconds to write a value to the tag, where normally it's about 200 ms. What could cause the issue and is there any solution to prevent it.

That's really long for "normal". It suggests that your PLC communications are heavily loaded, and occasionally overloaded. Fix that.

The whole point of writeBlocking() is to wait for the write to finish, or yield an error. Writes to memory tags should take a fraction of a millisecond. Writes to OPC tags with typical loading should take a few tens of milliseconds or less.

Hmm, we have a OPC server between PLC and Ignition. Do you think, that this could make some delays?

Not typically. But that OPC server could be heavily loaded or overloaded.

Aaa, I forgot to mention, that there is a script before writeBlocking, so this could take some time.

But there is still question about those 30 seconds response. What could cause it?

An overloaded OPC connection or PLC connection is the only obvious reason, within writeBlocking. You should use java.lang.System.nanoTime() before and after that call to verify the delay is really at that spot.

1 Like

Thanks for your response. I found in archive, that there are missing heartbeat signals (1 s) exactly in the moment, where writeBlocking responded after 30 seconds. We will monitor PLC and OPC connection.