Unprotected Read in PLC-5

laisp

Member
Join Date
Mar 2013
Location
Brampton Ontario
Posts
11
Hello All, I just have a curious question in regards the driver our software developer is working on I have been tasked with figuring out the PLC side of things. Unfortunately I am unable to figured this out from the Manuals.

Could someone please explain to me how to calculate the address field in the screen captures attached? I have no clue how to calculate the address for PLC-5, thank you so much in advance!

Unprotected Read.jpg Logical_Addressing.jpg
 
I have to ask - what are you trying to do?
If it is just read and write data to the PLC from a computer system, why not just use OPC software? Why reinvent the wheel?
 
There are a few open source DF1 implementation out there that can be used as a reference. Since you are using unprotected reads, I'm guessing you are trying to make it work with PLC5s.

This is one, but it does not work with PLC5:

http://sourceforge.net/projects/abdf1/

Some are bundled with HMI/SCADA packages, so you will have to do a little digging.
 
I have to ask - what are you trying to do?
If it is just read and write data to the PLC from a computer system, why not just use OPC software? Why reinvent the wheel?

Well my company is developing their own software to communicate with PLCs only with read/write of tags, or elements, everything works fine in SLC, Mircologix, and Contrologix using protected read/write, however PLC-5 does not work at work and some processors doesn't support it, so we are developing the unprotected protocol for our drivers section, and I am suppose to provide the PLC section of it, so the software guys can work it out, and I have no clue where the address is coming from, how is it converted hope that answers your question! Thank You for reading.
 
OK, Why not use logical ASCII addressing instead of logical binary addressing?
See page 13-15 of the DF1 protocol and command set manual your jpg were taken from.
 
Hi,

I guess I am confused as to what you are asking.

Examples are given in the DF1 protocol manual at 13-12.

Basically it is a method to encode/decode an address like N7:98 or T4:23.ACC.

level 1 0 (data table)
level 2 file number
level 3 element number
level 4 sub-element number
 
Hi,

I guess I am confused as to what you are asking.

Examples are given in the DF1 protocol manual at 13-12.

Basically it is a method to encode/decode an address like N7:98 or T4:23.ACC.

level 1 0 (data table)
level 2 file number
level 3 element number
level 4 sub-element number

I am basically trying to figure out what does the address field stands for? Like what is that exactly on 7-31

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1770-rm516_-en-p.pdf

How would I execute a unprotected read command in DF1 to PLC-5? It doesn't explain what ADDR comes from??? The other ones I know already, hope this clarified things?
 
OK, Why not use logical ASCII addressing instead of logical binary addressing?
See page 13-15 of the DF1 protocol and command set manual your jpg were taken from.

1774-PLC, PLC-2, PLC-3, PLC-5
Reads words of data from any area of PLC and PLC-2 data table
memory. In PLC-3 and PLC-5 processors, the data is read from the
PLC-2 compatibility file. Use the SIZE field to specify the number
of bytes to be read. To specify a number of PLC words, SIZE should
be an even value because PLC words are two bytes long. Data bytes
are transferred low byte first. The address of a word should be even.
C CMD
01 STS TNS ADDR SIZE
R STS TNS CMD
41 DATA (max. 244 bytes)

Basically confused as to what to do, let's say I would like to perform unprotected read at 'N10:0/12' in PLC-5, what would be the ADDR field be entered as in decimal? Because it's a world value, and it takes two words.

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1770-rm516_-en-p.pdf

Refer to 7-31
 
Hello,

>ADDR comes from???

You form ADDR for the data you want to read. ADDR is an encoded field. It is not just a single number.

>Because it's a world value, and it takes two words.

No, ADDR takes whatever byte/word count for the address level you are using. Just because the picture has ADDR as two blocks <> two words or two bytes.

Did you look at 13-12, it gives examples? One is for N7:30. 13-11 explains the mask and levels.

Generally, reads are not to the bit level so you would need to read N10:0 and mask off the bit yourself.

For N10:0 ADDR would be 3,0,10,0 = 3 levels, 0 datatable, 10 file, 0 element/word.
 
I think the confusion is coming from the fact that you're trying to do an UNPROTECTED READ function.

This communications command goes way back to the PLC-2 and 1774 controller in the late 1970's. These had a flat memory file that wasn't broken up into data tables with specific data types like the PLC-5 and SLC-500 data tables.

The address value for an unprotected read is just the offset from the beginning of the data file.

You'll find that the PLC-5 doesn't have a default "this file is the PLC-2 compatibility file". You need to specify in the PLC-5 configuration an Integer file (like N7, or N10, or N20, etc) that will be used by the PLC-5 to answer Unprotected Read commands.
 
Hello,

>ADDR comes from???

You form ADDR for the data you want to read. ADDR is an encoded field. It is not just a single number.

>Because it's a world value, and it takes two words.

No, ADDR takes whatever byte/word count for the address level you are using. Just because the picture has ADDR as two blocks <> two words or two bytes.

Did you look at 13-12, it gives examples? One is for N7:30. 13-11 explains the mask and levels.

Generally, reads are not to the bit level so you would need to read N10:0 and mask off the bit yourself.

For N10:0 ADDR would be 3,0,10,0 = 3 levels, 0 datatable, 10 file, 0 element/word.

Thanks for your reply, I can try to connect it this way see if I can get any reply back I did read through the exams but was unsure how to enter the values, I should enter these as byte or word ? Because it depends
for S:2/8 = 0 (default) word addressing is used
for S:2/8 = 1 byte addressing is used
What would be LSB? I guess I could try both.

Addr.jpg
 
Hello,

>as byte or word ?

It shows on the left top of your red box - Byte.

If the byte is greater than 255 then prefix with FF. It is all defined in the manual.
 
Your question was specifically about the Unprotected Read command, which is DF1 Command Code = 1.

It's described on page 7-31 of the DF1 user manual, which is your first screenshot in your initial post. That is all the information in the manual because that's all the Unprotected Read does.

You cannot use the Unprotected Read to read any other data file except the one you have designated as the PLC-2 compatibility file.

A lot of the other posts are not about the Unprotected Read function, but rather about other addressing modes used by different DF1 commands.

If you want to pursue a different command and figure out which one is most appropriate for your customers installed base of PLC-5 controllers, it makes sense to take up that topic separately.
 
Last edited:
Hello,

Ken is correct. I did not look at the read because I thought you just wanted to know about logic addressing.

In your first jpg:

In PLC-3 and PLC-5 processors, the data is read from the PLC-2 compatibility file.

So, the ADDR is a word that should be even, from the start of the file.
 
Hello,

>as byte or word ?

It shows on the left top of your red box - Byte.

If the byte is greater than 255 then prefix with FF. It is all defined in the manual.

I have found the explanation see attachment now I am just wondering what is the special file I am suppose to create?

Please advise thank you all!

Addr_PLC5.jpg
 

Similar Topics

Hello everyone, I'm working with an old ACM3710 device and I'm encountering an issue with the data frames I'm sending over an RS232 connection...
Replies
5
Views
680
Hello, I am using a Digi One IAP and CompactLogix PLC to read some Modbus registers from a Kohler Generator. Things are working, except when I...
Replies
1
Views
1,231
I am attempting to use a ControlLogix processor and a Digi One IAP, to read from several Modbus RTU slaves(GE Multilin motor protection relays)...
Replies
7
Views
6,611
Hello All, I wrote a code to execute the unprotected read for DF1. I created two Long (32 bits)data files numbered 9 and 10 where file 9 (L9)...
Replies
4
Views
2,663
Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
130
Back
Top Bottom