Author Topic: PLC to PLC Comm Stopped Working  (Read 15003 times)

rbatta

  • Newbie
  • Posts: 11
  • I'm a llama!
    • View Profile
PLC to PLC Comm Stopped Working
« on: February 08, 2014, 01:02:11 PM »
Hi -

I've been using RS-485 to communicate between two PLC's.  Basically, I ran out of Outputs on my FMD-10 PLC and used the RS-485 port to write outputs to my old T100MD.  It's a straight run of about 4' of twisted pair between each 485 port.  In a 1 second scan on the FMD, I have the following code:

WRITEMODBUS 13,1,16, OUTPUT[1]
RELAY[5] = READMODBUS(13,1,0)

My FMD-10 is ID#3, and my slave is ID#1.  There is no comm code running on the slave.  I'm not using a SETBAUD command either.  This has been working fine for months, until I added an additional Output on the slave PLC today.  Once I power cycled the slave PLC, the comms stopped working all together.  I tried using the SETBAUD command to ensure the baud rates were the same on each PLC.  No luck.  

I've also tried changing ID's, reading different registers, etc.  It just seems like the comm port stopped working.

Both PLC's run their intendant programs without issue.  Again, it's been working for months and the only thing I did today was add another output relay on the slave PLC.

I've been reading forums and reference material all day, I'm at a lose.  Any feedback would be appreciated.  





 


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PLC to PLC Comm Stopped Working
« Reply #1 on: February 08, 2014, 09:15:31 PM »
First check if the RS485 port on the master and the slave PLC is working properly. You can test them using a USB-RS485 adapter such as the U-485 (http://www.triplc.com/u485.htm) or if you only have a RS232 port on your PC you can use a RS232 to RS485 adapter such as the Auto485 (http://www.triplc.com/auto485.htm).

You can use TLServer to check the working state of the RS485 port. (For the master PLC you will need to stop the PLC from sending data out of the RS485 port so that it does not interfere with TLServer). If the RS485 port is not working you will need to replace the RS485 driver chip (SN75HVD3082 or LT1785).

If both RS485 port is working properly, but cannot communicate with each other, then you may want to use the PC software (such as HyperTerminal or RealTerm) to tap onto the RS485 bus to monitor the commands and response between the two PLCs. That is usually the most effective way of troubleshooting what is wrong in your program.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

rbatta

  • Newbie
  • Posts: 11
  • I'm a llama!
    • View Profile
Re:PLC to PLC Comm Stopped Working
« Reply #2 on: February 16, 2014, 08:20:13 AM »
Thank you for the advice.  I used the USB-RS485 adapter to attempt direct communication with each PLC and to monitor RS-485 network traffic.  Using the TL Server app, and connecting directly between the PLC and RS-485 USB adapter, I was not able to communicate with either PLC.  The "IR*" command returned "(Warning: No Response from PLC!)"  This happened on both the older T100MD and the new FMD-10.

So, following your advice I networked them together and used Putty to monitor the network activity.  See attached text file.  With both PLC's attached, the traffic was all over the place.  When I disconnected the FMD-10, and left the T100MD connected, the traffic seemed to follow a more uniform, repeating pattern.

This is my first experience in reviewing 485 traffic, so I really don't know what I'm looking at, but I would guess the FMD-10 485 driver is faulty.

Looking forward to your feedback, thanks again.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PLC to PLC Comm Stopped Working
« Reply #3 on: February 16, 2014, 11:14:42 AM »
What you captured suggest that your PC baud rate is not the same as the PLC. Did you set your communication program (Putty) to the same baud rate as the PLC?

Your first post suggested that the T100MD+ PLC is the slave and FMD88-10 is the master - is that correct?

If so, then when you connect your PC to the T100MD+ PLC ONLY (without FMD connected) you should not be seeing data appearing on your serial port monitoring software. It appears that the T100MD+ is sending data out of its RS485 port.  If both PLCs are sending data out of the RS485 port then communication will not work properly.

Can you turn ON DIP switch #4 and power cycle the T100MD+. That ensure that the PLC starts up without running any program. Then check that TLServer is set to 38400 bps, 8 data bit, 1 stop bit and no parity and then try the "IR*" command again out of the COM port where the USB-RS485 is assigned. If  you can a response then the T100MD888+ PLC's RS485 port is working.  You can also do the same test on FMD PLC to see if you can get a response as well.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

rbatta

  • Newbie
  • Posts: 11
  • I'm a llama!
    • View Profile
Re:PLC to PLC Comm Stopped Working
« Reply #4 on: February 16, 2014, 12:38:27 PM »
Hi, thanks for the quick reply.

Yes, the PC and Putty are set to 38400,8,n,1.  When I power cycle the FMD with DIP Switch#4 ON, I get the same gibberish on the comm monitoring program (Putty).  Still cannot get a response on TLServer to IR* command.  Same "Warning: No Response from PLC"

Yes, I had some testing code I forgot about in the T100MD+ that was sending out modbus traffic on COMM3.  I removed the code and confirmed no communication was being sent with Putty.  I power cycled the T100MD+ with DIP Switch #4 ON,  Still cannot get a response on TLServer to IR* command.  Same "Warning: No Response from PLC"

The FMD was acting as the master, using the READMODIBUS and WRITEMODBUS commands to manipulate and read inputs on the T100MD.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PLC to PLC Comm Stopped Working
« Reply #5 on: February 17, 2014, 08:44:52 PM »
Sounds like either both the RS485 driver on the two PLCs are not working, or the the USB-RS485 converter you have is not working. Is there a way for you to test your RS485 converter on another device or PLC?

Since you mentioned that the RS485 communication was working previously between the two PLCs and all of a sudden it stopped working, there may be a possibility that the RS485 drivers on both PLC are some how damaged (exposure to 24V DC or higher voltage can kill the driver chip). Try to replace the driver chips on both PLCs and test again.  A recommended part number is LT1785AIN8 which is a more robust version of the RS485 driver chip. Other alternatives are SN75176 and 65HVD3082.



Email: support@triplc.com
Tel: 1-877-TRI-PLCS

rbatta

  • Newbie
  • Posts: 11
  • I'm a llama!
    • View Profile
Re:PLC to PLC Comm Stopped Working
« Reply #6 on: February 22, 2014, 01:22:35 PM »
Replaced the IC - everything is working fine now.  Thanks for the help and advice.