09-09-2012 10:36 PM
Those shared variables are all single processes.
My coworker's program reads from and writes to a lot of single process shared variables in several threads.
He said that when there were a few of such variables, time values from DAQ reflects the current time, but when there were a lot of them, time values didn't change as time went.
DAQ SubVI and shared variables don't interact, but shared variables somehow affect DAQ time reading.
What is the problem?
09-11-2012
09:22 AM
- last edited on
09-14-2025
09:53 PM
by
Content Cleaner
From what I understand your using shared variables to share data between several threads/loops in LabVIEW. Shared variables might not be the best way to accomplish that within the same VI, since there is a lot of overhead/processing required for each of them. If you have a lot of single process shared variables, I would suggest you look at modifying your programs architecture. (http://www.ni.com/white-paper/7605/en)
Since shared variables are like global variables, I would reccomend actually using wires when possible, and local variables as nessecary.
Now, with that, I'm confused about the relation between your DAQ and the current time. What DAQ are you using? Is the DAQ aquiring the time? Are you using the timestamp on the shared variable?
Your DAQ system can only aquire data and process if you give it adequate time, it sounds like the processing overhead of the shared variables is starving your DAQ tasks/threads.
More on Shared Variables:
https://www.ni.com/en/support/documentation/supplemental/06/using-the-labview-shared-variable.html