Click on the small box above to download the serial debugging tool, and instruction list
Yespeed Apro series 4 ports smart PDU modbus order
Modbus-Rtu protocol,baud rate 9600,CRC check of all commands。
Software version : later than v1.3.16 (include1.3.16) There are new registers after version v1.3.16
/* 01H Read forced single coil*/
/* 05HWrite forced single coil*/
/* 0FHWrite forced single coil*/
#define REG_D010x0000
#define REG_D020x0001
#define REG_D030x0002
#define REG_D040x0003
/* 02H Read input status*/
#define REG_T010x0000//sensor1
#define REG_T020x0001//sensor2
/* 04H Read input register(analog signal)*/
#define REG_A010x0000//temperature
#define REG_A020x0001//humidness
#define REG_A030x0002//voltage
#define REG_A040x0003//electric current
#define REG_A050x0004//power accurate to the ones place
//The above are compatible with older registers---------------------------------------------------------
#define REG_A060x0005//reserve
#define REG_A070x0006//reserve
#define REG_A080x0007//reserve
#define REG_A090x0008//reserve
//The following is the starting address of the new register
-----------------------------------------------------
#define REG_A100x0009//temperature- like the REG_A01
#define REG_A110x000A//humidness- like the REG_A02
#define REG_A120x000B//voltage- like the REG_A03
#define REG_A130x000C//electric current- like the REG_A04
#define REG_A140x000D//power-accurate to one decimal place
#define REG_A150x000E//frequency
#define REG_A160x000F//power factor
#define REG_A170x0010//the battery register is high 8 bits
#define REG_A180x0011//the battery register is low 8 bits
This is explained at address 0x01:
---------------------------------------------------------------------------------
Read socket output status,use function code:
send:01 01 00 00 00 04 3D C9
receive:01 01 01 0F 11 8C
0x0F 0 0 0 0 1 1 1 1
Socket serial number4 3 2 1
If data 0x01 is received, the first relay turns on and the others turn off.
---------------------------------------------------------------------------------
Separate control of relay switches ,use function code0x05:
send:01 05 00 00 FF 00 8C 3A open relay1
receive:01 05 00 00 FF 00 8C 3A open successful
send:01 05 00 00 00 00 CD CA close relay1
receive:01 05 00 00 00 00 CD CA close successful
01 05 00 01 FF 00 DD FA
01 05 00 01 00 00 9C 0A
01 05 00 02 FF 00 2D FA
01 05 00 02 00 00 6C 0A
01 05 00 03 FF 00 7C 3A
01 05 00 03 00 00 3D CA
---------------------------------------------------------------------------------
Full on and full off relays,use function code0x0F:
send:01 0F 00 00 00 04 01 0F 7E 92 open all
receive:01 0F 00 00 00 04 54 08 open all successful
send:01 0F 00 00 00 04 01 00 3E 96 close all
receive:01 0F 00 00 00 04 54 08 close all successful
---------------------------------------------------------------------------------
Use function code 0x04 to read data:
//Compatible with older registers-------------------------------------------------------------
Read the temperature:
send:01 04 00 00 00 01 31 CA
receive:01 04 02 00 CB F8 A7
0x00 0xCB These are the high and low bytes of the received data
That is the temperature data received is 0x00CB,decimal is 203,dividing by 10 is the temperature data 20.3℃。
Rerad the humidness:
send:01 04 00 01 00 01 60 0A
receive:01 04 02 03 4D 79 F5
0x03 0x4D These are the high and low bytes of the received data
That is the received humidity data is 0x034D,decimal is 845,dividing by 10 is the humidity data84.5%RH。
Read voltage:
send:01 04 00 02 00 01 90 0A
receive:01 04 02 08 C0 BE A0
0x08 0xC0 These are the high and low bytes of the received data
That is the voltage data received is 0x08C0,decimal is2240,dividing by 10 is the voltage data 224.0V。
Read the total current:
send:01 04 00 03 00 01 C1 CA
receive:01 04 02 00 31 78 E4
0x00 0x31 These are the high and low bytes of the received data
That is the received current data is 0x0031,decimal is 49,dividing by 10 is the total current data4.9A。
Read power:
send:01 04 00 04 00 01 70 0B
receive:01 04 02 04 49 7A 06
0x04 0x49 These are the high and low bytes of the received data
That is the received power data is 0x0449,decimal is 1097,It is the power data 1097W。
Read all the data at once:
send:01 04 00 00 00 05 30 09
receive:01 04 0A 00 CB 03 4D 08 C0 00 31 04 49 BC F9
temperature:0x00CB,decimal is 203,dividing by 10 is the temperature data 20.3℃。
humidness:0x034D,decimal is 845,dividing by 10 is the humidity data 84.5%RH。
voltage:0x08C0,decimal is 2240,dividing by 10 is the voltage data 224.0V。
electric current:0x0031,decimal is 49,dividing by 10 is the total current data4.9A。
power:0x0449,decimal is 1097,It is the power data 1097W。
//The following are the new registers-----------------------------------------------------------
Read the temperature:
send:01 04 00 09 00 01 E1 C8
receive:01 04 02 00 CB F8 A7
0x00 0xCB These are the high and low bytes of the received data
That is the temperature data received is0x00CB,decimal is 203,dividing by 10 is the temperature data
20.3℃。
Rerad the humidness:
send:01 04 00 0A 00 01 11 C8
receive:01 04 02 03 4D 79 F5
0x03 0x4D These are the high and low bytes of the received data
That is the received humidity data is
0x034D,decimal is 845,dividing by 10 is the humidity data 84.5%RH。
Read voltage:
send:01 04 00 0B 00 01 40 08
receive:01 04 02 08 C0 BE A0
0x08 0xC0 These are the high and low bytes of the received data
That is the voltage data received is 0x08C0,decimal is 2240,dividing by 10 is the voltage data 224.0V。
Read the total current:
send:01 04 00 0C 00 01 F1 C9
receive:01 04 02 00 31 78 E4
0x001 0x31 These are the high and low bytes of the received data
That is the received current data is 0x0031,decimal is 49,dividing by 10 is the total current data4.9A。
Read power:
send:01 04 00 0D 00 01 A0 09
receive:01 04 02 2A E0 A7 D8
0x2A 0xE0 These are the high and low bytes of the received data
That is the received power data is 0x2AE0,decimal is 10976,dividing by 10 is the power data 1097.6W。
Reading frequency:
send:01 04 00 0E 00 01 50 09
receive:01 04 02 01 F4 B9 27
0x01 0xF4 These are the high and low bytes of the received data
That is the received frequency data is 0x01F4,decimal is 500,dividing by 10 is the frequency data50.0Hz。
Read power factor:
send:01 04 00 0F 00 01 01 C9
receive:01 04 02 03 E5 78 4B
0x03 0xE5 These are the high and low bytes of the received data
That is the received power factor data is 0x03E5,decimal is 997,dividing by 10 is the power facto data 99.7%。
Read electric energy:
send:01 04 00 10 00 02 70 0E
receive:01 04 04 00 00 04 EF B8 C8
0x00 0x00 0x04 0xEF The high word 2 and low 2 bytes of the received data
That is the electric energy data received is 0x000004EF,decimal is 1263,dividing by 10 is the electric energy data 126.3Kw/h。
Read all the data at once:
send:01 04 00 09 00 09 E0 0E
receive:01 04 10 00 CB 03 4D 08 C0 00 31 2A E0 01 F4 03 E5 00 00 04 EF B5 56
Temperature:0x00CB,decimal is 203,dividing by 10 is the temperature data 20.3℃。
Humidness:0x034D,decimal is 845,dividing by 10 is the humidity data 84.5%RH。
Voltage:0x08C0,decimal is 2240,dividing by 10 is the voltage data 224.0V。
Electric current:0x0031,decimal is 49,dividing by 10 is the total current data4.9A。
Power:0x2AE0,decimal is 10976,It is the power data 1097.6W。
Frequency:0x01F4,decimal is 500,dividing by 10 is the frequency data 50.0Hz。
Power factor:0x03E5,decimal is 997,dividing by 10 is the frequency data 99.7%。(power factor)
Electric energy:0x000004EF,decimal is 1263,dividing by 10 is the electric energy data 126.3Kw/h。
// -----------------------------------------------------------------------------------------
Read sensor1:
send:01 02 00 00 00 01 B9 CA
receive:01 02 01 00 A1 880x00 This is the returned data,disconnected state (normal state)
01 02 01 01 60 48 0x01 This is the returned data,closed state (trigger state)
Read sensor2:
send:01 02 00 01 00 01 E8 0A
receive:01 02 01 00 A1 880x00 This is the returned data,disconnected state (normal state)
01 02 01 01 60 48 0x01 This is the returned data,closed state (trigger state)