sumitomo_f70 module#

class sumitomo_f70.sumitomo_f70.SumitomoF70(com_port: str, connection=None, **kwargs)#

Bases: object

Sumitomo (SHI) F70 Helium Compressor Serial Communication Utils

Parameters:
  • com_port – The port of the helium compressor

  • connectionFOR DEBUGGING Pass a pre-made serial connection here

Raises:
  • ValueError – if no com port or connection is passed

  • ConnectionError – If no device can be found on the given com port

read_all_pressures() tuple[int]#

Read pressure values from all sensors (in PSIG)

Returns:

tuple (P1, P2)

read_all_temperatures() tuple[int]#

Reads all temperature values (in degrees C)

Returns:

tuple of values (T1, T2, T3, T4)

read_id() dict#

Returns the version and elapsed operating hours in a dictionary

Returns:

A dict with the version and operating hours

{‘version’: str,

’operating_hours’: float}

read_pressure(n) int#

Read pressure value from a specific sensor (in PSIG)

Parameters:

n – The index of the pressure sensor to read

Returns:

Pressure at the sensor (int)

read_status_bits() tuple[int, dict]#

Read status bits and alarm states (See user manual)

Returns:

A tuple containing (raw status bits, dict of status)

The dict of status pulls out the information in the status bits

{‘configuration’: int,

’solenoid’: bool, ‘pressure_alarm’: bool, ‘oil_level_alarm’: bool, ‘water_flow_alarm’: bool, ‘water_temperature_alarm’: bool, ‘helium_temperature_alarm’: bool, ‘phase_sequence_alarm’: bool, ‘motor_temperature_alarm’: bool, ‘system’: bool, ‘state’: str, ‘state_number’: int}

All of the boolean dict values correspond to the value of their bit

’state’ parameter is the witten state of the machine (one of ‘local off’, ‘local on’, ‘remote off’, etc)

read_temperature(n) float#

Read temperature from a specific sensor (in degrees C)

Parameters:

n – The index of the temperature sensor to read

Returns:

float of reading

reset() None#

Clears fault status from status response

send_command(command: str) None#

Writes command to F70 (it doesn’t read)

send_query(query: str) str#

Writes a query to F70 and reads response

Returns:

A string of the raw response from the F70

set_cold_head_pause() None#

Turns off only the cold head

set_cold_head_run() None#

Turns on the cold head if the compressor is off

It will disable the cold head after 30 minutes if no other command is recieved.

set_cold_head_unpause() None#

Turns on the cold head when the compressor is on

set_off() None#

Turns off compressor and/or cold head if one or both are on

set_on() None#

Turns on the compressor and the cold head

sumitomo_f70.sumitomo_f70.make_checksum(source: bytes, fixed_value: int = 40961) str#

Makes crc-16 modbus checksums for communication

This is for internal use. In normal operation, this shouldn’t need to be accessed

Parameters:
  • source – ASCII encoded byte string to checksum

  • fixed_value – preset fixed value used in checksum calculation