From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

User defined time period for output voltage

Hello,

 

I am new to the labview software package, and have been messing around for a few hours now trying to simply light an LED for a user defined time period, and setting back to 0V when the program stops.

 

I have tried using a while loop and event structure to achieve this, however I only seem to get the myDAQ to latch the LED on.

 

Can anyone point me in the right direction to achieve this, please?

 

Thanks in advance!

0 Kudos
Message 1 of 4
(3,550 Views)
What do you have inside the event structure? I think the myDAQ has software timed digital I/O so all that you need is a DAQmx Write with a true constant and its error out wired to Time Delay function and the error out of that is wired to DAQmx Write with a false constant. The DAQmx Write has a polymorphic selector that can be chosen for 1Samp and a Boolean input.
0 Kudos
Message 2 of 4
(3,544 Views)

Hello, thanks for the reply.

 

Sorry, it is an analoge output varying between 0 - 10V.

 

The LED was just to test the A0 port was and switching the LED on/off for a set time period.

 

Thanks.

0 Kudos
Message 3 of 4
(3,536 Views)
You can do it exactly like I said except with an analog task. You can also do it by specifying n samples. The duration of the analog output is basic arithmetic. The number of samples divided by samples per second is the second of the output. Just follow that by another write to set the output to zero. Either can be done with the DAQ Assistant as well. Please attach an image of what you have tried. I'm posting from my phone. Include any error messages and if you use the DAQ Assistant, include an image of its set-up. From what you have described, it should not take any more than as couple of minutes to write the program.
0 Kudos
Message 4 of 4
(3,528 Views)