LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you compare continuously collected data?

Solved!
Go to solution

Ray, thanks for the suggestion.  Since I am pretty new to Labview, I am pretty hungry to learn as much as possible to make future VI development more efficient.  Are the Producer/Consumer items found on the tools palette as functions?  Are they loops like the FOR and WHILE loops?

 

By the way, the CASE STRUCTURE suggested above works GREAT!  THanks!

 

Dave

0 Kudos
Message 11 of 26
(810 Views)

When you launch LabVIEW, select "more..." and look for Producer/Consumer design templete. You can also serach in NI Example for code. See attached image. Hope this can get you started !

 Capture.JPG

0 Kudos
Message 12 of 26
(806 Views)

Thanks, I am sure I can find that and start learning the functionality. thanks again!

Dav

0 Kudos
Message 13 of 26
(791 Views)

  Can I put a WHILE LOOP containing the shift registers inside the case structure?  Will that work the same way until the case changes?  What order will Labview execute a WHILE LOOP containing a CASE STRUCTURE that contains a WHILE LOOP?

0 Kudos
Message 14 of 26
(762 Views)

This little piece of architecture works perfectly for what I am trying to do.  It achieves the desired result of moving the shift register to the highest value and locking the highest value for the desired calculation.  Next, I would like to pass this value from one case structure to another. 

 

In other words, I have a sort of feedback system, where I put in a LOW and HIGH value for an operating range.  If the measured value is lower than the LOW, then, the "CASE 1" is true and the code tells it to increase, (using the shift register architecture) until it exceeds the LOW value specified.  Once the measured value is greater than the LOW value specified, then, that CASE 1 will be false, and CASE 2 will be true (because CASE 2 occurs when the measured value falls between LOW and HIGH). 

 

Now, I want to take the highest value (last SHIFT REGISTER value) from CASE 1, and use it in a calculation for the TRUE value of CASE 2.  How does CASE 2 TRUE get this value from CASE 1 TRUE?

 

In both CASE 1 and CASE 2,, the FALSE case is "DO NOTHING." 

 

Thanks a lot for your help.

0 Kudos
Message 15 of 26
(748 Views)

 

 

 

 

Sorry, I should have posted the "little piece of architecture."  Here it is.

 

 

demo19.jpg

This little piece of architecture works perfectly for what I am trying to do.  It achieves the desired result of moving the shift register to the highest value and locking the highest value for the desired calculation.  Next, I would like to pass this value from one case structure to another. 

 

In other words, I have a sort of feedback system, where I put in a LOW and HIGH value for an operating range.  If the measured value is lower than the LOW, then, the "CASE 1" is true and the code tells it to increase, (using the shift register architecture) until it exceeds the LOW value specified.  Once the measured value is greater than the LOW value specified, then, that CASE 1 will be false, and CASE 2 will be true (because CASE 2 occurs when the measured value falls between LOW and HIGH). 

 

Now, I want to take the highest value (last SHIFT REGISTER value) from CASE 1, and use it in a calculation for the TRUE value of CASE 2.  How does CASE 2 TRUE get this value from CASE 1 TRUE?

 

In both CASE 1 and CASE 2,, the FALSE case is "DO NOTHING." 

 

Thanks a lot for your help.

0 Kudos
Message 16 of 26
(735 Views)

Insert two additional case structures after the one in your image.  One handles the LOW limit and the other handles the HIGH limit.  Depending on what the calculations involve, you may be able to use In Range and Coerce?

 

Lynn

0 Kudos
Message 17 of 26
(733 Views)

Lynn, thanks for the suggestion.  When you say to place the case structure after...do I then wire the shift register to the next case outside the WHILE loop?

0 Kudos
Message 18 of 26
(726 Views)

No, Keep it all inside the loop, unless you need to do the limit testing only once, after all the data is collected.  Then the limit tests would be after the loop.

 

Lynn

 

Limit comparisons.png

0 Kudos
Message 19 of 26
(718 Views)

Ah, I"ll try that, Lynn.  Thank you very much.

Dave

0 Kudos
Message 20 of 26
(716 Views)