Free Shipping from EUR 10.00 (Germany)
shop@digitalpowersystems.eu +49 721 18125815 Mon–Fri 8:00–17:00 CET
Login Cart

Your Cart

Your cart is empty
Quick Order
DCP48 Python Programming Tutorial

DCP48 Python Programming Tutorial

Dr. Michael Heidinger
Dr. Michael Heidinger
CEO, Digital Power Systems

Introduction

This tutorial provides a step-by-step guide to mass-programming the DCP48M DC/DC converter using a Modbus connection via a Windows PC with a USB-to-RS485 adapter.

Required Material

  • DCP48M DC/DC converter
  • Windows PC
  • USB-to-RS485 adapter (recommended: Waveshare FTDI USB-to-RS485)

Hardware Wiring

DCP48M connected to a Windows PC
DCP48M connected to a Windows PC via USB-to-RS485 adapter.
Modbus wiring diagram
Wiring diagram: Connect terminal A to A and B to B.

Connect the RS-485 adapter terminals: A to A, B to B. RS-485 does not strictly require a ground connection, but if needed, use the "-" terminal from the power input.

Installing Python on Windows

  1. Download the programming script (ZIP file)
  2. Unzip the file, right-click to open a terminal in the folder
  3. Install required libraries:
    python -m pip install pymodbus pyserial
  4. Verify the installation:
    python -c "import pymodbus; print(pymodbus.__version__)"
  5. Modify the COM port in the configuration section of the script
  6. Execute the script:
    python modbus_massprogramming.py

Setting Up Parameters

In the script, uncomment the parameters you want to modify. Set ENABLE_SAVE_PARAMETERS = True to persist changes. The script also supports hardware control pin modification (PCB version 5 and later).

⚠ Note: Modifying control parameters may void the warranty. Proceed with caution and consult DPS support if unsure.