Go Down

Topic: PLC with MEGA using modbusmaster library (Read 752 times) previous topic - next topic


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
arduino MEGA 2560
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


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...


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131