Modbus

10 Jun 2011

Hi everybody,

I would like to know if it's possible to communicate with MODBUS protocol between mbed and an other device ?

14 Jun 2011

Hi,

I found this program :

http://mbed.org/users/giryan/programs/Modbus/5z95e/docs/

Someone use it ?? I need feedback experience ..

Thank you.

14 Jun 2011

Hi,

I used the port of the FreeModbus Libary for mbed at http://mbed.org/users/cam/programs/Modbus/5zdqv and it gave a working MODBUS RTU slave implementation for me. I tested it using a free MODBUS polling utility called modpoll that I found at http://www.modbusdriver.com/modpoll.html.

I am still looking for a MODBUS TCP implementation. Has anyone done this yet?

Peter

14 Jun 2011

Peter Ampt wrote:

Hi,

I used the port of the FreeModbus Libary for mbed at http://mbed.org/users/cam/programs/Modbus/5zdqv and it gave a working MODBUS RTU slave implementation for me. I tested it using a free MODBUS polling utility called modpoll that I found at http://www.modbusdriver.com/modpoll.html.

I am still looking for a MODBUS TCP implementation. Has anyone done this yet?

Peter

Hi,

Thank you very much for your reply.

There is no documentation, it will be difficult for me but i will try;

:)

15 Jun 2011

Hi,

You should not have too many problems getting the MODBUS RTU slave to work on mbed. Open the program at http://mbed.org/users/cam/programs/Modbus/5zdqv program in the mbed Compiler by clicking the "Import this program" link.

The main.cpp source file has the MODBUS settings in the "Defines" area and the following line 43 does the serial port settings.

eStatus = eMBInit( MB_RTU, SLAVE_ID, 0, 9600, MB_PAR_NONE );

The program should compile with just a couple of warnings.

Run modpoll with the following options: MODPOLL -m rtu -a 10 -r 1000 -c 4 -t 3:hex -b 9600 -d 8 -p none COM2. Of course select COM number to match the mbed com port. Use modpoll -h for help on the options.

I hope that is sufficient to get you going.

Peter

01 Jul 2011

Hi,

Sorry for this late response.

The program compile and work ! :)

I used this software http://qmodbus.sourceforge.net/.

Edit : In the for loop, if I add some functions , modbus protocol doesn't work anymore.

10 Sep 2014

hi all,

please tell me what are main changes are necessary in http://mbed.org/users/cam/programs/Modbus/5zdqv if i use lpc1768 and Changes like in main.cpp i wrote #include "mbed.h" in main.cpp.

Thank you

08 Sep 2015

Hi All,

The http://mbed.org/users/cam/programs/Modbus/5zdqv program is compiled with errors for my k64f target.

Does anyone have a solution to this problem ??

Thanks!

08 Sep 2015

The error is: #error directive: "CMSIS Target not recognised #error: "CMSIS Target not recognised

When I compel for my k64f target.

Tanks!

15 Feb 2016

magnus e wrote:

The error is: #error directive: "CMSIS Target not recognised #error: "CMSIS Target not recognised

When I compel for my k64f target.

Tanks!

You should update the mbed library in your program.

03 Sep 2019

Hi All,

The http://mbed.org/users/cam/programs/Modbus/5zdqv does not compile with FRDMK64 target. The error is "The build system did not finish successfully".

How to overcome this error/

Thanks