OMC-2900¶
(This decription is also available in the OMC2900.py file itself). This driver is specific for direct serial output conversion and will not transmittion via FTP. Setting requieres some editing of the OMC2900.py driver file in Python.
Required:¶
OMC2900: |
|
-id: |
output0 |
port: |
serial4 |
mode: |
RS232 |
baudrate: |
9600 |
sensor_data_print: |
False (False/True) |
Optional:¶
supply_port: |
(1/2/3/4) |
supply_port_always_on: |
(False) (False/True) |
response_timeout: |
(120) |
baudrate: |
(9600) |
mode: |
(RS232) (RS232/RS485/RS422) |
bits: |
(8) |
parity: |
(None) |
stop: |
(1) |
flow: |
(0) |
timeout: |
(10) |
timeout_char: |
(3) |
rxbuf: |
(128) |
txbuf: |
(128) |
xbuf: |
(256) |
Defaults when optional fields are not used in config are in (bold)
The OMC-2900 format is enabled via the config.txt file (see above).
The other port settings are defined identically as is done with the sensor drivers. Also multiple ports can be defined by adding multiple id’s, as is done with the sensor drivers
If ‘sensor_data_print’ is set to ‘True’ the USB REPL output will print all obtained sensor data. This data is used to identify the required sensor data for omc2900 output. ‘sensor_data_print’ is found under:
# ----System---- #
Omc048:
system_id: Test
application: Test
file_log_level: info
repl_log_level: info
utc_time_offset_hours: +1
utc_time_offset_minutes: 0
sensor_data_print: True
Output over usb example
Sensor data: ('Temp C', 'C', 'TMP_600OMS') 20.11
Sensor data: ('SpCond ms/cm', 'mS/cm', 'SPC_600OMS') 0.00
Sensor data: ('ODOsat %', '%', 'ODO_600OMS') 92.5
Sensor data: ('ODO mg/L', 'mg/L', 'ODO_600OMS') 8.39
The parameter fields can be copied to the desired OMC2900 conversion in the ‘self.conversion_dict’ in the OMC2900.py file. The dictionary can be tailored if needed.
Once sensor data is received, the parameters are ran through the dictionary and all matched parameters shall automatically transmit the omc-2900 message (via the serial_output_driver) over the configured output port.