Internal documentation for hardware testing of MinimalModbus using DTB4824

Hardware testing of MinimalModbus using the Delta DTB temperature controller.

For use with Delta DTB4824VR.


python scriptname [-rtu] [-ascii] [-b38400] [-D/dev/ttyUSB0]
  • -b : baud rate
  • -D : port name

NOTE: There should be no space between the option switch and its argument.

Defaults to RTU mode.

Settings in the temperature controller

To change the settings on the temperature controller panel, hold the SET button for more than 3 seconds. Use the ‘loop arrow’ button for moving to next parameter. Change the value with the up and down arrows, and confirm using the SET button. Press SET again to exit setting mode.

Use these setting values in the temperature controller:
  • SP 1 (Decimal point position)
  • CoSH on (ON: communication write-in enabled)
  • C-SL rtu (use RTU or ASCII)
  • C-no 1 (Slave number)
  • BPS (see the DEFAULT_BAUDRATE setting below, or the command line argument)
  • LEN 8
  • PRTY None
  • Stop 1

When running, the setpoint is seen on the rightmost part of the display.

USB-to-RS485 converter

BOB-09822 USB to RS-485 Converter:
DTB4824 terminal USB-RS485 terminal Description
DATA+ A Positive at idle
DATA- B Negative at idle

Sometimes after changing the baud rate, there is no communication with the temperature controller. Reset the FTDI chip by unplugging and replugging the USB-to-RS485 converter.

Function codes for DTB4824

From “DTB Series Temperature Controller Instruction Sheet”:
  • 02H to read the bits data (Max. 16 bits).
  • 03H to read the contents of register (Max. 8 words).
  • 05H to write 1 (one) bit into register.
  • 06H to write 1 (one) word into register.

Manual testing in interactive mode (at the Python prompt)

Use a setting of 19200 bps, RTU mode and slave addess 1 for the DTB4824. Run these commands:

import minimalmodbus
instrument = minimalmodbus.Instrument('/dev/ttyUSB0', 1)  # Adjust if necessary.
instrument.debug = True
instrument.read_register(4143)  # Read firmware version (address in hex is 0x102F)