Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

code gets stuck at daqmxbasecreatetask

Hi there,

I'm running the NI-DAQmx base on Mac os X with labview 7.1. I'm trying to use the dio C code examples that came with it, in particular writedigport.c (attached)
The thing is, when running the executable I get no signal, instead the program just get stuck. With some prodding I found that the it hangs at the call to DAQmxBaseCreateTask

The line is: DAQmxErrChk (DAQmxBaseCreateTask ("", &taskHandle));
I'm not sure what to do about this and would appreciate it if anyone could help me resolve this issue. All the example vi code runs fine in labview, so ii'm pretty sure the ports are set up right. Also, I'm pretty sure I'm calling the right port (Dev1/port0) so I don't think that's the problem.

Thanks,
Aatish
0 Kudos
Message 1 of 6
(3,363 Views)
What version of OS X?

What kind of DAQ device?

Be sure to check the ReadMe file- the support for various capabilities is dependent on the hardware.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 6
(3,355 Views)
OS X 10.3.9
software: NI-DAQmx Base 1.5.0f2
model:USB-6008
0 Kudos
Message 3 of 6
(3,354 Views)
So it seems that I was wrong about it getting stuck, I wasn't waiting long enough. After about 30 secs or so, I get the message:
DAQmxBase Error: -200220
Anyone know what I should do here?
Thanks,
Aatish


0 Kudos
Message 4 of 6
(3,349 Views)
also, this means that the offending line of code is not the one i mentioned before but the channel creation step:
DAQmxErrChk (DAQmxBaseCreateDOChan(taskHandle,chan,"",DAQmx_Val_ChanForAllLines));
sorry about that!
0 Kudos
Message 5 of 6
(3,346 Views)
From NIDAQmxBase.h:

#define DAQmxErrorInvalidDeviceID (-200220)

Looks like you aren't using the correct name for your device.
John Weeks

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