Author Topic: Communication  (Read 7628 times)

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Communication
« on: January 29, 2003, 08:59:38 AM »
Hi Leon,
I connected the rs485- optic fiber converter, that you check. I have this funtion.

'Map Relay 33-48 from Slave#2 (MO#3) to Relay 1-16 in Master
'-----------------------------------------------------------

C$ = NETCMD$(3,"@02RR04")      'Read Slave#2 relays 33-40
IF LEN(C$)=0 RETURN: ENDIF      'Not getting response
DM[100]=HEXVAL(MID$(C$,6,2))      'Keep the value temporarily.

C$ = NETCMD$(3,"@02RR05")      'Read Slave#2 relays 41-48
IF LEN(C$)=0 RETURN: ENDIF      'Not getting response
DM[101]=HEXVAL(MID$(C$,6,2))      'Keep the value temporarily.

RELAY[1]= (DM[101]*256)+DM[100]

But it doesn't change the status of the relay 1 at the master. When I monitor the master PLC, at the variable c$ some time shows me values like @02R004.
and the dm[100] sometimes change the value such as -6,4,-48.
I don't know how to solve this problem.
Philip
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re: Communication
« Reply #1 on: January 30, 2003, 05:46:40 AM »
It didn't sound as if you are getting a response from the slave.

1) First of all, have you defined the slave to be of ID=02? Use the TLServer 2.0 change ID button to do it.

2) Are the two side talking on the same baud rate? The default RS485 port on the M-series is 38.400 bps and on the T40H-Relay is 9600 bps.  You have to use "SETBAUD 3,3" to change the M-series RS485 port to 9600 bps.

You should obtain a full returned string from the slave the ends with the FCS and * characters. Otherwise, what you get seems to either come from other part of program code or an echo back from the RS485, not a real response.

Try to use a simplest program so that you can issue a single NETCMD$ every time you activate a certain test input. That way you have a chance to see if you have received a valid response from the slave and not be affected by the potential effect of other program fragments.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Re: Communication
« Reply #2 on: January 30, 2003, 10:47:05 AM »
Can I connect the server directly to the rs485 using a RS232-RS485 converter?
So, I could access directly to the H-PLC.
I changed the program at the master T100MD with the H-serie example that you have, but right now I don't have any communication. At the RS485-Fiber converter, I have only the TX led flashing, the RX led is off. is like the H-PLC is not responding.
Philip
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re: Communication
« Reply #3 on: January 30, 2003, 08:22:48 PM »
You may be able to use TLServer to send host link command to H-series PLC for testing purpose only. However, you can't use the Internet TRiLOGI 5.x to program the H-series because the compiled codes are different.

If you using TRiLOGI version 3.3 for the H-series, I would suggest you use the "IWnn*" command in the "Controller->Host Link Command" to change the PLC's ID to nn, where nn = 00 to FF.

Anyway, what is your slave T40H-Relay's ID? You should be able to find that by entering "IR*" command. The "RemoteIO-Hseries.PC5" program assume that the slave ID = 01 so you have to check that it is indeed the case.  

We have tested the FC485 and it works flawlessly with the T40H-Relay as slave and T100MD888+ as master. However, you may want to temporarily not use the FC485, but use directly wiring between the master and slave and get it to work first. Thereafter you can connect up the FC485 easily for further testing.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Re: Communication
« Reply #4 on: January 31, 2003, 07:55:27 AM »
Leon,
Do you remember the connection that you use when test the RS485-Fiber converter? They have 3 terminal screws. one (+), one (-) and the last one is marked with (C). I don't know if the C should be connected to ground. I check the master T100MD connected directly to the H-slave and it works properly. But, when I try to connect them trought the fiber optic, they don't have communication however the Tx and Rx leds are bipping (on, off).
Philip.
« Last Edit: December 31, 1969, 04:00:01 PM by -1 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re: Communication
« Reply #5 on: January 31, 2003, 08:20:13 AM »
1) Did you connect power to the FC485?
2) Check to make sure that you have connected the "+" and "-" terminals correctly to the PLC.  
I don't exactly remember it because it was quite sometime ago. But I don't think it is important to connect the "C" terminal. You may like to call RE Smith to ask them questions. Also make sure that the fiber are properly connected. It should work.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS