simultaneously log multiple temperatures using 1048

Technical Discussions on any InterfaceKits
dai_bach
Fresh meat
Posts: 1
Joined: Fri Jul 31, 2015 3:32 am
Contact:

simultaneously log multiple temperatures using 1048

Postby dai_bach » Fri Jul 31, 2015 3:51 am

Hi,

I'm using the 1048 board which has 4 thermocouple inputs. I'm trying to modify the temperatureLogger code in python so that EITHER:
1) for a change in temperature on ANY of the thermocouples, log the temperature of ALL thermocouples along with the current time.
OR
2) at given instants in time (say every millisecond), simultaneously log the temperature of ALL thermocouples along with the current time.

I'm having trouble working out how to read all 4 temperatures in one go. I've tried:

Code: Select all

# Set the thermocouple type and trigger (0 = record all data)
TCindex = 0; # value for indexing thermocouples.  TCindex = 0..3
while TCindex <= 3:
   try:
      device.setThermocoupleType(TCindex, ThermocoupleType.PHIDGET_TEMPERATURE_SENSOR_K_TYPE)
   except PhidgetException as e: LocalErrorCatcher(e)
   # Look for changes in temperature in all of the thermocouples. 
   device.setTemperatureChangeTrigger(TCindex, 0)
   TCindex += 1


but this only switches between each thermocouple at every temperature change. Can anyone help me out please?

Return to “InterfaceKits”

Who is online

Users browsing this forum: No registered users and 1 guest