Page 1 of 1
ARDUINO LEONARDO MODBUS ASCII
Posted: Mon Apr 12, 2021 4:22 pm
by pedrazzi
I'm trying to make a little slave with an Arduino Leonardo, but I can't get an answer even simply using the example that is provided.
I also tried with Arduino 1+( pic18f458), but the result doesn't change.
Maybe I use a micro that was not included in this component?
I also bought FC9 .. but the result is the same
>>(FC9) ModBus_Slave_Example.c: 5166: error: Missing or unknown component: ModbusSlave1 :: ReadCoilStates
Thanks in advance for your help.
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Mon Apr 12, 2021 4:53 pm
by Steve-Matrix
Please post the project you are trying to compile so we can see what is going wrong.
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Mon Apr 12, 2021 5:53 pm
by pedrazzi
there he is
Thanks
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Mon Apr 12, 2021 9:57 pm
by BenR
Hello,
Are you wanting the modbus to be controlled via the USB connection to the PC or via a serial UART connection?
You don't seem to be calling the function ReadCoilStates in the program you attached but some of the functions have been renamed to aid in simplicity so ReadCoilStates is now simply ReadCoils. If you edit the flowchart icon then you can change it so it calls the correct function.
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Tue Apr 13, 2021 7:55 am
by pedrazzi
Hi, I am using the pc with a simulator program through the serial (not usb)
Thank you
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Tue Apr 13, 2021 8:06 am
by pedrazzi
... the function is taken from the macro, the wrong name comes from FC7, now the error is okay, the problem is that it never enters the "if" and never responds on the serial line.
Re: ARDUINO LEONARDO MODBUS ASCII
Posted: Tue Apr 20, 2021 6:16 pm
by pedrazzi
Hi, with the latest updates the problem has been solved, thanks to the FC team!
