Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

nidaqmx base multiple digital inputs error

Hi,

I am trying to read multiple digital status lines using the latest DAQmx Base for Linux and it crashes whenever I try to collect the info from my than one digital port.  I am using the supplied "readDigMultiplePorts.c" sample code which was bundled in the DAQmx Base installation. 

line 42: char   chan[] = "Dev1/port0:2";
line 50: DAQmxErrChk (DAQmxBaseCreateDIChan(taskHandle, chan, "", DAQmx_Val_ChanForAllLines));  <-- crashing on this line giving me a simple "DAQmxbase Error: -1" output at runtime

The code runs fine if I only using one port alone, ie....
line 42: char   chan[] = "Dev1/port0";

I have also tried defining multiple ports like the following without success either...
line 42: char   chan[] = "Dev1/port0, Dev1/port1";

I am using RH Enterprise WS3 and running off a fresh install.  My DAQ board is an M Series model, PCI-6229.

Any suggestions?

JM

Message Edited by j.m.m on 08-19-2005 12:48 PM

0 Kudos
Message 1 of 3
(2,995 Views)
A PCI-6229 has more than 32 DIO lines if you include all the ports. DAQmx Base in only prepared to handle 32 lines at a time, I think. So I think you will need to break up your DIO access into multiple tasks, each with no more than 32 lines.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 3
(2,986 Views)
Thanks, I got it working for two seperate ports using two distinctive tasks.  The second task does not seem to work using I stop and clear the first one but it works fine. 
0 Kudos
Message 3 of 3
(2,978 Views)