Programm Modbus RTU Reader - help
=================================

Programm Modbus RTU Reader and Writer - actual version 11
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
Date of last finalising : 2023-09-12

Preface :
=========

I have created more programms for solar inverters and at first for two black boxes,
at first it was programm Modbus RTU Reader for grid-tie inverter SUN-1000G
and second  Modbus Ansi Reader-Controler for inverter/charger PS 3KVA
(from the PS1-5KVA series like predecestors of Axpert Max from Voltronic)

I have inform about actual version for Modbus30 Ansi (renamed later on ModbusAnsi10) on Github and on MyPower.

This readme is for Modbus RTU Reader and Writer - actual version is ModbusRtu11 .

At 12.9. 2023 					Pavel Oupicky

Short description of programm Modbus28 RTU Reader :
= = = = = = = = = = = = = = = = = = = = = = = = = =

Actual version of programm : 11
Date of last updating  : 12. 9. 2023

Programm was created in Delphi XE Starter 
and it is working under operating system Windows W7 till W10 32 bit .

Programm was created by Pavel Oupicky, rentier and home worker.

Programm in full version is distributed as licensed for end user.

Programm in shareware version is distributed as shareware.
  There is limited the number of recorded data for 100 ones.
   
Demo version of programm is distributed as freeware.
    There is blocked the comunication between PC and device.
    This version is now not public distributed, only shareware one.

Author takes no liability towards of any use of his programm.

Contact  on author : pavel.oupicky@seznam.cz

Default known problems in this program ModbusRtu10 :
= = = = = = = = = = = = = = = = = = = = = = = = = = =
- the program is the compilation of many of previous programs created by author,
- so some functions programs are or not ready or are out of functions
- Window OS can open many of windows, but when is program running, it is not impossible use the mini- or maximalization of ones, 
  as the OS and Deplphi program cannot right open or closed them .. so if my program is running do not use
  these button symbols for windows or program and data will be lost.

Basic description of program :
= = = = = = = = = = = = = = = = 

Program was created for devices with communication protocol Modbus RTU
 and for communication between personal computers
with connectors RS232 or USB converters to RS232 or RS485
 and devices like inverters SUN1000G or wattmeter SDM120M, for example.

When there is known Modbus protocol, it is possible to use so device, too.

Description of basic buttons on home page in upper line:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

About
- basic description of program

Memo
- memory for notes on PC

Help
- reads this similar file

Graphs
- first visualisation of parameters  for graphs

Menu
- when there are a data from measuremet, it is possible to see them 
  or get them into table or graph

Data
- reads recorded datas from pevious measurements

Hex counts
- some transfers between bits, bytes and hexbytes

End
- ends programm

Description ob basic buttons on home page in bottom line:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

Parameters
- primary basic parameters for measurements, data, graph etc.

Drivers
- parameters for communication via com ports and MODBUS RTU commands

Inputs
- list of   commands for measurement and suiteable inputs

Measure
- start for measurement process

Holdregs
- work with holding registers and there is possible to read them or write to them

Rtu Set
- basic set of R and W commands

Rtu Test
- basic test of communication between PC and device in Modbus RTU


Parameters for tests and measurement :
= = = = = = = = = = = = = = = = = = = =

- basic and driver parameters must be set before then the programm is started

- basic parameters must be set in file with extension .par in Par folder
- driver parameters must be set in file with extension .rtu in Driver folder
- parameters for graphs are in the filr wizh extension .grp in  Grp folder
- help file for Modbus28 must have name Modbus28-help.txt and must be in the Help folder

Example of initialization file (.ini)
= = = = = = = = = = = = = = = = = = =

ModbusRtu/11/Inicialisation
Inicial file for program Modbus28
06.07.2023/17:12:14
User: shareware
Path:Par
File:ModbusRtu11-SDM230M-9600-5+8+9+10.par
end

Example of basic parameters (.par file):
= = = = = = = = = = = = = = = = = = = = = 

ModbusRtu11/params
Measuring with wattmeter SDM230M
Test of program functions
Date:2023-09-02*10:22
Device:SDM230M,USB-RS485
Protocol:Rtu/Eastron V2.4
Driver:ModbusRtu11-SDM230M-Rtu-9600-Holds.rtu
Driver:ModbusRtu11-SDM230M-Rtu-9600-Inputs.rtu
Inputs:1,2,3,4,5,8,end
Measured interval:0
Outputs:8
Data:Data
Help:Help\ModbusRtu11-help.txt
Graf-par:Grp\Grf-Modbus-SDM120M.grp
end


Parameters for driver (.rtu file) with inputs commands example :
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

ModbusRtu/11/params
Parametry pro cteni dat z SDM120M po sbernici Modbus
1.09.2023*8:47:45
Protocol:Rtu
Description:Protocol Modbus RTU of Easun for SDM230M V2.4
Device:SDM230M,USB-RS485
Port:Com,7,9600,8,1,0
Timing:Timer=10,Sleep=10,Wait=200,Timeout=300
Device Address:01
Commands:14
1:0x04,0x00,0x00,0x00,0x02/4,0,999.99,1.0/V,Volts
2:0x04,0x00,0x06,0x00,0x02/4,0,99.999,1.0/A,Ampers
3:0x04,0x00,0x0C,0x00,0x02/4,0,999.99,1.0/W,Watts
4:0x04,0x00,0x12,0x00,0x02/4,0,999.99,1.0/VA,Voltampers
5:0x04,0x00,0x18,0x00,0x02/4,0,999.99,0.1/VAr,Voltamper r
6:0x04,0x00,0x1E,0x00,0x02/4,0,999.99,1.0/au,Power Factor
7:0x04,0x00,0x24,0x00,0x02/4,0,999.99,1.0/Deg,Degree
8:0x04,0x00,0x46,0x00,0x02/4,0,99.999,1.0/Hz,Frekvence
9:0x04,0x00,0x48,0x00,0x02/4,0,99.999,1.0/kWh,Import Active Energy
10:0x04,0x00,0x4A,0x00,0x02/4,0,99.999,1.0/kWh,Export Active Energy
11:0x04,0x00,0x4C,0x00,0x02/4,0,99.999,1.0/kVArh,Import Reactive Energy
12:0x04,0x00,0x4E,0x00,0x02/4,0,99.999,1.0/kVArh,Export Reactive Energy
13:0x04,0x01,0x56,0x00,0x02/4,0,99.999,1.0/kWh,Total Active Energy
14:0x04,0x01,0x58,0x00,0x02/4,0,99.999,1.0/kVArh,Total Reactive Energy
end

Parameters for driver (.rtu file) with holdings commands example :
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

ModbusRtu/11/params
Parametry pro ten a zpis dat z SDM230M po sbernici Modbus
4.09.2023*15:47:45
Protocol:Rtu
Description:Protocol Modbus RTU of Easun for SDM230M V2.4
Device:SDM230M,USB-RS485
Commands:11
1:0x00,0x0C,0x00,0x02/4,0,9.999,1.0/ms,Relay pulse width/60,100,200/100/Write relay on period in milliseconds: 60, 100 or 200
2:0x00,0x12,0x00,0x02/4,0,9.999,1.0/nr,stop bit and parity/0,1,2,3/0 = One stop bit and no parity/1 = One stop bit and even parity. 2 = One stop bit and odd parity.3 = Two stop bits and no parity.
3:0x00,0x14,0x00,0x02/4,0,9.999,1.0/nr,Modbus address/1-247/1/Range 1 to 247
4:0x00,0x1C,0x00,0x02/4,0,9.999,1.0/nr,baud rate/0,1,2,3/2 = 9600/0 = 2400 baud. 1 = 4800 baud.2 = 9600 baud, default.3 = 19200 baud. 4 = 38400 baud.
5:0x00,0x56,0x00,0x02/4,0,9.999,1.0/nr,pulse out mode/0001-0008/0004/change of source for pulse (import, export)
6:0xF9,0x00,0x00,0x01/5,0,999.9,1.0/nr,Time scroll/0-30/0/Time of scroll display
7:0xF9,0x10,0x00,0x01/5,0,9.999,1.0/nr,pulse output/0000-0003/0000/kWh of impuls
8:0xF9,0x20,0x00,0x01/5,0,9.999,1.0/nr,measurement mode/0001-0003/0002/mode 1 to mode 3
9:0xFC,0x00,0x00,0x02/1,0,9.999,1.0/nr,serial number/integer/integer/unsigned int32
10:0xFC,0x02,0x00,0x01/5,0,9.999,1.0/nr,meter code/00 20/00 20/read only
11:0xFC,0x03,0x00,0x01/5,0,9.999,1.0/nr,software version/xxxx/xxxx/read only
end





