Readme for programm MODBUS ANSI for inverters PS1-5KVA
= = = = = = = = = = = = = = = = = = = = = = = = = = = =

Version of programm : 30
Date of last creating  : 24. 7. 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 authorized and licensed.
Shareware version is distribute as shareware.
  (There is limited the number of recorded data to 50 ones.)
Demo version of programm is distributed as freeware.
  (There is blocked the comunication between PC and device.)

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

Contact  on author : pavel.oupicky@seznam.cz

Default known problems in this programm Modbus Ansi :
= = = = = = = = = = = = = = = = = = = = = = = = = = =
Version 30 (and all ModbusXY versions) :
- - - - - - - - - - - - - - - - - - - - -
- the program is the compilation of many of previous programs created by author,
- so some functions programs are or not ready or out of functions
- Window OS can open many of windows, but when is program running, it os impossible use the mini- or maximalization of ones, 
  as the OS and Deplphi program cannot right open or closed them .. so if the program is running do not use 
  these button symbols for windows or program and data can be lost.
- every window in Windows OS use its own handle for communication via com port.
  So, when you will change window, you must change its handle, too.
  So you must close previous handle with Close button and then use Open buton again.


Basic description of programm :
= = = = = = = = = = = = = = = = 

Programm was created for devices with communication protocol
PI30 of Modbus ANSI with commands confirmed  by CRC CCITT Xmodem and CR
 and for communication between personal computers
with connectors RS232 or USB converters to RS232 or RS485
 and devices like inverters PS1-5KVA.

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

About
- basic description of programm

Memo
- memory for notes on PC

Graphs
- first visualisation of parameters  for graphs

Data
- reads recorded datas from pevious measurements

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

Help
- reads this similar file

Hex counts
- some transfers between bits, bytes and hexbytes

Test
- basic control of communication between PC and device in Modbus Ansi or Ascii

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 ANSI commands

Inputs
- list of answers on the choosed measurement command

Measure
- start for measurement process

Nominal
- reads nominal data from inverter

Status
- reads actual data from inverter

Control
- reads and sets the process commands for device

Data
- simply reading and visualisation of data from device

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 .ans in Driver folder
- set parameters must be set in file with extension .set in Set folder
- parameters for graphs are in the file with extension .grp in folder Grp
- help file for Modbus30 must have name Modbus30-help.txt and must be in the folder Help

Example of inicialisation parameters (.ini file):
= = = = = = = = = = = = = = = = = = = = = = = = =

Modbus/30/Inicializace
Inicializacni soubor pro program Modbus30
08.07.2023/0:15:33
User: shareware
Path:Par
File:Modbus30-PS3KVA-RS232-com4-2400-PI30-QPIGS-1+3+4+5+6+12+13+14.par
end


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

Modbus/30/params
Test:Inverter-charger PS3KVA
Description: The test of device and data
Date:2023-07-08*15:22
Device:PS3KVA,USB-RS232
Protocol:Ansi/PI30
Battery:AGM/24V
Driver:Modbus30-PS3KVA-RS232-com4-2400-PI30.ans
Set:Modbus30-PS3KVA-set-po-10.set
Inputs:QPIGS:1,3,4,5,6,12,13,14,end
Measured interval:0
Outputs:8
Data:Data
Help:Help\Modbus-help.hlp
Graf-par:Grp\Grf-Modbus-basic.grp
end

Parameters for driver (.ans file) example :
= = = = = = = = = = = = = = = = = = = = = = = = =

Modbus/30/params/Modbus27-PS3KVA-Com4-2400-PI30.ans
Parameters for data transmission from PS3KVA via port RS232
8.7.2023*8:47:45
Protocol:Ansi/CRC/Xmodem/CR
Description:Protocol for PS3KVA like PI30
Device:PS3KVA,USB-RS232
Port:Com,4,2400,8,1,0
Timing:Timer=10,Sleep=10,Wait=300,Timeout=300
Device Address:NU
Commands:7
QPIGS:R/21
1:AC_Grid_Voltage/V
2:AC_Grid_Frequency/Hz
3:AC_Output_Voltage/V
4:AC_Output_Frequency/Hz
5:AC-App_Power/VA
6:AC_Active_Power/W
7:Output_Load_%/%
8:Bus_Voltage/V
9:Battery_Voltage/V
10:Batt_charg._Current/A
11:Battery_Capacity/%
12:Heat_Sink_Temp/Cels
13:PV_in_Current/A
14:PV_in_Voltage/V
15:Batt_SCC_voltage/V
16:Batt_disch_Current/A
17:Device status/byte
18:Batt_offset_for_fans/10mV
19:EEProm Version/nr
20:PV_charging_Power/W
21:Device_Status/nr
QPIRI:R/25
1:AC_Grid_Voltage/V
2:AC_Grid_Current_max/A
3:AC_Output_Voltage/V
4:AC_Grid_Frequency/Hz
5:AC_Output_Current_max/A
6:AC_Output_Voltampers_max/VA
7:AC_Output_Watts_max/W
8:DC_Battery_Nominal/V
9:DC_batt_set_low_volts/V
10:DC_batt_minimal_volts/V
11:DC_batt_set_volts_max/V
12:DC_batt_set_high_volts/V
13:Battery type/nr
14:DC_battery_max_charge/A
15:DC_batt_max_discharge/A
16:Input voltage range/nr
17:Output source priority/nr
18:Charger source priority/nr
19:Parallel max num/-
20:Machine type/nr
21:Topology/nr
22:Output mode/nr
23:Battery re-discharge voltage/V
24:PV OK condition for parallel/nr
25:PV power balance/nr
QDI:R/25
1:AC output voltage/V
2:AC output frequency/Hz
3:Max AC charging current/A
4:Battery Under voltage/V
5:Charging float voltage/V
6:Charging bulk voltage/V
7:Battery default re-charge voltage/V
8:Max charging current/A
9:AC input voltage range/V
10:Output source priority/nr
11:Charger source priority/nr
12:Battery type/nr
13:Buzzer/nr
14:Power saving/nr
15:Overload restart/nr
16:Over temperature restart/nr
17:LCD backlight on/nr
18:Alarm on primary source interrupt/nr
19:Fault code record/nr
20:Overload bypass/nr
21:LCD display escape/nr
22:Output mode/nr
23:Battery re-discharge voltage/V
24:PV OK condition for parallel/nr
25:PV power balance/nr
QID:R/1
1:Device_SN/Nr
QPI:R/1
1:Protocol/Text
QVFW:R/1
1:Firmware/Text
QFLAG:R/1
1:ListOfFlagsED/text
end

Example of set parameters:
- - - - - - - - - - - - - -

Modbus/30/Modbus29-PS3KVA-Set-po-10.set
Description:Parameters for basic set command of PS3KVA
PD:a Disable silence buzzer or open buzzer
PE:b Enable overload bypass
PE:k Enable LCD display escape to default page after 1min timeout
PD:u Disable overload restart and battery over discharge restart
PE:v Enable over temperature restart
PD:x Disable backlight on
PE:y Enable alarm on when primary source interrupt
PE:z Enable fault code record
POP:00 Setting device output source priority, nn is 00 for UtilitySolarBat, 01 for SolarUtilityBat, 02 for SolarBatUtility
PCP:00 Set output source priority, (00 for Utility,) 01 for solar first, 02 for solar and utility, 03 for only solar charging
PGR:01 Setting device grid working range, nn is 00 for appliance, 01 for UPS
PBT:00 Setting battery typ, nn is 00 for AGM, 01 for Flooded battery, 02 for user define, 
PBCV:24.0 Set battery re-charge voltage, nn.n is voltage in Volts
PBDV:27.0 Set battery re-discharge voltage, nn.n is 00.0V means battery is full (charging in float mode). (????)
PSDV:23.8 Setting battery cut-off voltage (Battery under voltage)
PCVV:28.0 Setting battery C.V. (bulk or constant voltage) charging voltage
PBFT:27.0 Setting battery float charging voltage
MCHGC:0020 Setting max (PV) charging current
MUCHGC:020 Setting utility (AC) max charging current
PBATMAXDISC:030 Max discharging current (A)
end

Example of graph parameters:
- - - - - - - - - - - - - - -

Modbus30/parameters/graphs
Graph:Modbus30 - basic graph parameters
28.6.2023/21:25:21
0*1*5*min*Axe of time for graph
0*1*5*2*min*Axe of time for measuring
0*50*250*V*Axe of intensity for graph
0*50*250*V*Axe of intensity for measuring - basic
0*10*50*V*Axe of intensity for measuring - user
0*1*.point for data on x and y
1*0*rastr x and rastr y
Color of line*type of line*width of line from 0 to 7 works
clBlue*psSolid*3
clGreen*psSolid*2
clRed*psSolid*1
clBlack*psDot*0
clNavy*psDash*2
clYellow*psDashDot*1
clGreen*psDashDotDot*2
clBlue*psSolid*0
end



