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!.
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!.