04-03-2013 07:43 PM - edited 04-03-2013 07:49 PM
I'm trying to control the voltage (analog output) going to a wind tunnel based on the user input for wind tunnel velocity. I am checking the velocity from a pitot probe (analog input). Both input and output are set as 'continuous'.
Here is the issue: I got buffer error initially when I intially sent in the output value as a 'double'. I built it in an array, and sent it through and now I get another error. So I cannot change the output based on the input.
The output and input are connected through an equation. If you look at the VI, Vin->VoltIn, VoltOut->VOut. Where VoltIn is the analog output (corrected for some error) and VoltOut is the analog input. I check if Vin and Vout are close to each other, if not VoltIn increases or decreases.
Seems logical, right?
The Vin-Vout loop disabled because I am trying to figure out what is wrong with VoltIn (analog output).
Any help?
04-04-2013 09:20 PM
Hello
- The error you are getting when passing the array to the DAQ assistant is because you have just one element in that array, and the minimum value permitted is 2 elements. So you could include the same element two times in the array to solve that error.
Regards
04-05-2013 12:05 PM
I will try to do that and see what happens.
Can someone tell me if the use of local variable is appropriate?
I have to run two daq assistants for an ouput and an input. I went with the flat sequence because I want to read the input before I send the output. Can this be done without the flat sequence?
04-08-2013 11:12 AM - edited 04-08-2013 11:12 AM
I revamped the program to not use daq assist.
The whole program does nothing, now. When I hit run, the value of NewV is on the order of 10^7.
When I used the highlight execution, I get an error -200279.
Attached is an image.
Also, it might help to know what I am trying to do..
I have a wind tunnel that will be used for propeller testing. The user inputs a desired speed. I am reading in air speed via pressure transducer (as a voltage..analog input). After I find a mean of around 10 readings, I get the wind tunnel speed. Using this speed, I compare it to the desired speed, and then add or subtract a voltage dV to the voltage that is the analog output.
I want 5second delay between the signal going out (analog output) and the program reading in the signal that is compared to the desired speed. This is to allow the wind tunnel to get to speed after the signal is sent through. Do I need to add another frame between two 'start tasks' vi and put a 5 second delay, there?
Attached is also the program.
The voltage to velocity conversions were obtained from previous calibration of pressure transducer and wind tunnel BNC control console.
Does the initial speed of the tunnel need to be something other than non-zero (for analog input)
04-08-2013 07:54 PM
Hello
Here you can find more information about the error code you are getting:
http://digital.ni.com/public.nsf/allkb/AB7D4CA85967804586257380006F0E62?OpenDocument
I recommend you to divide your code in little parts to debug them. Try to use subVIs. You should try to test DAQmx VI's with simple code, once that part is working you could add your equations.
You could take a look to the developer zone, there you could find similar applications and compare them with yours.
http://zone.ni.com/dzhp/app/main
Regards
04-09-2013 12:07 AM - edited 04-09-2013 12:11 AM
Thanks for the links. I will go through them. I am struggling with sample rate on analog output, compared to analog input. I want a time delay, say 5 seconds, between analog input and output. I also only want to read the data for, say, 2ms, then write the new data once, and then wait for 5 seconds, and then check again. If it is within tolerance, it stops the cycle.Also, I want to do 'sample compression' on the signal coming in to get a better average reading.
I was able to find a dynamometer software here: http://zone.ni.com/devzone/cda/epd/p/id/1957 but I need it converted to labview 2012 and I have made a request in the forum for that. I am just going to wait and see what can happen.
In the meantime, I am going to try to understand better on how long and when analog output is executed in the program.
Thank you!