AB Micrologix 1400 PLC has a DB9 port which supports RS232 protocol.So the Connections are PLC <---> RS232 Cable <---> RS232 to TTL converter <---> Arduino (0,1)(Rx,Tx)Yes but it's because my SoftwareSerial doesn't work!
re reply#11, there is no such thing as a software serial monitor.
Your hand drawing does not agree with the pic in the link.
Get rid of the useless delays in the program shown in the .jpg appended to reply #15.
Then bidirectional character transmission should work, but if not, try swapping the wires connected to pins 2 & 3.
I have gone back to Hardware Serial, removing SoftwareSerial from the picture.
The delay(50) is because PLC is sending data at every 50 milliseconds. And I send just ONE Character from PLC so ARDUINO should perfectly match with that.
No, you do not need a delay.
you should be able to use that verbatim, and the real problem is understanding how to use it.
Maybe configuring the serial port (stop/start/parity bits) is necessary
Actually I was following the Nick_Pyner's suggestions from #2 & #4.
#define DF1baud 9600#define DF1format SERIAL_8N1
I don't understand this, can you please elaborate on that one?
The link you provided had some code from the manufacturer, using hardware serial. Why don't you use it?
So finally I think I need to buy a new original uno and test again.