Skip to main content

Parameters

All the functionalities and the communication between processes are ensured by a common list of parameters.

The first 26 parameters (A -> Z) will be saved regularly in the log. These values will be recovered when the pHMeter reboots.

IDPARAMNAMEDESCRIPTION
0APARAM_TEMP_EXT1Temperature of the solution (top)
1BPARAM_TEMP_EXT2Temperature of the solution (bottom)
2CPARAM_PHpH (raw values)
3DPARAM_PH_HpH in unit of potential of hydrogen
4EPARAM_PH_TARGETDesired pH
5FPARAM_PIDpH Control
6GPARAM_ECElectric Conductivity (raw values)
7HPARAM_EC_USElectric Conductivity in unit of μSiemens/cm
16QPARAM_NUMBER_ACQNumber of acquisition of 100 ms that will be taken
17RPARAM_ACTIVE_PROBESNumber of reading values
18SPARAM_BATTERYBattery voltage (hundredths of volt)
24YPARAM_ERRORError in the system
25ZPARAM_STATUSCurrently active service
26AAPARAM_PH_FACTORPH calibration: conversion factor digital -> H
27ABPARAM_PH_NEUTRALPH calibration: digital offset value when pHMeter is full of pure water
28ACPARAM_EC_FACTOREC calibration: conversion factor digital -> uS
29ADPARAM_EC_NEUTRALEC calibration: digital offset value when pHMeter is full of pure water
51AZPARAM_ENABLEDEnabled services (set by user)

Other planned parameters

Others variables are consider with aditional modules that you can connect to the pHMeter via RJ12 port.

IDPARAMPARAM NAMEDESCRIPTION
PARAM_PH_STATE0: Pause 1 : normal acquisition, 2 : purge of pipes, 4: calibration pH=4, 7: calibration pH=7, 10: calibration pH=10

State machine

There are 3 important variables that will manage the state of the pHMeter:

  • PARAM_ENABLED: the functions that are currently enabled.
  • PARAM_STATUS: the current status of the pHMeter.
  • PARAM_ERROR: if there is any error in one of the processes.
info

The PARAM_ENABLED AZ will allow to activate or deactivate some function of the pHMeter. It is for example possible to disable EC while keeping all the other functionalities active.

PARAM_ENABLED

PARAM_ENABLED AZ allows to enable or disable some functionalities of the pHMeter. Currently, it can control alkaline/acid food.

BITPARAM_ENABLEDCOMMENT
0FLAG_OUTPUT_1Enable/disable alkaline control
1FLAG_OUTPUT_2Enable/disable acid control
2FLAG_OUTPUT_3Enable/disable alkaline/acid aux. control 1
3FLAG_OUTPUT_4Enable/disable alkaline/acid aux. control 2
tip

If you want to control everything the value of PARAM_ENABLED should be 15.

PARAM_STATUS

PARAM_STATUS Z will display the currently active functionalities. It is composed of different bits that can be enabled or disabled using the method start and stop.

BITPARAM_STATUSCOMMENT
0FLAG_OUTPUT_1Enable/disable alkaline control
1FLAG_OUTPUT_2Enable/disable acid control
2FLAG_OUTPUT_3Enable/disable alkaline/acid aux. control
3FLAG_OUTPUT_4Enable/disable alkaline/acid aux. control
4FLAG_EC_READINGEnable/disable EC reading
5FLAG_EC_READINGEnable/disable EC calibration
6FLAG_PH_CONTROLEnable/disable pH control
7FLAG_PH_CALIBRATEEnable/disable pH calibration
8FLAG_RELAY_ACIDEnable/disable acid addition
9FLAG_RELAY_BASEEnable/disable base addition
10FLAG_STATUS_TEST_PROBESEnable/disable test probes

The status is currently the Z parameter. You can change the status by changing this value. For example, if you want to force the pHMeter to go in the alkaline state you should ensure that the bits for the outputs, let's say FLAG_OUTPUT_1 & FLAG_PH_CONTROL & FLAG_RELAY_BASE are set. In other words, you may have to add 2^0 (1) + 2^5 (32) + 2^8 (256) = 289 to your value of the parameter Z (in the case it was not yet enabled). Same procedure is to be implemented for acidification and all commands.

danger

The param PARAM_STATUS is the main control when you are running the pHMeter protocol, be sure that those manual changes do not affect your actual test.

PARAM_ERROR

PARAM_ERROR Y will display any error in the pHMeter, you can check the code of the error with this table:

BITPARAM_ERRORCOMMENT
0FLAG_TEMP_EXT1_PROBE_ERRORLiquid probe in the top failed (one-wire not answering)
1FLAG_TEMP_EXT2_PROBE_ERRORLiquid probe in the bottom failed (one-wire not answering)
2FLAG_TEMP_EXT1_RANGE_ERRORTemperature of liquid in the top is outside range
3FLAG_TEMP_EXT2_RANGE_ERRORTemperature of liquid in the bottom is outside range
4FLAG_PH_RANGE_ERRORpH is out of range
5FLAG_EC_RANGE_ERROREC is out of range
tip

Always have this information at hand, you never know when it can be very helpful.