From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

question from a beginner

Here is the subVi. Thanks again
0 Kudos
Message 91 of 108
(751 Views)
There are no waits in the subVI you posted. Any waits that you put into a subVI are going to affect the main. That only makes sense. If a subVI takes 1 second to execute and then it takes 10 seconds, it will take an additional 9 seconds before the main VI gets data back. During that extra 9 seconds, the main can do nothing. I've said this before. That's the way subVIs normally work. Are you sure that you only added 100ms of waits? What function did you use?
Message 92 of 108
(747 Views)
Sorry I posted the wrong subVi. Here it is. In my Vi, there is a data acquisition with the daq board. When I run the Vi, the time of the Vi is rally slow. It actually takes almost 10s to go from 0.0s to 0.1s. Thanks Dennis
0 Kudos
Message 93 of 108
(744 Views)
Hi Dennis, Do you think that the slower clock of the Vi is due to the acquisition of data in the subVi? Thanks
0 Kudos
Message 94 of 108
(726 Views)
Could very well be. If you have the Professional version of LabVIEW, you can use the profiler (Tools>Advanced>Profile VIs). This will tell you where the time is being spent.
Message 95 of 108
(727 Views)
Thanks. i have the professional version. I will try.
0 Kudos
Message 96 of 108
(719 Views)
Hi Dennis,
Thank you. Before I solve the timing problem of the Vi, I have a question concerning the subVi pump in attachment. There I have two timers one for "copyB pump" and one for "copyB pump". I did so because I need the time to be reset before execution of "copyB pump". This because in "copyB pump", I calculate a volume based on the rate and time. However when I open the file toto.text, the time is not reset before "copyB pump" and so my formula node in "copyB pump" does not give me the correct V2. Do you know how I can solve this? Thanks again.
0 Kudos
Message 97 of 108
(711 Views)
0 Kudos
Message 98 of 108
(714 Views)
I'm not sure I understand. In the pump VI, you are sending the same time to both VIs. I think you're missing a basic understanding of LabVIEW. LabVIEW is dataflow. Functions execute when the data required is present. You have tick count outside your sequence structure. Both tick count values are obtained esetnially in parallel before the sequence structure runs. If you want two different tick counts, why did you put them outside and wire their values through a couple of frames? Put them inside the frame that they are required.
0 Kudos
Message 99 of 108
(712 Views)
hi Dennis, Thank you for your help. The program is running now. However, I cannot collect the data as I want. In the attached program, there are errors "tunnel is missing". If I fixed these errors by deconnecting the output wires of the sequence 0 or 2, I get data only from the case structure connected. However, I need data from sequence 0 and 2. Do you know what should I do to the tunnel to get data from both sequences. Thanks.
0 Kudos
Message 100 of 108
(680 Views)