Page 1 of 1

MIAC - MODBUS

Posted: Mon Dec 12, 2016 11:32 pm
by SAutoMotive
Good evening all,

Maybe a bit stupid question, but I am struggeling a bit with using the FC7 and a new dsPIC MIAC(without wireless/bluetooth).
Till now I was working with CANbus communication and that works very fine. (both standard and extended messages)

Now I want to communicate onto the RS232 with MODBUS RTU, but I cannot get this working...
MODBUS is quite new to me, I am working in the automotive world and there is everthing about CANbus, no MODBUS.
(hope that you will help me starting with this stuff...)

I am looking for a very simple example to get a MIAC communicating onto Modbus, both as slave and as master.
Have found the examples on the Flowcode Wiki, but I think I made some mistakes is setting up the communication, because I cannot find any data with my laptop onto the RS232 output of the MIAC.(using the CAS MODBUS scanner)

To be sure about the connections/jumpers inside the MIAC:
On page 11 of the datasheet is a picture of the jumpers inside, which one is correct for MODBUS on RS232?
http://www.flowcode.co.uk/old_site/resources/file ... C-60-3.pdf

Connecting the RX, TX and GND is enough to get the MODBUS working, isn't it? I can't find a proper answer if I need the CTS and RTS also...

Thanks in advance!!

Re: MIAC - MODBUS

Posted: Tue Dec 13, 2016 10:23 am
by LeighM
Hi,
Yes, RTS/CTS are not used by the Modbus component, so the default link settings, giving RS232 and RS485 interfaces, should be used...
default_links.jpg
default_links.jpg (21.79 KiB) Viewed 9102 times
For RS232 use hardware UART(0) Channel 1 on Port E pins 0 and 1
rs232master.jpg
rs232master.jpg (28.99 KiB) Viewed 9102 times
Hope that helps,
Leigh

Re: MIAC - MODBUS

Posted: Tue Dec 13, 2016 10:34 am
by SAutoMotive
Hi Leigh,

Thanks for your answer!
These settings are used in my test projects...

To be sure, which pin is used for the GND connection?
Just the normal GND of the MIAC or the 0R of the inputs, does this matter?

Could you give some advise in what kind of MODBUS logger/monitoring software works well?

Re: MIAC - MODBUS

Posted: Tue Dec 13, 2016 10:51 am
by LeighM
To be sure, which pin is used for the GND connection?
Just the normal GND of the MIAC or the 0R of the inputs, does this matter?
Use the normal GND (0R is for analog inputs ground)
Could you give some advise in what kind of MODBUS logger/monitoring software works well?
I've no recommendations on that, but I'm sure there are others on the forum that have :D

Re: MIAC - MODBUS

Posted: Tue Dec 13, 2016 3:15 pm
by EtsDriver
I use mbpoll for debugging/logging modbus data.
http://www.modbustools.com/modbus_poll.html

Re: MIAC - MODBUS

Posted: Tue Dec 13, 2016 8:39 pm
by Steve001

Re: MIAC - MODBUS

Posted: Wed Dec 14, 2016 9:23 am
by SAutoMotive
Hi Steve,

Thanks!

Yesterday I found this program and it was very useful!