msl.equipment.resources.picotech.pt104 module

Pico Technology PT-104 Platinum Resistance Data Logger.

class msl.equipment.resources.picotech.pt104.Pt104DataType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

The allowed data types for a PT-104 Data Logger.

OFF = 0
PT100 = 1
PT1000 = 2
RESISTANCE_TO_375R = 3
RESISTANCE_TO_10K = 4
DIFFERENTIAL_TO_115MV = 5
DIFFERENTIAL_TO_2500MV = 6
SINGLE_ENDED_TO_115MV = 7
SINGLE_ENDED_TO_2500MV = 8
MAX_DATA_TYPES = 9
msl.equipment.resources.picotech.pt104.enumerate_units(comm_type='all')[source]

Find PT-104 Platinum Resistance Data Logger’s.

This routine returns a list of all the attached PT-104 devices of the specified communication type.

Note

You cannot call this function after you have opened a connection to a Data Logger.

Parameters

comm_type (str, optional) – The communication type used by the PT-104. Can be any of the following values: 'usb', 'ethernet', 'enet', 'all'

Returns

list of str – A list of serial numbers of the PT-104 Data Loggers that were found.

class msl.equipment.resources.picotech.pt104.PT104(record)[source]

Bases: ConnectionSDK

Uses the PicoTech SDK to communicate with a PT-104 Platinum Resistance Data Logger.

The properties for a PT-104 connection supports the following key-value pairs in the Connections Database:

'ip_address': str, The IP address and port number of the PT-104 (e.g., '192.168.1.201:1234')
'open_via_ip': bool, Whether to connect to the PT-104 by Ethernet. Default is to connect by USB.

Do not instantiate this class directly. Use the connect() method to connect to the equipment.

Parameters

record (EquipmentRecord) – A record from an Equipment-Register Database.

MIN_WIRES = 2
MAX_WIRES = 4
DataType

alias of Pt104DataType

disconnect()[source]

Disconnect from the PT-104 Data Logger.

get_ip_details()[source]

Reads the IP details of the PT-104 Data Logger.

Returns

dict – The IP details.

get_unit_info(info=None, include_name=True)[source]

Retrieves information about the PT-104 Data Logger.

If the device fails to open, or no device is opened only the driver version is available.

Parameters
  • info (PicoScopeInfoApi, optional) – An enum value or member name. If None then request all information from the PT-104.

  • include_name (bool, optional) – If True then includes the enum member name as a prefix. For example, returns 'CAL_DATE: 09Aug16' if include_name is True else '09Aug16'.

Returns

str – The requested information from the PT-104 Data Logger.

get_value(channel, filtered=False)[source]

Get the most recent reading for the specified channel.

Once you open the driver and define some channels, the driver begins to take continuous readings from the PT-104 Data Logger.

The scaling of measurements is as follows:

Range

Scaling

Temperature

value * 1/1000 deg C

Voltage (0 to 2.5 V)

value * 10 nV

Voltage (0 to 115 mV)

value * 1 nV

Resistance

value * 1 mOhm

Parameters
  • channel (int) – The number of the channel to read, from 1 to 4 in differential mode or 1 to 8 in single-ended mode.

  • filtered (bool, optional) – If set to True, the driver returns a low-pass filtered value of the temperature. The time constant of the filter depends on the channel parameters as set by set_channel(), and on how many channels are active.

Returns

float – The latest reading for the specified channel.

open()[source]

Open the connection to the PT-104 via USB.

open_via_ip(address=None)[source]

Open the connection to the PT-104 via ETHERNET.

Parameters

address (str, optional) – The IP address and port number to use to connect to the PT-104. For example, '192.168.1.201:1234'. If None then uses the 'ip_address' value of the properties

set_channel(channel, data_type, num_wires)[source]

Configure a single channel of the PT-104 Data Logger.

The fewer channels selected, the more frequently they will be updated. Measurement takes about 1 second per active channel.

If a call to the set_channel() method has a data type of single-ended, then the specified channel’s ‘sister’ channel is also enabled. For example, enabling 3 also enables 7.

Parameters
  • channel (int) – The channel you want to set the details for. It should be between 1 and 4 if using single-ended inputs in voltage mode.

  • data_type (DataType) – The type of reading you require. Can be an enum value or member name.

  • num_wires (int) – The number of wires the PT100 or PT1000 sensor has (2, 3 or 4)

set_ip_details(enabled, ip_address=None, port=None)[source]

Writes the IP details to the device.

Parameters
  • enabled (bool) – Whether to enable or disable Ethernet communication for this device.

  • ip_address (str, optional) – The new IP address. If None then do not change the IP address.

  • port (int, optional) – The new port number. If None then do not change the port number.

set_mains(hertz)[source]

Inform the driver of the local mains (line) frequency.

This helps the driver to filter out electrical noise.

Parameters

hertz (int) – Either 50 or 60.