Forum Home › Forums › Communicating with Devices › Modbus › Register reading with Modbus TCP
- This topic has 22 replies, 4 voices, and was last updated 2 weeks, 3 days ago by
Mikhail.
-
AuthorPosts
-
April 19, 2025 at 8:24 am #16347
zzmMG
ParticipantHello all,
I was able to successfully connect rapidscada 6.4 to a modbus TCP device (power analyzer).
Now, I want to read data from registers lika voltage, current …
How am I supposed to adjust values in the appropriate channel?
The device documentation says following as example:
Request:
Address: 0A, Peripheral number: 10 in decimals.
Function: 04, Read function.
Initial Register: 0000, on which the reading will start.
No. of Registers: 0002, number of registers read.
CRC: 70B0, CRC Character.expected response:
Address: 0A, Responding peripheral number: 10 in decimals.
Function: 04, Read function.
No. of bytes: 04, No. of bytes received.
Registers: 0000084D, value of the phase voltage of L1: VL1 x 10 : 212.5V
CRC: 8621, CRC Character.Any documentation will be appreciated.
Thanks for your helpApril 20, 2025 at 1:42 pm #16349manjey73
ParticipantIn input script – Cnl/10
April 20, 2025 at 1:46 pm #16350manjey73
ParticipantIn configuration Modbus – group – Input Registers.
Value – 4 bytes uint.
Maybe change byteApril 21, 2025 at 12:07 pm #16352Mikhail
ModeratorHello,
This video may help.
If you add links to the screenshots of your settings and data, it would be useful to resolve the questions.April 21, 2025 at 3:07 pm #16354zzmMG
ParticipantThanks. Now I am progessing.
I cannot get min / max value changed (or read?), min in registers 164-165 and max 106-107
I use configuration Modbus – group – holding Registers – Value – 4 bytes uint for both element and command
following result of command:
Send: 00 0e 00 00 00 0b 01 10 01 64 00 02 04 00 00 08 98
Receive: 02 07 00 00 00 06 01
Receive: 10 01 64 00 02
OKApril 22, 2025 at 9:07 am #16359Mikhail
ModeratorTry the Modbus parser https://rapidscada.net/modbus/ to find mistakes in requests.
April 24, 2025 at 2:00 pm #16368zzmMG
ParticipantMy bad, the register i was trying to write to was not meant to be written but reset only. The parser helped a lot.
Thx
July 22, 2025 at 5:39 am #16683rapidscadaaks
ParticipantHi
I have a Waveshare Modbus RTU(D) Relay with has 8 channels each of Digital Inputs and Outputs.
I am able to use to digital outputs using commands and also check their status.I am however not able to read status of Digital Inputs. Waveshare manual gives following parameters for reading input status:
Modbus Function Code 0x02
Address (HEX) 1×0000 …… 1×0007 for the 8 channelsI have tried various combinations and have not succeeded
I will be grateful for assistance
July 22, 2025 at 5:40 am #16684rapidscadaaks
ParticipantDetails & manual of the device:
July 22, 2025 at 11:22 am #16686Mikhail
ModeratorHi,
Please copy a part of the communication line log to check data packets, and provide screenshots of the Modbus template.July 23, 2025 at 3:52 am #16692rapidscadaaks
ParticipantHi
I have the screenshots ready. Please advise how to attach as I do not seem to find option for uploading fileJuly 23, 2025 at 4:20 am #16693rapidscadaaks
Participanthttps://drive.google.com/drive/folders/1vlIcl4xIIcAInInh3mefr4DbJkR56pO0?usp=sharing
I hope the link is fine
Thanks
July 23, 2025 at 11:51 am #16694Mikhail
ModeratorHi,
Could you copy the packets from the communication line log as text?
They can be found in a text file in the logs directory.July 23, 2025 at 12:45 pm #16698rapidscadaaks
ParticipantHi
In 100% cases, Digital Input is failing2025-07-23 18:10:48 Session with the device [47] Waveshare_Relay_Test
Request element group “Relays”
Send (8): 01 01 00 00 00 08 3D CC
Receive (2/2): 01 01
Receive (4/4): 01 00 51 88
OK
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed2025-07-23 18:10:52 Session with the device [47] Waveshare_Relay_Test
Request element group “Relays”
Send (8): 01 01 00 00 00 08 3D CC
Receive (2/2): 01 01
Receive (4/4): 01 00 51 88
OK
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed2025-07-23 18:10:56 Session with the device [47] Waveshare_Relay_Test
Request element group “Relays”
Send (8): 01 01 00 00 00 08 3D CC
Receive (2/2): 01 01
Receive (4/4): 01 00 51 88
OK
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed2025-07-23 18:11:00 Session with the device [47] Waveshare_Relay_Test
Request element group “Relays”
Send (8): 01 01 00 00 00 08 3D CC
Receive (2/2): 01 01
Receive (4/4): 01 00 51 88
OK
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed
Request element group “Digital Input”
Send (8): 01 02 00 00 00 08 79 CC
Receive (0/2):
Error: communication failed2025-07-23 18:11:04 Session with the device [47] Waveshare_Relay_Test
Request element group “Relays”
Send (8): 01 01 00 00 00 08 3D CC
Receive (2/2): 01 01
Receive (4/4): 01 00 51 88
OKJuly 24, 2025 at 9:38 am #16706Mikhail
ModeratorHi,
According to Modbus Parser, the following data is requested:
https://ibb.co/bjB7xMyCDoes it match the Modbus register map?
-
AuthorPosts
- You must be logged in to reply to this topic.