The vogtlin module

Autogenerated API documentation for vogtlin

Minimal MODBUS driver for the red-y smart - meter GSM, - controller GSC, - pressure controller GSP and - back pressure controller GSB.

Implemented from the communication manual which is valid for instruments with a serial number starting from 110 000.

The manual can be downloaded from this page: https://www.voegtlin.com/en/support/download/ and has this link: https://www.voegtlin.com/data/329-3042_en_manualsmart_digicom.pdf-

@author: Kenneth Nielsen <k.nielsen81@gmail.com>

PyExpLabSys.drivers.vogtlin.process_string(value)[source]

Strip a few non-ascii characters from string

PyExpLabSys.drivers.vogtlin.convert_version(value)[source]

Extract 3 version numbers from 2 bytes

class PyExpLabSys.drivers.vogtlin.RedFlowMeter(port, slave_address, **serial_com_kwargs)[source]

Bases: object

Driver for the red-y smart flow meter

__init__(port, slave_address, **serial_com_kwargs)[source]

Initialize driver

Parameters:
  • port (str) – Device name e.g. “COM4” or “/dev/serial/by-id/XX-YYYYY
  • slave_address (int) – The integer slave address
  • serial_com_kwargs (dict) – Mapping with setting to value for the serial communication settings available for minimalmodbus at the module level. E.g. to set minimalmodbus.BAUDRATE use {‘BAUDRATE’: 9600}.
read_value(value_name)[source]

Read a value

Parameters:value_name (str) – The name of the value to read. Valid values are the keys in self.command_map
Raises:ValueError – On invalid key
write_value(value_name, value)[source]

Write a value

Parameters:
  • value_name (str) – The name of the value to read. Valid values are the keys in self.command_map
  • value (object) – The value to write
Raises:

ValueError – On invalid key

read_all()[source]

Return all values

read_flow()[source]

Return the current flow (alias for read_value(‘flow’)

read_temperature()[source]

Return the current temperature

set_address(address)[source]

Set the modbus address

Parameters:address (int) – The slave address to use 1-247
Raise:
ValueError: On invalid address