glicicle

Glicicle control class.

Classes

Glicicle(*args, **kwargs)

SCPIInstrument implementation for Glicicle.

Glicicle

class icicle.glicicle.Glicicle(*args, **kwargs)

Bases: SCPIInstrument

SCPIInstrument implementation for Glicicle.

Communicates with Wheeee firmware (currently supports v0.3).

__init__(resource='ASRL31::INSTR', sim=False)

Warning

The resource keyword argument is mandatory and must be explicitly specified - failing to do so will result in an error since the Multiton metaclass on VisaInstrument masks this default value for resource.

Parameters:

resource – VISA Resource address. See VISA docs for more info.

BAUD_RATE = 119200

Serial link baud rate (bits/s).

COM_RESET = ''

Instrument Reset SCPI command.

class Direction(*values)

Bases: Enum

ANTICLOCKWISE = 2
CLOCKWISE = 1
OFF = 0
MEASURE_TYPES = {'ENA:DCYCLE': 'ENA:DCYCLE register', 'ENA:FREQ': 'ENA:FREQ register', 'IN1': 'IN1 register', 'IN2': 'IN2 register', 'LED': 'LED register', 'LED:PLENGTH': 'LED:PLENGTH register', 'LED:PULSE': 'LED:PULSE register', 'MODE': 'MODE register'}
class MeasureChannel(instrument, channel, measure_type, unit='')

Bases: MeasureChannel

MeasureChannel implementation for the tpx4sc.

property status
Returns:

Connection?

Return type:

int

property value

Performs measurement and returns value.

Returns:

measured value.

Return type:

float

READ_TERMINATION = '\n'

Serial link read termination.

SETTINGS = {'ENA:DCYCLE': {'QUERY': 'ena:dcycle?', 'SET': 'ena:dcycle {:d}', 'parser': <function numeric_int>, 'verifier': <function is_integer.<locals>._is_integer>}, 'ENA:FREQ': {'QUERY': 'ena:freq?', 'SET': 'ena:freq {:d}', 'parser': <function numeric_int>, 'verifier': <function is_integer.<locals>._is_integer>}, 'IDENTIFIER': {'QUERY': '*idn?'}, 'IN1': {'QUERY': 'in1?', 'SET': 'in1 {:d}', 'parser': <function truthy_bool.<locals>._truthy>, 'verifier': <function truthy.<locals>._truthy>}, 'IN2': {'QUERY': 'in2?', 'SET': 'in2 {:d}', 'parser': <function truthy_bool.<locals>._truthy>, 'verifier': <function truthy.<locals>._truthy>}, 'LED': {'QUERY': 'led?', 'SET': 'led {:d}', 'parser': <function truthy_bool.<locals>._truthy>, 'verifier': <function truthy.<locals>._truthy>}, 'LED:PLENGTH': {'QUERY': 'led:plength?', 'SET': 'led:plength {:d}', 'parser': <function numeric_int>, 'verifier': <function is_integer.<locals>._is_integer>}, 'LED:PULSE': {'QUERY': 'led:pulse?', 'SET': 'led:pulse {:d}', 'parser': <function truthy_bool.<locals>._truthy>, 'verifier': <function truthy.<locals>._truthy>}, 'MODE': {'QUERY': 'mode?', 'SET': 'mode {:d}', 'parser': <function numeric_int>, 'verifier': <function is_integer.<locals>._is_integer>}, 'QUIT': {'SET': '*quit'}}

Settings dictionary with all Set/Query combinations.

SET_REQUIRES_READBACK = False

Every command must be sent as a query.

TIMEOUT = 10000

Serial link timeout (ms).

WRITE_TERMINATION = '\n'

Serial link write termination.

direction(direction=None)

Sets motor direction.

Parameters:

directionGlicicle.Direction enumeration (OFF, CLOCKWISE, ANTICLOCKWISE).

Returns:

True if direction set successful, or current direction if direction is None.

speed(speed=None)

Sets motor speed.

Parameters:

speed – Speed as fraction of maximum in range [0, 1].

Returns:

True if speed set successful, or speed as float if speed is None.

status()

STATUS template - should be implemented to return device/channel status.

validate_channel(channel, raise_exception=True)

Check if an channel exists on this device. Only successful if channel == 1.

Parameters:

channel – Channel number to validate as an input