Author Topic: Using the E10+ PLC as remote I/O for the Nano-10 PLC.  (Read 14047 times)

Hermes

  • Newbie
  • Posts: 6
  • I'm a llama!
    • View Profile
Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« on: February 17, 2011, 05:41:32 AM »
I recently purchased the Nano-10 starter kit and use the sample program to control the digital outputs remotely using the sample web page and i-Relay.PC6 program that was provided.  I need additional outputs so I purchased the E10-Relay+ and connected the two devices using the RS485 ports with a short cable.  I purchased the iTriLOGI software for the Nano-10 but not the WinTriLOGI for the E10+ because I did not think it is needed if the E10-Relay+ is only used as a slave device.

I cannot establish communication with the E10-Relay+.  I read that each PLC must be given a unique ID. I try to have the Nano-10 (master) send commands to the slave using the ?NETCMD? statement but I don?t know the ID of the E10-Relay+.

Is there a simple application example or some instructions which will tell me how to use the E10+ as a slave and how to program the Nano-10 and/or modify the sample HTM files so that I can toggle both the Nano-10 outputs and the E10-Relay+ outputs remotely from the internet using a single web page?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #1 on: February 17, 2011, 08:29:03 AM »
Note that the E10-Relay+ default baud rate is 9600 bps whereas the default baud rate on the Nano-10 RS485 port is 38,400bps. You need to change either PLC to match the other so that they can communicate using the NETCMD$ command.

You can write a custom function on the Nano-10 that runs either every scan of the ladder program or triggered by a clock pulse. This custom function can map the E10-Relay input to the Nano-10 internal relays and map the Nano-10 extra outputs to the E10-Relay+ outputs. This way you just have to change the unused  output on the Nano-10 and the PLC automatically updates the corresponding output on the E10-Relay and any changes on the input to the E10-Relay+ will be updated on some Nano-10's internal relays.

For sample programs on how to do the remote I/O mappings, please refer to the application notes page as follow:

http://www.tri-plc.com/appnotes/AppnoteMain.htm
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Hermes

  • Newbie
  • Posts: 6
  • I'm a llama!
    • View Profile
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #2 on: February 17, 2011, 09:16:11 AM »
Thanks for the quick response.
Do I also need to know the default ID of the E10-Relay+ when using the NETCMD$ command?  I don't know what the ID of the E10-Relay+ is now.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #3 on: February 17, 2011, 02:52:02 PM »
The default ID is either a 01 or a FF.

You can use the TLServer Serial Port Setup screen to check the ID of the E10-Relay+ if you have a USB-RS232 or USB to RS485 adapter. First change the baud rate to 9600, then enter "IR*" and the E10-Relay+ should respond with the ID of IR01* or IRFF*. You can also change the ID and you should use a different ID for the master and the slave PLCs.

However, you won't be able to use the i-TRiLOGI software to program the E10. It wouldn't work at all.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Hermes

  • Newbie
  • Posts: 6
  • I'm a llama!
    • View Profile
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #4 on: February 18, 2011, 07:54:25 PM »
I used the TLServer Serial Port Setup screen and the RS485 adapter to check the ID of the Nano10 PLC and was able to check it and change the id of the Nano10 from 01 to 02.  When I hook the RS485 adapter to the E10-Relay+ and enter the "IR*" command, the E10-Relay+ responds with yR01*.  I can't figure out why it responds with yR01* and not IR01*.  I still can't seem to communicate correctly with the E10 Relay+.  I am pretty sure I have the baud rate at 9600, 8,n,1.  Any suggestions?


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #5 on: February 20, 2011, 02:59:40 PM »
It appears that your E10-Relay+ does have an ID = 01. Normally we use the WinTRILOGI software (the E10-specific software) to read/change ID but since you did not order the WinTRiLOGI software I was suggesting you use the TLServer instead to test it although it is not designed to work with E10.

Can you configure your Nano-10 with a different ID, then use a HyperTerminal software or any other serial terminal emulator software set to 9600,8,n,1 and monitor the U-485 serial port and record the communication between the Nano-10 and the E10-Relay+ over the RS485 cable.

You can write a simple program with an input to trigger a custom function and send a simple command from Nano-10 to E10-Relay+ using the NETCMD$ command. When you touch the input the Nano-10 should send the command string and E10-Relay+ should send a response string. Both strings can be monitored on the HyperTerminal window which is the best way to see what's going on between two devices communicating over RS485.

[Editor's Notes]

1) Try to send "@01IR00*"  and see if the E10-Relay+ will return "@01IR015B*"

2) We have tested using TLServer to connect to an E10-Relay+ and we are able to obtain a good "IR01*" response from the E10-Relay+ PLC. So there may also be a possibility that the RS485 driver on your E10-Relay+ could be partially damaged (wrong connection to 24V DC can damage the driver). If the driver is partially damaged then it could lead to difficulty in communication so the HyperTerminal test we suggested would shed some light on the comm issue.

The RS485 driver can be easily replaced since it is a socketed part. A compatible part number is 75HVD3082, LT1785 or SN75176.


« Last Edit: February 21, 2011, 12:30:29 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Hermes

  • Newbie
  • Posts: 6
  • I'm a llama!
    • View Profile
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #6 on: February 23, 2011, 08:46:07 PM »
When I send ?@01IR00*? the E10-Relay+ returns ?@01IRO15B*?.

I have not replaced the chip yet, but I was successful communicating somewhat with the E10-Relay+.  I would still like to confirm it is not something I am doing wrong.  I have some more data that may help you confirm what the problem is.

Here are input states and responses when I issue the command: @01RI0000*
inputs 1 through 4 all off: Response= @01RI005A* (so 0000, is 00, ok )
input 4 is on: response= 01RI0852* (so 1000, is 08, ok)
input 1 and 4 are on: response= 01RI0953 (so 1001, is 09, ok)
other combinations provided the predicted responses for the inputs.

When I issue the output command: @01WO0000* it turns off all 4 outputs and returns @01WO59*
When I issue the output command: @01WO0059* it turns on outputs 1 and 4 and returns @01WO59*.  (I don?t understand this.  What does 59 represent?)
When I issue other output commands I get the same error code always.
I am not successful with write commands.

I also loaded a small program in the Nano10 PLC and issued the same commands as above using the NETCMD$ statement.  I was able to make the E10-Relay+ do the same thing as when issuing the commands from the TLServer.

Do you recommend replacing the RS485 driver?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #7 on: February 24, 2011, 05:20:57 AM »
Your WO command is missing the data and the PLC interpretted the FCS (59) as the data which led to wrong outcome.

When you issue "@01WO00nnff*, nn is the data. ff is the FCS.

So to turn on output 1,3,5,7 you can issue "@01WO005559*"

To turn on output 2,4 only, you can issue "@01WO000A28*"

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

Hermes

  • Newbie
  • Posts: 6
  • I'm a llama!
    • View Profile
Re:Using the E10+ PLC as remote I/O for the Nano-10 PLC.
« Reply #8 on: February 25, 2011, 05:25:06 AM »
Thanks for all of your help.  I can now use the E10-Relay+ as remote I/O of the Nano10 via a PC over the internet!