-
-
Notifications
You must be signed in to change notification settings - Fork 111
Unexpected behavior of the Modbus Flex-FC node with FC 20 (0x14) #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @tnn85 Just to let you know i look into this, i already have an idea of what is happening but i want to confirm this first before i tell you more. |
Hey @tnn85 Okay i can now safely confirm that the following is happening: The request is send succesfully by the flex fc logic, but the response goes in the wrong direction and get's handled by someone else in the chain this is the reason why the response has no fields and the data isn't formatted as intended. The last two additional bytes there have to be the CRC of the Message. This should be fixable we just need to indicate that the flex fc should always be handled seperate from all the other handlers! Also thank you for the thorough bug report :) |
Hi @tnn85 I prepared a bugfix for the issue. You can find it here: https://github.com/BiancoRoyal/node-red-contrib-modbus/tree/feature/flex-fc-bugfix Can you check if the new version is helping in any way? In case you don't know how:
|
Hi @grewek, thanks a lot for your investigation and your bugfix. If I have problems I will let you know :) |
No rush, please take your time. |
Which node-red-contrib-modbus version are you using?
5.43.0
What happened?
I'm trying to use the Flex-FC node to read a Siemens Sentron PAC2200 energy meter using the FC 20 (0x14)
.
FC 20 is actually a standardized FC according to the Modbus protocol, but unfortunately not available as a node in node-red-contrib-modbus.
I tried implementing it as shown here with a JSON object injected into the Flex-FC node by an injection node.
https://youtu.be/3TYG2UTtt4Q?feature=shared&t=116
I get a response from the energy meter, but it's 2 bytes longer than expected and isn't divided into the fields specified by the "Response Map."
The response of the energy meter to a request with this Flex-FC node also looks correct in Wireshark and exactly like a response to a request from Siemens Sentron Powerconfig V3.29, a program from Siemens for configuring the energy meter.
Server
Other/External server
How can this be reproduced?
Import this flow and simulate a Modbus TCP server with implemented FC 0x14 "Read File Record".
flows.json
What did you expect to happen?
I expected this structure of the response:
Other Information
No response
The text was updated successfully, but these errors were encountered: