×
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

Sending host commands from SLC505 to ultra 3000 drive via ascii port

Sending host commands from SLC505 to ultra 3000 drive via ascii port

Sending host commands from SLC505 to ultra 3000 drive via ascii port

(OP)
Hello all!!

I need to send host command to an allen bradley ultra 3000 servo drive via r2-232 (ascii port). the command i want to send is to set the speed of the drive.

The speed data must  be a hexadecimal number that is 8 characters long and has to then be inserted into a string along with node, command, function and data value in the complete string

example
Drive address = 00
Command = 06D --- speed
Function = 1
Data = 00012EBC (see below)
Command string = :0006D100012EBCcc (cc = checksum value)

the checksum value has to be figured out also, this can be done i believe by using the interger to ascii convert function in rslogix 500 software, then adding up all the ascii totals (from above)

0006D100012EBC
ASCII value: 48+48+48+54+68+49+48+48+48+49+50+69+66+67= 760
then
Subtract 760 from 256 256 – 760 = – 504
Convert – 504 to hexadecimal: – 504 = 0xFFFFFE08 - taking the last 2 digits (08)
(is there a function to convert ascii value -504 back to hexadecimal)

then...

to set the drive to a speed of 500 RPM, we must
perform the following conversion:

The encoder i am using has 2000 lines or 8000 counts/revolution
1 RPM = 8000 counts/minute or 155 counts/second
500RPM = 77,500 counts/sec
Convert 77,500 to a hexadecimal number
77,500 = 0x12EBC
Since i have to send 8 characters for the rpm value, 3 zeros in this example (or the remaining amount of characters have to be filled in with zeros) have to be put in front of the value to make it 8 characters example: 00012EBC
How do i convert the decimal value to hexadecimal and then add the zeros in front of the hex value?


after each component of the string is calculated and figured out!! can the different components be added to the string individually??

Drive address = 00
Command = 06D
Function = 1
Data = 00012EBC
checksum = 08
Command string = :0006D100012EBC08

has any body done this before?
Thanks for the help in advanced!!

RE: Sending host commands from SLC505 to ultra 3000 drive via ascii port

Yes, only I did it with the Controllogix and Compactlogix.  Never with an SLC.  But I think I missed your question beside if anyone had done this before.

----------------------------------
TW Controls - http://www.twcontrols.com

RE: Sending host commands from SLC505 to ultra 3000 drive via ascii port

(OP)
Sorry TWControls,

The 4 questions i have is:

1) After calculating the rpm needed to send to the drive, how did you convert it to hexadecimal and after getting the hexadecimal value how did you add the zeros in front of the hexadecimal value to make that value 8 characters long.


2)after i get my complete command string and its time for me to figure out the checksum, what is a good method of getting the ascii value for each character?? after getting all the ascii values, the host communication manual from ab says to add them together then subtract 256 to get your checksum value.


3) how to i convert the checksum which i believe would be in ascii to hexadecimal,


4) how do i retain only the last 2 digits/or the digits excluding the FFFFFEEE junk?




do you have an example you could show me. It would be much appreciated!!

Thanks in advance

RE: Sending host commands from SLC505 to ultra 3000 drive via ascii port

You've got it.  But make your structure in a string file then insert your speed and checksum.

In other words you will start with a string containing
:0006D1

Then insert the hex equivalent of your velocity set point and your checksum in your empty structure.  It works better for me

----------------------------------
TW Controls - http://www.twcontrols.com

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