Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6009 and DAQmx Base Concerns

Hello,
 
I just received a USB-6009 multifunction DAQ device along with DAQmx Base for use on Windows XP with LabWindows/CVI ver 7.1.  Both the 6009 and DAQmxBase are successfully installed however I have several questions, I hope I am missing something obvious:
 
1. The Task Configuration Utility is not needed for use with LabWindows/CVI?  I believe I read this in the Getting Started Guide.
 
2. There is no function panel for the DAQmxBase functions?  I even searched the installation CD and found no .fp files.  So the only way to know what functions are available with DAQmxBase is to open the NIDAQmxBase.h file and search through the function prototypes?  Then, to know what a function does it is necessary to open the C Function Reference Manual via the Windows Start button and search for the function name of interest?
 
3. When creating a digital input or output channel with DAQmxBaseCreateDIChan or DOChan is it only possible to setup a "channel" as an entire port?  Is it not possible to setup a channel as a single input or output line?  Similarly, once the channel is configured is it only possible to read or write an entire port with DAQmxBaseReadDigitalU8 or WriteDigitalU8?  I was expecting something similar to the DIG_out_line function used in Traditional NI-DAQ where a board number, port number, line number and state are passed so that a signal output line can be set on or off.
 
Thanks in advance for the assistance,
- Aaron
0 Kudos
Message 1 of 3
(3,236 Views)





@Aaron T. wrote:



Hello,
 
I just received a USB-6009 multifunction DAQ device along with DAQmx Base for use on Windows XP with LabWindows/CVI ver 7.1.  Both the 6009 and DAQmxBase are successfully installed however I have several questions, I hope I am missing something obvious:
 
1. The Task Configuration Utility is not needed for use with LabWindows/CVI?  I believe I read this in the Getting Started Guide.
 



**The Task Configuration Utility is not necessary, except that there is significant functionality missing from DAQmx Base but present in the utility. That includes a lot of what DAQmx calls "proerties", and includes things like the convert rate for AI scanning.



2. There is no function panel for the DAQmxBase functions?  I even searched the installation CD and found no .fp files.  So the only way to know what functions are available with DAQmxBase is to open the NIDAQmxBase.h file and search through the function prototypes?  Then, to know what a function does it is necessary to open the C Function Reference Manual via the Windows Start button and search for the function name of interest?
 

**I don't use CVI so I don't know anything about this. It strikes me that even if you have such a panel reading the documentation is a good idea 😉



3. When creating a digital input or output channel with DAQmxBaseCreateDIChan or DOChan is it only possible to setup a "channel" as an entire port?  Is it not possible to setup a channel as a single input or output line?  Similarly, once the channel is configured is it only possible to read or write an entire port with DAQmxBaseReadDigitalU8 or WriteDigitalU8?  I was expecting something similar to the DIG_out_line function used in Traditional NI-DAQ where a board number, port number, line number and state are passed so that a signal output line can be set on or off.
 

**Well, the ReadMe file says that USB-6008/9 is supported with both Line I/O and Port I/O. On the other hand, the documentation for DAQmxBaseCreateDOChan and DAQmxBaseCreateDIChan say for the lineGrouping parameter, "Always pass DAQmx_Val_ChanForAllLines." So your question is a good one! Perhaps one of the NI engineers can comment on this.




- Aaron



Thanks in advance for the assistance,




John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 3
(3,218 Views)

 Hi Aaron and John-

Thanks John for your help with most of the questions.  Let me see if I can fill in the blanks...

First, function panels are not available for the NI-DAQmx Base functions.  However, the functions are completely documented in the NI-DAQmx C Function Reference Help at Start>>Programs>>National Instruments>>NI-DAQmx Base>>Documentation on your start menu.  Alternatively you can view C-based examples on your local hard drive at C:\Program Files\National Instruments\NI-DAQmx Base\Examples .

The syntax for setting up channels that comprise only a subset of an entire port is "DevX/portN/lineA:B" for a list of lines from line "A" to "B" on port "N" of device "X."  For non-consecutive channels you can use a list of the format "DevX/portN/lineA, DevX/portM/lineB" . 

As John mentioned you will need to specify a single channel for all lines in the line grouping.  When you create either input or output tasks on the lines the unused lines are masked for output channels so that updates only occur on the lines configured for output.  The DAQmxBaseReadDigitalU8/WriteDigitalU8 functions will return readings and require write values as if addressing the entire port.  This means for instance that to active line0 you will need to write a value of 0b00000001 to the port.  To control more than one line you will simply set the bits in an 8-bit port write.  As I mentioned before the states of lines not used in the output task are "don't care" and will not be affected by the values you write.

In read operations a read of the entire port will take place.  This will include the states of all lines in the port (including output lines) in U8 format.  You will simply need to interpret the reading to disregard the unneeded bits or the lines configured as output.  Reading from the port does not affect the output lines in any way.

Because the ports can be split for multi-directional use they are considered both port- and line operational.  I hope this clears up your questions.

Thanks-

Tom W
National Instruments
0 Kudos
Message 3 of 3
(3,200 Views)