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:
objectClass for all functions of Agilent IPCMini controller.
Methods
List all read function labels available.
List all set function labels available.
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:
objectClass 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 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.
- 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.
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:
objectClass 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:
objectClass 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:
objectClass 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,PumpReadIdFunctionsClass 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 status.
read_baud_rate()Read serial baud rate.
Read controller model.
Read measured current.
Read protect current.
read_data()Read data on serial port.
read_device_number()Read device number.
Read error code.
Read fixed/step status.
Read HV status.
read_label()Read device label.
Read max power.
Read the communication mode.
Read measured pressure.
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 set point current.
Read status.
Read set point status.
Read temperature of internal controller.
Read temperature of power section.
Read unit pressure.
Read measured voltage.
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_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_protect() bool[source]#
Read protect status.
- Returns:
- bool
Protect status [0=disabled ; 1=enabled].
- 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).
- class pyipcmini.functions.ion_pump_read_functions.PumpReadIdFunctions(serial_connection: serial.Serial)[source]#
Bases:
PumpBaseFunctionsClass 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 label.
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"].
- class pyipcmini.functions.ion_pump_read_functions.PumpReadSerialFunctions(serial_connection: serial.Serial)[source]#
Bases:
PumpBaseFunctionsClass 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 serial baud rate.
read_data()Read data on serial port.
Read RS485 serial address.
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"].
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,PumpSetIdFunctionsClass 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.
- class pyipcmini.functions.ion_pump_set_functions.PumpSetIdFunctions(serial_connection: serial.Serial)[source]#
Bases:
PumpBaseFunctionsClass 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.
- class pyipcmini.functions.ion_pump_set_functions.PumpSetSerialFunctions(serial_connection: serial.Serial)[source]#
Bases:
PumpBaseFunctionsClass 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.
Module contents#
Function package for Agilent IPCMini ion pump controller.
- class pyipcmini.functions.IonPump(serial_connection: serial.Serial)[source]#
Bases:
objectClass for all functions of Agilent IPCMini controller.
Methods
List all read function labels available.
List all set function labels available.
- class pyipcmini.functions.IonPumpDics[source]#
Bases:
objectClass 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'})})#