LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 Turning Analog outputs ON and OFF

Solved!
Go to solution

I am new to LabVIEW. This is the first time I have tried to write a VI that talks with an external device. All I am trying to do set the voltages and turn ON and OFF the two analog outputs to a USB-6008. I am not reading any inputs or doing anything with the digital outputs, I just want to turn the analog outputs ON and OFF.

0 Kudos
Message 1 of 7
(2,982 Views)

What voltages do you define as on and off? Have you tried something as simple as the DAQ Assitant to output them, one at a time?

0 Kudos
Message 2 of 7
(2,975 Views)

I would like to be able to adjust the voltage from 1 to 5 volts. Zero volts being the OFF position.

I need to be able to have have both analog outs ON, Both OFF or one ON and one OFF.

The VI that comes with the USB-6008 has such a vi, but it is bundled with lots of other commands that I don't need.

I f I could just unlock the vi that comes with the device and extract just what I want I should be okay.

0 Kudos
Message 3 of 7
(2,961 Views)

I have no idea what VI you are refering to but you only need 3 different basic functions - DAQmx Create Channel, DAQmx Write, and DAQmx Clear. It's really a very simple task.

 

0 Kudos
Message 4 of 7
(2,948 Views)

 smg45acp -

 

I just wanted to clarify that the terms ON and OFF are digital terms. Analog is any voltage, although you can certain manage analog waveforms to fit digital waveforms. You are probably working with a TTL interface if you want 0 to be OFF and 5 to be ON.

 

You may try looking at the help files for DAQmx that install into LabVIEW when you install the drivers (Help»Find Examples => Hardware Input and Output»Analog Generation»Voltage). These can be very helpful for demonstrating how to perform different basic functions with the device and they are valuable starting points for your own code.

 

If you would like to learn more about the basics of setting up the device, I recommend our Getting Started with NI-DAQmx: Basic Programming with NI-DAQmx page.

- Regards,

Beutlich
0 Kudos
Message 5 of 7
(2,935 Views)

The program will be used to control a multi band RF filter.

The filter has two control logic lines and four different filter bandwidths.

                  Line 0          Line 1

BW1               0                   0

BW2               0                   1

BW3               1                   0

BW4                1                  1

The logic low being zero volts and the logic 1 being 5 volts.

Yes, it's extremely simple, but I'm still learning what functions are available in LabVIEW and what the functions even do.

After figuring out how to set the analog outs puts I'll make four radio buttons, one for each bandwidth, and a case structure with four cases, one for each button.

0 Kudos
Message 6 of 7
(2,926 Views)
Solution
Accepted by topic author smg45acp

Here is what I have so far.

It does the job of setting the analog out puts to the USB-6008.

The only thing left to do is make it an executable. I don't have a clue on how to do that yet.

I'm sure a true LabVIEWw guru could have done it better, but it does the job.

0 Kudos
Message 7 of 7
(2,903 Views)