I am building a slave object and to test it I use a MB master SW from PC, I have not tried to use another card in master configuration, but I do not think this is the problem ..
As I have already shown I can simply send a message composed correctly by the terminal, but the slave does not respond.
In addition it does not even enter in RX "CheckForIncoming" ...
ESP32 MODBUS ASCII
-
- 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:
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: ESP32 MODBUS ASCII
Hello,
I've had another look at your program for you, you shouldn't need to use the ChangeBaud command as the properties are configuring the baud rate for you to 9600.
I can't see any other problems other then you are using the digital inputs and these are usually inputs to the modbus slave which are then send out but you seem to be using them the other way and so using coils might make more sense.
Can we see your PC side of the communications to double check that this matches? A screen shot of the software might be good enough to see what's going on.
I've had another look at your program for you, you shouldn't need to use the ChangeBaud command as the properties are configuring the baud rate for you to 9600.
I can't see any other problems other then you are using the digital inputs and these are usually inputs to the modbus slave which are then send out but you seem to be using them the other way and so using coils might make more sense.
Can we see your PC side of the communications to double check that this matches? A screen shot of the software might be good enough to see what's going on.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 21
- Joined: Sat Feb 20, 2021 7:46 am
- Location: ITALY
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: ESP32 MODBUS ASCII
here is the program, practically the same as the example from which I removed the LEDs, and a photo of the message sent to which no response follows.
- Attachments
-
- MB_tr.jpg (64.42 KiB) Viewed 7155 times
-
- MB_ric.jpg (91.58 KiB) Viewed 7155 times
-
- test_MB_ASCII.fcfx
- (12.86 KiB) Downloaded 590 times
Tecnoservice
-
- Posts: 21
- Joined: Sat Feb 20, 2021 7:46 am
- Location: ITALY
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: ESP32 MODBUS ASCII
even this has no answer
- Attachments
-
- MB_tr_2.jpg (89.87 KiB) Viewed 7155 times
Tecnoservice
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: ESP32 MODBUS ASCII
Are you sure it's MODbus ASCII the PC application is using?
The default is usually Modbus RTU and looking at the data it does seem to be RTU.
The default is usually Modbus RTU and looking at the data it does seem to be RTU.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 21
- Joined: Sat Feb 20, 2021 7:46 am
- Location: ITALY
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: ESP32 MODBUS ASCII
unfortunately the request is ASCII, I tried to compile RTU (for test), but the result does not change ..
Tecnoservice
-
- Posts: 21
- Joined: Sat Feb 20, 2021 7:46 am
- Location: ITALY
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: ESP32 MODBUS ASCII
the project I attached in the post with the two photos is the one I use (ASCII)
Tecnoservice
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: ESP32 MODBUS ASCII
Hello,
Yes sorry I see now you're right it is ASCII mode data.
I have been back through the component and beleive I may have fixed a significant bug in the way ASCII data is sent and received. Fingers crossed that helps your situation and gets it working for you.
Yes sorry I see now you're right it is ASCII mode data.
I have been back through the component and beleive I may have fixed a significant bug in the way ASCII data is sent and received. Fingers crossed that helps your situation and gets it working for you.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 21
- Joined: Sat Feb 20, 2021 7:46 am
- Location: ITALY
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: ESP32 MODBUS ASCII
I added a check on the error in reception "255", but this is also ignored ..
- Attachments
-
- test_MB_ASCII.fcfx
- (13.5 KiB) Downloaded 668 times
Tecnoservice
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: ESP32 MODBUS ASCII
Hello again,
I've done a lot of testing now and found some more problems with the ASCII mode which have hopefully now been resolved for you. It's now working correctly for me with Flowcode as the master and the slave. I've also tried with some third party software to double check I have everything correct and so far these tests have also been very positive.
FIngers crossed and let me know how you get on.
I've done a lot of testing now and found some more problems with the ASCII mode which have hopefully now been resolved for you. It's now working correctly for me with Flowcode as the master and the slave. I've also tried with some third party software to double check I have everything correct and so far these tests have also been very positive.
FIngers crossed and let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel