Splitting Hex Value

garlantm

Member
Join Date
Aug 2016
Location
Michigan
Posts
28
Hello All,

I need some more clever help with a problem. I am using Revision 30 RSLogix but having a problem. I need to be able to send a value to an object that requires the number 0-10000 split up in a high byte and low byte in hex. So for the number 5000 (decimal)= 1388 (hex) I need to get 13 into the high and 88 into the low. I will include a picture below.

Thank you for the help!

pic1.JPG
 
I'm guessing that you don't need to do that. You can just send the Hi/Low byte over in decimal and that's not that hard if you have to brute force it with bunch of XIC-OTE. There's probably a more elegant solution though.
 
Mispeld is exactly correct; this is the ordinary byte order for the COP instruction.

The Length of the COP instruction should be "2" because the Length is the number of destination array elements (not bits, bytes, or words).

COP_16_to_8.PNG
 

Similar Topics

I'm working up this temperature deviation stuff for a plant and fist I'll say what I've done, and then an idea that someone mentioned to me (which...
Replies
8
Views
7,364
I am close to wits end and would appreciate any new perspective. Cannot go into minutia, but here is a rough rundown of the system and issue we...
Replies
26
Views
9,199
I have to take a 16 bit N register and split some of the bits into separate integers. example: Bits 0-1 = integer with a value from 0-3 Bit 2 is...
Replies
22
Views
5,811
Would it be wise / safe to split a 24vdc input from a switch to a PLC and relay? I currently have 14 of the same type of equipment that each have...
Replies
2
Views
1,515
Any one know of way to split a 4-20 mA signal 4 ways? Do they even make such a device? Thanks
Replies
12
Views
3,610
Back
Top Bottom