11-04-2011 04:38 PM
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
11-04-2011 08:26 PM
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.
11-06-2011 04:41 PM
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
11-06-2011 06:17 PM
Since you are not using 2010, unbundle the Status from the error cluster.
11-06-2011 10:01 PM
Actually, I am using 2010.
11-06-2011 10:36 PM
Sorry, I meant 2011. The ability to wire an error cluster directly to the OR gate is a new feature.
11-07-2011 10:08 AM
How do I unbundle the status from the error cluster?
Thanks
11-07-2011 10:10 AM
Use the Unbundle By Name function
11-07-2011 10:13 AM - edited 11-07-2011 10:15 AM
11-11-2011 04:50 PM
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