LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IV-characterization

I'm trying to use the IV characterization  VI downloaded from the NI website.  I've modified it, so I can keep track of the instantaneous temperature and control the light source I'm using (via a solid state relay) in order to shut the lights off if the module temperature reaches a certain limit.  The original VI was changed so I can hit a "start analysis" button and take repeated readings without the entire program shutting off (thus shutting off the temperature control).  My problem is, I can either get the instantaneous temperature readings to work, and not the analysis portion of the VI, or vice versa.  As the program is now (see attachment), I can run the analysis but the instantaneous temperature won't keep running.  If I contain the upper portion of the block diagram in a while loop, the instantaneous temperature will show but the the analysis will freeze.  Can anyone look at the VI and recommend how to get both portions of the program working at the same time?

0 Kudos
Message 1 of 2
(2,195 Views)

Because you've got a loop within a loop.  The outer loop can't go to its next iteration until the inner while loop finishes.  That is basic data flow principles of LabVIEW.

 

Not only that, you need to quickly start and stop in order for the event structure to fire otherwise it will hold in the inner loop waiting for that button press.

 

Run your code with Highlight Execution on so you can see what is happening.

 

You need to separate data acquisition and analysis into two parallel while loops passing data between them using queues in a producer/consumer architecture.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 2
(2,191 Views)