Author Topic: RS485  (Read 17000 times)

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
RS485
« on: November 27, 2007, 01:07:29 PM »
Hi Again All,

I have an array of 3 T100 PLC's (soon to be expanded to 5) for bench testing with later install into a large RS232 network.

To save programming time I would like to use a RS485 network. I have purchased a MOXA Uport 1130 USB to RS485 converter. This has been set to Com9 and RS485 2 Wire. I have connected this to the first PLC/s RS485 port along with 120 ohm (2 x 240 in parallel) terminating resistors.

For the life of me I can't get the TRIlogi program to connect to the PLC. The server opens the port OK but I don't know how to test an RS485 network from there the IR* command obviously doesn't work as it is a network.

Is there anything else I should be doing, e.g., links on PLC, etc.

Do I need the gnd connection? The distance is only 1 m.  I currently have R+(D+) and R-(D-) connected to the + and - RS485 ports respectively. I have tried every combination of polarity and gnd connection with no success.

Any help is once again appreciated.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #1 on: November 27, 2007, 06:30:20 PM »
First of all, each PLC must be set with a unique ID. You can do this from within TLServer Serial Port Setup screen. You will have to do this one at a time using the RS232 port.

Once each PLC has its own unique ID, then when they are linked together to the PC with the USB-RS485 converter, you should try to test each PLC ID from within TLServer first.

E.g.   if you have three PLCs: 01, 02,03

Try to send the following command one at a time:

@01IR00*
@02IR00*
@03IR00*

If you get a response from each PLC then your setup is working fine. When you try to use TRiLOGI to address to each PLC, simply enter the ID of each PLC at the login screen and not use the "Detect ID" button. You will then be able to switch from one PLC to another from the same TRiLOGI program.

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

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
Re:RS485
« Reply #2 on: November 27, 2007, 07:01:11 PM »
Thanks for the assistance.

Unfortunately it still seems to be no go. After playing around a bit more it appears that the 485 converter is transmitting but not receiving.

However I can measure a voltage change when I would expect the PLC to respond but the converter doesn't flash its Rx LED.

To test this I wrote some code to send a modbus command once per second from the PLC and could measure V change across RS485 but the converter is still unresponsive.

Have you had any experience with converters not being compatible? The differential voltage is 5V when measured at the converter with no PLC. When measured at the PLC it is 1 V with no converter?????

Thanks.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #3 on: November 27, 2007, 08:45:28 PM »
Is the RS485 adapter setup for  two-wire mode communication?

We have not tried a USB to RS485 converter before and cannot say for sure if it will work. The only connection that we guarantee to work is to connect to the PLC's RS485 via the Auto485 adapter. In that case you connect the PC's RS232 port via the Auto485 to the RS485 bus of the PLC and it should work immediately.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
Re:RS485
« Reply #4 on: December 06, 2007, 05:26:30 PM »
Hi support,

I received my Auto485 today and it worked immediately off my PC's serial port.

But, I ideally want to be able to use my laptop so i can reprogram in the field. As my laptop doesn't have a serial port I need to use a USB to serial converter. I have tried to use a Prolific USB-RS232 converter which then goes to the Auto 485 and it just won't work.

Do I need to change any jumpers on the Auto 485? Have you tried with USB-Serial converters before?

I would have thought this would have been a common situation amongst automation engineers.

Thanks.

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
Re:RS485
« Reply #5 on: December 06, 2007, 06:00:56 PM »
Whoops, posted too soon.

I forgot that I was setting only comm1 to 9600 Baud but comm3 was still at default of 38400.

Duh!!!

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #6 on: December 06, 2007, 09:34:10 PM »
Yes, Auto485 can work with USB to RS232 adapter. We have been using such a setup in our own premises for some time already. I presume after setting the correct baud rate everything should work out well.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
Re:RS485
« Reply #7 on: December 07, 2007, 02:27:16 PM »
Yes thanks all has worked well.

Apart from spending half an hour trying to get comms with my SCADA to work with the PLC. This turned out to be another Duh! moment where I forgot that the PLC ID is in Hex and the SCADA works in decimal.

That begs the question....why does the PLC ID need to be entered in HEX. Can't the interface perform a conversion on the users behalf?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #8 on: December 07, 2007, 02:39:40 PM »
There are many users who want to play with the host link commands from TLServer serial port setup screen. The ID used in the hostlink commands are in HEX. It is therefore much more intuitive for the user to define the ID in HEX and not in decimal.

E.g. To read the inputs from the PLC, they can enter:

   @25RI0000*

In the above case the ID of the PLC is 25 Hex. Imagine if we ask user to enter the ID in decimal - that would means that the user must define the PLC  ID as 37 decimal (25 Hex equivalent) and yet have to enter the host link command using "@25" -  that will be more confusing for the users. Hence the use of Hex notation when defining ID.

 ;D
« Last Edit: December 07, 2007, 02:41:44 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

ccdubs

  • Full Member
  • Posts: 116
    • View Profile
Re:RS485
« Reply #9 on: December 08, 2007, 03:50:02 PM »
Thank you for the explanation.