petebachant / daqmx

A Python wrapper to the National Instruments DAQmx driver.
MIT License
3 stars 6 forks source link

cDAQ / NI-9234 #8

Open claypipkin opened 9 years ago

claypipkin commented 9 years ago

Has anyone had any luck connecting cdaq usb device? I'm trying to connect with a NI-9234 but haven't had much luck. I have my physical channel set as:

channel.physical_channel = "cDAQ1Mod1/ai0"

but get the following error: 'RuntimeError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.'

I've tried using #Dev1/ai0 but get this error: 'RuntimeError: Device identifier is invalid.'

petebachant commented 9 years ago

I have used a 9237 in a cDAQ Ethernet chassis. I recommend looking in NI-MAX to get the correct device and channel names.

You may be trying to setup a channel of the wrong type as well. The 9234 may not support daqmx.channels.AnalogInputVoltageChannel. It may need to be a different type of channel, which may not be implemented yet. For example, with the 9237 you need to create an analog input bridge channel, e.g., daqmx.channels.AnalogInputBridgeChannel.

If this error is due to a bug, which it may be considering this package's immaturity, please submit a pull request if you get it fixed! I imagine you may simply need to create a new type of channel in daqmx.channels and write a little code in daqmx.tasks.Task.add_channel. This is actually related to #5.