Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

usb 6008 triggering digital output

My USB-6008 device works fine for acquiring an analog signal from a digital trigger port. Given this capability I expected it to be able to be able to do a digital output from the digital trigger port. This does not work but I don't understand why the device cannot do this. I suspect my understanding is not correct.

Specifically, I am running LabView 8.2 FDS with a USB-6008 as device "Dev1". I can run the distributed example "Acq&Gaph Voltage-Int Clk-Dig Start.vi" which waits on a rising edge on /Dev1/PFI0 to trigger an analog acqusition on Dev1/ai0. This works well. What I really want is to toggle the state of a digital line "Dev1/port0" when I receive the trigger from /Dev1/PFI0. This fails with the error -200077 from the "DAQmx Timing" vi which says:

Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:3->t3.vi

Possible reason(s):

Requested value is not a supported value for this property.

Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand

Task Name: _unnamedTask<3A>

Can someone illuminate what is going wrong here? I triggering works on the USB-6008 for an analog acquisition why can't it work for a digital operation?

My sample code (which fails) is attached.

Thanks in advance for all your help.


0 Kudos
Message 1 of 8
(5,330 Views)
 

Hey mwil,

You are receiving the 200077 error because the USB-6008 only supports software-timed DIO so you won't be able to configure a sample clock. You also won't be able to trigger on the PFI line with a digital operation. More information can be found in the USB-6008 user manual below.

NI USB-6008/6009 User Guide and Specifications
https://www.ni.com/docs/en-US/bundle/usb-6008-6009-feature/page/introduction.html

Your application should, however, work with software timing. You could monitor the value of one DIO line and output another accordingly.

 
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 2 of 8
(5,304 Views)

Sorry for posting on such on old thread but the topic is very similar to my question.

I had a few general questions concerning the usb 6008 and the digital outputs. It seems to me that these outputs are always ON as soon as you power the device up? So simply wiring a boolean switch to these outputs with DAQmx write code would not control the ON/OFF states? So, as was mentioned in the previous post, it is necessary to read the DO values (which are normally ON) using the digital inputs and then adding the needed code/controls before sending out the digital value to its intended target?

I basically would just like for someone to either verify or correct me on that. Thanks.

0 Kudos
Message 3 of 8
(4,825 Views)

All of your assumptions are wrong. If you looked at the manual, you would see that the power-on state is that all lines are high-impedance inputs with a weak pull-up. You do not have any control over the power-on states.

 

Using a DAQmx Configure Channel will set a line/port to an input or output and using a DAQmx Write will set an output to high or low. Period. Don't see where you see a need to read DO values. Especially since there are no DO values when you first power-up the device.

0 Kudos
Message 4 of 8
(4,820 Views)

Well I was assuming that the DO values were high when you first power it up and was trying to find out how to change that according to a boolean control in order to activate a set of relays.

So, that cannot be done with the usb 6008?

0 Kudos
Message 5 of 8
(4,815 Views)

You can change the digital I/O to anything you want once you start your program but you cannot change the power-up state. Other, more expensive DAQ boards do have the ability to program the power-up state.

0 Kudos
Message 6 of 8
(4,810 Views)

I am seeing HIGH on the digital outputs (P0.0-P0.7) when measured with a DMM, that is as soon as the device is connected. A boolean switch that sends its value to a write to the DO's does not change the states.

0 Kudos
Message 7 of 8
(4,808 Views)

OK, thanks for clearing that up.

0 Kudos
Message 8 of 8
(4,807 Views)