MIAC - MODBUS

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

SAutoMotive
Posts: 5
Joined: Thu Jul 31, 2014 2:21 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

MIAC - MODBUS

Postby SAutoMotive » Mon Dec 12, 2016 11:32 pm

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.matrixtsl.com/resources/files/datasheets/MIAC-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!!

User avatar
LeighM
Matrix Staff
Posts: 1482
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 377 times
Been thanked: 534 times
Contact:

Re: MIAC - MODBUS

Postby LeighM » Tue Dec 13, 2016 10:23 am

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 3644 times

For RS232 use hardware UART(0) Channel 1 on Port E pins 0 and 1

rs232master.jpg
rs232master.jpg (29 KiB) Viewed 3644 times


Hope that helps,
Leigh
These users thanked the author LeighM for the post:
SAutoMotive (Tue Dec 13, 2016 10:34 am)
Rating: 5.88%
 

SAutoMotive
Posts: 5
Joined: Thu Jul 31, 2014 2:21 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: MIAC - MODBUS

Postby SAutoMotive » Tue Dec 13, 2016 10:34 am

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?

User avatar
LeighM
Matrix Staff
Posts: 1482
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 377 times
Been thanked: 534 times
Contact:

Re: MIAC - MODBUS

Postby LeighM » Tue Dec 13, 2016 10:51 am

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

EtsDriver
Valued Contributor
Valued Contributor
Posts: 386
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 321 times
Been thanked: 206 times
Contact:

Re: MIAC - MODBUS

Postby EtsDriver » Tue Dec 13, 2016 3:15 pm

I use mbpoll for debugging/logging modbus data.
http://www.modbustools.com/modbus_poll.html
These users thanked the author EtsDriver for the post:
LeighM (Tue Dec 13, 2016 3:56 pm)
Rating: 5.88%
 
Ill just keep the good work up!

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1003
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 419 times
Been thanked: 472 times
Contact:

Re: MIAC - MODBUS

Postby Steve001 » Tue Dec 13, 2016 8:39 pm

These users thanked the author Steve001 for the post (total 2):
EtsDriver (Tue Dec 13, 2016 8:49 pm) • LeighM (Wed Dec 14, 2016 9:24 am)
Rating: 11.76%
 
Success always occurs in private and failure in full view.

SAutoMotive
Posts: 5
Joined: Thu Jul 31, 2014 2:21 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: MIAC - MODBUS

Postby SAutoMotive » Wed Dec 14, 2016 9:23 am

Hi Steve,

Thanks!

Yesterday I found this program and it was very useful!
These users thanked the author SAutoMotive for the post:
Steve001 (Wed Dec 14, 2016 9:48 pm)
Rating: 5.88%