
PI30 - Communication Protocol - version for PS3KVA

(derived from protocol for inverter/charger Voltronic Axpert Max)

https://github.com/users/PavelOu/projects/

1	Communication format
1.1	RS232

2	Inquiry Command
2.1	QPI<cr>: Device Protocol ID Inquiry	
2.2	QID<cr>: The device serial number inquiry
(2.3	QSID<cr>: The device serial number inquiry (the length is more than 14)
2.4	QVFW<cr>: Main CPU Firmware version inquiry
(2.5	QVFW3<cr>: Another CPU (remote panel) Firmware version inquiry)
(2.6	VERFW:<cr>: Bluetooth version inquiry)
2.7	QPIRI<cr>: Device Rating Information inquiry
2.8	QFLAG<cr>: Device flag status inquiry
2.9	QPIGS<cr>: Device general status parameters inquiry
2.12	QMOD<cr>: Device Mode inquiry
2.13	QPIWS<cr>: Device Warning Status inquiry
2.14	QDI<cr>: The default setting value information
2.15	QMCHGCR<cr>: Enquiry selectable value about max charging current
2.16	QMUCHGCR<cr>: Enquiry selectable value about max utility charging current

3	Setting parameters Command
3.3	PE<X> / PD<X><cr>: Setting some status enable/disable
3.4	PF<cr>: Setting control parameter to default value
(3.5	MNCHGC<mnnn><cr>: Setting PV max charging current   .. Axpert Max ?)
3.5	MCHGC<mnnn><cr>: Setting PV max charging current ... PS3KVA
3.6	MUCHGC<mnn><cr>: Setting AC utility max charging current	
3.9	POP<NN><cr>: Setting device output source priority
3.10	PBCV<nn.n><cr>: Set battery re-charge voltage
3.11	PBDV<nn.n><cr>: Set battery re-discharge voltage
3.12	PCP<NN><cr>: Setting device charger priority
3.13	PGR<NN><cr>: Setting device grid working range
3.14	PBT<NN><cr>: Setting battery type
3.17	PSDV<nn.n><cr>: Setting battery cut-off voltage (Battery under voltage)
3.18	PCVV<nn.n><cr>: Setting battery C.V. (constant voltage) charging voltage	
3.19	PBFT<nn.n><cr>: Setting battery float charging voltage
3.30	PBATCD<abc><cr>: Battery charge/discharge controlling command
3.31	PBATMAXDISC<nnn><cr>: Setting max discharging current


4	Appendix
4.1	CRC calculation method


1	Communication format
= = = = = = = = = = = = = = = = = = = 
1.1	RS232

RJ45 to RS232 cable between computer and device

Communication format
RS232	Baud rate	Start bit	Data bit Parity bit	Stop bit
	2400		1		8	 N		1

(Note - PS3KVA with programm WatchPower works till 19200 baud sure)

Inquiry Command
= = = = = = = =
(commands                                       Answers)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
QPI<cr>: Device Protocol ID Inquiry		PI30
Computer: QPI<CRC><cr>
Device: (PI<NN> <CRC><cr>
N is an integer number ranging from 0 to 9.
Function: To request the device Protocol ID.
Protocol ID distribution: 30 for Axpert KS series

QID<cr>: The device serial number inquiry	5555xxxxx
Computer: QID <CRC><cr>
Device: (XXXXXXXXXXXXXX <CRC><cr>

QSID<cr>: The device serial number inquiry (the length is more than 14)	 NAK 
Computer: QSID<CRC><cr>
Device: (NNXXXXXXXXXXXXXXXXXXXX <CRC><cr> 
NN: Serial number valid length, X: Serial number, invalid part is filled as 0, total X is 20.

QVFW<cr>: Main CPU Firmware version inquiry	VERFW:000SR.33
Computer: QVFW<CRC><cr>
Device: (VERFW:<NNNNN.NN><CRC><cr>
<N> is a HEX number from 0...9 or AF.
Example:
Computer: QVFW<CRC><cr>
Device: (VERFW:00023.01<CRC><cr>
00123: firmware series number;01:version

QVFW3<cr>: Another CPU (remote panel) Firmware version inquiry 
Computer: QVFW3<CRC><cr>
Device: (VERFW: <NNNNN.NN><CRC><cr>
<N> is a HEX number from 0...9 or AF.


VERFW:<cr>: Bluetooth version inquiry		NAK
Computer: VERFW:<CRC><cr>
Device: (VERFW: <NNNNN.NN><cr>
<N> is a HEX number from 0...9 or AF.

QPIRI<cr>: Device Rating Information inquiry
Computer: QPIRI<CRC><cr>
Device: (BBB.B CC.C DDD.D EE.E FF.F HHHH IIII JJ.J KK.K JJ.J KK.K LL.L O PP QQ0 
O P Q R SS T U VV.V W X YYY Z CCC <CRC><cr>

Date	Description	Notes
A	(		Start byte
B	BBB.B		Grid rating voltage, 		B is an integer ranging from 0 to 9. The units is V.
C	CC.C		Grid rating current, 		C is an Integer ranging from 0 to 9. The units is A. 
D	DDD.D		AC output rating voltage, 	D is an Integer ranging from 0 to 9. The units is V.
E	EE.E		AC output rating frequency,	E is an Integer ranging from 0 to 9. The units is Hz.
F	FF.F		AC output rating current	F is an Integer ranging from 0 to 9. The unit is A.
H	HHHH		AC output rating apparent power,H is an Integer ranging from 0 to 9. The unit is VA.
I	IIII		AC output rating active power,	I is an Integer ranging from 0 to 9. The unit is W.
J	JJ.J		Battery rating voltage,		J is an Integer ranging from 0 to 9. The units is V.
K	KK.K		Battery re-charge voltage,	K is an Integer ranging from 0 to 9. The units is V.
l	JJ.J		Battery under voltage,		J is an Integer ranging from 0 to 9. The units is V.
M	KK.K		Battery bulk voltage,		K is an Integer ranging from 0 to 9. The units is V.
N	LL.L		Battery float voltage,		L is an Integer ranging from 0 to 9. The units is V.
O	O		Battery type,			0: AGM, 1: Flooded, 2: User
P	PP		Max AC charging current,	P is an Integer ranging from 0 to 9 The units is A.
Q	QQ		Max charging current,		Q is an Integer ranging from 0 to 9. The units is A.
O	O		Input voltage range,		0: Appliance, 1: UPS
P	P		Output source priority,		0: UtilitySolarBat, 1: SolarUtilityBat, 2: SolarBatUtility
Q	Q		Charger source priority,	1: Solar first,	2: Solar + Utility, 3: Only solar charging permitted
R	R		Parallel max num,		R is an Integer ranging from 0 to 9. 
S	SS		Machine type,			00: Grid tie; 01: Off Grid; 10: Hybrid.
T	T		Topology,			0: transformerless, 1: transformer
U	U		Output mode,			00: single machine output
V	VV.V		Battery re-discharge voltage	V is an Integer ranging from 0 to 9. The unit is V.
W	W		PV OK condition for parallel,	0: As long as one unit of inverters has connect PV, system will consider PV OK; 


QFLAG<cr>: Device flag status inquiry
ExxxDxxx is the flag status. E means enable, D means disable
Code	Control setting
a	Enable/disable silence buzzer or open buzzer
b	Enable/Disable overload bypass function

u	Enable/Disable overload restart
v	Enable/Disable over temperature restart
x	Enable/Disable backlight on
y	Enable/Disable alarm on when primary source interrupt
z	Enable/Disable fault code record

Computer: QFLAG <CRC><cr>
Device: (ExxxDxxx <CRC><cr>

QPIGS<cr>: Device general status parameters inquiry
Computer: QPIGS <CRC><cr>
Device: (BBB.B CC.C DDD.D EE.E FFFF GGGG HHH III JJ.JJ KKK OOO TTTT EE.E UUU.U WW.WW PPPPP b7b6b5b4b3b2b1b0 QQ VV MMMMM b10b9b8 Y ZZ AAAA <CRC><cr>

Data	Description	Notes
a	(		Start byte
B	BBB.B		Grid voltage,		B is an Integer number 0 to 9. The units is V.
C	CC.C		Grid frequency,		C s an Integer number 0 to 9. The units is Hz.
D	DDD.D		AC output voltage,	D is an Integer number 0 to 9. The units is V.
E	EE.E		AC output frequency,	E is an Integer number from 0 to 9. The units is Hz.
F	FFFF		AC output apparent power, F is an Integer number from 0 to 9. The units is VA
G	GGGG		AC output active power,	G is an Integer ranging from 0 to 9. The units is W.
H	HHH		Output load percent,	DEVICE: HHH is Maximum of W% or VA%. 
						VA% is a percent of apparent power.
 						W% is a percent of active power.	The units is %.
I	III		BUS voltage,		I is an Integer ranging from 0 to 9. The units is V.
j	JJ.JJ		Battery voltage,	J is an Integer ranging from 0 to 9. The units is V.
k	KKK		Battery charging current, K is an Integer ranging from 0 to 9. The units is A.
o	OOO		Battery capacity,	X is an Integer ranging from 0 to 9. The units is %.
P	TTTT		Inverter heat sink temperature, T is an integer ranging from 0 to 9. The units is ?(NTC A/D value for Axpert 1~3K)
r	EE.E		PV1 Input current,	E is an Integer ranging from 0 to 9. The units is A.
t	UUU.U		PV1 Input voltage,	U is an Integer ranging from 0 to 9. The units is V.
u	WW.WW		Battery voltage from SCC, W is an Integer ranging from 0 to 9. The units is V.
w	PPPPP		Battery discharge current, P is an Integer ranging from 0 to 9. The units is A.
x	b7b6b5b4b3b2b1b0 Device status
			b7: add SBU priority version, 1: yes,0: no
			b6: configuration status: 1: Change 0: unchanged
			b5: SCC firmware version 1: Updated 0: unchanged
			b4: Load status: 0: Load off   1:Load on
			b3: battery voltage to steady while charging
			b2: Charging status
			b1: Charging status(SCC charging on/off)
			b0: Charging status(AC charging on/off)
	b2b1b0:
			000: Do nothing
			110: Charging on with SCC charge on
			101: Charging on with AC charge on
			111: Charging on with SCC and AC charge on
						Keep b6~b4, b2 ~ b0, reserve other
y	QQ		Battery voltage offset for fans on, Q is an Integer ranging from 0 to 9. The unit is 10mV.
z	VV		EEPROM version,		V is an Integer ranging from 0 to 9. 
	MMMMM		PV1 Charging powerM is an Integer ranging from 0 to 9. The unit is watt.
	b10b9b8		Device status
			b10: flag for charging to floating mode
			b9: Switch On
			b8: flag for dustproof installed(1-dustproof  installed,0-no dustproof, only available for Axpert V series)


Fault Code (probably - still with question)

Fault 	Event
01	Fan is locked when inverter is off.
02	Over temperature
03	Battery voltage is too high	
04	Battery voltage is too low
05	Output short circuited.
06	Output voltage is too high.
07	Overload time out
08	Bus voltage is too high
09	Bus soft start failed
10	PV over current
11	PV over voltage
12	DCDC over current
13	Battery discharge over current
51	Over current
52	Bus voltage is too low
53	Inverter soft start failed
55	Over DC voltage in AC output
57	Current sensor failed
58	Output voltage is too low
60	Power feedback protection
71	Firmware version inconsistent
72	Current sharing fault
80	CAN fault
81	Host loss
82	Synchronization loss
83	Battery voltage detected different
84	AC input voltage and frequency detected different
85	AC output current unbalance
86	AC output mode setting is different


QMOD<cr>: Device Mode inquiry
Computer: QMOD<CRC><cr>
Device: (M<CRC><cr>
MODE		CODE(M)	Notes
Power on mode	P	Power on mode
Standby mode	S	Standby mode
Line mode	L	Line mode
Battery mode	B	Battery mode
Fault mode	F	Fault mode
Shutdown mode	D	Shutdown mode

Example:
Computer: QMOD<CRC><cr>
DEVICE: (L<CRC><cr>       
Means: the current DEVICE mode is Grid mode.

QPIWS<cr>: Device Warning Status inquiry	(more probaly fault codes)
Computer: QPIWS<CRC> <cr>
Device: (a0a1..a30a31<CRC><cr>
a0 a35 is the warning status. If the warning is happened, the relevant bit will set 1, else the relevant bit will set 0. The following table is the warning code.
bit	Warning		Description
a0	PV loss		Warning
a1	Inverter fault	Fault
a2	Bus Over 	Fault
a3	Bus Under 	Fault
a4	Bus Soft Fail 	Fault
a5	LINE_FAIL 	Warning
a6	OPVShort 	Fault
a7	Inverter voltage too low 	Fault
a8	Inverter voltage too high 	Fault
a9	Over temperature 		Compile with a1, if a1=1,fault, otherwise warning
a10	Fan locked	Compile with a1, if a1=1,fault, otherwise warning
a11	Battery voltage high 		Compile with a1, if a1=1,fault, otherwise warning
a12	Battery low alarm	Warning
a13	Reserved
a14	Battery under shutdown	Warning
a15	Battery derating	Warning
a16	Over load	Compile with a1, if a1=1,fault, otherwise warning
a17	Eeprom fault	Warning
a18	Inverter Over Current	Fault
a19	Inverter Soft Fail	Fault
a20	Self Test Fail		Fault	
a21	OP DC Voltage Over	Fault
a22	Bat Open 		Warning
a23	Current Sensor Fail	Fault
a24 to a30	Reserved
a31	Battery weak (only 48V model)
	24V model: a31, a32 is fault code
	48V model: a32, a33 is fault code

QDI<cr>: The default setting value information
Computer: QDI<CRC><cr>
Device: (BBB.B CC.C 00DD EE.E FF.F GG.G HH.H II J K L M N O P Q R S T U V W YY.Y X Z aaa bbb<CRC><cr>

Data	Description	Notes	AXPERT
A	(		Start byte
B	BBB.B		AC output voltage,	B is an Integer ranging from 0 to 9. The units is V.
						Default 230.0 for HV models, 120.0 for LV models
C	CC.C		AC output frequency,	C is an Integer ranging from 0 to 9. The units is Hz.
						Default 50.0 for HV models, 60.0 for LV models
D	00DD		Max AC charging current, D is an Integer ranging from 0 to 9. The unit is A. Default is 0030 A
E	EE.E		Battery Under voltage,	E is an Integer ranging from 0 to 9. The unit is V. Default 44.0 V
F	FF.F		Charging float voltage,	F is an Integer ranging from 0 to 9. The unit is V. Default 54.0 V
G	GG.G		Charging bulk voltage,	G is an Integer ranging from 0 to 9. The unit is V. Default 56.4
H	HH.H		Battery default re-charge voltage, H is an Integer ranging from 0 to 9. The units is V. Default 46.0 for HV model
I	II		Max charging current,	I is an Integer ranging from 0 to 9. The units is A.	Default 60 A for HV model
J	J		AC input voltage range,	J is an Integer ranging from 0 to 1. No unit, Default 0 for Appliances range
K	K		Output source priority,	K is an Integer ranging from 0 to 1. No unit, Default 0 for utility first
L	L		Charger source priority,L is an Integer ranging from 1 to 3. No unit
						Default 2 for solar and utility
M	M		Battery type,		M is an Integer ranging from 0 to 1. No unit
						Default 0 for AGM
N	N		Enable/disable silence buzzer or open buzzer, N is an Integer ranging from 0 to 1. No unit
						Default 0 for enable buzzer
O	O		Enable/Disable power saving, O is an Integer ranging from 0 to 1. No unit
						Default 0 for disable power saving
P	P		Enable/Disable overload restart, P is an Integer ranging from 0 to 1. No unit, Default 0 for disable overload restart
Q	Q		Enable/Disable over temperature restart, Q is an Integer ranging from 0 to 1. No unit, Default 0 for disable over temperature restart
R	R		Enable/Disable LCD backlight on, R is an Integer ranging from 0 to 1. No unit, Default 1 for enable LCD backlight on
S	S		Enable/Disable alarm on when primary source interrupt, S is an Integer ranging from 0 to 1. No unit
						Default 1 for enable alarm on when primary source interrupt
T	T		Enable/Disable fault code record, T is an Integer ranging from 0 to 1. No unit
						Default 1 for disable fault code record
U	U		Overload bypass,	U is an Integer ranging from 0 to 1. No unit
						Default 0 for disable overload bypass function
V	V		Enable/Disable LCD display escape to default page after 1min timeout, V is an Integer ranging from 0 to 1. No unit
						Default 1 for LCD display escape to default page
W	W		Output mode		W is an Integer ranging from 0 to 4. No unit
						Default 0 for single output
Y	YY.Y		Battery re-discharge voltage, W is an Integer ranging from 0 to 9. The unit is V
						Default 54.0 for HV model
X	X		PV OK condition for parallel,	X is an Integer ranging from 0 to 1
						0: As long as one unit of inverters has connect PV, parallel system will consider PV OK; 
Z	Z		PV power balance,	X is an Integer ranging from 0 to 1
						0: PV input max current will be the max charged current;
a	aaa		Max. charging time at C.V stage(only 48V model), a is an Integer ranging from 0 to 9
b	bbb		Max discharging current (only 48V model), b is an integer ranging from 0 to 9. The units is A.

					
QMCHGCR<cr>: Enquiry selectable value about max charging current 
Computer: QMCHGCR<CRC><cr>
Device: (AAA BBB CCC DDD<CRC><cr>
More value can be added, make sure there is a space character between every value.


QMUCHGCR<cr>: Enquiry selectable value about max utility charging current 
Computer: QMUCHGCR<CRC><cr>
Device: (AAA BBB CCC DDD<CRC><cr>
More value can be added, make sure there is a space character between every value.

				
Setting parameters Command
- - - - - - - - - - - - - -
PE<X> / PD<X><cr>: Setting some status enable/disable
Computer: PE<X> / PD<X><CRC><cr>
Device: (ACK<CRC><cr> if DEVICE accepts this command, otherwise, responds (NAK<cr>
PEx / PDx set flag status. PE means enable, PD means disable
x	Control setting
a	Enable/disable silence buzzer or open buzzer
b	Enable/disable overload bypass
k	Enable/Disable LCD display escape to default page after 1min timeout
u	Enable/Disable overload restart and battery over discharge restart
v	Enable/Disable over temperature restart
x	Enable/Disable backlight on
y	Enable/Disable alarm on when primary source interrupt
z	Enable/Disable fault code record

PF<cr>: Setting control parameter to default value
Computer: PF<CRC><cr> 
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Note: The correct default value can be gain by QDI command.

(MNCHGC<mnnn><cr>: Setting max charging current .... Axpert Max ?)
MCHGC<nnn><cr>: Setting max charging current ... PS3KVA
Computer: MCHGC<nnn><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Setting value can be gain by QMCHGCR command.
nnn is max charging current, (m is parallel machine number - Axpert)

MUCHGC<mnn><cr>: Setting utility max charging current
Computer: MUCHGC<mnn><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Setting value can be gain by QMUCHGCR command.
nn is max charging current, m is parallel machine number.
If the max AC charging current is greater than 99A, modify it to nnn

POP<NN><cr>: Setting device output source priority
Computer: POP<NN><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Set output source priority, 00 for UtilitySolarBat, 01 for SolarUtilityBat, 02 for SolarBatUtility

PBCV<nn.n><cr>: Set battery re-charge voltage
Computer: PBCV<nn.n><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>

PBDV<nn.n><cr>: Set battery re-discharge voltage
Computer: PBDV<nn.n><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
00.0V means battery is full (charging in float mode).

PCP<NN><cr>: Setting device charger priority
Computer: PCP<NN><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Set output source priority,
01 for solar first, 02 for solar and utility, 03 for only solar charging

PGR<NN><cr>: Setting device grid working range
Computer: PGR<NN><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<cr>
Set device grid working range, 00 for appliance, 01 for UPS

PBT<NN><cr>: Setting battery type
Computer: PBT<NN><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
Setting battery type, 00 for AGM, 01 for Flooded battery, 02 for user define, 


PSDV<nn.n><cr>: Setting battery cut-off voltage (Battery under voltage)
Computer: PSDV <nn.n><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>

(Device PS3KV returns ACK, but value is not get to EEProm .. )

PCVV<nn.n><cr>: Setting battery C.V. (constant voltage) charging voltage
Computer: PCVV <nn.n><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>

(Device PS3KVA  returns ACK, but value is not acessible in Q_comands)

PBFT<nn.n><cr>: Setting battery float charging voltage
Computer: PBFT <nn.n><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>


PBATCD<abc><cr>: Battery charge/discharge controlling command
Computer: PBATCD<abc><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
a = Discharge completely on/off
b = Discharge on/off, but standby allowed (so small discharge allowed)
c = Charge completely on/off

Detail:
abc:

Charger	Discharger
1 1 1	Enabled charger	Enabled discharger
0 1 1	Enabled charger, depends on Prog16 setting if AC source valid, charge 2A from AC, even if prog. 16 is only solar. If prog. 16 is any other setting, ignore and let charging from AC source continue normally.
	Disabled discharger and shut down unit completely when insufficient PV or Grid is present.
1 0 1	Enabled charger, depends on Prog16 setting if AC source valid, charge 2A from AC, even if prog. 16 is only solar. If prog. 16 is any other setting, ignore and let charging from AC source continue normally.
	Disabled discharger but keep unit stay at standby mode.
1 1 0	Disabled charger
	Enabled discharger
0 1 0	Disabled charger
	Disabled discharger and shut down unit completely when no PV or Grid is present.
1 0 0	Disabled charger
	Disabled discharger but keep unit stay at standby mode.
0 0 1	N/A
	N/A
0 0 0	Cleaned the enable/disable charger flags and return to previous charger status.
	Cleaned the enable/disable discharger flags and return to previous discharger status.

PBATMAXDISC<nnn><cr>: Setting max discharging current
Computer: PBATMAXDISC<nnn><CRC><cr>
Device: (ACK<CRC><cr> if device accepts this command, otherwise, responds (NAK<CRC><cr>
nnn is max discharging current
48V unit: 000 or 30A~150A
000 means the function will be disable.



Appendix
= = = = =
CRC calibration method :  CCITT Xmodem



