Sign in to follow this  
Followers 0
monkey

writing my own DF1 driver

3 posts in this topic

Hello, I am writing my own DF1 driver for a robot to communicate with Allen Bradley devices. I am starting with the SLC family because that is what I use most. I have successfully handled the Link Layer programming and have so far integrated two commands for reading and writing directly to and from SLC memory using "protected typed logical read/write with three address fields" This works great for any word addresses ie. integers,timers,counters - you name it. I just can't figure out how to write a single bit. I don't see any command in the DF1 manual that is compatible with the SLC's and writes a single bit. BUT.... It is obviously possible because I set single bits all the time with panelview programs. And yes, they are using DF1 full duplex protocol!! Can anyone offer an explanation of how this is accomplished?? Any help would be appreciated

Share this post


Link to post
Share on other sites
I cannot explain why A-B gave up on the DF1 protocol manual after about 1996, but they did. The SLC-500 single-bit write technique isn't described in that book. They way I think it works is that you're never precisely writing a single bit; instead, you're writing a word with a mask. Use the Protected Typed Logical Write with Mask command; That's Command 0x0F, function 0xAB. It's just like the Protected Typed Logical Write w/ Three Address Fields except that it adds two bytes for Bit Mask. CMD = 0x0F STS TNSW [byte Size] [File No.] [File Type] [Element No.] [subelement No.] [bit Mask] Data Again the bit mask is two bytes, low byte first. Bits =1 in this mask designate bits affected by this write command. I wish there was an updated and corrected DF1 manual. I dug this out a couple of years ago while troubleshooting a 3rd party driver.

Share this post


Link to post
Share on other sites
Ken, Thanks very much for the helpful (and speedy) information. I am glad I asked! Thanks again, Monkey

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0