Replies: 1 comment 29 replies
-
There are a few issues with your code, but nothing which should stop it working for small frames, as far as I can see. None of the data you got back looks like a valid modbus frame though. Try just enabling the pull-up resistor on your rx line? It's going high-z when you transmit, and a floating voltage might be confusing the UART peripheral a bit, but nothing that should lead to a large amount of garbage. Are you sure you connected to the correct pins on the inverter? |
Beta Was this translation helpful? Give feedback.
29 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Doc: https://github.com/nathanmarlor/foxess_modbus
https://github.com/nathanmarlor/foxess_modbus/wiki/Modbus-Wiring-Guide
https://github.com/nathanmarlor/foxess_modbus/files/11552447/KH.Series.Modbus.pdf
https://github.com/nathanmarlor/foxess_modbus/files/11511264/Energy.Storage.Inverter.Modbus.TCP.Communication.protocols.for.FOXESS-1.pdf
I am beginner trying to get data from foxess kh8 inverter but getting very long data in decimal or HEX using below code, can anyone help me to parse it or get correct readable form or this response is correct or not or how I can get correct response?
rs485 to max485 to esp-wroom-32 ch340 kit
inverter modbus address: 247
I connected:
max485 -> esp32
RO -> RX
(DE + RE common) -> 5 pin
DI -> TX
GND -> GND
My code:
Serial2.read response:
Schreibe Daten ....
0xF7 0x03 0x00 0x00 0x00 0x07 0x10 0x9E
Lese Daten ....
86 EE 0 0 0 7 1F 1E
or
Schreibe Daten ....
0xF7 0x03 0x00 0x00 0x00 0x07 0x10 0x9E
Lese Daten ....
0 0 0 0 6 0 1 1 C0 E0 E0 60 E1 60 D0 10 70 50 40 40 E0 F1 60 F0 70 60 10 0 70 20 30 28 18 18 18 C C 10 1A 1C E 4 5 2 4 80 E0 C0 60 C0 F0 18 38 18 C E 2 6 4 3 1 E0 C0 E0 54 B0 30 20 70 58 18 1C 18 1C A 2 E E 3 2 C4 B8 0 C0 C0 60 B0 30 78 B0 28 1A C F 60 E0 28 30 18 58 B 1C 8 C 2 B 6 6 E E 7 C0 E0 60 30 38 10 30 38 18 19 8 18 18 A C0 60 30 30 78 98 18 8 4 6 2 E 6 6 7 6 6 42 C0 30 70 20 18 18 C 6 4 3 C0 E0 60 40 20 30 16 0 4C 6 6 7 7 80 C0 60 60 60 30 32 70 90 10 70 70 38 30 18 14 4C 2 2 7 1 1 C0 C0 E0 D0 70 38 0 C 4 7 87 3 1 44 E0 A8 60 70 31 78 30 8 8 A 7 3 1 C0 A0 E0 74 B8 18 4 48 98 C C E 7 3 80 E0 50 D0 40 60 30 70 38 20 30 28 38 38 30 18 10 18 14 1C 6 3 C0 C0 F0 61 10 30 38 30 78 E4 30 B0 F4 E0 E0 E0 F0 F7 E5 F0 A0 F8 E0 E1 E0 F0 E8 F0 F0 F8 78 78 F8 E8 60 F0 B0 E1 E0 F4 F0 F4 F8 34 70 FA 78 7C FE 58 7A FC 7E 78 70 FA F0 7C FC F4 78 F2 F9 E8 FB 9C 7F BE 1C 7E 3F FF 3F 9E 3E C7 BD 7F FF FF FF 9F FB 7E FF BF FF 7F FF DF FF FF FF FF FF BF FF FF FF 7F FF FF FF FF FF FF FF FF BF FF 0 3 0 0 0 0 0 0 6 2 0 0 2 0 0 0 0
Beta Was this translation helpful? Give feedback.
All reactions