pyipcmini.functions package#

Submodules#

pyipcmini.functions.ion_pump module#

Class for all functions of Agilent IPCMini controller.

class pyipcmini.functions.ion_pump.IonPump(serial_connection: serial.Serial)[source]#

Bases: object

Class for all functions of Agilent IPCMini controller.

Methods

list_read_function_labels()

List all read function labels available.

list_set_function_labels()

List all set function labels available.

list_read_function_labels() int[source]#

List all read function labels available.

Parameters:
int

The list of available read functions keys.

list_set_function_labels() int[source]#

List all set function labels available.

Parameters:
int

The list of available set functions keys.

pyipcmini.functions.ion_pump_base_functions module#

Class for general send/receive data functions of Agilent IPCMini controller.

class pyipcmini.functions.ion_pump_base_functions.PumpBaseFunctions(serial_connection: serial.Serial)[source]#

Bases: object

Class for general send/receive data functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_data()

Read data on serial port.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

WAIT_TIME_READ_SERIAL = 0.5#
get_reply_after_set_cmd(answer: bytes) str[source]#

Check the status of the answer.

Parameters:
answerbytes

The answer from the controller to be assessed.

Returns:
str

Success/fail answer.

make_crc(base_msg: tuple[str, str, str, str], *, data: str | None = None) list[str][source]#

Make formatted crc message.

Parameters:
base_msgtuple[str, str, str, str]

Base part of the message to send to the controller.

datastr | None

Data send for a set command, None for a read command.

Returns:
list[str]

The controller’s answer.

read_data() bytes[source]#

Read data on serial port.

Returns:
bytes

The controller’s answer.

send_data(message: bytes) bytes[source]#

Send data on serial port and read answer.

Parameters:
messagebytes

Message to send to the controller.

Returns:
bytes

The controller’s answer.

send_read_request(request: str) bytes[source]#

Send read request from IonPumpDics.dics[“Win”].

Parameters:
requeststr

The request to send to the controller.

Returns:
bytes

The controller’s answer.

send_set_request(request: str, data_to_set: str) bytes[source]#

Send set request from IonPumpDics.dics[“Win”].

Parameters:
requeststr

The request to send to the controller.

data_to_setstr

The data to send to the controller for this request.

Returns:
bytes

The controller’s answer.

pyipcmini.functions.ion_pump_dic module#

Contain the class of dictionnaries for Agilent IPCMini ion pump controller.

class pyipcmini.functions.ion_pump_dic.IonPumpDic[source]#

Bases: object

Class of dictionnaries for Agilent IPCMini ion pump controller.

dic_baud_rate = mappingproxy({1: 1200, 2: 2400, 3: 4800, 4: 9600})#
dic_device_number = mappingproxy({0: 'Spare', 1: '500 StarCell', 2: '300 StarCell', 16: '200 StarCell', 3: '150 StarCell', 4: '75-55-40 StarCell', 5: '20 StarCell', 20: 'NEXTorr-SC', 6: '500 diode', 7: '300 diode', 15: '200 diode', 8: '150 diode', 9: '75-55-40 diode', 10: '20 diode', 11: '10 diode', 12: '75 Sem', 13: '75 Sem', 14: '75 Sem', 17: '2 diode', 18: '0.2 diode 1250 Gauss', 19: '0.2 diode 800 Gauss'})#
dic_mode = mappingproxy({0: 'Serial', 1: 'Remote', 2: 'Local', 3: 'LAN'})#
dic_pressure_unit = mappingproxy({0: 'Torr', 1: 'mBar', 2: 'Pa'})#
dic_reply = mappingproxy({6: 'Command success', 15: 'Command fail', 32: 'Invalid window', 33: 'Data type error', 34: 'Out of range', 35: 'Window is read-only'})#
dic_serial_type = mappingproxy({False: 'RS232', True: 'RS485'})#
dic_win = mappingproxy({'Mode': '008', 'HV ON/OFF': '011', 'Baud rate': '108', 'Status': '205', 'Error code': '206', 'Model': '319', 'Serial number': '323', 'RS485 address': '503', 'Serial type': '504', 'Unit pressure': '600', 'Autostart': '601', 'Protect': '602', 'Fixed/step': '603', 'Device number': '610', 'Max power': '612', 'V target': '613', 'I protect': '614', 'Set point': '615', 'Temperature power section': '800', 'Temperature internal controller': '801', 'Status set point': '804', 'V measured': '810', 'I measured': '811', 'Pressure': '812', 'Label': '890'})#
class pyipcmini.functions.ion_pump_dic.IonPumpDics[source]#

Bases: object

Class of joint dictionnaries for Agilent IPCMini ion pump controller.

dics = mappingproxy({'Reply': mappingproxy({6: 'Command success', 15: 'Command fail', 32: 'Invalid window', 33: 'Data type error', 34: 'Out of range', 35: 'Window is read-only'}), 'Mode': mappingproxy({0: 'Serial', 1: 'Remote', 2: 'Local', 3: 'LAN'}), 'Baud rate': mappingproxy({1: 1200, 2: 2400, 3: 4800, 4: 9600}), 'Serial type': mappingproxy({False: 'RS232', True: 'RS485'}), 'Unit pressure': mappingproxy({0: 'Torr', 1: 'mBar', 2: 'Pa'}), 'Device number': mappingproxy({0: 'Spare', 1: '500 StarCell', 2: '300 StarCell', 16: '200 StarCell', 3: '150 StarCell', 4: '75-55-40 StarCell', 5: '20 StarCell', 20: 'NEXTorr-SC', 6: '500 diode', 7: '300 diode', 15: '200 diode', 8: '150 diode', 9: '75-55-40 diode', 10: '20 diode', 11: '10 diode', 12: '75 Sem', 13: '75 Sem', 14: '75 Sem', 17: '2 diode', 18: '0.2 diode 1250 Gauss', 19: '0.2 diode 800 Gauss'}), 'Win': mappingproxy({'Mode': '008', 'HV ON/OFF': '011', 'Baud rate': '108', 'Status': '205', 'Error code': '206', 'Model': '319', 'Serial number': '323', 'RS485 address': '503', 'Serial type': '504', 'Unit pressure': '600', 'Autostart': '601', 'Protect': '602', 'Fixed/step': '603', 'Device number': '610', 'Max power': '612', 'V target': '613', 'I protect': '614', 'Set point': '615', 'Temperature power section': '800', 'Temperature internal controller': '801', 'Status set point': '804', 'V measured': '810', 'I measured': '811', 'Pressure': '812', 'Label': '890'})})#
class pyipcmini.functions.ion_pump_dic.IonPumpMinMaxDics[source]#

Bases: object

Class of min/max values dictionnaries for Agilent IPCMini ion pump controller.

dic_max_values = mappingproxy({'LABEL_LENGTH': 10, 'SETPOINT_CURRENT': 1e-05, 'PROTECT_CURRENT': 10000, 'VOLTAGE': 7000, 'POWER': 40, 'UNIT_PRESSURE': 2, 'ADDRESS': 31, 'BAUDRATE': 4, 'MODE': 3})#
dic_min_values = mappingproxy({'SETPOINT_CURRENT': 1e-10, 'PROTECT_CURRENT': 1, 'VOLTAGE': 3000, 'POWER': 10, 'UNIT_PRESSURE': 0, 'ADDRESS': 0, 'BAUDRATE': 1, 'MODE': 0})#

pyipcmini.functions.ion_pump_read_functions module#

Class for read functions of Agilent IPCMini controller.

class pyipcmini.functions.ion_pump_read_functions.PumpReadFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpReadSerialFunctions, PumpReadIdFunctions

Class for read functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_autostart()

Read autostart status.

read_baud_rate()

Read serial baud rate.

read_controller_model()

Read controller model.

read_current_measured()

Read measured current.

read_current_protect()

Read protect current.

read_data()

Read data on serial port.

read_device_number()

Read device number.

read_error_code()

Read error code.

read_fixed_step()

Read fixed/step status.

read_hv_on_off()

Read HV status.

read_label()

Read device label.

read_max_power()

Read max power.

read_mode()

Read the communication mode.

read_pressure()

Read measured pressure.

read_protect()

Read protect status.

read_rs485_address()

Read RS485 serial address.

read_serial_number()

Read device serial number.

read_serial_type()

Read serial type select.

read_setpoint()

Read set point current.

read_status()

Read status.

read_status_setpoint()

Read set point status.

read_temperature_internal_controller()

Read temperature of internal controller.

read_temperature_power_section()

Read temperature of power section.

read_unit_pressure()

Read unit pressure.

read_voltage_measured()

Read measured voltage.

read_voltage_target()

Read target voltage.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

read_autostart() bool[source]#

Read autostart status.

Returns:
bool

Autostart status [0=disabled ; 1=enabled].

read_controller_model() str[source]#

Read controller model.

Returns:
str

Controller model.

read_current_measured() float[source]#

Read measured current.

Returns:
float

Current (in A).

read_current_protect() int[source]#

Read protect current.

Returns:
int

Current (in microA).

read_error_code() int[source]#

Read error code.

Returns:
int
Error code [0=No error ; 4=Over Temperature ;

32=Interlock cable ; 64=ShortCircuit ; 128=Protect].

read_fixed_step() bool[source]#

Read fixed/step status.

Returns:
bool

Fixed/step status [0=disabled ; 1=enabled].

read_hv_on_off() bool[source]#

Read HV status.

Returns:
bool

HV status [0=OFF ; 1=ON].

read_max_power() int[source]#

Read max power.

Returns:
int

Power (in W).

read_mode() str[source]#

Read the communication mode.

Returns:
str

Mode, see parent_pump.dic_mode.

read_pressure() float[source]#

Read measured pressure.

Returns:
float

Pressure (in pressure unit).

read_protect() bool[source]#

Read protect status.

Returns:
bool

Protect status [0=disabled ; 1=enabled].

read_setpoint() float[source]#

Read set point current.

Returns:
float

Set point (in A).

read_status() int[source]#

Read status.

Returns:
int

Status [0=OK ; 5=HV ON ; 6=Fail].

read_status_setpoint() bool[source]#

Read set point status.

Returns:
bool

Set point status [0=OFF ; 1=ON].

read_temperature_internal_controller() float[source]#

Read temperature of internal controller.

Returns:
float

Temperature (in degC).

read_temperature_power_section() float[source]#

Read temperature of power section.

Returns:
float

Temperature (in degC).

read_unit_pressure() str[source]#

Read unit pressure.

Returns:
str

Unit pressure, see parent_pump.dic_pressure_unit.

read_voltage_measured() int[source]#

Read measured voltage.

Returns:
int

Voltage (in V).

read_voltage_target() int[source]#

Read target voltage.

Returns:
int

Voltage (in V).

class pyipcmini.functions.ion_pump_read_functions.PumpReadIdFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpBaseFunctions

Class for ID read functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_data()

Read data on serial port.

read_device_number()

Read device number.

read_label()

Read device label.

read_serial_number()

Read device serial number.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

read_device_number() str[source]#

Read device number.

Returns:
str

Device number giving the pump type, see parent_pump.dic_device_number.

read_label() str[source]#

Read device label.

Returns:
str

Device label.

read_serial_number() str[source]#

Read device serial number.

Returns:
str

Device serial number.

class pyipcmini.functions.ion_pump_read_functions.PumpReadSerialFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpBaseFunctions

Class for serial read functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_baud_rate()

Read serial baud rate.

read_data()

Read data on serial port.

read_rs485_address()

Read RS485 serial address.

read_serial_type()

Read serial type select.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

read_baud_rate() int[source]#

Read serial baud rate.

Returns:
int

Baud rate [1=1200 ; 2=2400 ; 3=4800 ; 4=9600].

read_rs485_address() int[source]#

Read RS485 serial address.

Returns:
int

Address [0-31].

read_serial_type() str[source]#

Read serial type select.

Returns:
str

Serial type [RS232 ; RS485].

pyipcmini.functions.ion_pump_set_functions module#

Class for set functions of Agilent IPCMini controller.

class pyipcmini.functions.ion_pump_set_functions.PumpSetFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpSetSerialFunctions, PumpSetIdFunctions

Class for read functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_data()

Read data on serial port.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

set_autostart(*, on_off)

Set autostart.

set_baud_rate(baudrate)

Set serial baud rate.

set_current_protect(current)

Set protect current.

set_device_number(number)

Set device number.

set_fixed_step(*, on_off)

Set fixed/step status.

set_hv_on_off(*, on_off)

Set HV output ON/OFF.

set_label(label)

Set device label.

set_max_power(power)

Set max power.

set_mode(mode)

Set the communication mode.

set_protect(*, on_off)

Set protect current.

set_rs485_address([address])

Set RS485 serial address.

set_serial_type([serial_type])

Set serial type.

set_setpoint(setpoint_current)

Set the set point current.

set_unit_pressure(unit)

Set unit pressure.

set_voltage_target(voltage)

Set target voltage.

set_autostart(*, on_off: bool) str[source]#

Set autostart.

Parameters:
on_offbool

[0=disabled ; 1=enabled].

Returns:
str

Pump reply.

set_current_protect(current: int) str[source]#

Set protect current.

Parameters:
currentint

[1-10000] (in microA)..

Returns:
str

Pump reply.

set_fixed_step(*, on_off: bool) str[source]#

Set fixed/step status.

Parameters:
on_offbool

[0=disabled ; 1=enabled].

Returns:
str

Pump reply.

set_hv_on_off(*, on_off: bool) str[source]#

Set HV output ON/OFF.

Parameters:
on_offbool

[0=OFF ; 1=ON].

Returns:
str

Pump reply.

set_max_power(power: int) str[source]#

Set max power.

Parameters:
powerint

[10-40] (in W).

Returns:
str

Pump reply.

set_mode(mode: int) str[source]#

Set the communication mode.

Parameters:
modeint

[0=Serial ; 1=Remote ; 2=Local ; 3=LAN], see parent_pump.dic_mode.

Returns:
str

Pump reply.

set_protect(*, on_off: bool) str[source]#

Set protect current.

Parameters:
on_offbool

[0=disabled ; 1=enabled].

Returns:
str

Pump reply.

set_setpoint(setpoint_current: float) str[source]#

Set the set point current.

Parameters:
setpoint_currentfloat

X.XE-XX [1.0E-10 - 1.0E-5] (in A).

Returns:
str

Pump reply.

set_unit_pressure(unit: int) str[source]#

Set unit pressure.

Parameters:
unitint

[0=Torr ; 1=mBar ; 2=Pa], see parent_pump.dic_pressure_unit.

Returns:
str

Pump reply.

set_voltage_target(voltage: int) str[source]#

Set target voltage.

Parameters:
voltageint

[3000-7000] (in V).

Returns:
str

Pump reply.

class pyipcmini.functions.ion_pump_set_functions.PumpSetIdFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpBaseFunctions

Class for ID set functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_data()

Read data on serial port.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

set_device_number(number)

Set device number.

set_label(label)

Set device label.

set_device_number(number: int) str[source]#

Set device number.

Parameters:
numberint

Depending on the pump type, see parent_pump.dic_device_number.

Returns:
str

Pump reply.

set_label(label: str) str[source]#

Set device label.

Parameters:
labelstr

Max 10 characters.

Returns:
str

Pump reply.

class pyipcmini.functions.ion_pump_set_functions.PumpSetSerialFunctions(serial_connection: serial.Serial)[source]#

Bases: PumpBaseFunctions

Class for serial set functions of Agilent IPCMini controller.

Methods

get_reply_after_set_cmd(answer)

Check the status of the answer.

make_crc(base_msg, *[, data])

Make formatted crc message.

read_data()

Read data on serial port.

send_data(message)

Send data on serial port and read answer.

send_read_request(request)

Send read request from IonPumpDics.dics["Win"].

send_set_request(request, data_to_set)

Send set request from IonPumpDics.dics["Win"].

set_baud_rate(baudrate)

Set serial baud rate.

set_rs485_address([address])

Set RS485 serial address.

set_serial_type([serial_type])

Set serial type.

set_baud_rate(baudrate: int) str[source]#

Set serial baud rate.

Parameters:
baudrateint

Baud rate [1=1200 ; 2=2400 ; 3=4800 ; 4=9600].

Returns:
str

Pump reply.

set_rs485_address(address: int = 1) str[source]#

Set RS485 serial address.

Parameters:
addressint

RS485 address [0-31] (1=def).

Returns:
str

Pump reply.

set_serial_type(serial_type: int = 0) str[source]#

Set serial type.

Parameters:
serial_typeint

Serial type [0 = RS232 (def) ; 1 = RS485].

Returns:
str

Pump reply.

Module contents#

Function package for Agilent IPCMini ion pump controller.

class pyipcmini.functions.IonPump(serial_connection: serial.Serial)[source]#

Bases: object

Class for all functions of Agilent IPCMini controller.

Methods

list_read_function_labels()

List all read function labels available.

list_set_function_labels()

List all set function labels available.

list_read_function_labels() int[source]#

List all read function labels available.

Parameters:
int

The list of available read functions keys.

list_set_function_labels() int[source]#

List all set function labels available.

Parameters:
int

The list of available set functions keys.

class pyipcmini.functions.IonPumpDics[source]#

Bases: object

Class of joint dictionnaries for Agilent IPCMini ion pump controller.

dics = mappingproxy({'Reply': mappingproxy({6: 'Command success', 15: 'Command fail', 32: 'Invalid window', 33: 'Data type error', 34: 'Out of range', 35: 'Window is read-only'}), 'Mode': mappingproxy({0: 'Serial', 1: 'Remote', 2: 'Local', 3: 'LAN'}), 'Baud rate': mappingproxy({1: 1200, 2: 2400, 3: 4800, 4: 9600}), 'Serial type': mappingproxy({False: 'RS232', True: 'RS485'}), 'Unit pressure': mappingproxy({0: 'Torr', 1: 'mBar', 2: 'Pa'}), 'Device number': mappingproxy({0: 'Spare', 1: '500 StarCell', 2: '300 StarCell', 16: '200 StarCell', 3: '150 StarCell', 4: '75-55-40 StarCell', 5: '20 StarCell', 20: 'NEXTorr-SC', 6: '500 diode', 7: '300 diode', 15: '200 diode', 8: '150 diode', 9: '75-55-40 diode', 10: '20 diode', 11: '10 diode', 12: '75 Sem', 13: '75 Sem', 14: '75 Sem', 17: '2 diode', 18: '0.2 diode 1250 Gauss', 19: '0.2 diode 800 Gauss'}), 'Win': mappingproxy({'Mode': '008', 'HV ON/OFF': '011', 'Baud rate': '108', 'Status': '205', 'Error code': '206', 'Model': '319', 'Serial number': '323', 'RS485 address': '503', 'Serial type': '504', 'Unit pressure': '600', 'Autostart': '601', 'Protect': '602', 'Fixed/step': '603', 'Device number': '610', 'Max power': '612', 'V target': '613', 'I protect': '614', 'Set point': '615', 'Temperature power section': '800', 'Temperature internal controller': '801', 'Status set point': '804', 'V measured': '810', 'I measured': '811', 'Pressure': '812', 'Label': '890'})})#