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
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
please help!! thanks
RE: High Byte, Medium High Byte, Medium low byte, Low Byte
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
BSL or BSR instructions
RE: High Byte, Medium High Byte, Medium low byte, Low Byte