Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DH+ in C

Status
Not open for further replies.

jlada

Electrical
Oct 4, 2002
14
0
0
CA
Communicating to A-B processors seems to be an issue.

I wrote a subset of the DH+ protocol (in C) based on A-B's own documentation. The intent was to read and write to a few registers in an SLC 1500, which it does well enough. A few years ago i wrote the Omron Host Link protocol (also in C) and figured that DH+ was going to be as simple. Wrong. I spent at least two weeks getting it that far. Mind you, since most of the ground work has been done, it wouldn't take too much time to add additional functions. The code is set up for iether BCC or CRC checksum and will recognize all the possible fault conditions coming back from the processor, for example.

In retrospect, i would use A-B's own Interchange library (which the customer had already purchsed). It's bound to be more robust and certainly more complete.

If anybody's interested, i could cut and paste the functions together. Be forwarned - i use a lot of globals. Bad programming practice, i know. If you're into 'proper' style, you'd have to rewrite to pass more parameters...

Jeff
 
I think you are confused about things here. It sounds as if you are trying to use a comport to get on a peer to peer net work. If you are useing DH+ you need not be concrnd about BBC or CRC for the DH+ hardware does that already for you. If you are trying to do this with out the hardware suck as a KT card, You can not.

If I were you try useine DF1 protocal.
 
MacBeth;

You're absolutely right - i meant DF1 protocol. I hadn't look at the code in a while. Sorry for any confusion...

Jeff
 
I would be very interested in getting the code for AB DF1 protocol that you have developed. If you could please email it to jduke1@cinci.rr.com, I would be greatly appreciate it. I have been looking for some example code for along time. I'm especially interested in how you developed the CRC calculations, and if you used a lookup table.
 
I would like to look at this code too. Could you, pls e-mail to rlevkovsky@inovec.com.

TIA

Rafail.
 
Status
Not open for further replies.
Back
Top