LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

on/off daq program

Hello,

 

I am trying to build a program that will do input and output through a daq.  I am reading data from three sensors and sending out voltage to three pistons.  I would like to create a program in which I can have the program run and be able to turn the pistons on and off without stopping the program.  I already have a setup that works for reading the data pretty well, I just can't figure out how to make an on/off and have the program continue to run.  Any help would be appreciated.  I tried using a waveform generator with different square wave duty cycles, but that doesn't work well.  Thanks in advance!

 

-stefenmcloven

0 Kudos
Message 1 of 5
(2,732 Views)

A copy of your vi will make things easier.

 

But, you are going to need an input task (which you have) and an output task (which you want).  You do not want to stop and start a program for control, you will just want to change the output voltage to the pistons to control them.  The easiest and quickest way is to have a boolean control a case structure.  The true case could be the ON voltage and the false case could be the OFF voltage.  Then you could move into event structures.

 

Also look search the example files (help -> Examples) for voltage and there will be all kinds of good info.

0 Kudos
Message 2 of 5
(2,722 Views)

I don't know how much my vi will help, there's not much there, but I'll go ahead and attach it.  I understand the case structure, but I don't know where to put it or what function I would use to change the voltage.  Thanks for your help!

 

-stefenmcloven

0 Kudos
Message 3 of 5
(2,677 Views)

what is your Daq? What is your pistons? What are the voltages needed to control?

0 Kudos
Message 4 of 5
(2,668 Views)

I'm using a USB-6211 daq, some air-powered pistons connected to a solenoid, and +/- 10V.

0 Kudos
Message 5 of 5
(2,623 Views)