ARDUINO LEONARDO MODBUS ASCII

For general Flowcode discussion that does not belong in the other sections.
Post Reply
pedrazzi
Posts: 21
http://meble-kuchenne.info.pl
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

ARDUINO LEONARDO MODBUS ASCII

Post 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.
Tecnoservice

Steve-Matrix
Matrix Staff
Posts: 1512
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 351 times

Re: ARDUINO LEONARDO MODBUS ASCII

Post by Steve-Matrix »

Please post the project you are trying to compile so we can see what is going wrong.

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ARDUINO LEONARDO MODBUS ASCII

Post by pedrazzi »

there he is

Thanks
Attachments
32U4DA_modbus.fcfx
(13.09 KiB) Downloaded 440 times
Tecnoservice

BenR
Matrix Staff
Posts: 1940
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 689 times

Re: ARDUINO LEONARDO MODBUS ASCII

Post 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.

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ARDUINO LEONARDO MODBUS ASCII

Post by pedrazzi »

Hi, I am using the pc with a simulator program through the serial (not usb)

Thank you
Tecnoservice

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ARDUINO LEONARDO MODBUS ASCII

Post 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.
Tecnoservice

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ARDUINO LEONARDO MODBUS ASCII

Post by pedrazzi »

Hi, with the latest updates the problem has been solved, thanks to the FC team! ;)
Tecnoservice

Post Reply