PLC5 Integer to HEX (Ascii)

Coops

Member
Join Date
Dec 2004
Posts
103
Hi Fella's,

GOt a problem with a PLC5, I have an integer number....lets say 1234 for example, and I need to convert this to a HEX number and store it in a ASCII file ready for transfer.

I cant seem to find any instruction to do this, or part of it. As i would need to extract the numbers indivdually and convert them to a hex value. Hmmmm....reading this back through it now seems easy, well maybe. If I convert the number to a string and then extract each individual number and adda value of 48 to them this should give me my result.

Back in abit off to try it. Always seems easier once you have written it down, LOL!.
 

Similar Topics

Hello, I am converting to iFIX 6.1 and talking to a PLC5. I have several TX tags that were looking at N32 addresses in the PLC5 and were getting...
Replies
4
Views
2,944
Hi Friends! How many words are in an Integer in PLC5/04 Processor? In an INTEGER Say N10:0, N10:1, N10:2, N10:3..........N10:x WHAT IS THE...
Replies
4
Views
1,934
Good morning. I have a question regarding AB PLC5. We have a AB PLC5 Processor (1785-L40E Rev B) in our plant with an existing running program on...
Replies
10
Views
4,479
Hello! I have a question that I can't seem to find a solution to here on the forums. I am working on an evaporator system where there are several...
Replies
12
Views
8,592
I have noticed in one of our PLC5 programs there is a copy instruction that copies a integer into a floating file. The integer value being copied...
Replies
17
Views
9,173
Back
Top Bottom