Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

For some of our customers there is a need for manual manipulating charging settings via modbus. Bellow you can find attached python script, that should be a good start what can you do with modbus on our Inch products. Script is written, with both Duo and Inch, in mind.

Prerequsites:

PC with Windows/Linux, MacOS or other device capable running Python

Python 3.(x) and above installed - Python 3.9

Modbus module - https://github.com/riptideio/pymodbus

Python editor - we suggest https://code.visualstudio.com/

Installation:

First you need to install Python and add it to you path. On Windows path is found in Enviroment variables settings.

Then, using pip, you must install pymodbus library. Once your python was added to path you can use command

pip install -U pymodbus

In script there is a line that sets charger IP address. (Line 27), and it looks like following

clientIP="192.168.1.250" #Charger's IP address

Change IP address accordingly to your charger.

Running script:

Script can be easily run using python executable from command prompt.

For reading Modbus registers use

python INCH_modbus_read.py

And for writing Modbus registers use

python INCH_modbus_write.py

When writing modbus, scripts asks for which connector on Inch Duo

Limitations:

Station is figuring out minimal and maximum current during first 45 seconds, thus it is impossible to set current point.

  • No labels