Modbus RTU Slave error after updating Flowcode v10.1.2.40

For general Flowcode discussion that does not belong in the other sections.
Post Reply
seokgi
Posts: 217
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Flowcode v10 Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

Hello?
After updating FC10, Modbus RTU Slave error occurs.
It worked fine in the previous version.
Modbus RTU Master works.

MCU : PIC18F67K40
PIC24FJ512GA606
Thank you.
Attachments
241010-18F67K40-1.fcfx
(90.22 KiB) Downloaded 138 times

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by medelec35 »

Hi can you more specific.
Errors in compiling.
Errors in the data received.
If data received is different to expected data, what is the difference e..g. all data received is 0 etc.
Martin

seokgi
Posts: 217
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

When I look at the TTL reception on the RS-485 master (Modbus POLL) side, the data is received normally. However, when I look at the TTL reception on the PCB side programmed with FC10, the amount of data is small. Sometimes it is the opposite.
So I think the duration of the Direction signal is short.
And it works only when the master mode is software. Sometimes it doesn't work when I give it a channel number. When I select channel 6 (PIC24FJ512GA606) in master mode, the reception ends quickly. So if I directly connect the RX of the master (FC10) and the TX TTL of the slave, it works well.
Based on the above phenomenon, I guess the duration of the RS-485 Direction (RE, DE) signal is short.

Please also review Modbus TCP.
The project failed twice.

Thank you.

seokgi
Posts: 217
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

Hello?

I know that the modification is a very difficult task.
However, several projects are delayed.

I am ready to test with the following MCUs and RS-485 Support ICs.

PIC24FJ512GA606
PIC18F67K40
PIC18F45K40
MAX485
SN75176B
MAX13487

If you give me the test file, I will test it and let you know the result.
Please process it quickly.

Thank you.

seokgi
Posts: 217
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

Please tell me how to increase the duration of RE,DE(Data Direction Pin) of Modbus Slave/Master. I think adjusting it will solve the problem.

Please help me.

Thank you.

seokgi
Posts: 217
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

Modbus Slave RS-232 mode work well.

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by medelec35 »

Hello, sorry for the delay in getting back to you.
If you right - click and select help on the component, you will be taken to the component source.
For the time of data direction pin to be increased, for the master you can try to increase the Silent interval within the component properties.
For the slave you can try increasing the reply delay within the properties.
Martin

seokgi
Posts: 217
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 6 times
Been thanked: 7 times

Re: Modbus RTU Slave error after updating Flowcode v10.1.2.40

Post by seokgi »

I did as advised above, but it still doesn't work.
For reference, I'm uploading the oscilloscope waveforms.
1ch TX
2ch re/de
3ch RX

The first picture is after connecting the RS-485 device connected to the PC to the device programmed with FC10 in the RS-485 method, and then directly connecting the TX signal of the device programmed with FC10 and the RX signal of the RS-485 device on the PC. Communication works fine.

However, if I remove the direct connection between the TX signal of the device programmed with FC10 and the RX signal of the RS-485 device on the PC, the waveforms appear as in the second and third pictures, and then communication does not work.
Attachments
1.jpeg
1.jpeg (89.01 KiB) Viewed 3802 times
2.jpeg
2.jpeg (91.54 KiB) Viewed 3802 times
3.jpeg
3.jpeg (87.11 KiB) Viewed 3802 times

Post Reply