Modbus Slave no CheckForIncoming

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Modbus Slave no CheckForIncoming

Post by dannyvanneijenhoff »

Hello

I have no respons from the modbus slave with the Check For Incoming component.
Maybe i have an wrong settings.

I see on the scope the correct data signals from the output of the 485 IC, and the data direction pin is low, but no reaction :-(

The hardware is working with an modbus master component.
---------------------------------------------------------------------------------------
I have removed the master component from this program, because of trouble with the data direction pin.
When using master and slave in the same program, the data direction pin will be high (most of the time).
And for slave (i think) it should be low (mostly). The red line is the data direction pin, and blue is the data to the 485 IC in picture 2
Attachments
Knip2sel.JPG
Knip2sel.JPG (40.22 KiB) Viewed 3972 times
Knipsel.JPG
Knipsel.JPG (47.29 KiB) Viewed 3972 times
modbus slave FC7 rev1e .fcfx
(12.32 KiB) Downloaded 259 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Modbus Slave no CheckForIncoming

Post by Benj »

Hello,

It should be working fine, can you give us a description of your hardware setup so we can try and determine what might be going wrong.

Have you tried the 1 second flasher test to confirm your clock speed is correct and micro is running as expected.

Your program looks ok and configuration also looks good so it could be something to do with the RS485 data direction.

The data should be Master TX Slave RX by default. It's only when the master message has been sent and the slave is responding that the data direction should change. The reply delay property can be useful if you need to wait longer for the data direction to change before replying.

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: Modbus Slave no CheckForIncoming

Post by dannyvanneijenhoff »

Hello benj

hardware setup:
an working HMI (exor) with 485 modbus master connection to an ADAM modbus reciever, with 8 inputs and 8 outputs. Cable is 2mtr with start and end 120R.
This system works 100% good (for months).

Our PCB with 8mhz chrystal with FC7, has an working MASTER connection to the ADAM slave. And that works good.
Can i asume that the 1 second flasher test is not neccesary ?
But only tested to send, not tested for receiving.


Your program looks ok and configuration also looks good so it could be something to do with the RS485 data direction.

The scoop give an nice signal on the output of the Line Transceiver with an proper code , the RS-485-IC pin TX is connected to RC6, RX is connected to RC7 on 16F887 44-pin TQFP


The data should be Master TX Slave RX by default. It's only when the master message has been sent and the slave is responding that the data direction should change.

I will check this, today

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: Modbus Slave no CheckForIncoming

Post by dannyvanneijenhoff »

testing with same hardware with the master component:
I can assume that the hardware is working, as the pic send data and get data return.

BUT i get CRC fail 255 (pwm = 800)

I hope when i get to read the (working) master, i can test (and understand) the slave better.

Thanks for your help.
Attachments
modbus master online 1 .fcfx
(21.66 KiB) Downloaded 256 times
master out-red and slave respons blue on PIC.JPG
master out-red and slave respons blue on PIC.JPG (72.42 KiB) Viewed 3917 times

Post Reply