LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need VI design help, trying to output continuous voltage

This is one of my first attempts at this, so please bear with my elementary level questions.
 
I'm running LV 8.2.
Using the NI USB 6211 Multifunction I/O
 
My VI seems to work with the exception of a couple issues I'm not sure how to resolve. 
 
1) I would like to turn on my voltage output (2v) on a true condition and have it stay on until the condition changes.  When the condition changes to false, the output should turn off and stay off until the condition changes once again.  Currently, when the loop is true the output turns on, but turns back off before the while loop iteration completes.  So I end up with a on then off at the speed of the loop.  How is this corrected??
 
2) I would like the indicator lamps on the front panel to be on only when the respective output is on.
 
Please have a look, any and all comments are appreciated.
 
Thanks in advance,  Bryan
 
 
0 Kudos
Message 1 of 6
(2,999 Views)

Bryan,

It looks like you take some sort of measurement, filter the results and then you want to make a decision based on the amplitude of the measured signal.  If that is the case then you need to use something like the tone measurment.vi to actually calculate the amplitude before doing the comparison.  The signal you have feeding the selector terminal now is is more like an array of results.  That is probably why things are bouncing around.

 

0 Kudos
Message 2 of 6
(2,978 Views)

Thanks for the reply centerbolt,

I tried somthing like you proposed, only I used a mean value from the mathmatic functions pallet.  This does change the output to a single floating point value.  However, I still have the same palsing response.

Your correct, I am collecting a accelerometer value from a vehicle application.  This measures roll acceleration.  If the value is more than .2g it should activate the 2v output to fire a damper for the appropriate side of the vehicle and maintain the 2v until the condition changes.  If the value is less than -.2, the other side damper should fire and stay on until the accel changes condition.  But it doesn't maintain the output signal.  Instead it cycles on then off every loop iteration.

I also have to figure out hoe to have my indicator light come on only if the respective damper is active.

Thanks again for any help, it is appreciated,

Bryan

Here's what I have at this point:

0 Kudos
Message 3 of 6
(2,955 Views)
Try getting rid of the express vi that is doing the comparison and just use the Greater? function from the Comparison palette.
0 Kudos
Message 4 of 6
(2,949 Views)

I changed the Express Comparison vi's to the simple compare function with no change in the result.  Still getting the on/off cycle at the speed of the loop iteration.

Any other ideas, I'd be happy to try them.

Bryan

0 Kudos
Message 5 of 6
(2,920 Views)

Bryan,

It could be alternating because of something about the workings of the vi or because that's what the inputs are telling it to do.  I would start by deciding if you are correctly reading and processing the signals from your sensors. 

A couple of suggestions:

1 - Wire up the error clusters and make sure that no errors are being generated.

2 - Add a Wait (ms) function to your While Loop to keep it from trying to run full tilt.

3 - Add probes or temporary indicators to help monitor the output of the various DAQ assistant blocks you have placed.

0 Kudos
Message 6 of 6
(2,913 Views)