Przejdź do głównej zawartości

OB-216 Operating Manual

Ta treść nie jest jeszcze dostępna w Twoim języku.

OB-216 Digital Input/Output Module

NOVATEK-ELECTRO LTD

Intelligent industrial electronic

DIGITAL INPUT/OUTPUT MODULE OB-216

OPERATING MANUAL

Quality control system on the development and production complies with requirements ISO 9001:2015

Dear customer,

Company NOVATEK-ELECTRO LTD. thanks you for purchasing our devices.

You will be able to use properly the device after carefully studying the Operating Manual.

Keep the Operating Manual throughout the service life of the device.

UKRAINE, Odesawww.novatek-electro.com

Digital input/output module OB-216 (hereinafter referred to as the Device or OB-216) can be used as:

  • remote DC voltage meter (0 – 10 V);
  • remote meter of direct current (0 – 20 mA);
  • remote temperature meter when connecting an analog sensor NTC (10KB), PTC 1000 or PT 1000;
  • remote temperature or humidity meter when connecting a digital sensor DS18B20, DHT21, DHT22 or AM2301;
  • counter of impulses with saving the result in memory.

OB-216 provides:

  • monitoring the state (closed / open) of the contact at the input of the «dry contact» type;
  • issue of an analog signal (0 - 10 V, 0 - 20 mA) at the analog output.

RS-485 or USB interfaces provide control over the ModBus protocol of devices connected to the analog output (Figure 1, pos. 9, 10), reading sensor readings, setting device parameters. The control is carried out using the program “Control Panel OB-215/OB-216” or other software supporting the MODBUS protocol.

Power supply of the device and data exchange are indicated by indicators on the front panel (Fig. 1, pos. 2, 3).

The overall and mounting dimensions and controls of OB-216 are shown in Figure 1.

OB-216 front panel and overall dimensions

1 – microUSB connector;

2 – data exchange indicator;

3 – power supply indicator;

4 – terminals for RS-485 connection;

5 – terminals for power supply;

6 – terminal for restarting the device;

7 – terminals for connecting sensors;

8 – terminal “ground” of the analog output;

9 – current terminal 0 - 20 mA analog output;

10 – voltage terminal 0 - 10 V analog output.

Figure 1 – OB-216 front panel and overall dimensions

  • ModBus – standard, packet communication protocol based on “client-server” technology for industrial electronic devices;
  • ModBus RTU – device communication protocol, through which the packet is transmitted byte by byte;
  • ModBus ASCII – device communication protocol through which a packet is transmitted in the form of ASCII characters;
  • RS-485/EIA-485 – network standard for communication of devices via twisted pair;
  • Twisted pair – a pair of insulated conductors in a cable, twisted together to reduce distortion of transmitted signals;
  • W/R – write/read;
  • Indicator – a single LED indicator;
  • R – reading.
ItemQuantity
OB-2161 pcs.
PC connection cable (microUSB)1 pcs.
Operating manual1 pcs.
Packaging1 pcs.
ParameterValue
DC supply voltage10 – 30 V
Number of connected sensors1
DC voltage measurement error in the range 0 - 10 V≤ 1%
DC current measurement error in the range of 0 - 20 mA≤ 1%
Temperature measuring range (NTC 10KB)–25…+125 °C
Temperature measuring range (PTC 1000)–50…+120 °C
Temperature measuring range (PT 1000)–50…+250 °C
Maximum pulse frequency in the «Pulse counter/Logic input» mode200 Hz
Maximum pulse frequency in the «Voltage/current pulse counter» mode10 Hz
Maximum voltage supplied to the input «IO1», «IO2»no more supply voltage
Number of outputs1
Output voltage range0 – 10 V
Output voltage error0.5 %
Output current range0 – 20 mA
Output current error0.5%
Ready time≤ 2 s
Maximum power consumption≤ 1 W
Communication interfacesRS (EIA/TIA)–485, USB
Data exchange protocol ModbusMODBUS RTU / ASCII
Nominal operating modelong lasting
Weight≤ 0.07 kg
Overall dimensions, H×W×L90×65×18 mm
Cross-section of conductors for connection0.5 – 3.0 mm²
Screw tightening torque0.4 N·m
Device protection degreeIP20
Electric shock protection classIII
Climatic performanceNF 3.1
Permissible degree of pollutionII
  • The device maintains its performance at any position in space
  • Installation (mounting) – DIN rail 35 mm
  • Body material – self-extinguishing plastic
  • The device meets the requirements of the following: EN 60947-1; EN 60947-6-2; EN 55011; EN 61000-4-2
  • Harmful substances in amounts exceeding maximum permissible concentrations are not available

Table – OB-216 Settings

Setting operating modes (Address 100)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Operating mode0…6, 8, 11–121UINTW/R100

Operating mode values:

  • Measurement of discrete signals:
    • 0 – impulse counter (discrete signal)
    • 1 – logical input
  • Measurement of analog signals:
    • 2 – voltage measurement
    • 3 – current measurement
  • Temperature measurement:
    • 4 – NTC sensor (10KB)
    • 5 – PTC 1000 sensor
    • 6 – PT 1000 sensor
  • Additional:
    • 8 – digital sensor (1-Wire)*
    • 11 – pulse counter (voltage)
    • 12 – pulse counter (current)

Connected digital sensor (Address 101)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Connectable digital sensor0…30UINTW/R101

Connectable digital sensor values:

  • 0 – DS18B20 (1-Wire)
  • 1 – DHT11 (1-Wire)
  • 2 – DHT21/AM2301 (1-Wire)
  • 3 – DHT22 (1-Wire)

Temperature and threshold settings (Addresses 102–105)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Temperature correction–99…990INTW/R102
Working parameter*0…10UINTW/R103
Upper threshold-32767…32767250INTW/R104
Lower threshold–32767…327670INTW/R105

Working parameter values:

  • 0 – temperature
  • 1 – humidity

Settings for the pulse counter (Addresses 106–108)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Pulse counter mode0…20UINTW/R106
Contact debouncing delay**1…25010UINTW/R107
Number of pulses per counting device***1…655348000UINTW/R108

Pulse counter mode values:

  • 0 – counter on the leading edge of the pulse
  • 1 – counter on the trailing edge of the pulse
  • 2 – counter on both pulse edges

Data transfer settings (Addresses 109–116)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
RS-485 protocol0…10UINTW/R109
MODBUS UID1…24728UINTW/R110
Exchange rate0…83UINTW/R111
Parity and stop bits control0…20UINTW/R112
Interface selection0…20UINTW/R113
Password protection ModBus****0…10UINTW/R116
ModBus password valueA–Z, a–z, 0–9adminSTRINGW/R117–124

RS-485 protocol values:

  • 0 – MODBUS RTU
  • 1 – MODBUS ASCII

Exchange rate values:

  • 0 – 1200
  • 1 – 2400
  • 2 – 4800
  • 3 – 9600
  • 4 – 14400
  • 5 – 19200
  • 6 – 38400
  • 7 – 57600
  • 8 – 115200

Parity and stop bits control values:

  • 0 – no, 2 stop bits
  • 1 – even, 1 stop bit
  • 2 – odd, 1 stop bit

Interface selection values:

  • 0 – automatically
  • 1 – RS-485
  • 2 – USB

Measured value conversion settings (Addresses 130–134)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Measured value conversion0…10UINTW/R130
Minimum input value0…20000UINTW/R131
Maximum input value0…20001000UINTW/R132
Minimum converted value–32767…327670INTW/R133
Maximum converted value–32767…327671000INTW/R134

Measured value conversion values:

  • 0 – conversion is disabled
  • 1 – conversion is enabled

Settings for analog output (Addresses 150–156)

ParameterValue rangeFactory valueTypeW/RAddress (DEC)
Analog output control0…40UINTW/R150
Register for writing value in manual mode0…20000UINTW/R151
Converting the manual control value to analog signal0…10UINTW/R152
Minimum input value–500…25000INTW/R153
Maximum input value–500…25001000INTW/R154
Minimum converted analog value0…20000UINTW/R155
Maximum converted analog value0…20001000UINTW/R156

Analog output control values:

  • 0 – control is disabled
  • 1 – automatic control of voltage output
  • 2 – automatic control of current output
  • 3 – manual control of voltage output
  • 4 – manual control of current output

Converting the manual control value to analog signal values:

  • 0 – conversion is disabled
  • 1 – conversion is enabled

Notes:

  • * Used parameter of the selected digital sensor (address 101).
  • ** Delay in milliseconds used to suppress contact bounce in the «Pulse counter» and «Logic input/pulse relay» modes.
  • *** Used only if pulse counter is enabled. The «Value» column indicates the number of pulses at the input, after the registration of which the counter is increased by one. Writing to memory is performed at intervals of 1 minute.
  • **** If «ModBus password protection» is enabled (address 116 value «1»), then to access the recording functions, must be write the correct password value to addresses 51-58.

Temperature Measurement Error When Using Analog Sensors

Section titled “Temperature Measurement Error When Using Analog Sensors”

Temperature measurement error when using analog sensors

The device is intended for operation in the following conditions:

  • Ambient temperature: from minus 35 to +45 °С
  • Atmospheric pressure: from 84 to 106.7 kPa
  • Relative humidity (at temperature of +25 °С): 30 … 80 %

If the temperature of the device after transportation or storage differs from the ambient temperature at which it is supposed to be operated, then before connecting to the mains keep the device under the operating conditions within two hours (because of condensation may be on the product elements).

An error during installation work can damage the unit and appliances connected to it.

For reliable contact, it is necessary to tighten the terminal block screws with force of 0.4 N·m.

When the tightening torque is reduced, the junction may heat up, the terminal block may melt and the wire may catch fire. With an increase in the tightening torque, it is possible that the threads of the terminal block screws are broken or the wire to be connected is pinched.

Analog measurement mode wiring diagram

Figure 2 – Analog measurement mode wiring diagram

Wiring Diagram for Operation with Digital Sensors

Section titled “Wiring Diagram for Operation with Digital Sensors”

Wiring diagram for operation with digital sensors

Figure 3 – Wiring diagram for operation with digital sensors

1. Connect the device in accordance with Figure 2 (when using the device in the mode of measuring analog and discrete signals) or in accordance with Figure 3 (when using the device with digital sensors) and check the correct connection. To connect the device to the ModBus network, use a twisted pair cable of Cat.1 category or higher.

2. Check the correct connection according to «Connecting different types of sensors» and the diagrams in Figure 2 or Figure 3.

Connecting different types of sensors

After power is applied, the indicator « ⏻ » flashes for 1.5 s, then the indicators « ⏻ » and «RS-485» (Fig. 1, pos. 2, 3). After 0.5 s, the «RS-485» indicator goes out. During data exchange, the «RS-485» flashes, otherwise the indicator does not light up.

To configure the device, use the program «Control Panel OB-215/OB-216» (available at website www.novatek-electro.com in the «Software» section) or other software compatible with the ModBus RTU/ASCII. The program connects to the device via USB or RS-485 interface.

Connect an external device according to Figure 2 (e). Configure the device for operation in the pulse counter mode for counting discrete signals («OB-216 setting», address 100, value 0). In the register (address 106) to select the pulse detection algorithm.

In this mode, the device counts the number of pulses at the «IO2» (input with a duration not less than the value specified in the «OB-216 settings», address 107, the value is specified in ms) and saves the data into memory with a frequency of 1 minute. If the device was switched off before 1 minute has elapsed, the last stored value will be restored when switched on.

Upon reaching the value indicated in the register (address 108), the counter is incremented by one («Additional registers», address 4:5).

To configure the initial value of the pulse counter, write the required value into the register («Additional registers», address 4:5). Then the counter will count pulses from the entered value.

When changing the value in the register (address 108), all stored pulse counter values will be deleted.

Connect an external device according to Figure 2 (f). Configure OB-216 to operate in the pulse counter mode for counting voltage pulses («OB-216 settings», address 100, value 11). In register (address 106) select the pulse detection algorithm. In registers (addresses 104, 105) specify the upper and lower voltage thresholds at which the pulse will be counted.

In this mode, the device counts the number of voltage pulses in accordance with the set thresholds. If the voltage value changes within the upper and lower thresholds, the device will not register these pulses. The number of impulses is saved to memory every minute. If the device was switched off before 1 minute has elapsed, the last stored value will be restored when switched on.

Upon reaching the value indicated in the register (address 108), the counter is incremented by one («Additional registers», address 4:5).

To configure the initial value of the pulse counter, write the required value into the register («Additional registers», address 4:5). Then the counter will add pulses to the initial value.

When changing the value in the register (address 108), all stored pulse counter values will be deleted.

Connect an external device according to Figure 2 (f). Configure OB-216 to operate in the impulse counter mode for counting current impulses («Device settings», address 100, value 12). In register (address 106) select the impulse detection algorithm. In registers (addresses 104, 105) specify the upper and lower current thresholds at which the impulse will be recorded.

In this mode, the device counts the number of current impulses in accordance with the set thresholds. If the current value changes within the upper and lower thresholds, the device will not register these impulses. The number of impulses is saved to memory every minute. If the device was switched off before 1 minute has elapsed, the last stored value will be restored when switched on.

Upon reaching the value indicated in the register (address 108), the counter is incremented by one («Additional registers», address 4:5).

To configure the initial value of the impulse counter, write the required value into the register («Additional registers», address 4:5). Then the counter will add pulses to the initial value.

When changing the value in the register (address 108), all stored impulse counter values will be deleted.

Connect the device according to Figure 2 (d). Configure it for operation in the «Logic input» («OB-216 settings», address 100, value 1).

When the logical state at the «IO2» terminal (Fig. 1, item 7) changes to a low level, the device will set bit 18 («Additional registers», address 2:3) equal to 1.

When the logical state at the «IO2» terminal (Fig. 1, pos. 7) changes to a high level, the device will set bit 18 («Additional registers», address 2:3) equal to 0.

Connect the device according to Figure 2(b). Configure it to operate in the «Voltage measurement» («OB-216 settings», address 100, value 2). The register («Additional registers», address 6) will display the voltage measured at the «IO1» (Fig. 1, pos. 7).

If it is necessary for the device to indicate overvoltage (under voltage), it is necessary to set the response thresholds («OB-216 settings», addresses 104, 105). To set the thresholds, write down the values in address 104 – upper threshold and address 105 – lower threshold. When the voltage value is exceeded (decreased), the corresponding bit will be set to «1» (bit 20 – voltage value above the upper threshold, bit 21 – voltage value below the lower threshold) («Additional registers», address 2:3).

To convert the measured voltage to another value, turn on the conversion («OB-216 setting», address 130, value 1) and set the conversion ranges (addresses 131 – 134).

For example, the measured voltage needs to be converted to bars with the following sensor parameters: a voltage range of 0.5 V to 8 V corresponds to a pressure of 1 bar to 25 bar. Configuring the conversion ranges: minimum input value (address 131, value 50 corresponds to 0.5 V), maximum input value (address 132, value 800 corresponds to 8 V), minimum converted value (address 133, value 1 corresponds to 1 bar), maximum converted value (address 134, value 25 corresponds to 25 bar).

The converted value will be output to a register («Additional registers», address 16).

Voltage Measurement with Analog Current Output

Section titled “Voltage Measurement with Analog Current Output”

To output the measured voltage to the analog current output, select the analog current output by writing to the register (address 150) the value 2 – current output control (Fig. 1, pos. 9).

For example, to convert a measured voltage in the 1 V to 10 V range to a current (4 mA to 20 mA range), the conversion ranges must be set.

To set the ranges, write down the minimum value of the input voltage (100 = 1 V) into the register (address 153), and into the register (address 154) write down the maximum value of the input voltage (1000 = 10 V). In the register (address 155) write the minimum value of the output current (400 = 4 mA), in the register (address 156) – the maximum value of the output current (2000 = 20 mA).

The converted analog value will be output to a register («Additional registers», address 17).

Voltage Measurement with Analog Voltage Output

Section titled “Voltage Measurement with Analog Voltage Output”

To output the measured voltage to the analog voltage output, select the analog voltage output by writing to the register (address 150) the value 1 – voltage output control (Fig. 1, pos. 10).

For example, to convert a measured voltage in the 1 V to 10 V range to a voltage (0 V to 5 V range), the conversion ranges must be set.

To set the ranges, write down the minimum value of the input voltage (100 = 1 V) into the register (address 153), and into the register (address 154) write down the maximum value of the input voltage (1000 = 10 V). In the register (address 155) write the minimum value of the output voltage (0 = 0 V), in the register (address 156) – the maximum value of the output voltage (500 = 5 V).

The converted analog value will be output to a register («Additional registers», address 17).

Output Voltage to Analog Output in Manual Mode

Section titled “Output Voltage to Analog Output in Manual Mode”

To output voltage to the analog output in manual mode, select the analog voltage output by writing the value 3 to the register (address 150) - manual control of the voltage output (Fig. 1, pos. 10). To convert a manually set value, turn on the conversion of the output value by writing the value «1» to the register (address 152) and the required ranges in the corresponding registers (addresses 153-156).

When the value «500», is written to the register (address 151), a voltage with a level equal to 5.00 V will appear at the output of the analog voltage (Fig.1, pos. 10) (when the conversion of the output value is disabled).

Connect the device according to Figure 2 (a). Configure it for operation in the «Current measurement» mode («OB-216 settings», address 100, value 3). The register («Additional registers», address 6) will display the value of the current measured at the «IO1» terminal (Fig. 1, pos. 7).

If it is necessary for the device to indicate an excess (decrease) in current, it is necessary to set the response thresholds («OB-216 settings», addresses 104, 105).

To set the thresholds, write down the values in address 104 - high threshold and address 105 - low threshold. When the current value is exceeded (decreased), the corresponding bit will be set to «1» (bit 22 - the current value is above the upper threshold, bit 23 - the current value is below the lower threshold) («Additional registers», address 2:3).

To convert the measured current into another value, turn on the conversion («OB-216 settings», address 130, value 1) and set the conversion ranges (addresses 131 - 134).

For example, the measured current needs to be converted to bars with the following sensor parameters: a current range of 4.5 mA to 20 mA corresponds to a pressure of 1 bar to 25 bar. Configuring the conversion ranges: minimum input value (address 131, value 450 corresponds to 4.5 mA), maximum input value (address 132, value 2000 corresponds to 20 mA), minimum converted value (address 133, value 1 corresponds to 1 bar), maximum converted value (address 134, value 25 corresponds to 25 bar).

The converted value will be output to a register («Additional registers», address 16).

Current Measurement with Output to Analog Current Output

Section titled “Current Measurement with Output to Analog Current Output”

To output the measured current to the analog current output, select the analog current output by writing to the register (address 150) the value 2 - current output control (Fig. 1, item 9).

For example, to convert the measured current, in the range from 0 mA to 10 mA, to current (range from 4 mA to 20 mA), adjust the conversion ranges.

To set the ranges, write the minimum value of the input current (0=0 mA) into the register (address 153), and into the register (address 154) – the maximum value of the input current (1000 = 10mA). In the register (address 155) write the minimum value of the output current (400 = 4 mA), in the register (address 156) – the maximum value of the output current (2000 = 20 mA).

Current Measurement with Analog Voltage Output

Section titled “Current Measurement with Analog Voltage Output”

To output the measured current to the analog output, select the analog voltage output by writing the value 1 to the register (address 150) – voltage output control (Fig. 1, pos. 10).

For example, to convert the measured current, in the range from 0 mA to 20 mA, to voltage (range from 0 V to 5 V), the conversion ranges must be set. To set the ranges, write the minimum value of the input current (0 = 0 mA) to the register (address 153), and the maximum value of the input current (2000 = 20 mA) to the register (address 154). In the register (address 155) write the minimum value of the output voltage (0 = 0 V), in the register (address 156) – the maximum value of the output voltage (500 = 5 V).

Current Output to Analog Output in Manual Mode

Section titled “Current Output to Analog Output in Manual Mode”

To output the current to the analog output in manual mode, select the analog current output by writing the value 4 to the register (address 150) – manual control of the current output (Fig. 1, item 9).

To convert a manually set value, turn on the conversion of the output value by writing the value «1» to the register (address 152) and the required ranges in the corresponding registers (addresses 153 - 156).

When the value «500» is written to the register (address 151), a current with a level equal to 5.00 mA will appear at the analog current output (Fig. 1, pos. 9) (when the conversion of the output value is disabled).

Connect the device according to Figure 2 (c). Configure it for operation in the «Temperature measurement» («OB-216 settings», address 100, value 4, 5, 6). If it is necessary for the device to react to an excess (decrease) of temperature, set the response thresholds («OB-216 settings», addresses 104, 105). To set the thresholds, write down the values to address 104 – upper threshold and address 105 – lower threshold. When the temperature value is exceeded (decreased), the corresponding bit will be set to «1» («Additional registers», address 2:3, bits 24, 25).

If it is required to correct the temperature measured by the sensor, enter the correction temperature into register 102 (OB-216 settings). Value input format: 55 = 5.5 °С.

In this mode, the device measures the temperature using a thermistor. The measured temperature value can be read at address 6 (Additional registers).

Temperature values are displayed with an accuracy of tenths of a degree Celsius (1234 = 123.4 °С; 123 = 12.3 °С).

Temperature Measurement with Analogue Output

Section titled “Temperature Measurement with Analogue Output”

To output the measured temperature to the analog output, select the analog voltage output by writing in the register (address 150) the value «1» (control of the voltage output, Fig. 1, item 10) or value «2» (control of the current output, Fig. 1, item 9) and set up the conversion range registers (addresses 153 – 156).

The device supports digital (single) sensors specified in the «OB-216 settings» (address 101).

The measured values of the digital sensor can be read at addresses 11 – 12, «Additional registers» (depending on which values the sensor measures). Interrogation period of digital sensors – 3 s.

If it is required to correct the temperature measured by a digital sensor, it is necessary to enter the correction temperature into register 102 (OB-216 Settings).

If it is necessary for the device to react to the excess (decrease) of the operating parameter, it is necessary to select the operating parameter («OB-216 settings», address 103), and set the response thresholds (addresses 104, 105). When the value of the operating parameter is exceeded (decreased), the corresponding bit will be set to «1» (excess (decrease) of temperature – bit 24, bit 25 («Additional registers», address 2:3), excess (decrease) of humidity – bit 26, bit 27 (address 2:3)).

Temperature values are displayed with an accuracy of tenths of a degree Celsius (1234 = 123.4 °С; 123 = 12.3 °С).

Moisture values are displayed with an accuracy of tenths of a percent (800 = 80.0 %).

Connection of Digital Sensors with Output to Analog Output

Section titled “Connection of Digital Sensors with Output to Analog Output”

To output the operating parameter of the digital sensor («OB-216 settings», address 103) to the analog output, select the analog voltage output by writing the value «1» to the register (address 150) (voltage output control, Fig. 1, pos. 10) or value «2» (current output control, Fig. 1, pos. 9) and set the registers of the conversion ranges (addresses 153 – 156).

9 Restarting the Device and Resetting to the Factory Settings

Section titled “9 Restarting the Device and Resetting to the Factory Settings”

If you need to restart the device, close and hold contacts «R» and «–» for 3 seconds (Fig. 1).

If it is required to restore the factory settings of the device, it is necessary to close and hold contacts «R» and «–» (Fig. 1) for more than 10 seconds. After 10 seconds, the device will automatically restore factory settings and reboot.

Also, the above actions can be performed through the command register by writing the corresponding command into it («Command register», address 50).

10 Work with RS (EIA/TIA)-485 and USB Interface via ModBus Protocol

Section titled “10 Work with RS (EIA/TIA)-485 and USB Interface via ModBus Protocol”

If the register (address 113) contains the value «0» (automatic selection of the interface), the device will automatically switch to work with USB, if OB-216 is connected to the PC via a USB cable. Otherwise, the device works with the RS-485 interface.

To work only with the RS-485 interface, it is necessary to write the value «1», to the register (address 113); with this setting, the device will not switch to work with USB when the cable is connected.

To work only with the USB interface, it is necessary to write the value «2», to the register (address 113), with this setting the device will work only with the USB interface, and access to the device via RS-485 will be prohibited.

OB-216 allows data exchange with external devices via the RS (EIA/TIA)-485 serial interface via the ModBus protocol with a limited set of commands (the list of supported functions is given in the table below).

When building a network, the master-slave organization principle is used, where OB-216 acts as a slave. Only one master and several slaves can be present on the network. A personal computer or a programmable logic controller acts as a master node.

With this organization, only the master node can act as the initiator of exchange cycles.

Host requests are individual (addressed to a specific device).

OB-216 transmits in response to individual requests from the master.

If errors are detected in receiving requests, or if it is impossible to execute the received command, OB-216, as a response, generates an error message.

The addresses (in decimal) of the command registers and their purpose are shown in the «List of Supported Functions».

Addresses (in decimal) of additional registers and their purpose are given in the «Command Register.

Function (hex)AppointmentNote
0x03Reading one or more registersMaximum 50
0x06Writing one value to a register
0x08Communication diagnostics
NameDescriptionW/RAddress (DEC)
Command registerCommand codes:W/R50

Command codes:

  • 18220 – write settings to flash memory
  • 18263 – load settings from flash memory
  • 42228 – device restart
  • 41672 – reset to factory settings
  • 61989 – reset the impulse counter (this will clear all values stored in the flash memory)
NameDescriptionW/RAddress (DEC)
Entering ModBus password (8 ASCII characters)Set the correct password to access the recording functions (default value is “admin”). To disable recording functions, set any value other than a password. Allowed characters: A-Z; a-z; 0-9W/R51 – 58

Notes:

  • W/R – type of access to the register write/read;
  • an address like “50” means a 16-bit value (UINT);
  • address like “51 – 58” mean a range of 8-bit values.
NameDescriptionW/RAddress (DEC)
IdentifierDevice ID (value 28)R0
Firmware version12R1
Impulse counterW/R4:5
Measured value*R6
Temperature (× 0.1°С)R11
Humidity (× 0.1%)R12
Converted value**R16
Converted analog value***R17

Notes:

  • address of the form «1» means the value of 16 bits (INT);
  • address of the form «2:3» means 32-bit value (ULONG);
  • * Measured value from analog sensors (voltage, current, temperature);
  • ** Converted value of the measured value in accordance with the settings in the registers (addresses 131 - 134);
  • *** The measured value converted into an analog signal at the output in accordance with the settings in the registers (addresses 153 - 156)
BitDescription
bit 00 – impulse counter (discrete) disabled; 1 – pulse counter (discrete) enabled
bit 10 – counter on the leading edge of the pulse is disabled; 1 – counter on the leading edge of the pulse is on
bit 20 – counter on the trailing edge of the pulse is disabled; 1 – counter on the trailing edge of the pulse is on
bit 30 – counter on both pulse edges is disabled; 1 – counter on both pulse edges is on
bit 40 – logical input disabled; 1 – logical input is enabled
bit 50 – voltage measurement is disabled; 1 – voltage measurement is on
bit 60 – current measurement is disabled; 1 – current measurement is on
bit 70 – measurement by the NTC (10KB) sensor is disabled; 1 – measurement by NTC (10KB) sensor is enabled
bit 80 – measurement by PTC1000 sensor is disabled; 1 – measurement by PTC1000 sensor is enabled
bit 90 – measurement by PT1000 sensor is disabled; 1 – measurement by PT1000 sensor is on
bit 100 – impulse counter (by voltage) is disabled; 1 – impulse counter (voltage) enabled
bit 110 – impulse counter (by current) is disabled; 1 – pulse counter (current) is on
bit 120 – measurement by DS18B20 sensor is disabled; 1 – measurement by DS18B20 sensor is enabled
bit 130 – measurement by DHT11 sensor is disabled; 1 – measurement by DHT11 sensor is enabled
bit 140 – measurement by DHT21 sensor is disabled; 1 – measurement by DHT21 sensor is enabled
bit 150 – measurement by DHT22 sensor is disabled; 1 – measurement by DHT22 sensor enabled
bit 160 – automatic control of voltage output is on; 1 – automatic control of current output enabled
bit 170 – manual control of voltage output is enabled; 1 – manual control of current output enabled
bit 180 – «IO2» input is open; 1 – «IO2» input is closed
bit 190 – exchange via RS-485 is enabled; 1 – sharing via USB is enabled
bit 200 – there is no overvoltage; 1 – there is overvoltage
bit 210 – there is no decrease in voltage; 1 – there is decrease in voltage
bit 220 – there is no overcurrent; 1 – there is overcurrent
bit 230 – there is no current reduction; 1 – there is current reduction
bit 240 – there is no temperature rise; 1 – there is temperature rise
bit 250 – there is no temperature drop; 1 – there is temperature drop
bit 260 – there is no excess humidity; 1 – there is excess of humidity
bit 270 – there is no moisture reduction; 1 – there is moisture reduction
bit 280 – value conversion is disabled; 1 – value conversion is enabled
bit 290 – device settings are saved; 1 – device settings are not saved
bit 300 – the device is calibrated; 1 – the device is not calibrated
bit 310 – conversion of the value into an analog signal is disabled; 1 – conversion of a value into an analog signal is enabled

The exchange protocol has clearly defined message formats. Compliance with the formats ensures the correctness and stability of the network.

OB-216 is configured to operate with one of two formats of data bytes: with parity control (Fig. 4) and without parity control (Fig. 5). In parity control mode, the type of control is also indicated: Even or Odd. Transmission of data bits is performed by the least significant bits forward.

By default (during manufacture) the device is configured to operate without parity control and with two stop bits.

Byte transfer is performed at speeds of 1200, 2400, 4800, 9600, 14400 and 19200 bps. By default, during manufacturing, the device is configured to operate at a speed of 9600 bps.

Byte format with and without parity control

Figure 4, 5 – Byte format with parity control (top) and without parity control (bottom)

The frame length cannot exceed 256 bytes for ModBus RTU and 513 bytes for ModBus ASCII.

In ModBus RTU mode the start and end of the frame are monitored by silence intervals of at least 3.5 bytes. The frame must be transmitted as a continuous byte stream. The correctness of frame acceptance is additionally controlled by checking the CRC checksum.

The address field occupies one byte. The addresses of the slaves are in the range from 1 to 247. Fig. 6 shows the RTU frame format.

RTU frame format

Figure 6 – RTU frame format

In ModBus ASCII mode the start and end of the frame are controlled by special characters (symbols (’:’ 0x3A) – for start of the frame; symbols (‘CRLF’ 0x0D0x0A) – for the end of the frame). The frame must be transmitted as a continuous stream of bytes. The correctness of frame acceptance is additionally controlled by checking the LRC checksum.

The address field occupies two bytes. The addresses of the slaves are in the range from 1 to 247. Fig. 7 shows the ASCII frame format.

ASCII frame format

Figure 7 – ASCII frame format

The transmitting device generates a checksum for all bytes of the transmitted message. OB-216 similarly generates a checksum for all bytes of the received message and compares it with the checksum received from the transmitting device. If the generated and received checksums do not match, an error message is generated.

The checksum in the message is sent by the least significant byte forward, it is a cyclic verification code based on the irreducible polynomial 0xA001.

Subroutine for CRC checksum generation in C language:

uint16_t GenerateCRC(uint8_t *pSendRecvBuf, uint16_t uCount)
{
const uint16_t Polynom = 0xA001;
uint16_t crc = 0xFFFF;
uint16_t i;
uint8_t byte;
for(i=0; i<(uCount-2); i++){
crc = crc ^ pSendRecvBuf[i];
for(byte=0; byte<8; byte++){
if((crc & 0x0001) == 0){
crc = crc >> 1;
}else{
crc = crc >> 1;
crc = crc ^ Polynom;
}
}
}
return crc;
}

The checksum in the message is transmitted by the most significant byte forward, which is a longitudinal redundancy check.

Subroutine for LRC checksum generation in C language:

uint8_t GenerateLRC(uint8_t *pSendRecvBuf, uint16_t uCount)
{
uint8_t lrc = 0x00;
uint16_t i;
for(i=0; i<(uCount-1); i++){
lrc = (lrc + pSendRecvBuf[i]) & 0xFF;
}
lrc = ((lrc ^ 0xFF) + 2) & 0xFF;
return lrc;
}

Function 0x03 – Reading a Group of Registers

Section titled “Function 0x03 – Reading a Group of Registers”

Function 0x03 provides reading of the contents of registers OB-216. The master query contains the address of the initial register, as well as the number of words to read.

The OB-216 response contains the number of bytes to return and the requested data. The number of registers returned is limited to 50. If the number of registers in the query exceeds 50 (100 bytes), the response is not divided into frames.

An example of the query and response in ModBus RTU is shown in Fig. 8.

Example of reading registers (Function 0x03)

Figure 8 – Example of reading registers (Function 0x03)

The function 0x06 provides recording in one OB-216 register. The master query contains the address of the register and the data to be written.

The device response is the same as the master query and contains the register address and the set data. An example of the query and response in ModBus RTU mode is shown in Fig. 9.

Example of writing to a register (Function 0x06)

Figure 9 – Example of writing to a register (Function 0x06)

Function 0x08 – Communication Diagnostics

Section titled “Function 0x08 – Communication Diagnostics”

Subfunction 0x00 - returns the received data, the response is identical to the request.

An example of a request and response is shown in Figure 10.

Example of communication diagnostics (Function 0x08)

Figure 10 – Example of communication diagnostics (Function 0x08)

Error codeNameComments
0x01ILLEGAL FUNCTIONIllegal function number
0x02ILLEGAL DATA ADDRESSIncorrect address
0x03ILLEGAL DATA VALUEInvalid data
0x04SERVER DEVICE FAILUREFailure of controller equipment
0x05ACKNOWLEDGEData is not ready
0x06SERVER DEVICE BUSYSystem is busy
0x08MEMORY PARITY ERRORMemory error

It is not allowed water penetration on terminals and internal elements of the device.

During operation and maintenance, the regulatory document requirements must be met, namely:

  • Regulations for Operation of Consumer Electrical Installations;
  • Safety Rules for Operation of Consumer Electrical Installations;
  • Occupational Safety in Operation of Electrical Installations.

Recommended frequency of maintenance is every six months.

Maintenance Procedure:

  1. Check the connection reliability of the wires, if necessary, clamp with the force 0.4 N·m;
  2. Visually check the integrity of the housing;
  3. If necessary, wipe the front panel and the housing of the device with cloth.

Do not use abrasives and solvents for cleaning.

The device in the original package is permitted to be transported and stored at the temperature from minus 45 to +60 °C and relative humidity of no more than 80 %, not in aggressive environment.

The lifetime of the device is 10 years.

Shelf life is 3 years.

Warranty period of the device operation is 5 years from the date of sale.

During the warranty period of operation, the manufacturer performs free repair of the device, if the user has complied with the requirements of the Operating Manual.

Warranty service is performed at the place of purchase or by the manufacturer of the device. Post-warranty service of the device is performed by the manufacturer at current rates.

Before sending for repair, the device should be packed in the original or other packing excluding mechanical damage.

For all questions, please contact the manufacturer:

“Novatek-Electro” Ltd.

www.novatek-electro.com

59, Mykhailo Boltenko (Admiral Lazarev) str., Odesa, Ukraine, 65007

Tel: +38 (067) 565 37 68 +38 (050) 359 39 11 +38 (063) 301 30 40

VN250731