Convert two 8-bit decimals (combined) to hexadecimal in RSLogix5000

keristos

Member
Join Date
Aug 2011
Location
Malta
Posts
65
I really need your help here!

I have a Decimal Number that is being transferred in 1-byte words. The original number is larger than 1 byte though, some being 2 or 3 bytes long.

Now the problem I'm having with this is that to convert to HEX I need to combine the separate words together, which I managed to do successfully. After this a conversion to HEX needs to be done.

I have no idea how to do this in Ladder logic, I've tried the division by 16 and remainders methods in ladder but I can't seem to be able to get it working.

Thank you
 
You are confusing a method of storage (possibly in multiple bytes) with a method of display (hexadecimal as opposed to octal, binary or decimal).

Can you give an example what the information looks like, possibly in a byte (SINT) array, and what apperance you would like in the end?
 
Last edited:
As is always the case with me posting questions on forums, I managed to solve the problem and as you said, its a problem of storage. I changed the storage value from decimal to Hex and worked on the values that way.

I was trying to continue after someone else's work and I was led to think in the wrong way :)

Thank you anyway!
 

Similar Topics

First post here, hopefully not breaking any rules. I am working with a Redlion G3 HMI (yes, I know). I have a series of string tags that I am...
Replies
17
Views
4,081
Hello, First, please excuse my question I am new to Modbus. I have a CX-5140 control unit from Beckhoff and an instrumentation device that...
Replies
3
Views
3,124
Hi all, Going to use a ML1400 to talk to a Krohne gas meter via Modbus. Krohne's totals come as doubles (64-bit floats). I was wondering if...
Replies
5
Views
4,703
Hey all, I've reviewed many threads regarding converting one data type to another and I have something I'm working on that I'm stumped on and...
Replies
9
Views
5,922
Hello all, I wonder if someone might have some insight on how to convert a 16 bit Integer value into an 8 bit array in Crimson 3. Example...
Replies
5
Views
3,458
Back
Top Bottom