Author Topic: RS485  (Read 6305 times)

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
RS485
« on: October 29, 2010, 10:40:58 PM »
Hi. How do I use my laptop to read data from slave MD888 if I'm connected to master MD888 using RS232? Do I need to set any pin on slave PLC to let it become slave?

Thank you

Regards
Ken

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #1 on: October 29, 2010, 11:23:12 PM »
You can't read the data from the slave PLC when your PC is connected only to the master, unless the master retrieve the data from the slave PLC via another communication link (such as RS485). However, the master has to be program to periodically retrieve the data from the slave and save insides its data memory to make them accessible to the PC.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:RS485
« Reply #2 on: October 29, 2010, 11:41:18 PM »
Hi. thanks for the quick replay.

1) Can I retrieve slave PLC data using excellink when I'm connected to master PLC using RS232? Both are connected by RS485.

2) Can the data memory of slave PLC be read to master PLC?

Thank you.
« Last Edit: October 30, 2010, 12:31:43 AM by can »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #3 on: October 31, 2010, 09:23:01 AM »
No. There is no way for the PC connected to the master's RS232 port to communicate with the slave PLC. It is not setup for such "tunneling" of messages that you suggested regardless of whether it is TRiLOGI or ExcelLink.

The master certainly can read the DM data from the slave into its own DM. You can use the NETCMD$ command or READMB2 command for the master to access data in the slave.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:RS485
« Reply #4 on: October 31, 2010, 07:32:39 PM »
Thanks for the reply. If the laptop is using Auto485 to connect to the 2 MD PLC, can the laptop be used as master and read the DM data from the 2 slave PLC?


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #5 on: November 01, 2010, 09:37:44 AM »
Yes, all the PLC can be wired as RS485 slaves to a PC as master and the PC and read/write to any PLC using host link commands.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:RS485
« Reply #6 on: November 01, 2010, 09:20:31 PM »
Hi. After reading a lot about netcmds and readmb2, I still do not quite understand them. What should the command be if I want the slave to write the HSC and DM to the Master DM and vice versa? Is the DM and HSC updated realtime or will there be a delay?

Thank you.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #7 on: November 02, 2010, 07:39:11 PM »
Master is the one that send command to the slave. The slave respond to the command with a return message.

NETCMD$ is used to send ASCII Host link command from Master to Slave and it returns a string that you need to interpret and extract data using TBASIC.

Please follow the example "RemoteIO-M-series.PC6" in your "samples" folder for an example.

READMODBUS or READMB2 automatically extract the actual values from the slave response and install in the memory location in the master. It is slightly easier to use but only limited to 16-bit variables.

See MODBUS.PC6 sample program for explanation.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:RS485
« Reply #8 on: November 03, 2010, 09:11:09 AM »
Hi. All the examples seem to be controlling the digital IO only. Any examples that control the DM?

Regards

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:RS485
« Reply #9 on: November 03, 2010, 11:03:00 AM »
For NETCMD$, please refer to the User's Manual for the Host Link command. The example shows you the way for reading the digital I/O, you have to modify the example if you want to access other data.

For READMODBUS and READMB2, check the Modbus mapping table to see where DMs are located in the Modbus address.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS