Page 1 of 1

485 analog input register

Posted: Sun Oct 18, 2020 7:33 pm
by MikeVerweij
Hello,

My name is Mike and for a current project i am working with rs485 RTU on Flowcode 8.
I need to get an analog input working on the slave, i tried setanaloginput and read analog input, but i cant see the changes on my master.
I know how to get the digital in and outputs working but it does not work the same with the analog... I wonder if anyone can look at my code and tell me what i am doing wrong and how to get it working :D
Thanks in advance.

Re: 485 analog input register

Posted: Mon Oct 26, 2020 9:43 am
by dannyvanneijenhoff
bump :D

Re: 485 analog input register

Posted: Mon Oct 26, 2020 11:45 am
by viktor_au
Hello Mike

When Modbus master sends a request to slave what is the value of byte 'raw_RX_antw_master'?
Can you insert in your code the decision:
-------------------------------------
If raw_RX_antw_master=255
--------------------------------------
Is it CRC issue?

Did you try to send to Modbus master only one analog value?

Re: 485 analog input register

Posted: Mon Oct 26, 2020 4:20 pm
by MikeVerweij
hi, thanks for a reply.

I tried it but it is not a CRC fail, the slave will answer a default replay as it seems from the scope.
It doesn't matter what i set the answer will always be the same(see attachments), even if i remove everything and only initialise the slave.
I wonder if you can take a look at this and tell me what the problem is because i can't see it.

Kind regards, :D

Re: 485 analog input register

Posted: Tue Oct 27, 2020 4:44 am
by viktor_au
Hello Mike

I changed a bit your Slave12 and run it with FC8 run Master (not on PIC, bur Arduino).
All works OK on Arduino.

Please check you PIC hardware connections and settings.
I created a quick guide.
https://www.matrixtsl.com/mmforums/view ... 60#p103660