06-28-2025 12:04 PM
I just ran across this sentence in a LabVIEW StyleGuide on the DQMH website:
"Avoid the use of the Value Signaling property for inter-process communication."
In my medium-size applications, I often have a GUI loop (with an Event Sequence), a DAQ loop, and a Logging loop in the top-level vi. I use queue's or events to communicate between the loops, and sometimes a Value Signaling property to trigger an event case in the GUI loop from one of the other two loops. I am in the midst of learning DQMH, and can see that if I employed properly, the need to using Value Signaling would largely disappear. But in the meantime, can someone explain why it's a faux pas?
Solved! Go to Solution.
06-28-2025 01:03 PM
What is an "event sequence"?
We can probably give more targeted advice once we see some simplified code. What do the triggered events do?
06-28-2025 01:24 PM
My guess is that Value Signaling is much slower because it's performing a front panel update.
06-28-2025 01:39 PM
I meant "Event Structure", not Event Sequence.
06-28-2025 07:57 PM - edited 06-28-2025 08:02 PM
Paul Cardinale nailed it. The Value Property (with or without signaling) is performed in the UI thread just as any other VI frontpanel property. This means your code has to arbitrate for the UI thread, update the control value, wait for the control to be redrawn and then return back to the thread it was originally operating in.
There are various examples that show the performance difference of using the value property nodes, globals, and locals. From those the first is way less performant than the other two.
Globals are bad in many other ways as they let anyone change the value at any time, creating perfect sources for race conditions. Locals are better as they isolate access to one single VI but if you are not careful, you still can create race conditions.
But the value property is slow, evil, very easy to create race conditions and did I mention ugly? Use of it should be causing you some pain. It’s sometimes unavoidable but in most cases simply lazy programming, that will bite your ass rather sooner than later.
06-28-2025 08:43 PM
But the value property is slow, evil, very easy to create race conditions and did I mention ugly? Use of it should be causing you some pain. It’s sometimes unavoidable but in most cases simply lazy programming, that will bite your ass rather sooner than later.
I've gotten away with them without being bitten in the ass because I only happen to have used them where timing is not critical, and I am always very careful about race conditions. But I promise to stop using them, if for no other reason than to avoid being called lazy 😀. Thanks to you and Paul for explaining.