Jump to content
  • 0

RTD Configuration for USB-TEMP-AI in Python



I'm trying to configure RTDs on a USB-TEMP-AI module.

The user manual describes the 2wire-2sensor wiring configuration and mentions that internal connections (T#H & T#H/T#L) are made using InstaCal. I don't see anything in the mcculw documentation that supports this (I'm using the ul.ignore_instacal() mode).

The old version of mcculw had parameters that seem to fit the bill but were explicitly removed with the latest GitHub release:

ul.set_config(InfoType.BOARDINFO, board_num, channel, BoardInfo.TEMPSENSORTYPE, TempSensorType.RTD)

ul.set_config(InfoType.BOARDINFO, board_num, channel, BoardInfo.TEMPCONNECTIONTYPE, TempSensorConnectionType.CONN_2_WIRE_2)


Any suggestions or code fragments would be welcome!

Edited by DAQNoob
Missing detail
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

The necessary information on programming the USB-TEMP without InstaCal is not readily available. MCC preferred to have users use InstaCal to do it.  InstaCal's configuration is written to USB-TEMP flash memory, so you need to do this only once, even when moved to another PC.

I looked at the old mcculw Python support and confirmed what you reported about CONN_2_WIRE_2 and RTD missing. BoardInfo.TEMPSENSORTYPE and BoardInfo.TEMPCONNECTIONTYPE continues to be available in the last version—the value for TempSensorType.RTD was 0x00, and the value for TempSensorConnectionType.CONN_2_WIRE_2 was 0x01. It's not clear if the following will work, but give it a try.

ul.set_config(InfoType.BOARDINFO, board_num, channel, BoardInfo.TEMPSENSORTYPE, 0)

ul.set_config(InfoType.BOARDINFO, board_num, channel, BoardInfo.TEMPCONNECTIONTYPE, 1)

Link to comment
Share on other sites

  • 0

JRys... Thank you, that worked for my 2-Wire RTD sensors... I had to add one more parameter to turn excitation current on.

I am using InstaCal to verify that my python code configuration is working properly.

I have a follow-up on my question:

I tried to configure a 4-wire RTD, both with InstaCal and python but cannot read temperatures. I noticed that the InstaCal drop has 4-Wire as a "Connection Type", which matches the TempSensorConnectionType.CONN_4_WIRE config parameter.

InstaCal then prompts for specific 4-Wire configuration (RTD, 4-Wire (2 Sensors), 4-Wire (1 Sensors) CH2, 4-Wire (1 Sensors) CH3).

How would I accomplish this same config using Python?

Link to comment
Share on other sites

  • 0

InstaCal for RTD has the following connection types: 2-Wire (1 sensor), 2-Wire (2 sensors), 3-Wire, and 4-Wire.  

Sensor Category: RTD

Connection Type: 4-Wire

Can you read the 4-Wire temperature with InstaCal's Test->Analog feature? If not, please check the sensor.

I've reviewed the last two releases (0.98 & 1.0), and it appears that the Configuration Values TempSensorType, TempSensorConnectionType, and ExcitationLevel were accidentally removed. This is because the Configuration Items TEMPSENSORTYPE, TEMPCONNECTIONTYPE, and TEMPEXCITATION remain available.


class TempSensorType(IntEnum):
    RTD = 0x00
    THERMISTOR = 0x01
    DISABLED = 0x04
    VOLTAGE = 0x05

class TempSensorConnectionType(IntEnum):
    CONN_2_WIRE = 0x00
    CONN_2_WIRE_2 = 0x01
    CONN_3_WIRE = 0x02
    CONN_4_WIRE = 0x03

class ExcitationLevel(IntEnum):
    NONE = 0x00
    THERMISTOR = 0x01
    RTD = 0x02
    PLUS = 0x03

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...