07-22-2008 04:48 AM
07-22-2008 07:35 AM
07-24-2008
11:22 AM
- last edited on
07-09-2025
06:42 PM
by
Content Cleaner
I would keep the for loop inside the sub VI (I assume you are talking about the StepandCount_func_noloop.vi). Create a waveform graph indicator inside the subVI, then create a Shared Variable and place it in your main VI. Shared variables are great for sharing information between sub VIs. That being said, I have a few comments about your post, and your code.
- The VI uses local variables extensively. Local variables are good for sharing data between parallel loops (mainly sharinig a stop button). However, in your case you may run into problems using local variables this way. Mainly because you can’t be sure what values the local variables are holding at a certain instant in time. I would recommend taking a look at the following articles for more information.
Avoiding Race Conditions
Are LabVIEW global variables good or bad, and when is it OK to use them?
- In your previous post, you had mentioned wanting your program and DAQ to run in real-time. Please understand that whenever using Windows you will have inherent latencies. I cannot say for sure how deterministic you system is because there are too many variables (such as system specifications, installed software, maintenance frequency, environment, etc.) that will affect the performance. If you don’t mind latencies of about 100-200 ms, then you are fine.
Let me know if anything I mentioned is unclear.