R/W on PLC5 through ASCII & RS232

jeffroman

Member
Join Date
Oct 2005
Location
Louisville, KY
Posts
8
I was curious if anyone had experience connecting directly to a PLC through serial, and reading/writing tables with ascii commands from the instruction set.
 
Greetings jeffroman,

and welcome to the forum ...

yes, some of us have the experience you're asking about ... if you have a specific project in mind, give us some details and we'll try to help ...

just to get started: do you know how to use HyperTerminal? ... that's usually the easiest way to test and debug the PLC programming that's involved ...
 
Last edited:
Thanks Ron,
Yes I do know how to use HyperTerminal. The project I have in mind is creating a real time analysis system for trending information. What I would like to do is directly request values from the PLC through the serial port, using HyperTerminal for example. I just need a little guidance on how to read and write values at addresses. Any help would be greatly appreciated. Thanks again.
 
Time is money

I think in the long run you will be off better to purchase a copy of RSLinx single node edition (around $400-$450) and use DDE and Excel. The cost of the software will be more than offset by the time savings.
You can still use the serial port for you data exchange, but you will not have to do all the programming that ASCII requires.


Just a thought.

Ken
 
Last edited:
I don't think you realize the magnitude of your task. You will have to program the PLC to convert the integer, bit, and floating point data you require to ASCII strings, and then send them to the serial port. You can't jsut send a "read" command via ASCII and get any value in the PLC's memory area.

When you said
It's absolutely essential that I communicate through the serial port natively
You didn't mention ASCII, so you may be able to do something using DF1. Search the site, for "DF1 driver".



Ken
 
thats ok, im just wondering what a typical command that can be issued through the hyperterminal. lets assume that all values im working with are integers.
 
If you are going to read limited number of data from the PLC5 then
you will not need to use DF1. You can switch the PLC5 Channel 0 to
User (ASCII) from System (default). Then you use built in ASCII read / write instructions to move data in and out. Other ASCII instructions will enable you to manipulate and convert ASCII data.
These instructions always start with A so take a look at them.
However if you are going to read lots of data for your analysis then I suggest that you should use a DF1 driver. I don't have one for free for PLC5 I only have one for Micrologix and slc500 on my
web site I think that you will have to buy it somewhere. There are many DF1 drivers on the market. If you are going to use .NET framework make sure that DF1 driver is capable of
working with it.
 
Greetings jeffroman,

What I would like to do is directly request values from the PLC through the serial port, using HyperTerminal for example. I just need a little guidance on how to read and write values at addresses.

just as a thought ... would the following approach work for you? ...

rather than writing into the serial port to request a value, suppose that the serial port simply spits out the values of a series of addresses ... for example:

123, 234, 345

suppose that these numbers always report the values of N7:0, N7:1, N7:2 ...

if this approach would work, then your task would be much simpler ... you could just use the appropriate ASCII commands to build the string - and to write it out through the serial port on a regular schedule ... if that would work, I can write the code for you - if you need that level of help ...

if you really do need to be able to request "randomly located" data from the PLC by writing into the serial port, then the problem is MUCH MUCH more complicated ...
 
ron,
For the most part, that would be great. The majority of my program would just sample various addresses a set rate. However, I also need the ability to rewrite a set point for processes. Something simple like resetting a temperature setpoint for example.
 
...However, I also need the ability to rewrite a set point for processes. Something simple like resetting a temperature setpoint for example.

If DDE is not for you (I assume you understand DDE/OPC, this would be my first choice) then you should look at DF1. Here is an official link at AB: http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1770-rm516_-en-p.pdf

Problem with ASCII that this is unreliable method.
Data can be corrupted during transfer very easy. DF1 has some checks to prevent and minimize this.

Really I would not waste time for monumantal task of writing own DF1 driver and look at DF1.
 

Similar Topics

I have a PLC5/80E that I want to poll a Modbus device into using a Digi1. I have setup the message as a multihop going to the IP adress of the...
Replies
2
Views
1,432
First time trying this particular combo. ML1400 and PLC5 over radio. Initially I used 2 PLC5's and set them up to talk across the radio link and...
Replies
20
Views
5,865
I understand that the sidecars don't support CIP, so I don't think I can initiate a message from the CLX in this case. (I tried PLC5 Typed Read...
Replies
13
Views
4,032
Hello, I'm a new user here. I'm using a PLC5/40E to send & receive messages from a dozen or so outlying PLCs. There mostly PLC5s but a few SLC500s...
Replies
6
Views
5,051
A customer has a PLC5/40 that has a 1761-NET-ENI (series C) connected to the DF1 communication port. They have an old Panelview HMI connected on...
Replies
2
Views
4,669
Back
Top Bottom