Modbus-TCP library
#1
Posted 31 March 2012 - 02:46 PM
I hope to be able to add the RS-485 transport way, but it's much a challenge...
http://highfieldtale...y-for-netduino/
- NeonMika / Markus VV. and Victor M. like this
#2
Posted 31 March 2012 - 09:53 PM
#3
Posted 09 April 2012 - 03:25 PM
It seems pretty easy to realize, so I'd expect should be available for the Go! as well.
http://highfieldtale...t-open-toolbox/
#4
Posted 21 September 2012 - 05:31 AM
- Victor M. likes this
#5
Posted 21 September 2012 - 04:46 PM
http://diybrewery.com
#6
Posted 20 October 2012 - 04:42 PM
#7
Posted 26 March 2014 - 03:12 PM
I neet to setup Modbus TCP beetween some Netduino 2 Plus boards for a Project and so i found an downloaded this library. My Problem is that i couldnt find any Examples how to include this Library to my programm and i am pretty new at working with Visual C#.
Has anyone an Example or link for me?
Thank you very much!
#8
Posted 27 March 2014 - 04:24 AM
I neet to setup Modbus TCP beetween some Netduino 2 Plus boards for a Project and so i found an downloaded this library. My Problem is that i couldnt find any Examples how to include this Library to my programm and i am pretty new at working with Visual C#.
Has anyone an Example or link for me?
Thank you very much!
Hello.
If you have no-at-all or even few experience with C# and Netduino, I'd suggest to begin with something easier. The library is not particularly complex, but it assumes that the developer *knows* how to deal with the framework, the language and the hardware.
Also consider to take practice just without the Netduino first. Try to create some small programs for PC with the Visual Studio Express.
http://www.visualstu...udio-express-vs
The repository does include several examples. If you need to deal just with Netduino, here is the sample program where are all-six the different ways to use the library.
http://cetdevelop.co...s_MF/Program.cs
That is, if you compile the source as-is, you'll have a TCP-Master Netduino. To create the TCP-Slave counterpart, just un/comment the proper "#define" at the top of the module.
What else do you need?
- Victor M. likes this
#9
Posted 23 April 2014 - 06:50 PM
Thank you for the example!
First i had to find out how to add the Library to the Visual Studio and added for MM4.2
So that seems to be ok.
Now i am playing around and try to set up the right IP-Adress for my Network which causes some trouble.
//setup the board IP NetworkInterface.GetAllNetworkInterfaces()[0] .EnableStaticIP("10.0.0.110", "255.255.255.0", "10.0.0.138");
and the unexpected Output is:
The local IP address of your Netduino Plus is 192.168.0.99
#10
Posted 24 April 2014 - 03:29 AM
Thank you for the example!
First i had to find out how to add the Library to the Visual Studio and added for MM4.2
So that seems to be ok.
Now i am playing around and try to set up the right IP-Adress for my Network which causes some trouble.
//setup the board IP NetworkInterface.GetAllNetworkInterfaces()[0] .EnableStaticIP("10.0.0.110", "255.255.255.0", "10.0.0.138");and the unexpected Output is:
The local IP address of your Netduino Plus is 192.168.0.99
AFAIK the network IP can be changed via MFDeploy. The utility has a section where you can set the desired IP. I had the same problem.
By the way, are you sure that 10.0.0.x is a valid IP? Isn't superseded as mask?
#11
Posted 27 April 2014 - 07:48 AM
Hello!
10.0.0.110 is a valid IP Adreass and after removing the linebreak in the following codeline
NetworkInterface.GetAllNetworkInterfaces()[0].EnableStaticIP("10.0.0.110", "255.255.255.0", "10.0.0.138");
it just works fine! I dont realy understand why but its working now.
Thank you very much!!!
#12
Posted 26 November 2014 - 11:38 AM
Hi Mario
I set up a modbus TCP client, but I'd need to send registers in string format. Could it be done?
Thanks
Alessandro
Alek
Brained in Italy
#13
Posted 26 November 2014 - 12:32 PM
Hi Mario
I set up a modbus TCP client, but I'd need to send registers in string format. Could it be done?
Thanks
Alessandro
Ciao Alessandro.
If you mean Modbus ASCII, then the answer is "no". However, you may create your own codec for such a standard. Have a look at the RTU codecs, and the design is easy enough.
Riciao
#14
Posted 26 November 2014 - 01:03 PM
Thanks Mario for ur prompt reply!!
I think I'll convert the string to byte array, send it as a register (or multiregister) and re-compose on server side (scada).
Grazie ciò
Alessandro
Alek
Brained in Italy
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users