Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6009 Voltage Generation vi

I'm fairly new to LabVIEW so hopefully this should be an easy question to answer. I have a USB 6009 and I need to generate a 5V signal that will trip a relay. I only need the signal to be generated for at most 3 seconds. However, when I use the example program Gen Voltage Update.vi under Examples-->Hardware Input and Output-->DAQmx-->Analog Generation-->Voltage, it keeps the signal running until I stop the program, manually enter 0V into the Voltage Output control and restart the program. How could I modify that program (or find another program) to have the 5V signal stay on for only 3 seconds? Thanks

0 Kudos
Message 1 of 13
(3,860 Views)

Hi aparker,

 

Thanks for using the forums!

 

I've modified the example to include a state machine architecture which should achieve the functionality you require.  You can double-click the "Elapsed Time" Express VI to change the delay time.  Currently the VI will 'Write High > Wait > Write Low' and then clear the task to release the resource.


Regards,

Peter D

0 Kudos
Message 2 of 13
(3,852 Views)

Peter,

 

Thank you for your quick response. Unfortunately, I'm still not getting it to work. I've attached a screenshot showing the error that I get. When I hover the mouse over either of the two bad wires in the screenshot, it says:

 

You have connected two terminals of different types.

The type of the source is cluster of 3 elements.

The type of the sink is boolean (TRUE or FALSE).

 

How should I remedy this?

 

Thanks,

 

Adam

0 Kudos
Message 3 of 13
(3,843 Views)

Since you are not using 2010, unbundle the Status from the error cluster.

0 Kudos
Message 4 of 13
(3,832 Views)

Actually, I am using 2010.

0 Kudos
Message 5 of 13
(3,826 Views)

Sorry, I meant 2011. The ability to wire an error cluster directly to the OR gate is a new feature.

0 Kudos
Message 6 of 13
(3,821 Views)

How do I unbundle the status from the error cluster?

 

Thanks

0 Kudos
Message 7 of 13
(3,805 Views)

Use the Unbundle By Name function Smiley Happy


Regards,

Peter D

0 Kudos
Message 8 of 13
(3,803 Views)

Here is a little example.

 

UnbundleByName.png


Regards,

Peter D

0 Kudos
Message 9 of 13
(3,800 Views)

Thanks a lot. I got "Gen Voltage Update.vi" to work. However, I'm still working on yet another problem. In the big picture, I need my program to:

1) Generate 5 V for 3 seconds (which is taken care of)

2) Take input voltage measurements continuously and write them to a file until I manually tell the program to stop running.

 

I've already got a program that will do each of these two functions individually but I'm trying to merge them into one. When I run the program, the 6009 generates 5V for 3 seconds and goes back to 0V afterward. However, the program stops after 3 seconds and generates the error message seen in the attached .png file. How would I get these two functionalities into the same program?

 

Note: "Cont Acq&Graph Voltage-Int Clk-Timed Loop_d5.vi" requries "Export Waveforms To Spreadsheet File_special.vi" in the same folder in order to run. I've attached both files.

 

I appreciate your help.

 

Adam

0 Kudos
Message 10 of 13
(3,772 Views)