In the past, I have used a modified version of the t_in.py program provided by Measurement Computing to collect thermocouple readings from a USB-2408-2AO. Recently, one of our collaborators has asked us if they can use our Python script to collect temperatures from their USB-TEMP. When I try to collect temperatures from the USB-TEMP using the t_in.py program, it fails to set the channel types to AiCHanType.TC because an "if" statement will only allows this line to be executed on the USB-2416-4AO, USB-2408, and the USB-2408-AO.
for chan in range(low_channel, high_channel + 1):
# Set the specified analog channels to TC type if the specified
# DAQ device is a USB-2408 or USB-2416 device
if (descriptor.product_id == USB_2416_ID
or descriptor.product_id == USB_2416_4AO_ID
or descriptor.product_id == USB_2408_ID
or descriptor.product_id == USB_2408_2AO_ID):
ai_config.set_chan_type(chan, AiChanType.TC)
When I override the "if" statement so that ai_config.set_chan_type(chan, AiChanType.TC) is called regardless of the DAQ model, I get the following error.
raise ULException(err)
uldaq.ul_exception.ULException: ULError.CONFIG_NOT_SUPPORTED: Configuration not supported
Is there anyone who knows which Python commands I need to use to set up a channel as a thermocouple channel on the USB-TEMP? We also tried just using DAQami to collect temperatures. DAQami is able to see and add the device to the panel, but it always returns temperatures of -9999.0 (which might mean that DAQami wasn't able to set up the channels either).
Question
wjmason
In the past, I have used a modified version of the t_in.py program provided by Measurement Computing to collect thermocouple readings from a USB-2408-2AO. Recently, one of our collaborators has asked us if they can use our Python script to collect temperatures from their USB-TEMP. When I try to collect temperatures from the USB-TEMP using the t_in.py program, it fails to set the channel types to AiCHanType.TC because an "if" statement will only allows this line to be executed on the USB-2416-4AO, USB-2408, and the USB-2408-AO.
for chan in range(low_channel, high_channel + 1):
# Set the specified analog channels to TC type if the specified
# DAQ device is a USB-2408 or USB-2416 device
if (descriptor.product_id == USB_2416_ID
or descriptor.product_id == USB_2416_4AO_ID
or descriptor.product_id == USB_2408_ID
or descriptor.product_id == USB_2408_2AO_ID):
ai_config.set_chan_type(chan, AiChanType.TC)
When I override the "if" statement so that ai_config.set_chan_type(chan, AiChanType.TC) is called regardless of the DAQ model, I get the following error.
raise ULException(err)
uldaq.ul_exception.ULException: ULError.CONFIG_NOT_SUPPORTED: Configuration not supported
Is there anyone who knows which Python commands I need to use to set up a channel as a thermocouple channel on the USB-TEMP? We also tried just using DAQami to collect temperatures. DAQami is able to see and add the device to the panel, but it always returns temperatures of -9999.0 (which might mean that DAQami wasn't able to set up the channels either).
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now