LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI loaded with either Invoke Node or Call by Reference only functions properly when it is already open

I have modified the Dynamic Loading example so that my case for the first button loads three VIs in succession, rather than one.  The first VI generates a waveform, the second uses this waveform to calibrate the measurement, and the last VI stops the waveform generation.  I discovered that the middle Calibrate.vi would only function properly if the Calibrate.vi was already open.  I attempted the VI loading of the Calibrate.vi with both the Call by Reference (identical to the example) and the Invoke Node method.  In both cases, the first and last VIs (Multitone Gen.vi and Stop Gen.vi) functioned properly, but the Calibrate.vi only worked correctly when it was already open.

 

I have tried resetting the NI USB DAQ device and that hasn't helped.

 

My search for answers has come up empty and I am hoping that someone in the forum might be of assistance.  I have attached a snapshot of each version of my code, both built off of the Dynamic Loading example.

 

Thanks!!

 

 

Download All
0 Kudos
Message 1 of 4
(2,841 Views)

What is the calibrate VI designed to do?

How are the results you are receiving different from the results you expect?

Do you receive any error messages when you try to load and run the middle VI without having the Calibrate VI open?

 

Regards,

Anjelica W.

Regards,

Anjelica W.
National Instruments
Product Marketing Manager
FlexLogger and TestStand
0 Kudos
Message 2 of 4
(2,794 Views)

Hello Anjelica,

 

I do not receive any error messages when the middle VI is loaded and run.

 

The Calibrate.vi acquires three separate corrections (Open, Short, Load), averaging results from a  number (N) of measurements, determined by the user.  When the VI is loaded and run correctly, information describing the multitone waveform generated by the first VI is first acquired.  Then the user selects each correction individually.  The corrections are made and averaged after N corrections, taking approximately 10 seconds per N.

 

When the Calibrate.vi is malfunctioning, the multitone waveform information is not loaded and when a correction is selected, the indicator displaying the number of measurements performed (n of N where n = 0 to N) instantaneously displays N of N.  The correction measurements are not performed.  I have even tried using the Front Panel:Open method and then running the middle VI and this results in the same malfunction unless the Calibrate.vi is already open.

 

Though it is an obvious workaround, I can live with opening the Calibrate.vi via the Open VI Reference method outside of the while loop. This will be my solution for now.

 

Thank you for your response.

 

 

0 Kudos
Message 3 of 4
(2,784 Views)

Can you upload your Calibrate.vi?  It sounds like there's a programming error in that VI, or a race condition around a front-panel property.  What happens if you add a short wait after setting show front panel to true, before executing Run VI, so that the front panel is open before the VI starts running?  Does it make a difference if you use a method node (the Front Panel:Open method) instead of using a property node to open the front panel?

0 Kudos
Message 4 of 4
(2,774 Views)