LabJackInterface

class lsst.ts.atwhitelight.LabJackInterface(identifier, log, device_type='T4', connection_type='TCP', simulate=False)

Bases: object

Communicate with a LabJack T4, or T7.

Parameters:
identifierstr

LabJack indentifier:

  • An IP address if connection_type=TCP

  • A serial number if connection_type = USB

  • For testing in an environment with only one LabJack you may use ANY.

device_typestr

LabJack model

connection_typestr

Connection type

simulateint, optional

Use a simulated LabJack?

Notes

In simulation mode the mock LabJack returns unspecified values, and those values may change in future versions of the LabJack software.

Attributes Summary

connected

Methods Summary

connect()

Connect to the LabJack and check we can read the specified channels.

disconnect()

Disconnect from the LabJack.

read()

Read all channels specified in LabjackChannels.read.

write(**kwargs)

Write to one or more labelled channels.

Attributes Documentation

connected

Methods Documentation

async connect()

Connect to the LabJack and check we can read the specified channels.

Disconnect first, if connected.

async disconnect()

Disconnect from the LabJack. A no-op if disconnected.

async read()

Read all channels specified in LabjackChannels.read.

Returns:
datatypes.SimpleNamespace

Struct of label=value, where label is a key in LabjackChannels.read

async write(**kwargs)

Write to one or more labelled channels.

Parameters:
kwargsdict

Dict of label: value, where label is a key in LabJackChannels.write