Pages: [1]   Go Down
Author Topic: PLC with MEGA using modbusmaster library  (Read 408 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello  friends

i have  a little problem using modbusmaster library

i am trying to communicate my ALLEN BRADELY MAKE MICROLOGIX PLC-1400 and arduino MEGA2560 using modbus protocol

so i have make my ARDUINO as modbus master and PLC as modbus slave

so now i have following hardware
PLC
arduino MEGA 2560
RS-232 TO TTL CONVERTOR
 my channel setting as per i have attached is 4800,n,1,8
and id is 2
i have attached the screen shot of that
now my problem is that i am able to connect both device as i can see on my channel that messages are sent and messages are received
but on comm port of my arduino strangely i received some unexpected characters
 so i think that i cannot use the same port i.e i cannot use the onboard usb to TTL chip. The master does not echo this back to the PC terminal via the on board ftdi chip so i need to forward the data to the another serial port in this case (i am not sure this is what i think)
so how should i achieve this using this library
 i tried to use serial.println function but not succeed

I have attached the screenshot of all my settings
can anyone help me regarding this??
i want to use the function 1,2 and 5 of modbus protocol

waiting for your reply
thanks in advance

* PLC communication WITH MEGA.rar (327.87 KB - downloaded 16 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
I am passionate about electronics, industrial and home automation. Love DIY stuff
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
I would suggest you to check whether your PLC communicates through RS232... many PLCs I know uses RS485, and this maybe is the cause of your issue...

elle
Logged


Pages: [1]   Go Up
Jump to: