×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DH+ in C

DH+ in C

DH+ in C

(OP)
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

RE: DH+ in C

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.

RE: DH+ in C

(OP)
MacBeth;

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

Jeff

RE: DH+ in C

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.

RE: DH+ in C

I would like to look at this code too. Could you, pls e-mail to rlevkovsky@inovec.com.

TIA

Rafail.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources