Hello, I have just installed the drivers for the USB-6009 into my linux distro, and I am attempting to run the readDigPort example in /usr/local/natinst/nidaqmxbase/examples/dio.
When you make and try to run the program without any modification, you get this error message:
DAQmxBase Error -200170: Physical channel specified does not exist on this device.
I look at the code, and I see this:
// Channel parameters
const char chan[] = "Dev1/Port0";
I change it to reflect the device port mapping per the user manual, to be this:
// Channel parameters
const char chan[] = "Dev1/P0.1";
This changes the error message to this:
DAQmxBase Error -200430: I/O type of the physical channel does not match the I/O type required for the virtual channel you are creating.
The good news is that it seems I have managed to guess the port mapping. The bad news is that something in the driver thinks I don't have a digital I/O at P0.1. I tried a couple of other combinations of "legal" port names according to the user manual to no avail.
It seems that the USB-6009 is installed well; the light is happily flashing on it, and lsdaq returns this:
--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
NI USB-6009: "Dev1" (USB0::0x3923::0x717B::01256EA6::RAW)
--------------------------------
So my questions are these:
1) Is there some explicit documentation on the mapping of port names? It's a little ambiguous reading the data sheet as to whether, for example, the port names are case-sensitive, if they require a space between the P and the port number, etc.
2) Is there a tested ANSI-C code example that someone can give me for reading and writing to the USB-6009? It seems that this example was written for a different device (since the port mapping isn't relevant to the USB-6009). Something that reads and writes digital ports as well as analog ports would be primo. I'd just like to sanity check this whole setup before moving on.
3) How does one, using the ANSI-C calls, configure the characteristics of the digital I/O ports? I see there are some knobs to turn (totem-pole versus open collector) outputs, but there is no API for that as far as I can see in the documentation.
thanks!