sontx/modbus

Support function code 08?

kpx-dev opened this issue · 7 comments

Hi,

I just found your lib, looks good and planning to use it for my project. It doesn't seem to support FC08 right now, would you be willing to add support or accept PR for it?

I'm working with several hardware that offer that Diagnostic feature so we can use it to "healthcheck" our device. Basically when we send a message like this 01 08 0000 1234 ED7C, we would get the exact same answer back, this helps us knowing that our device is up and running.

Ex: https://infosys.beckhoff.com/english.php?content=../content/1033/fbb-x730/html/Bt_Modbus%20function_8.htm&id=

sontx commented

Hi @kienpham2000 ,
I will add the func08 to this lib as soon as possible. Otherwise, that will be great if you have a pull request for this support.
Thanks.

thank you, I'm still learning how to use the lib, I'll make a PR once I'm more familiar, I'm new to C# as well.

From the read me:

var builder = RequestBuilderFactory.CreateRequest03<RtuRequest>(1, 0, 4);

Visual Studio tells me there's extra param, 1 is not valid in this case?

sontx commented

Sorry, but the document is out of date (a year ago). If you want to use the Modbus library for your project, there is another library that still updates to date: https://bitbucket.org/sontx/dotnet-utils/src/master/Code4Bugs.Utils/IO/Modbus/
Ps: the func08 will be added to the new repo (the bitbucket repo).

Cool thanks, would you also publish that new package to NuGet? Let me test out the new package locally now.

sontx commented

I already updated the modbus nuget package to v2, you can take a look here https://www.nuget.org/packages/Modbus/

ah cool thank you!

Looks like v2.0 publish the entire Util directory. Is there if you can just publish the ModBus package only? I think that's the right approach.