LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I program the 6704 board for constant output useing CVI

Here is what I want to do with the 6704 Card
    1) User selects an output channel
    2) User Turns on the switch
    3) +5 volts is output on the channel
    4) When the user turns off the switch 0 volts are sent out the channel
   
    5) There are 11 discrete channels
Maybe I'm dense but I am trying to do a simple thing with a complicated system all of the examples seem to assume some periodic signal, my signal is simply off and on.
 
How do I accomplish this?
 
Harry Watkins
Sofdtware Engineer OADS
Telephone 703-393-0754
0 Kudos
Message 1 of 4
(3,105 Views)

Dear Harry,

It is too bad that you don't have a board with more DIO lines. However, this can be done easily using AO lines as well. Have you seen this example? It doesn't use a switch, but it shows how to output a single voltage. Replace the button with a switch. Instead of using the slide, have an if else loop in your code. If the switch is on, make &data for AQmxWriteAnalogF64 5V. If off, make it 0V. The voltage will remain at the same level until you update it with a new single voltage. Please let me know if you have any questions. Have a great day!

Sincerely,

Marni S.

0 Kudos
Message 2 of 4
(3,093 Views)
The link under this will not open so I can't see the example
0 Kudos
Message 3 of 4
(3,079 Views)
The link goes to C:\Program Files\National Instruments\CVI71\samples\DAQmx\Analog Out\Generate Voltage\Volt Update.
0 Kudos
Message 4 of 4
(3,067 Views)