Author Topic: Interface to datalogger using RS485  (Read 11493 times)

DLUN

  • Newbie
  • Posts: 18
    • View Profile
Interface to datalogger using RS485
« on: January 20, 2010, 02:03:19 PM »
I am trying to interface a DC100 data collector to my F1616 PLC.

I have my F1616 PLC connected to my computer through the RS232 port and have successfully programed it many times. I recently connected the data collector to the F1616 PLC via the COMM 2 port (RS 485).

I have two questions.

First, how do I get the address (RS485) of my data collector and how do I test communications with it.

Second, if I want to program my PLC to collect information from the data collector, what commands should I use.

Thank you.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Interface to datalogger using RS485
« Reply #1 on: January 20, 2010, 09:51:05 PM »
First you have to find out the protocol that your data logger uses. If it is a Modbus protocol then you can use the TBASIC READMODBUS to read data from the data logger.

But if the data logger uses a proprietary protocol, then you will have to format the Command string that it expects to receive and send to the data logger, then it will respond with response string. Your program will need to interpret the returned response. There are a lot of TBASIC commands that can help you do that.

You data logger may or may not use an ID, that you have to find out from its manual or talk to the data logger's tech support.

You can using the PRINT #2 and INPUT$(2) to send and receive from the data logger, or you can use the NETCMD$ with special terminator to do it. Please refer to the sample program where we use a M-series PLC to talk to I-7000 analog module. The same programs are located in the "\TRiLOGI\TL6\usr\samples\I-7000" folder.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS