PZEM017 Modbus


title: “PZEM017 Modbus”
date: 2022-12-16T22:50:19
slug: pzem017-modbus


Read High Voltage Alarm threshod:

sudo mbpoll -a 5 -t 4:hex -r 1 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v

Set High Voltage Alarm threshod (20000 = 200.00 V):

sudo mbpoll -a 5 -t 4:hex -r 1 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v 0x4e20

Read Low Voltage Alarm threshod:

sudo mbpoll -a 5 -t 4:hex -r 2 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v

Set Low Voltage Alarm threshod (700 = 7.00 V):

sudo mbpoll -a 5 -t 4:hex -r 2 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v 0x02BC

Read Modbus Adress:

sudo mbpoll -a 5 -t 4:hex -r 3 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v

Set Modbus Address to 5:

sudo mbpoll -a 5 -t 4:hex -r 3 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v 0x0005

Read Shunt:

sudo mbpoll -a 5 -t 4:hex -r 4 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v

Set correct Shunt (300A):

sudo mbpoll -a 5 -t 4:hex -r 4 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v 0x0003
100A = 0x0000
50A = 0x0001
200A = 0x0002
300A = 0x0003
Beispiel (Lesen):
$ sudo mbpoll -a 5 -t 4:hex -r 4 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v
debug enabled
Set mode to RTU for serial port
Set device=/dev/ttyUSB2
mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.
Opening /dev/ttyUSB2 at 9600 bauds (N, 8, 2)
Set response timeout to 2 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [5]
start reference = 4, count = 1
Communication.........: /dev/ttyUSB2, 9600-8N2
t/o 2.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table
-- Polling slave 5...
[05][03][00][03][00][01][75][8E]
Waiting for a confirmation...
<05><03><02><00><03><09><85>
[4]: 0x0003
Beispiel (Schreiben):
$ sudo mbpoll -a 5 -t 4:hex -r 4 -b 9600 -P none -s 2 -o 2 /dev/ttyUSB2 -1 -v 0x0003
debug enabled
Set mode to RTU for serial port
Set device=/dev/ttyUSB2
1 write data have been found
Set data=3
Word[0]=0x3
mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.
Opening /dev/ttyUSB2 at 9600 bauds (N, 8, 2)
Set response timeout to 2 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [5]
start reference = 4, count = 1
Communication.........: /dev/ttyUSB2, 9600-8N2
t/o 2.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table
[05][06][00][03][00][03][38][4F]
Waiting for a confirmation...
<05><06><00><03><00><03><38><4F>
Written 1 references.
Print Friendly, PDF & Email