Temperature in the sample.
Set to -300000 for automatic temperature compensation using the sample temperature sensor (e.g. Pt100).
Set to -300000 - N for automatic temperature compensation using an optical temperature sensor connected to channel N.
| |E 1 |*pressure* |0\.001 mbar |-1 – 10000000|Ambient air pressure in the sample
(set to -1 for automatic pressure compensation)
| |E 2 |*salinity* |0\.001 g/l |0 – 1000000|Salinity in the sample| |M T 
3
|*duration* |- |1 – 8 |Determines the duration of the red flash used for the optical measurement. The values 1-8 correspond to a flash duration of 1, 2, 4, 8, 16, 32, 64, and 128ms, respectively.| |M S 
4
|*intensity\** |- |0 – 7 |Determines the intensity of the red flash use for the optical measurement. The values 0-7 correspond to 10%, 15%, 20%, 30%, 40%, 60%, 80%, and 100% of the maximum intensity
.
| |M S 
5
|*amp\** |- |4 – 6 |Determines the amplification level of the optical detector used for reading out the optical sensor. The values 4-6 correspond to 80x, 200x, and 400x amplification.| |T 6 |*frequency* |Hz |1 – 32000 |Sensor type specific constant| |M 7 |*crcEnable* |- |0 – 1 |0: no cyclic redundancy check (CRC)
1: enables CRC of the communication protocol (only used for channel=1, see comment below)
| |8 |Reserved |||| |T 9 |*options* |- |0 – 7 |Sensor type specific constant
bit0 (add 1): automaticFlashDuration is enabled bit1 (add 2): automaticAmpLevel is enabled bit2 (add 4): 1000xOxygen is enabled
| |M 10 |*broadcast* |- ||See below | |T 11 |*analyte* |- |0 – 4 |Sensor type specific constant
Detected analyte by the optical sensor: 0: no sensor, 1: oxygen, 2: temperature, 3:
` `pH
| |T 12 |*fiberType* |- |0 – 2 |Sensor type specific constant Diameter of the used optical fiber 0 = 230µm, 1 = 430µm, 2 = 1mm| PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |13-19 |Reserved |||| | - | - | :- | :- | :- | * Note: When changing these values, a recalibration of the optical sensor is recommended. 1. E Environmental Condition Registers  Before triggering an optical measurement, the registers *temp*, *pressure* and *salinity* must be adjusted by the user in order to define the environmental conditions in the sample at the very position where the sensitive part of the optical sensor is located. This is needed by the device for calculating the correct result for the optical sensor measurement. Refer to the table below, which environmental settings are needed for the different analytes. The special setting *temp* = -300000 activates the automatic temperature compensation of the optical measurement, which means that the result of the sample temperature measurement (e.g. external Pt100) is used for calculating the results. Devices with more than one optical channel can use optical temperature sensors for compensating optical sensors connected to other channels. For example, if an oxygen, a pH, and an optical temperature sensor are connected to the optical channels 1, 2, and 3, respectively. Then *Settings.temp* should be adjusted to -300003 for the channels 1 and 2. This way, the oxygen and the pH sensor will be automatically temperature compensated by the results of the last optical temperature measurement at channel 3. In this scenario it is important to trigger first the measurement at channel 3, followed by measurements at channels 1 and 2. The special setting *pressure* = -1 activates the automatic pressure compensation of the optical measurement, which means that the result of ambient air pressure measurement is used for calculating the results. |Analyte |Temperature|Pressure |Salinity | | - | - | - | - | |Oxygen |Required |Required only for oxygen units: µmolar (mg/L), %air sat., %O2 |Required only for oxygen units: µmolar (mg/L) | |Optical Temperature|-- |-- |-- | |pH |Required |-- |Required | 2. M Measurement Mode Registers  Optical Measurement Parameters. All optical sensors from PyroScience are based on proprietary luminescent dyes, which are excited with LED light. The excited dyes emit then light in the near infrared (NIR), which is detected by a light detector. The measured lifetime of the emitted NIR light is then used to calculate the final oxygen, pH, or temperature values (all done within the firmware). The user can adjust (i) the *intensity* of the LED light, (ii) the *duration* of the emitted LED flash, and the (iii) the amplification level *amp* of the detector. The registers *intensity* and *amp* should be adjusted together. Suggested procedure: set *amp* = 6 and increase *intensity* stepwise from 0 to 7 until the signal intensity (*Results.signalIntensity*) is within the typical range of 100-400mV. If *Results.signalIntensity* is then still too high, decrease stepwise *amp* to 5 or 4 and choose ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual again the best value for *intensity*. But *amp* must be kept in the range of 4-6. Note that the chosen value of *intensity* is a compromise between lower long-term drift (*intensity*=1) and lower signal-to-noise ratio (*intensity*=8). The registers *intensity* and *amp* should be always adjusted properly if a new sensor head is connected to the device. After the sensor has been calibrated, these two registers should not be changed again. Please refer also to section 2.5.3 [describing](#_page27_x54.00_y607.92) an alternative way how to adjust the registers *intensity* and *amp* based on the sensor code provided with each individual sensor head. The register *duration* determines the length of the LED flash as indicated in the table. The chosen value is a compromise between lower long-term drift (*duration*=1) and lower signal-to-noise ratio (*duration*=8). If in doubt set *duration*=5. This register has no effect on the calibration, so it can be changed anytime. Broadcast Mode. The register *broadcast* can be used to enable and configure the broadcast mode for the specific optical channel. During broadcast mode, the device triggers itself periodic measurements as defined in the *broadcast* register (see details in the table below). Optionally it is also possible to trigger broadcast measurements via the digital input TRIGIN at the extension port of the device (if available). The results can be given at the analog output (if available), and the results can be transmitted via the UART/USB interface. In the latter case, the results are transmitted following the syntax of the MEA command (2.3.[1), with](#_page15_x54.00_y531.92) the only difference, that the message starts with the character “>” (ASCII code 0x3E). The broadcast mode of different optical channels can be configured independently. For example, one channel can measure every 10s, the next one every 0.5s. Note, the minimum realizable broadcast interval depends on the hardware. For laboratory (e.g. FireSting) and underwater devices (e.g. AquapHOx Transmitter) it can be as low as 25 ms, while for most OEM devices (e.g. PICO-x) the minimum realizable broadcast interval is 1000 ms. The reason is, that these OEM devices are optimized for low energy and not for high speed operation. The maximum possible broadcast interval is 65000 ms = 65 s. Note, the master can anytime send standard commands to the device, even if the broadcast mode is enabled. If the device receives a command from the master, while it is executing a broadcast measurement, the device will (1) complete the broadcast measurement, (2) send the broadcast message, (3) thereafter it will immediately execute the requested command, and (4) send then the response to the master. Broadcast Mode with Deep Sleep. For devices which support the #STOP command [(2.2.6), ](#_page13_x54.00_y604.92)the broadcast mode does also work in combination with the deep sleep mode in order to reduce the power consumption significantly. This mode is enabled by sending the command #STOP or it is enabled directly after power up if the *enableDeepSleep* bit is set to 1. In this case the device automatically wakes up from deep sleep for each ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual required broadcast measurement. When the measurement is finished it goes back into deep sleep mode. |broadcast Register|Label ||Description | | - | - | :- | - | |Bit 0..15 |*Interval* (ms) ||interval = 0: Interval broadcast mode is disabled| ||||interval = 1-65535: Interval broadcast mode is enabled. The | ||||module triggers itself periodic measurements, whereby interval | ||||defines the broadcast interval in units of ms. The max. possible | ||||interval is 65 s. The minimum is in the range of 25-1000ms | ||||depending on the specific hardware and the configuration of | ||||the measurement mode registers. | |Bit 16..23 |*enabledSensors* ||Bitfield defining which sensors are enabled during the | |Bit 16 (add 65536) Bit 17 (add 131072) Bit 18 (add 262144) Bit 19 (add 524288) Bit 20 (add 1048576) Bit 21 (add 2097152)|optical channel sample temperature ambient air pressure relative humidity reserved
case temperature
||broadcast mode as given by the parameter S in the command MEA. | |Bit 24 (add 16777216) |*enableUartTransmit*||If set to 1, then the broadcast mode will send after each | ||||measurement via the UART (USB) interface the character ‘>’ | ||||followed by the answer string as given by the command MEA. | |Bit 25 (add 33554432) |*enableTrigin* ||If set to 1, then a broadcast measurement can be triggered by | ||||the TRIGIN pin at the extension port (if available).| |Bit 26 (add 67108864) |*enableDeepSleep* ||If set to 1, then the device will go after power up directly into | ||||deep sleep mode (only if device supports the #STOP command). | ||||It will wake up periodically for each required broadcast | ||||measurement, and then go back to deep sleep.| Cyclic Redundancy Check (CRC). Setting the register *Settings.crcEnable*=1 will enable a cyclic redundancy check (CRC) for all messages (i.e. command responses and broadcast messages) transmitted from the device to the control hardware (e.g. PC). Now every answer from the device to the master is terminate by the string “:˽C↵” where C is the CRC16/Modbus checksum represented as a decimal ASCII-string (human readable). The CRC is calculated for all ASCII-characters (unsigned bytes) from the very beginning of the returned string until the character just before the “:”. Note, also spaces (ASCII code 32) are included in the CRC calculation. See also 2.1.4. Note, crcEnable is only used for channel=1. The value of crcEnable for channel 1 enables/disables the CRC for the whole device! 3. S Sensor Code Settings  Section [2.5.2 de](#_page25_x54.00_y574.92)scribed how to configure the registers *intensity* and *amp.* This procedure can be optionally omitted by utilizing information given by the “sensor code” provided with each individual sensor head from PyroScience. This sensor code contains the factory calibration (see section 2.6.2) [and recomme](#_page30_x54.00_y671.92)nded measurement settings for *intensity* and *amp*. The last two digits of the first block of the sensor code contain the recommended settings. For example, in the sensor-code “XB7-547-213” “B” encodes the *intensity* setting (the letters A to H correspond to 10%, 15%, 20%, 30%, 40%, 60%, 80%, and 100% of the maximum intensity) and “7” encodes the *amp* setting (5, 6 and 7 correspond to 80x, 200x, and 400x amplification). These values are only ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual recommendations for typical applications for the specific sensor head. For optimal performance please follow the instruction given in section 2.5.2. 4. T Sensor Type Specific Constants  These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). For example: if the user intents to use always oxygen microsensor (item nr. OXR50), then these registers need to be configured only one time. It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code attached to the sensor head. Standard users might skip the following paragraphs of this section, as these registers are adjusted by the mentioned software tools. Automatic Flash Duration. Setting bit 0 (*automaticFlashDuration*) of *Settings.options* to 1 will enable the automatic flash duration. Now the flash duration is dynamically adjusted within the range of 1-128 ms depending on the last value of *Results.signalIntensity*. In this case *duration* defines the flash duration if *Results.signalIntensity* equals 400mV. For higher signal intensities the duration is automatically reduced, while for lower ones it is increased. This option is especially useful for oxygen sensors, because their *signalIntensity* depends strongly on the actual oxygen level. This way the *duration* is dynamical adjusted in order to assure a pretty constant signal-to-noise level while ensuring minimal drift (caused by photobleaching). Automatic Amplification Level. If bit 1 (*automaticAmpLevel*) of *Settings.options* is set to 1, then the amplification level of the detector is reduced automatically in case of an oversaturation of the detector. It is recommended for precision measurements to adjust *intensity* and *amp* in such a way, that *Results.status* never indicates “sensor signal or ambient light too high”. But an enabled automatic amplification level is anyhow recommended, because the optical sensor will still give reasonable values if e.g. increased ambient light might saturate the amplifier. In this case the optical measurement is automatically repeated with stepwise decreased amplification levels, until the amplifier is not anymore saturated. If such an automatic amplification reduction has taken place, then *Results.status* shows “Warning - automatic amplification level active”. Note, that the content of the register *amp* is not changed by this procedure. Trace Oxygen Option. If bit 2 (*1000xOxygen*) of *Settings.options* is set to 1, the integer values given in the *Results* registers *umolar*, *mbar*, *airSat*, and *percentO2* are multiplied by a factor of 1000. This means, that after conversion to floating point values, the user will obtain 3 more digits of precision for oxygen measurements. This option should be only used in combination with special “trace oxygen sensors” intended for measurements close to 0%O2. If the *1000xOxygen* option is enabled, then *Results.status* will always show the warning “WARNING – 1000xOxygen enabled”.![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual In the following table the recommended settings for a few selected sensor types are listed. The values for duration are only suggestions and can be changed as described in section [2.5.2. P](#_page25_x54.00_y574.92)lease contact us if your sensor type is not listed here. ||Register Name (Register Number)||||| | :- | - | :- | :- | :- | :- | |Sensor Type(s)|duration (3) |frequency (6)|options (9) |analyte (11)|fiberType (12)| |X, S |5 |4000 |3 |1 |2 | |XZ |5 |4000 |3 |1 |2 | |Z |5 |4000 |3 |1 |0 | |Y |5 |4000 |3 |1 |1 | |W |5 |4000 |3 |1 |2 | |U, T |8 |470 |3 |1 |2 | |D |8 |970 |3 |2 |2 | |C |8 |1970 |3 |2 |1 | |SA, SB, SC, SD, SE, SF, XA, XB, XC, XD, XE, XF |5 |3000 |3 |3 |2 | 6. Calibration Registers (Oxygen Sensors) These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) Example Communication (reading the first 6 registers) Command: RMR˽1˽1˽0˽6↵ Response: RMR˽1˽1˽0˽6˽53212˽20123˽20212˽21209˽1024089˽100000 ↵ Example Communication (writing the first 2 registers) Command: WTM˽1˽1˽0˽2˽53000˽20000↵ Response: WTM˽1˽1˽0˽2˽53000˽20000 ↵ Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical oxygen sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 1 in this case. This ensures, that the device applies the calibration registers accordingly. The *Calibration* registers provide all information needed for converting the raw value *Results.dphi* into the final oxygen units in the *Results* registers. The following table provides an overview. The registers can be grouped into 2 different categories as indicated by the circles in the first column.![ref1] |Reg. Nr. |Label |Unit |Configured by |Description | | - | - | - | - | - | |C S 0 |*dphi0* |0\.001° |command CLO (or sensor code) |Phase shift at 0%O2. | |C S 1 |*dphi100* |0\.001° |command CHI (or sensor code) |Phase shift at upper calibration point.| PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |C S 2 |*temp0* |0\.001°C |command CLO (or sensor code|) |Calibration temperature at 0%O2.| | - | - | - | - | - | - | |C S 3 |*temp100* |0\.001°C |command CHI (or sensor code|) |Calibration temperature at upper calibration point.| |C S 4 |*pressure* |0\.001 mbar |command CHI (or sensor code|) |Ambient air pressure during calibration at upper calibration point.| |C S 5 |*humidity* |0\.001 %RH |command CHI (or sensor code|) |Relative humidity during calibration at upper calibration point. Set to 100%RH | ||||||for calibrations in liquid samples.| |T 6 |*f* |0\.001 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 7 |*m* |0\.001 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 8 ![ref3]|*calFreq* |Hz |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 9 |*tt* |10-5/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 10 |*kt* |10-5/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 11 |*bkgdAmpl* |0\.001 mV |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 12 |*bkgdDphi* |0\.001° |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 13 |*useKsv* ||software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 14 |*ksv* |10-6/mbar |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 15 |*ft* |10-6/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |T 16 |*mt* |10-6/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| |17 |Reserved ||||| |T 18 |*percentO2* |0\.001 %O2 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant
Oxygen level at upper calibration point
| |19-29 |Reserved ||||| 1. C User Calibration  The calibration data registers contain all information about the last sensor calibration. It is only necessary to write these registers if the factory calibration of a sensor head should be used. During a calibration they are automatically adjusted by the oxygen calibration commands CHI (2.3.[2) and ](#_page16_x54.00_y628.92)CLO (2.3.3).[ The comm](#_page17_x54.00_y431.92)and CHI will adjust the registers *dphi100, temp100, pressure,* and *humidity*. The command CLO will adjust the registers *dphi0* and *temp0*. 2. S Factory Calibration Taken from Sensor Code![ref4] The user calibration is generally advised for highest accuracy. But it is possible to replace either calibration point by a rough factory calibration, which is given by the so called “Sensor Code” attached to each oxygen sensor. This is especially interesting, if the aimed application will not measure oxygen values close to one of the calibration points. For example, a respiration measurement might measure always around oxygen levels of ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 18-21 %O2. Then it is possible to take the factory calibration for the 0 %O2 calibration point, without losing too much accuracy. How to deduct the factory calibration from the Sensor Code is best explained by an example, where we assume the following Sensor Code: XB7-547-213 A 0 %O2 factory calibration is encoded by the numbers 547 which give *dphi0* = 54,7°. The user has to write the following registers, in order to apply this calibration: |Register |Value |int32 value| | - | - | - | |*dphi0* |54\.7° |54700 | |*temp0* |20\.0°C |20000 | An ambient air factory calibration is encoded by the numbers 213 which give *dphi100* = 21,3°. The user has to write the following registers, in order to apply this calibration: |Register |Value |int32 value| | - | - | - | |*dphi100* |21\.3° |21300 | |*temp100* |20\.0°C |20000 | |*pressure* |1013 mbar |1013000| |*humidity* |0 %RH |0 | 3. T Sensor Type Specific Constants These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). For example: if the user intents to use always oxygen microsensors (item nr. OXR50), then these registers must be configured only one time. It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code provided with the sensor head. Advanced users might change the register *percentO2*. For most standard range oxygen sensors this register is fixed to 20.95 %O2. This defines, that the command CHI (2.3.2) can be used for calibrations at ambient oxygen levels. If you want to apply a calibration gas of e.g. 15 %O2 or 100 %O2, then you have to write this value into the register *percentO2* before using the command CHI. Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* can be estimated as: - 0.234 × ℎ( ) + 0.343 ℎ = 0 (eq. 1) If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the registers can be adjusted manually. The following table lists the type specific calibration registers for a ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual few selected oxygen sensors. The values in this table are in register-units. No conversion is necessary. For all listed sensor types the following registers are constant: bkgdDphi = useKsv = ksv = ft = 0, percentO2 = 20950. ||Register Name (Register Number)||||||| | :- | - | :- | :- | :- | :- | :- | :- | |Sensor Type(s)|f (6) |m (7) |calFreq |tt (9) |kt (10) |bkgdAmpl (11)|mt (16) | ||||(8) ||||| |X, S |804 |122 |4000 |-56 |969 |see eq. 1 |-303 | |XZ |836 |49 |4000 |-29 |549 |see eq. 1 |-32 | |Z, Y |817 |106 |4000 |-70 |953 |0 |-301 | |W |817 |106 |4000 |-43 |799 |see eq. 1 |-301 | |U, T |827 |75 |470 |-350 |874 |see eq. 1 |-106 | 7. Calibration Registers (Optical Temperature Sensors) These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) Example Communication (reading the first 2 registers) Command: RMR˽1˽1˽0˽2↵ Response: RMR˽1˽1˽0˽2˽343˽223↵ Example Communication (writing the 10th register *Tofs*) Command: WTM˽1˽1˽9˽1˽-1023↵ Response: WTM˽1˽1˽9˽1˽-1023↵ Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical temperature sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 2 in this case. This ensures, that the device applies the calibration registers accordingly. These registers provide all information needed for converting the raw value *Results.dphi* into the temperature given in *Results.tempOptical*. The following table provides an overview. The registers can be grouped into 3 different categories as indicated by the circles in the first column.![ref1] |Reg. Nr. |Label |Unit |Configured by|Description | | - | - | - | - | - | |S 0 |*M* |1 |sensor code|Sensor code constant| |S 1 |*N* |1 |sensor code|Sensor code constant| |2-5 |Reserved* |||| |T 6 |*C* |0\.001 |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| |7-8 |Reserved* |||| PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |C 9 |*Tofs* |0\.001 K |command COT |Offset temperature used for single point calibration (e.g. -1230 corresponds to an offset of -1.23K) | | - | - | - | - | :- | |10 |Reserved* |||| |T 11 |*bkgdAmpl* |0\.001 mV |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| |T 12 |*bkgdDphi* |0\.001° |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| |13-29 |Reserved* |||| 1. C User Calibration The register *Tofs* contains a simple offset user calibration. The command COT (2.3.4) will adjust this register. 2. S Sensor Code Constants These registers comprise constants which must be adjusted for each individual sensor head. These constants are part of the sensor code printed on the label attached to the sensor head. An example explains how to deduct these constants from the sensor code: We assume the following Sensor Code: CD6-303-407 Then the register *M* must be adjusted to *M* = 303. And the register *N* must be adjusted to *N* = 407. 3. T Sensor Type Specific Constants These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). It is recommended to determine the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench” initially as a reference. These software tools will configure these registers based on the sensor code attached to the sensor head. Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* and *bkgdDphi* can be estimated with Fehler! Verweisquelle konnte nicht gefunden werden. given in section 2.6.3. If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the register *C* can be adjusted manually. For the sensor type “D” the value for *C* is 97. For the sensor type “C” the value of C is -27. Both values are in register units. No conversion is necessary. ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 8. Calibration Registers (pH Sensors) These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) © PyroScience GmbH 35 ![ref2] Example Communication (reading the 14 Command: RMR˽1˽1˽13˽1↵ Response: RMR˽1˽1˽13˽1˽154↵ Example Communication (writing the 1 Command: WTM˽1˽1˽0˽1˽7013↵ Response: WTM˽1˽1˽0˽1˽7013↵ th register) st register) © PyroScience GmbH ![ref2] Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical pH sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 3 in this case. This ensures, that the device applies the calibration registers accordingly! These read/write registers provide all information needed for converting the raw value *Results.dphi* into the final pH value given in the *Results.ph*. The following table provides an overview on all *calibration* registers. These registers can be grouped into 3 different categories is indicated by the circles in the first column.![ref1] |Reg. Nr. |Label |Unit |Configured by|Description || | - | - | - | - | - | :- | |S 0 |*pka* |0\.001 pH |sensor code|Sensor code constant|| |T 1 |*slope* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 2 |*dPhi\_ref* |0\.001° |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 3 |*pka\_t* |10-6 delta pH/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 4 |*dyn\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 5 |*bottom\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 6 |*slope\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 7 |*f* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 8 ![ref3]|*lambda\_std* |0\.001 nm |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 9 |*pka\_is1* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 10 |*pka\_is2* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 11 |*bkgdAmpl* |0\.001 mV |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |T 12 |*bkgdDphi* |0\.001° |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| |C 
` `13
|*offset* |0\.001 pH |command CPH ||| |C 
` `14
|*dPhi1* |0\.001° |command CPH ||| |C 
` `15
|*pH1* |0\.001 |command CPH ||| PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |C 
` `16
|*temp1* |0\.001 °C |command CPH ||| | - | - | - | - | :- | :- | |C 
` `17
|*salinity1* |0\.001 g/L |command CPH ||| |C 
` `18
|*ldev1* |0\.001 nm |command CPH ||| |C S 
19
|*dPhi2* |0\.001° |command CPH (or sensor code)||| |C S 
20
|*pH2* |0\.001 pH |command CPH (or sensor code)||| |C S 
21
|*temp2* |0\.001 °C |command CPH (or sensor code)||| |C S 
22
|*salinity2* |0\.001 g/L |command CPH (or sensor code)||| |C S 
23
|*ldev2* |0\.001 nm |command CPH (or sensor code)||| |C 
` `24
|*Aon* |10-6|command CPH ||| |C 
` `25
|*Aoff* |10-6|command CPH ||| |26-29 |Reserved ||||| 1. C User Calibration These registers are adjusted by applying the command CPH (2.3.5). When[ the sen](#_page18_x54.00_y318.92)sor is switched the offset *register* must be reset to 0. 2. S Sensor Code Constants![ref4] The register *pka* is a constant which must be adjusted for each individual sensor head. This constant is printed on the label attached to the sensor head. A two-point calibration by the user calibration is generally advised for highest accuracy. However, the label attached to the sensor head contains a factory calibration for the calibration point at high pH (*dPhi2*). In this case only a 1-point calibration at low pH is required by the user. On sensor heads produced after 11/2021 the value of *dPhi2* is printed on the label of the sensor. If this value is not printed on your sensor head you can decode it from the last 2 digits of the sensor code with this formula: *dPhi2* = 47 + 10/99\*lastTwoDigits For the example sensor code SAC7-387-250 this would result in: *dPhi2* = 47 + 10/99\*50 - 52.05°. *dPhi2* is the hypothetical phase angle at *pH2*=14, *temp2*=20°C, *salinity2*=7.5 and *ldev2*=623. For this example the following command would be used to set the registers on the device: WTM˽**C**˽1˽19˽5˽52050˽14000˽20000˽7500˽62300↵ where C has to be replaced with the channel number. If the sensor will be calibrated with a two-point calibration this step can be omitted. 3. T Sensor Type Specific Constants![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code attached to the sensor head. Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* and *bkgdDphi* can be estimated with Fehler! Verweisquelle konnte nicht gefunden werden. given in section 2.6.3. If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the registers can be adjusted manually. The following table lists the type specific calibration registers for a few selected pH sensors. The values in this table are in register-units. No conversion is necessary. For all listed sensor types the following registers are constant: *dPhi*\_*ref* = 57800, *slope*\_t = 0, *lambda*\_*std* = 623000, *bkgdDphi* = 0. If the sensor is switched the *offset* register should be reset to 0. ||Register Name (Register Number)|||||||| | :- | - | :- | :- | :- | :- | :- | :- | :- | |Sensor Type(s) |slope (1) |pka\_t (3) |dyn\_t (4) |bottom\_t (5) |f (7) |pka\_is1 (9) |pka\_is2 (10) |bkgdAmpl (11) | |SA, XA |1037000|-9570 |-955 |-676 |39500 |2330000|250000 |see eq. 1 | |SB, XB |1081000|-11500 |-2090 |199 |32500 |2540000|250000 |see eq. 1 | |SC, XC |1033000|-16300 |-521 |-1255 |32500 |969700 |126300 |see eq. 1 | |SD, XD |1034800|-2756 |240 |145 |38710 |0 |250000 |see eq. 1 | |SE, XE |1000000|-8568 |207 |-4130 |37980 |702000 |250000 |see eq. 1 | |SF, XF |1000000|-7344 |-645 |-834 |35760 |1358000|250000 |see eq. 1 | 9. Results Registers The read-only *Results* registers provide the status and the results of the last measurement. This register block is not saved within the flash memory, it is only kept in the volatile RAM memory. The register block number is 3. They can be read by using the command RMR (2.[3.8). ](#_page20_x54.00_y432.92) Example Communication (reading the first 8 registers) Command: RMR˽1˽3˽0˽15↵ Response: RMR˽1˽3˽0˽15˽0˽21099˽210837˽203987˽97876˽23656˽21065˽234098↵ Interpreted as: status = 0, dphi = 21.099°, umolar = 210.837 µmol/L, mbar = 203.987 hPa, airSat = 97.876 %air sat., tempSample = 23.656°C, tempCase = 21.065°C, signalIntensity = 234.098 mV ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual Note, the MEA command (2.3.[1) returns](#_page15_x54.00_y531.92) by default the content of the *Result* registers in the command response. So in standard applications it is not necessary to use the RMR command. |Reg. Nr. |Label |Unit |Range |Description | | - | - | - | - | - | |0 |*status*||int32 |ERROR / Warning Flags of the last measurement (refer to separate table below)| |1 |*dphi*|0\.001° |int32 |Phase shift of optical measurement (raw data)| |2 |*umolar\*\**|0\.001 µmol/L |int32 |Dissolved oxygen concentration (valid only in water) | |3 |*mbar\*\**|0\.001 mbar
= 0.001 hPa
|int32 |Partial pressure oxygen (hPa=mbar) (valid in gases and in liquids)| |4 |*airSat\*\**|0\.001 %air sat. |int32 |Dissolved oxygen given as % air saturation (valid only in liquids) | |5 |*tempSample*|0\.001°C |int32 |Sample temperature (typ. Pt100 sensor)| |6 |*tempCase*|0\.001°C |int32 |Case temperature within the device| |7 |*signalIntensity\**|0\.001 mV |int32 |Signal intensity of optical measurement| |8 |*ambientLight*|0\.001 mV |int32 |Ambient light entering the sensor| |9 |*pressure*|0\.001 mbar |int32 |Ambient air pressure| |10 |*humidity*|0\.001 %RH |int32 |Relative humidity within the device| |11 |*resistorTemp*|0\.001 Ohm |int32 |Resistance of the sample temperature sensor | |12 |*percentO2\*\**|0\.001 %O2 |int32 |Oxygen volume fraction (valid only in gases)| |13 |*tempOptical*|0\.001 °C |int32 |Temperature measured with optical temperature sensor| |14 |*ph*|0\.001 |int32 |pH value measured by optical pH sensors| |15 |*ldev*|0\.001 nm |int32 |Only for internal usage| |16-17 |Reserved* |||| * If *automaticAmpLevel* is enabled in *settings.options*, then *signalIntensity* is given as it would be for the actual amplification level adjusted in *settings.amp*! For example if *settings.amp*=7 (=400x) and the measurement was due to *automaticAmpLevel* performed with 80x amplification and a real photodetector signal intensity of 800mV, then *signalIntensity* will have the value 800mV x 400 / 80 = 4000mV. \*\* If *1000xOxygen* is enabled in *settings.options*, then these registers are internally multiplied by 1000, giving 3 more digits of precision after conversion to floating point values. Status Register. The *status* register contains several bit flags indicating errors or warnings of the last measured data point. It is on the users authority to check the *status* register after each measurement for possible Warnings or ERRORS. Especially in case of ERRORS, the given results might be not valid. The user has to distinguish between warnings and errors. A warning indicates, that the measurement results are in principle still valid, but their precision and/or accuracy might be deteriorated. An error means, that the respective measurement result is not at all valid. ![ref1] |status Bit |ERROR / Warning Description| | - | - | |Bit 0 (add 1)|Warning - automatic amplification level active| |Bit 1 (add 2)|Warning - sensor signal intensity low | |Bit 2 (add 4)|ERROR - optical detector saturated| |Bit 3 (add 8)|Warning - reference signal intensity too low | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |Bit 4 (add 16)||ERROR - reference signal too high| | - | :- | - | |Bit 5 (add 32)||ERROR - failure of sample temperature sensor (e.g. Pt100) | |Bit 6 (add 64)||Warning – 1000xOxygen enabled| |Bit 7 (add 128)||Warning - high humidity (>90%RH) within the module| |Bit 8 (add 256)||ERROR - failure of case temperature sensor| |Bit 9 (add 512) ||ERROR - failure of pressure sensor| |Bit 10 (add 1024)||ERROR - failure of humidity sensor| Example: *status* = 34 = 2 + 32 means, that there is a warning about low signal intensity of the optical sensor, and that the external temperature sensor (Pt100) had a failure. Results of optical oxygen sensors are given in the registers *umolar*, *mbar*, *airSat*, and *percentO2*. Refer to the table above for the details on the different oxygen units. These registers show only results if *Settings.analyte* = 1. Otherwise they are set to 0. Results of optical temperature sensors are given in the register *tempOptical*. This register shows only a result if *Settings.analyte* = 2. Otherwise it is set to 0. Results of optical pH sensors are given in the register *ph*. This register shows only a result if *Settings.analyte* = 3. Otherwise it is set to 0. Results of sample temperature sensors (typ. Pt100), case temperature sensors, internal pressure sensors and internal humidity sensors are given in *tempSample*, *tempCase*, *resistorTemp*, *pressure* and *humidity*, respectively. Invalid Results. If for any reason the measurement produces an invalid results (e.g. the signal intensity of an optical sensor is much too low, or the reference LED measurement had a failure etc.), then the result register contains the integer value -300000. Any higher programming language should interpret this as “not a number” (NaN). Raw data of the optical measurement. The raw data given by the optical phase-shift measurement are the “phase shift” *dphi*, the *signalIntensity*, and *ambientLight*.The phase shift *dphi* is the essential value used for calculating the value of the sensor analyte (see below). *signalIntensity* represents the measured luminescent signal intensity of the optical sensor. *signalIntensity* can be also used for checking the quality of the sensor (e.g. a broken sensor tip will result in a rapid decrease of the intensity). Please note, that the signal intensity is highly dependent e.g. on the actual oxygen concentration and/or on the temperature. Therefore, measured signal intensities can be only compared with each other, if they have been measured at similar analyte levels and temperatures. Immediately before each optical measurement, the device measures also the ambient light entering the optical detector and stores it in *ambientLight*. Considerable amounts of ambient light might enter the optoelectronics, if the sensor is exposed e.g. to direct sun light. This might lead to a saturation of the optical detector and to an invalid optical measurement. As a thumb of rule the sum of *ambientLight* and *signalIntensity* should not exceed 2000mV. If it exceeds this value, the amplification level in the *settings.amp* should be lowered. Or the sensor tip should be shaded from the external light source. Or *automaticAmpLevel* should be enabled in *settings.options*. ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 10. AnalogOutput Registers These read/write registers contain the configuration of the analog outputs (if available). The register block number is 4. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) Example Communication (reading the first 4 registers) Command: RMR˽1˽4˽0˽4↵ Response: RMR˽1˽4˽0˽4˽260˽516˽1028˽2052↵ Example Communication (writing the 5th register) Command: WTM˽1˽4˽4˽0↵ Response: WTM˽1˽4˽4˽0 ↵ The maximum number of supported analog outputs is 4. Any result register from any optical channel can be mapped on the analog outputs, whereby the linear scaling can be freely adjusted by min and max values. If the corresponding result register contains an invalid result (i.e. register value is -300000), then the analog output is set to 0.0V or 0mA. Note, these registers can be comfortably configured with the Windows software tools Pyro DeveloperTool or Pyro Woekbench.![ref1] |Reg. Nr. |Label |Unit ||Range |Description | | - | - | - | :- | - | - | |0 |*aoSelectA* |bits 0-6: regNr bit 7: alarm\*\* bits 8-15: C ||regNr: 0..17 alarm: 0..1 C: 1..4 |regNr is the register number of the *results*-register and C the optical channel number which is used for the analog | ||||||output A. | ||||||Use alarm=0 for standard analog output.| ||||||Use alarm=1 for alarm output, see below | ||||||\*| |1 |*aoSelectB* |as above ||see above|As *aoSelectA* but given for analog output | ||||||B.| |2 |*aoSelectC* |as above ||see above|As *aoSelectA* but given for analog output | ||||||C.| |3 |*aoSelectD* |as above ||see above|As *aoSelectA* but given for analog output | ||||||D.| |4 |*aoMinA* |unit identical to the unit of the register number regNr in the *results*-registers ||int32 |Defines the *results*-register value (selected by *aoSelectA*), which corresponds to the minimum output level (0.0V or 4mA).| |5 |*aoMinB* |as above ||int32 |As *aoMinA* but given for analog output | ||||||B.| |6 |*aoMinC* |as above ||int32 |As *aoMinA* but given for analog output | ||||||C.| |7 |*aoMinD* |as above ||int32 |As *aoMinA* but given for analog output | ||||||D.| |8 |*aoMaxA* |unit identical to the unit of the register ||int32 |Defines the *results*-register value (selected by *aoSelectA*), which | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |||number regNr in the *results*-registers |||corresponds to the maximum output level (Umax or 20mA)| | :- | :- | :- | :- | :- | :- | |9 |*aoMaxB* |as above ||int32 |As *aoMaxA* but given for analog output | ||||||B.| |10 |*aoMaxC* |as above ||int32 |As *aoMaxA* but given for analog output | ||||||C.| |11 |*aoMaxD* |as above ||int32 |As *aoMaxA* but given for analog output | ||||||D.| * If alarm=1 then the analog output acts as a digital alarm output, giving 0.0V (or 4mA for current outputs) if the selected register is within the range defined by aoMinA and aoMaxA. If outside that range, the output is set to Umax (or 20mA). For invalid results (i.e. register value is -300000) it is set to Umax (or 0mA). 11. Resistive Temperature Sensor Registers These read/write registers contain the configuration of the resistive temperature measurement (e.g. Pt100 temperature sensor connected to the sample temperature port. The register block number is 20. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) This register block contains 8 registers, but only the register *tempOffset* is interesting for developers. This register can be used to perform a simple offset user calibration of the attached sample temperature sensor. The following example communication show how to read and write this single register: Example Communication for reading *tempOffset* Command: RMR˽1˽20˽6˽1↵ Response: RMR˽1˽20˽6˽1˽1200↵ In this example the current temperature offset is +1.2 K. Example Communication for writing *tempOffset* Command: WTM˽1˽20˽6˽-3340↵ Response: WTM˽1˽20˽6˽-3340↵ This example adjusts the temperature offset to -3.34 K. Note: The default value of *tempOffset* is 0. Resistive temperature sensors are generally quite precise and long-term stable. In many typical applications it is not required to adjust this offset. Important: Changing the *tempOffset* register will have immediate impact on the calibration of any optical sensor, which is using the sample temperature sensor for automatic temperature compensation. Therefore, it is generally recommended to adjust *tempOffset* before the optical sensors are calibrated. Warning: Never change any of the registers *reg0-reg5* and *reg7*. They contain the factory configuration of the internal circuits used for reading out the sample temperature sensors. Please contact PyroScience if you have changed some of these registers accidentally.![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual![ref1] |Reg. Nr. |Label |Unit |Range |Description | | - | - | - | - | - | |0 |*reg0* |||Never change! | |1 |*reg1* |||Never change! | |2 |*reg2* |||Never change! | |3 |*reg3* |||Never change! | |4 |*reg4* |||Never change! | |5 |*reg5* |||Never change! | |6 |*tempOffset* |0\.001 K |int32 |Offset added to measured temperature| |7 |*reg7* |||Never change! | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual MODBUS PROTOCOL 1. General Structure![ref1]  PyroScience Unified Protocol FW4.10-4.19 | Reference Manual The figure above shows the general structure of some representative solutions from PyroScience offering a Modbus interface. All PyroScience devices possess a central microcontroller which is communicating via a UART interface based on the proprietary PyroScience protocol (2.1). Devices[ with](#_page7_x54.00_y134.92) a RS485/Modbus interface possess a second “Modbus microcontroller” which acts as a translator: it communicates with the outer world via the RS485 interface based on the Modbus protocol, while it is internally communicating with the central microcontroller based on the PyroScience protocol. 1. Modbus RTU Standard PyroScience devices offering a Modbus interface are compatible with the Modbus RTU protocol as described in the official documentation “Modbus over serial line specification and implementation guide V1.02” and “Modbus application protocol specification V1.1b” provided by the Modbus Organization inc. ( https://[modbus.org ). ](https://modbus.org/) The advantages of RS485 in combination with the Modbus RTU protocol are: - cable lengths up to several 100m are supported - up to 247 devices can be connected to a 4-wire RS485 bus - Modbus RTU is a popular communication protocol 2. Modbus Implementation in PyroScience Devices The PyroScience protocol is based on (1) registers and on (2) commands. In contrast, the Modbus protocol is solely based on registers. It is the task of the Modbus microcontroller to map the functionality of the PyroScience registers and commands onto the Modbus register structure. PyroScience registers are simply mapped onto corresponding Modbus registers as outlined in the following chapters. The implementation of PyroScience commands into the Modbus protocol is a little bit more complex, it is realized by the special command register block as described in 3.3.6. Note: If the content of Modbus registers is changed by standard Modbus write accesses, these changes are only kept until the next power cycle. Please refer to section 3.3.6 how to make such changes persistent after power cycles. The enumeration of Modbus registers is always based on 16bit registers. PyroScience devices use by default always 32bit registers (signed integer), so two Modbus registers are always coupled to a 32bit register. Within this document a 32bit register is therefore indicated for example like “40001/40002”, which refers to a signed 32bit integer located in the two 16bit Modbus registers 40001 and 40002. The used byte order is “CDAB” , so in this example the register 40001 contains the least significant 16bit of the 32bit integer, and the register 40002 contains the most significant ones. This is also known as little-endian byte swap.![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 3. Modbus Slave Address The default Modbus slave address is 1. Refer to 3.3.5 how[ to change](#_page49_x54.00_y657.92) this slave address. 4. Operation Principle of Periodic Measurements The periodic measurements mode is activated by writing the desired sample interval in units of ms into the Modbus register *broadcast* located at the address 40021/40022 [(3.3.2). ](#_page47_x54.00_y490.92)The minimum realizable sample interval depends on the hardware. For underwater devices (e.g. AquapHOx) it can be as low as 50 ms, while for most OEM devices (e.g. PICO-x) the minimum realizable sample interval is 1000 ms. The reason is, that these OEM devices are optimized for low energy and not for high speed operation. The maximum possible broadcast interval is 65000 ms = 65 s. Writing a 0 to this register will disable periodic measurements. The results of the latest periodic measurement can read from the *Results* registers [(3.2.1). ](#_page45_x54.00_y186.92)Or it can be read from the analog output. 5. Operation Principle of Triggered Measurements Individual measurements can be triggered by applying the MEA command by using the special command registers. Please refer to 3.3.6 for [more de](#_page50_x54.00_y189.92)tails. The results of the measurement can read from the *Results* registers (3.2.1). Or it ca[n be ](#_page45_x54.00_y186.92)read from the analog output. 6. Transparent Mode and Evaluation Software The Modbus microcontroller can be optionally switched into a transparent mode, where the RS485 communication is again based on the PyroScience protocol (i.e. the Modbus microcontroller is simply transmitting any received message without any changes). By using the optional RS485-USB adapter cables all PyroScience Modbus devices can be operated with the Windows software Pyro DeveloperTool (some devices also with the software Pyro Workbench). These software packages use the transparent mode for operating the devices. IMPORTANT: During the transparent mode, the analog output is not operational! But the analog output can be configured. The Modbus protocol can be used with up to 247 devices connected to the same RS485 bus. However, the transparent mode does not work with a bus system. During the transparent mode only a single device can be connected e.g. by a RS485-USB adapter cable to a computer. ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 2. Read-Only Modbus Registers Read-only Modbus registers, also known as “input registers” are used for information which is readable, but not writeable by the Modbus master. Their entity numbers begin with 3 and they can be read from using function code 4. 1. Results Registers The register block *Results* (2.9) [of the](#_page36_x54.00_y519.92) PyroScience protocol is mapped to the following Modbus registers: |Modbus protocol|||PyroScience protocol|||||| | - | :- | :- | - | :- | :- | :- | :- | :- | |Entity Nr. ||Input register |Label ||Range |Reg. Block |Reg. Nr. || |||address ||||||| |30001/30002||0000/0001|*status* ||int32 |3 |0 || |30003/30004||0002/0003|*dphi* ||int32 |3 |1 || |30005/30006||0004/0005|*umolar* ||int32 |3 |2 || |30007/30008||0006/0007|*mbar* ||int32 |3 |3 || |30009/30010||0008/0009|*airSat* ||int32 |3 |4 || |30011/30012||0010/0011|*tempSample* ||int32 |3 |5 || |30013/30014||0012/0013|*tempCase* ||int32 |3 |6 || |30015/30016||0014/0015|*signalIntensity* ||int32 |3 |7 || |30017/30018||0016/0017|*ambientLight* ||int32 |3 |8 || |30019/30020||0018/0019|*pressure* ||int32 |3 |9 || |30021/30022||0020/0021|*humidity* ||int32 |3 |10 || |30023/30024||0022/0023|*resistorTemp* ||int32 |3 |11 || |30025/30026||0024/0025|*percentO2* ||int32 |3 |12 || |30027/30028||0026/0027|*tempOptical* ||int32 |3 |13 || |30029/30030||0028/0029|*ph* ||int32 |3 |14 || |30031/30032||0030/0031|*ldev* ||int32 |3 |15 || |30033/30034||0032/0033|-- reserved -- ||- |- |- || |30035/30036||0034/0035|-- reserved -- ||- |- |- || |30037/30038||0036/0037|data point counter||uint32 |- |- || The registers 30001/30002 up to 30035/30036 are mapped onto the corresponding *Results* registers. Refer to 2.9 [for de](#_page36_x54.00_y519.92)tails on the definitions of each register. The registers 30037/30038 contain a 32 bit data point counter, which is incremented by one for each performed measurement. After a reset or a power cycle this counter starts at 0. This register has no counterpart within the PyroScience registers. 2. Device Info Registers The device info registers have no counterpart within the PyroScience registers. Instead, they contain the information returned by the PyroScience commands #VERS and #IDNR ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual of the PyroScience protocol, and some specific information on the Modbus microcontroller. |Modbus protocol|||PyroScience protocol||||| | - | :- | :- | - | :- | :- | :- | :- | |Entity Nr. |Input ||Label ||Range |Command |Parameter | ||register ||||||Nr. | ||address ||||||| |36001/36002 |6000/6001||*PyroScience device ID* ||uint32 |#VERS |1 | |36003/36004 |6002/6003||*Number of optical channels*||uint32 |#VERS |2 | |36005/36006 |6004/6005||*Firmware version of the* ||uint32 |#VERS |3 | ||||*central microcontroller*||||| |36007/36008 |6006/6007||*Available sensor types and* ||uint32 |#VERS |4 | ||||*supported analytes*||||| |36009/36010 |6008/6009||*Firmware build number*||uint32 |#VERS |5 | |36011/36012 |6010/6011||*Features* ||uint32 |#VERS |6 | |36013/36014 |6012/6013||*MSW Unique ID number*||uint32 |#IDNR |1 (MSW) | ||||*(most significant 32bit of* ||||| ||||*64bit UID)* ||||| |36015/36016 |6014/6015||*LSW Unique ID number*||uint32 |#IDNR |1 (LSW) | ||||*(least significant 32bit of* ||||| ||||*64bit UID)* ||||| |36017/36018 |6016/6017||*Firmware version of the* ||uint32 |- |- | ||||*Modbus microcontroller.* ||||| |36019/36020 |6018/6019||*Internal baud rate between* ||uint32 |- |- | ||||*the central and the Modbus* ||||| ||||*microcontroller* ||||| After power-up the Modbus microcontroller automatically sends the commands #VERS and #IDNR to the central microcontroller and writes the returned parameters into the following Modbus registers. The registers 36001/36002 up to 36011/36012 contain the information returned by the PyroScience command #VERS. Please refer to 2.2.1 for[ more d](#_page11_x54.00_y644.92)etails. The registers 36013/36014 up to 36015/36016 contain the information returned by the PyroScience command #IDNR. Note, that the 64bit unique ID is splitted into two 32bit registers. Please refer to 2.2.2 [for mor](#_page12_x54.00_y618.92)e details. The register 36017/36018 contains the firmware version of the Modbus microcontroller. For example, a value of 114 corresponds to firmware version 1.14. The register 36019/36020 contains baud rate used for the internal communication between the central microcontroller and the Modbus microcontroller (e.g. 19200 or 115200). ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual 3. Read-Write Modbus Registers Read-write Modbus registers are called “holding registers” are used for data which can be read or written. They use the address space 4xxxx starting with address 40001. Read-Write Modbus registers, also known as “holding registers”, are used for data which can be both read and written by the Modbus master. Their entity numbers begin with 4 and they can be read using function code 3 or written by using function codes 6 and 16. 1. Making Register Changes Persistent During Power Cycles The values in the different Modbus registers can be changed by the standard Modbus write commands. It is important to understand, that such changes are only kept until the next power cycle. In order to make any changes persistent even after a power cycle, the user has to trigger the special command SVS by writing the value 16 to the Modbus register 49001/49002 (refer also to 3.[3.6. and](#_page50_x54.00_y189.92) 2.3.[10). ](#_page21_x54.00_y584.92) Background: A Modbus write access will trigger a write to the corresponding PyroScience registers in the central microcontroller, which are kept in the volatile memory. If the special command SVS is triggered, the Modbus controller will send the PyroScience command SVS to the central microcontroller. This will save the current register configuration in the flash memory. After a power cycle, register configuration is automatically read from this flash memory and transferred into the corresponding Modbus registers. 2. Settings Registers The register block *Settings* (0) of[ the](#_page23_x54.00_y514.92) PyroScience protocol is mapped to the following Modbus registers:![ref1] |Modbus protocol||PyroScience protocol||||| | - | :- | - | :- | :- | :- | :- | |Entity Nr. ||Holding register |Label |Range |Reg. Block |Reg. Nr. | |||address ||||| |40001/40002 ||0000/0001|*temp* |int32 |0 |0 | |40003/40004 ||0002/0003|*pressure* |int32 |0 |1 | |40005/40006 ||0004/0005|*salinity* |int32 |0 |2 | |40007/40008 ||0006/0007|*duration* |int32 |0 |3 | |40009/40010 ||0008/0009|*intensity* |int32 |0 |4 | |40011/40012 ||0010/0011|*amp* |int32 |0 |5 | |40013/40014 ||0012/0013|*frequency* |int32 |0 |6 | |40015/40016 ||0014/0015|*crcEnable* |int32 |0 |7 | |40017/40018||0016/0017|Reserved |int32 |0 |8 | |40019/40020 ||0018/0019|*options* |int32 |0 |9 | |40021/40022 ||0020/0021|*broadcast* |int32 |0 |10 | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |40023/40024 |0022/0023|*analyte* |int32 |0 |11 | | - | - | - | - | - | - | |40025/40026 |0024/0025|*fiberType* |int32 |0 |12 | |40027/40028
- 40039/40040
|0026/0027 – 0038/0039|-- reserved -- |int32 |0 |13 - 19 | Most of these Modbus registers are defined exactly as their corresponding PyroScience registers. Refer to section 2.5 for more details. The only exception is the register *broadcast* (40021/40022) which is only mapped onto the lower 16 bit of the PyroScience register *Settings.broadcast*. These 16bit contain the broadcast interval giving a range of 0-60000ms (0-60s). The upper 16 bit of the PyroScience register *Settings.broadcast* are automatically configured by the Modbus microcontroller. This *broadcast* register is very essential for operating the device in the periodic sampling mode. Refer for details to 3.1.4. 3. Calibration Registers The register block *Calibration* of the PyroScience protocol is mapped to the following Modbus registers:![ref1] |Modbus protocol||PyroScience protocol||||||| | - | :- | - | :- | :- | :- | :- | :- | :- | |Entity Nr. |Holding ||Label |Label |Label |Range |Reg. |Reg. Nr. | ||register ||(Oxygen) |(Temperature)|(pH) ||Block || ||address |||||||| |40101/40102 |0100/0101||*dphi0* |*M* |*pka* |int32 |1 |0 | |40103/40104 |0102/0103||*dphi100* |*N* |*slope* |int32 |1 |1 | |40105/40106 |0104/0105||*temp0* |-- reserved -- |*dPhi\_ref* |int32 |1 |2 | |40107/40108 |0106/0107||*temp100* |-- reserved -- |*pka\_t* |int32 |1 |3 | |40109/40110 |0108/0109||*pressure* |-- reserved -- |*dyn\_t* |int32 |1 |4 | |40111/40112 |0110/0111||*humidity* |-- reserved -- |*bottom\_t* |int32 |1 |5 | |40113/40114 |0112/0113||*f* |*C* |*slope\_t* |int32 |1 |6 | |40115/40116 |0114/0115||*m* |-- reserved -- |*f* |int32 |1 |7 | |40117/40118 |0116/0117||*calFreq* |-- reserved -- |*lambda\_std* |int32 |1 |8 | |40119/40120 |0118/0119||*tt* |*Tofs* |*pka\_is1* |int32 |1 |9 | |40121/40122 |0120/0121||*kt* |-- reserved -- |*pka\_is2* |int32 |1 |10 | |40123/40124 |0122/0123||*bkgdAmpl* |*bkgdAmpl* |*bkgdAmpl* |int32 |1 |11 | |40125/40126 |0124/0125||*bkgdDphi* |*bkgdDphi* |*bkgdDphi* |int32 |1 |12 | |40127/40128 |0126/0127||*useKsv* |-- reserved -- |*offset* |int32 |1 |13 | |40129/40130 |0128/0129||*ksv* |-- reserved -- |*dPhi1* |int32 |1 |14 | |40131/40132 |0130/0131||*ft* |-- reserved -- |*pH1* |int32 |1 |15 | |40133/40134 |0132/0133||*mt* |-- reserved -- |*temp1* |int32 |1 |16 | |40135/40136 |0134/0135||-reserved- |-- reserved -- |*salinity1* |int32 |1 |17 | |40137/40138 |0136/0137||*percentO2* |-- reserved -- |*ldev1* |int32 |1 |18 | |40139/40140 |0138/0139|||-- reserved -- |*dPhi2* |int32 |1 |19 | |40141/40142 |0140/0141|||-- reserved -- |*pH2* |int32 |1 |20 | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |40143/40|144 |0142/0143||-reserved- |-- reserved -- |*temp2* |int32 |1 |21 | | - | - | - | :- | - | - | - | - | - | - | |40145/40|146 |0144/0145||-reserved- |-- reserved -- |*salinity2* |int32 |1 |22 | |40147/40|148 |0146/0147||-reserved- |-- reserved -- |*ldev2* |int32 |1 |23 | |40149/40|150 |0148/0149||-reserved- |-- reserved -- |*Aon* |int32 |1 |24 | |40151/40|152 |0150/0151||-reserved- |-- reserved -- |*Aoff* |int32 |1 |25 | |40153/40|154 |0152/0153 ||-reserved- |-- reserved -- |-reserved-* |int32 |1 |26-29 | |- 40159/40|160 |– 0158/0159|||||||| Note, the register definitions depend on the analyte of the connected sensor head. All these Modbus registers are exactly mapped onto the corresponding PyroScience register. Refer to the sections 2.6, [2.7, ](#_page29_x54.00_y323.92)[and 2.](#_page32_x54.00_y249.92)8 for[ more](#_page34_x54.00_y85.92) details. 4. Analog Output Registers The register block *AnalogOutput* of the PyroScience protocol is mapped to the following Modbus registers: |Modbus protocol||PyroScience protocol||||| | - | :- | - | :- | :- | :- | :- | |Entity Nr. ||Holding register |Label |Range |Reg. Block |Reg. Nr. | |||address ||||| |40401/40402 ||0400/0401|*aoSelectA* |int32 |4 |0 | |40403/40404 ||0402/0403|*aoSelectB* |int32 |4 |1 | |40405/40406 ||0404/0405|*aoSelectC* |int32 |4 |2 | |40407/40408 ||0406/0407|*aoSelectD* |int32 |4 |3 | |40409/40410 ||0408/0409|*aoMinA* |int32 |4 |4 | |40411/40412 ||0410/0411|*aoMinB* |int32 |4 |5 | |40413/40414 ||0412/0413|*aoMinC* |int32 |4 |6 | |40415/40416 ||0414/0415|*aoMinD* |int32 |4 |7 | |40417/40418 ||0416/0417|*aoMaxA* |int32 |4 |8 | |40419/40420 ||0418/0419|*aoMaxB* |int32 |4 |9 | |40421/40422 ||0420/0421|*aoMaxC* |int32 |4 |10 | |40423/40424 ||0422/0423|*aoMaxD* |int32 |4 |11 | All these Modbus registers are exactly mapped onto the corresponding PyroScience register. Refer to the sections 2.10 [for more](#_page39_x54.00_y85.92) details. 5. Modbus Slave Address Register A special Modbus register is used for defining the Modbus slave address:![ref1] |Modbus protocol|PyroScience protocol||||| | - | - | :- | :- | :- | :- | |Entity Nr. |Holding register address |Label |Range |Reg. Block |Reg. Nr. | |43421/43422 |3420/3421|*slaveAddress* |1-247 |34 |10 | PyroScience Unified Protocol FW4.10-4.19 | Reference Manual This register is mapped to a hidden PyroScience register, which is not documented within this document. The default value is 1. Note, that changes to this register come effective after the next power cycle. After writing a new slave address to this register it is required to store the register configuration in the flash memory as described in section [3.3.1. ](#_page47_x54.00_y226.92) 6. Command Registers The command registers are used for executing special commands. Some commands affect the Modbus microcontroller directly; other commands are forwarded to the central microcontroller.![ref1] |Entity Nr. |Holding ||Description || | - | - | :- | - | :- | ||register |||| ||address |||| |49001/49002|9000/9001||Command Register|| ||||If any of the following numbers are written to this register, the module || ||||will first send the Modbus response confirming the writing of this module. || ||||Then one of the following actions is executed.|| |||||| ||||Register |Performed Action| ||||Content || |||||| ||||0 |Sensor module is ready, the command register block can be | |||||written and a new command can be triggered by writing a | |||||number to this register here.| |||||| ||||1 |Sensor module is busy. The command registers cannot be | |||||written. A write access will give the Modbus error “Slave | |||||Busy”. | |||||| ||||10 |Flash status LED of the device. | |||||(sends the #LOGO command to the central microcontroller) | |||||| ||||11 |Trigger a single oxygen measurement.| |||||(sends the MEA command to the central microcontroller) | |||||| ||||12 |Calibrate an oxygen sensor at zero oxygen level.| |||||(sends a CLO command to the central microcontroller) | |||||| ||||13 |Calibrate an oxygen sensor at air oxygen level.| |||||(sends a CHI command to the central microcontroller) | |||||| ||||14 |Calibrate an optical temperature sensor.| |||||(sends a COT command to the central microcontroller) | |||||| ||||15 |Calibrate a pH sensor.| |||||(sends a CPH command to the central microcontroller) | |||||| ||||16 |Store all registers in flash memory as new default values | |||||after a power cycle. (sends a SVS command to the central | |||||microcontroller) | |||||| ||||7777 |Triggers a firmware reset. | |||||| ||||8888 |Switch into a transparent mode.| |49003/49004|9002/9003||Parameter Register 1 required by some commands.|| |49005/49006 |9004/9005||Parameter Register 2 required by some commands.|| PyroScience Unified Protocol FW4.10-4.19 | Reference Manual |49007/49008 |9006/9007||Parameter Register|` `3 required by some commands.|| | - | - | :- | - | - | :- | |49009/49010 |9008/9009||Parameter Register|` `4 required by some commands.|| |49011/49012 |9010/9011||Parameter Register|` `5 required by some commands.|| |49013/49014 |9012/9013||Parameter Register|` `6 required by some commands.|| |49015/49016 |9014/9015||Parameter Register|` `7 required by some commands.|| |49017/49018 |9016/9017||Parameter Register|` `8 required by some commands.|| If a command requires parameters, it is necessary to write these into the parameter registers, before triggering the command by writing the corresponding number into 49001/49002. Since PyroScience Modbus devices only support one optical channel, the first parameter register (49003/49004) refers to the first actual parameter necessary for each command, not the channel number. Example to execute the MEA command, the “enabled sensor types” parameter s has to be written into registers 49003/49004 and then 11 has to be written into registers 49001/49002. Writing 10 to the Command Register will trigger, that the Modbus controller sends the PyroScience command #LOGO to the central microcontroller. Please refer to 2.2.3 for more details on this command. Writing 11 to the Command Register will trigger, that the Modbus controller sends the PyroScience command MEA to the central microcontroller. The required parameter must be written to Parameter Register 1. Please refer to 2.3.1 for [more detai](#_page15_x54.00_y531.92)ls on this command. Writing 12 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CLO to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.3 for mo[re detai](#_page17_x54.00_y431.92)ls on this command. Writing 13 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CHI to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.2 for mo[re detai](#_page16_x54.00_y628.92)ls on this command. Writing 14 to the Command Register will trigger, that the Modbus controller sends the PyroScience command COT to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.4 for mo[re detai](#_page17_x54.00_y760.92)ls on this command. Writing 15 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CPH to the central microcontroller. The required parameters must ![ref1] PyroScience Unified Protocol FW4.10-4.19 | Reference Manual be written to the Parameter Registers. Please refer to 2.3.5 for mo[re detai](#_page18_x54.00_y318.92)ls on this command. Writing 16 to the Command Register will trigger, that the Modbus controller sends the PyroScience command SVS to the central microcontroller. Please refer to 2.3.10 for mor[e ](#_page21_x54.00_y584.92)details on this command. Writing 7777 to the Command Register will trigger a firmware reset, equivalent to a power cycle of the complete device. Writing 8888 to the Command Register will switch the Modbus microcontroller into a so called “transparent mode”, in which the Modbus microcontroller will passively forward any message in either direction. This way the user can communicate directly with the central microcontroller based on the PyroScience protocol as given in section 2.1. The transparent mode is terminated by sending the following 3 chars: ##