Convert + Swap values from dec to hex

AmazingTrans

Member
Join Date
Nov 2005
Location
Illinois
Posts
38
Gurus,

I have a question for rslogix 5000, is there any command that can convert dec to hex value and then swap the bits around?
For example:

22000(dec) -convert-> 00035B60(HEX) -swap-> 03 00 60 5B

any idea what is the best solution for this?

Thanks
 
It will take some work, but I would suggest trying a BTD or MVM command on the source tag to setup seperate tags for each octet, then rearranging in the order you prefer back into a destination tag.
 
That is the great thing about this forum. I have never used this function and didn't find it during a quick view of the instruction help. I always learn something new hare.
 
You don't need to convert the value from decimal to hexadecimal, you just view it differently by changing the view radix in the RSLogix 5000 tag database.

Mark is right on with the Swap Bytes (SWPB) instruction in "High/Low" mode. That swaps the bytes of the High Word and the Low Word of a DINT tag individually.
 

Similar Topics

Hello all, I'm currently working on a servo motor linear positioning system (ball screw). I'm all set up regarding communication between my HMI...
Replies
1
Views
79
I have an application using an incremental encoder and then I convert it to degree (0-360) using calculation program. For a while, the calculation...
Replies
7
Views
226
Hi all. Me again still learning Rockwell. So I'll be polling an INT data array from a Modbus SE power meter with a L82 (with a Modbus ProSoft in...
Replies
56
Views
1,336
Hello, could someone kindly convert the attached RSP files that are currently used for SLC 5 PLC into PDF please
Replies
6
Views
516
I'm trying to convert an RS Logix 500 fille when I open the 500 file and try to "save as" a .slc file, it does not allow it. It says " SLC library...
Replies
7
Views
680
Back
Top Bottom