Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

DaqmxGetPhysicalChanName parameters

Hey all,


Trying to get Physical Channel names from my connected DAQs using the ctypes package from Python. So far I can get the System Device names by:

nidaq = ctypes.windll.nicaiu

buf_size = 100

buf = ctypes.create_string_buffer('\000'*buf_size)

nidaq.DAQmxGetSysDevNames(buf, buf_size);

detected_devices = (buf.raw).split(", ")


Which returns a list of the System Devices: [Dev1, Dev3]



One step further I am trying to use DaqmxGetPhysicalChanName in a similar fashion by looking through the devices so that I can end up with something like:








When calling:

nidaq.DaqmxGetPhysicalChanName(TaskHandle(0), const char channel[] , buf, buf_size)


What am I supposed to be passing for const char channel[] ? Obviously a const char, but what would an example of that be?


Things I have tried:

nidaq.DaqmxGetPhysicalChanName(TaskHandle(0), 'Dev1' , buf, buf_size)       a python string 

Returns : -200088

nidaq.DaqmxGetPhysicalChanName(TaskHandle(0), ctypes.c_char_p("Dev1") , buf, buf_size)       equivalent to char*

 Returns : -200088


If I call this twice in a loop, the function also returns 00088.


Any help would be great. Keep in mind the end-goal is to be able to find each device, along with all of it's analog output channels names.


Thanks folks!



0 Kudos
Message 1 of 5

So I have at least gotten as far as figuring out that these returns codes mean something. Any documentation out there?

0 Kudos
Message 2 of 5

Hi dlindema,


I do not know if you have seen these links before, but I think they could be useful, so just to be sure I am sharing them with you:


I hope they give you more tools to work with. 


Regarding the error codes you are getting, this is what I found:


error code -200088

Possible reason(s):

Task specified is invalid or does not exist.


error code 00088

Possible reason(s):

LabVIEW: Run-time menu error.








Message 3 of 5

Hey thanks for the links!


I figured it out, and most of my problems come from my lack of C knowledge. Good reads though if anybody else stumbles into this.

0 Kudos
Message 4 of 5

Hi dlindema,


I am glad you figured it out.

You are welcome.





0 Kudos
Message 5 of 5