LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wind tunnel speed adjustment

Hello,

 

I am currently writing a program to adjust the speed of a wind tunnel.  I have a few questions about my program and why it is working in a particular way.  In addition,  I am fairly new to LabVIEW so if someone see's a better way of constructing my program I am all for suggestions.  For example, I have a lot of nested loops which I just learned Consumer/Producer loops might eliminate.  I have learned a lot in the past few months but still have a long way to go.

 

Here is the overall goal IM trying to accomplish.  I am using an ABB ACS 550 drive to power a wind tunnel.  In addition, I am controlling the drive from LabVIEW using the digital outputs on my DAQ (NI USB-6211). 

 

The program I have attached, will start the wind tunnel, monitor the mach number, compare it to a target mach number, then adjust the RPM of the drive either up or down, and keep repeating the monitoring and adjusting until the target mach number (range with limits) is reached.  The one thing ive tried and have questions about is another timer. I inserted on in a frame before the daq assistants to allow the adjustment of RPM to stabilize.  I wanted to wait Sec before collecting the mach number again.  However when I did this it shortened the timer in the while loop.  Why is that? Lastly, if I put the timer to 3 sec I get an error (Code 200279).

 

Thanks for the help!  Again any suggestions for improvement would be greatly appreciated!

 

-Alex

 

 

0 Kudos
Message 1 of 4
(2,552 Views)

Hi Alex,

 

Let me get some clarifying info from you. 

 

1) "I wanted to wait Sec before collecting..."  How many seconds did you want to wait?

 

2) Which timer did it shorten in the while loop? 

 

3) Which timer gives you error 200279 when you set it to 3 seconds?

 

I would also suggest that you look at using a state machine architecture to simplify your design a little bit, though it seems like you are close with the design you have so you may not want to take the time to redo it. However, if you plan on expanding this program in the future, you should look at changing the design.

 

Regards,


Daniel H. 

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

 

Hello,

 

Sorry for not being clear, I was in a hurry the other day when I wrote this.

 

Over the weekend I did some more research on how to improve the program and ended up creating a state machine that completes the same tasks.  I have attached the new code however I am still having the same issues.  The answers to your questions are,

 

1 and 3... Ideally I would like a 3 sec wait time after adjusting the mach number.  I don’t believe this timer was included in the other code; instead I was trying to explain where I had tried putting it.  I tried putting it in the same case structure as the while loop that collects the mach number.  It was before the loop.  In addition, I tried putting it in the structure that the increase/decrease daq assistants were.  Each location allowed me to have a time < 3s.  When I set the timer to 3s that is when I would get the error.

 

2. When I had the timer I described above, it affected the elapsed time of the while loop.  I want the while loop to run for 3s to collect 300 mach numbers to average (100Hz sample rate).  With the addition of the mentioned timer, even if I set the length of the elapsed timer to 3 secs. it seems to only run for 3-timer secs.  For example, if I set the timer to 2 secs. the elapsed time would only run for 1 sec.  I noticed this when observing the elapsed time indicator on the front panel.

 

 

I have attached the new vi (State Machine) and a picture highlighting the timer I am talking about.  I am also having the same problem with the timer affecting the elapsed time. I have adjusted the code so it takes the timer and adds that amount of time back to the elapsed timer length, however, I don’t think this is the correct way of doing it.  Now when the program runs, the first time the elapsed time indicator will run showing 0-5secs. but for every other iteration of the loop it will only show 2-5 secs.

 

Lastly, as I am putting the finishing touches on my new program, if you have any other suggestions let me know! 

 

Thanks for your help!

 

-Alex

 

Download All
0 Kudos
Message 3 of 4
(2,488 Views)

Hi Alex,

 

I think the simplest solution for you will be to remove your elapsed time VI and remove the while loop, then go into your DAQ Assistants and change them from Continuous Samples to Finite Samples. If you set Samples to Read = 300 and Sample Rate = 100 Hz, then it will aquire data for 3 seconds and spit out a 300 element array that you can average.

 

There's no need to have the while loop there. The DAQ Assistant will collect data for 3 seconds, then your program will move to the next frame. I think that would be a good solution to the problem you are seeing.


Regards,


Daniel H.

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