04-28-2011 04:01 PM
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
04-28-2011 05:28 PM
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 !
04-29-2011 12:55 PM
Thanks, I am sure I can find that and start learning the functionality. thanks again!
Dav
05-29-2011 12:45 PM
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?
05-29-2011 05:59 PM
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.
05-30-2011 10:04 AM
Sorry, I should have posted the "little piece of architecture." Here it is.
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.
05-30-2011 10:10 AM
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
05-30-2011 08:40 PM
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?
05-31-2011 08:42 AM
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
05-31-2011 08:53 AM
Ah, I"ll try that, Lynn. Thank you very much.
Dave