Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn voltage output of NI 9263 on and off using DAQ assistant.

I need to create a VI that will output 5 volts from a NI 9263 module. I would like a front panel switch that will allow me to start and stop the voltage output while the VI is running. For example, I want to turn a 5 volt fan on and off using the DAQ Assistant. I have created a front panel that allows me to select the output voltage. When I run the VI it outputs the voltage but when I press the stop button, nothing happens. The voltage is still being applying to the fan. Please help.
Message 1 of 15
(7,011 Views)
It sounds like you need to make sure you write a zero to the DAQ output before the program quits running. 
0 Kudos
Message 2 of 15
(7,002 Views)
So how do I do I write a zero to the daq output when the program stops running? Attached is an image of my block diagram. When I run the VI and press the stop button on the front panel nothing happens. My goal is to press the stop button which will make the output zero volts. When the stop button is released, the output will go back to 5 volts.

Message Edited by wigging on 03-19-2008 03:28 PM
0 Kudos
Message 3 of 15
(6,997 Views)
What version of LV are you running?
0 Kudos
Message 4 of 15
(6,983 Views)
LabView 8.5 using CompactDAQ.
0 Kudos
Message 5 of 15
(6,979 Views)

It looks like you have the right idea.  I'm guessing that if you hooked up the simple error handler to the error out of the second DAQ assistant you would see some kind of error being generated that is preventing the last 0 being written.  I'm not a big fan of the DAQ assistant and don't use it much.

I've attached a sample vi that uses the DAQmx vi's.  You will just need to select the right channel in the constant.

0 Kudos
Message 6 of 15
(6,962 Views)
Using your VI gives me the same problem as mine using the DAQ Assistants. When I set the mechanical action of the stop button on the front panel to "switch when pressed" the voltage output acts like it wants to go back to zero but bounces back and forth from zero to the voltage output specified. I am using an ordinary voltmeter to take readings.
0 Kudos
Message 7 of 15
(6,958 Views)
Any chance you have the output setup to default to some value other than 0V?  Any chance you have another program running that is writing to the same output?
 
 
Update :  I tested this on my machine using a relay output on a cDAQ.  Only change was to make the Analog Voltage writes be Digital Output writes.  It works fine here.


Message Edited by centerbolt on 03-19-2008 05:02 PM
0 Kudos
Message 8 of 15
(6,952 Views)
There are no other programs running. I did notice that when I double-click the DAQ Assistant block, that there is a voltage out value of 1.1. I tried to set this to zero but once I run the VI and check it's setting again, it defaults back to 1.1. My generation mode is set to 1 Sample (On Demand).

As for the relay output. I'm using the NI 9263 module. I don't think I can output a digital signal.
0 Kudos
Message 9 of 15
(6,943 Views)
Changed my block diagram. This seems to work but it's cumbersome. Once you have the output voltage set, you run the VI. In this case set the output voltage to 3 volts. When the vi is running, in order to turn on the fan you must depress the ON button (see voltage_on picture). To turn off the fan, you must first deselect the ON button, then select the OFF button (see voltage_off). Repeat the steps in reverse to turn the fan back on. Is there a VI button, control, or toggle switch that I could use instead of doing on this of turning the loops on and off?
Download All
0 Kudos
Message 10 of 15
(6,914 Views)