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!

*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.

Jobs

High Byte, Medium High Byte, Medium low byte, Low Byte

High Byte, Medium High Byte, Medium low byte, Low Byte

(OP)
Im new at this whole programming thing, i am using a slc505 (ab) to send data to an ultra3000 servo indexing drive (on devicenet). I want to send the index count value from the plc to the servo drive via devicenet, but the drive has the value seperated into 4 bytes, high, high medium, low medium, low, how do i break up the interger value in the plc into these 4 bytes (thats my first question), my second question is how can i merge two bytes from the drive into 1 word in the plc or 4 bytes from the drive into 1 long interger in the plc!! please help, thanks!! jtwan

RE: High Byte, Medium High Byte, Medium low byte, Low Byte

1st you can define under the device net config words that are passed to the drive and to the slc. I believe you can set this up in words and bytes. Been awhile since I did slc but I think the slc only supports 16bit words and not 32 bit words.

If you want to move certain bytes into certain other bytes on the drive, use this command

Bit field distribute BTD?

Read the help on it makes it more clear than me explaining it by memory.

Source you can define the starting bit and how many bits to transfer

Destination you can define the starting bit and where the starting bit is transferred to in that word.

Have fun!

RE: High Byte, Medium High Byte, Medium low byte, Low Byte

(OP)
in a slc505 there are double integers DINT those are 32bit (2 words) arent they controlsdude?? the high and middle high bytes would be considered the high word ( like an n7 file in a slc505) and the low and middle low byte is considered the low word (like a second n7 file in a slc505)

please help!! thanks

RE: High Byte, Medium High Byte, Medium low byte, Low Byte

Like I said its been 10 years since I touched a slc500. If there is then as an example

32 bit or DINT example
N7:0/0 to N7:0/31

16 bit or INT example
N7:0/0 to N7:0/15

I thought if its a devicenet uses M0 and M1 words.
I would think that the servo would be dint but I am not reading a manual. You read the manual.

Looked manual looks like there is no BTD, I would be use a combination of
MVM this command will mask out the part of the word you don't want
move this over to a temp word, then move the temp word into the servo drive area of memory.
then
use COP or MOV to move the data from one word to the next drive area of memory.

RE: High Byte, Medium High Byte, Medium low byte, Low Byte

Oh forgot if you want to shift part of your word over to another byte then use

BSL or BSR instructions

RE: High Byte, Medium High Byte, Medium low byte, Low Byte

(OP)
thanks controlsdude, your input was very helpful!!

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


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close