DF1 protocol - Micrologix 1200

fed007

Member
Join Date
Feb 2004
Posts
3
Hello y'all PLC experts!

here should be an easy question for someone to answer...I have a Micrologix 1200 and I am writing a web interface for. (writing Java DF1 driver)

I am sending the Micro an embedded DF1 (PCCC) command through Ethernet. (I have a NET-ENI). This is working. I am able to send echos, diagnostics request, and likely other DF1 commands however I am on the task of reading the status of the inputs.

I am having a problem with the Open File command, (only CMD byte and bytes after are req for EIP/PCCC), I am a bit confused about the protection bit, I have not set protection on any files explicitly. Does AB protect files from DF1 read by default?

at any rate here is what I am doing...

my command: 0F 00 FC 26 81 01 01 00 49

translates: (Command 0F)(STS 00)(TNS FC 26)(Function 81)(Protection "Read" 01)(File Number 01 00)(File Type 'I')

remember it's little endian... I am targeting the Data File I1

So my DF1 Response is as such...

my response: 4F F0 FC 26 0B

translates (4F ignored) (STS F0)(TNS FC 26)(EXT STS 0B)

soooo what does that tell me? if I trace it in the DF1 manual it says STS=F0 means look at the EXT byte, and that tells me 0B=Access Denied/Privilege Violation

I won't ask why the STS EXT byte reflects an error code in a DH-485 table but rather am I making the proper request to open the input file?

thanks in advance to anyone who can help!

Once I can open the input file I expect I can use the protected read to get my data.
 
The goal is to use the protected read however I must open the file first and receive a Tag Id back correct?

I notice that the CIF (Common Interface File) is what unprotected read support states to access BUT in SLC 500 it is implemented as a protected read. so rather than target the input file I tried to target that CIF file (N9)


I am now getting the same response when I target that file, am I targeting the file incorrectly?

DF1 Open file syntax

[COMMAND][STS][2 TNS bytes][FNC byte] [protection byte , "read", "not supported", "r/w" repsectively 01,02 or 03][file number - two bytes][file type]

my command looks like
0F 00 [2 tns bytes ] 81 01 09 00 4E

4E='N' thus file type/number N9

(for the record I tried 7 too)

Argghhh! I am SOOOO close to achieving what I need to

Thanks for the Reply ROBO, hope you can continue to help

Thx
 
Last edited:
HA!

I got it, turns out I can do an unprotected read, The default target of that command on the Micrologix 1200 is CIF N9 (knew that , but didn't know how to address it properly with DF1)

I had to create that file first, next I attempted addressing for the word (element) and not the value 9 itself.

And voila!- no Access Denied /Privilege Violation. AND my data appeared that was copied into the respective elements of the N9 integer file.

Now I can do anything - within a few hours I'll have all the data from the PLC streaming to my cell phone. :) - not joking :)

I am still interested in why I was unable to do a protectd read. More importantly why it would fail at the Open file step. Note that I never attempted the actual prot. read because I never had a successfull response from the open file request. The DF1 manual stated I needed a two byte "TAG" value returned from an open file request to pass into the protected file read command.

Can I somehow ignore the TAG bytes? I saw some posts from Peter Nacht'asomething that talked about the command with reference to the "TAG". At any rate I would like to understand how the protected read could be executed.

Today is Saturday, I am going to program All day cause I love it! Thats what super geeks do!

ttyl
 
Last edited:

Similar Topics

Hello everybody. I am currently trying to retrieve the Integer data file values from a micrologix 1200 via VB6. I have constructed a string that...
Replies
7
Views
15,037
I have to load a project to a PLC 5 processor via DF1 protocol. I have a laptop with a PCMK card in it with the 1784-PCM5/B Cable. I have to...
Replies
4
Views
2,338
Guys/ Gals Have an application where I am using DF1 protocol on a compactlogix to communicate with a radio device. The plan is to read date (no...
Replies
1
Views
1,653
I am looking for a way to view/edit the program in a SLC 5/02. Currently I am using the 1747-UIC to do this but I would like to be able to do this...
Replies
2
Views
2,592
Currently I test the communication with AB SLC500/04 using DF1 protocol.I find that the communication is ok when CPU is in program mode .while I...
Replies
5
Views
2,680
Back
Top Bottom