My LV2020 on the Win 10 client subscribes to the data_change_event for sys/tg_test/1/ulong64_scalar. The timeout is set to 1 second. When Test Ds is running, everything works as expected. But when I stop the DS, at some point my client receives a ghost event with timeout = false.
How to reproduce this:
Configure a change_event for ulong64_scalar in JIVE, e.g. DeltaAbs = 1
Start the VI and observe the indicators.
Stop the test DS
Observe the indicators. After a few seconds, the timeout indicator shows false and the received value is set to zero
Can somebody explain this behavior?
Workaround is to check error code == 0 in the attribute raw data cluster.
I don’t know how the labview bindings work, but I can explain what happens with Tango in general.
If a client has subscribed to events, and the server is no longer reachable (terminated, or maybe a network issue), then the client will generate “timeout” events. Roughly, every 10 seconds. If the device server comes back, then the client will automatically resubscribe, and you’ll start receiving normal events again.
Here’s an example using PyTango, where the device server was stopped. You can see the timeout events keep coming until we unsubscribe the client.
>>> import tango
>>> dp = tango.DeviceProxy("sys/tg_test/2")
>>> eid = dp.subscribe_event("boolean_scalar", tango.EventType.CHANGE_EVENT, tango.utils.EventCallback())
2025-07-21 09:36:43.811053 SYS/TG_TEST/2 BOOLEAN_SCALAR CHANGE [ATTR_VALID] True
2025-07-21 09:36:46.811386 SYS/TG_TEST/2 BOOLEAN_SCALAR CHANGE [ATTR_VALID] True
# kill server
2025-07-21 09:36:56.044967 SYS/TG_TEST/2 BOOLEAN_SCALAR CHANGE [API_EventTimeout] Event channel is not responding anymore, maybe the server or event system is down
2025-07-21 09:37:06.050172 SYS/TG_TEST/2 BOOLEAN_SCALAR CHANGE [API_EventTimeout] Event channel is not responding anymore, maybe the server or event system is down
>>> dp.unsubscribe_event(eid)
# no more event callbacks
Are you raising the issue because you expect timeout = True, instead of the False value you are seeing?
Hi @ajoubert, thanks for the explanation. This makes it clearer and the PyTango example gives a meaningful error message. In the case of the LV binding, it is more hidden.
I raised the issue because the behaviour was not intuitive to me. And yes, I expect timeout == true in case of a timeout.