09-21-2018 03:58 AM
THIS IS WHAT I AM TRYING TO ACHIEVE..
INSERTED NUMBER = 1
OUTPUT = 001 <I HAVE DONE THIS.. THE PROBLEM IS...
INSERTED NUMBER = 11
OUTPUT IS = 00C <BECAUSE OF NUMBER TO HEXA STRING FUNCTION.
THIS IS WHAT I WANT TO APPEAR
011
AND SO ON 012........100....101
09-21-2018 04:26 AM
Hello,
i need to know ur final data (001, 002,.. 010, 011,.. 100, 101,..) should be in number or string?
S Boopathy Raja
09-21-2018 04:35 AM
Convert using Number to Decimal String Function with width as 3
Then replace Space with 0,
Then you will get the expected Result.
09-21-2018 05:06 AM
Even Change of Properties of a Numeric Control/indicator will help you.
09-21-2018 06:32 AM
Post the code you have.
You're not describing if you're visualizing strings or numbers. That kind of things are pretty important for understanding your problem (and our answers).
09-21-2018 06:56 AM
@1der-er wrote:
THIS IS WHAT I AM TRYING TO ACHIEVE..
INSERTED NUMBER = 1
OUTPUT = 001 <I HAVE DONE THIS.. THE PROBLEM IS...
INSERTED NUMBER = 11
OUTPUT IS = 00C <BECAUSE OF NUMBER TO HEXA STRING FUNCTION.
Why use number to Hex String at all???
Use "format into string" with the correct "format string" and you are done:
Regards, Jens
09-21-2018 07:36 AM
@JensG69 wrote:
Why use number to Hex String at all???
![]()
Because...
it works on 1D arrays. And 2D arrays. And clusters. And Arrays of cluster. And cluster of arrays. And... Well, you get the point.
It's a bit faster too.
Format Into String is usually the end point, as it's much more flexible. But not always. I'd slightly prefer Number to Hex String over Format Into String, if it fits the job.
09-21-2018 08:37 AM
wiebe@CARYAFormat Into String is usually the end point, as it's much more flexible. But not always. I'd slightly prefer Number to Hex String over Format Into String, if it fits the job.
But it (ie Number to Hex string) does not do the job - in this case.
09-21-2018 08:45 AM
@JensG69 wrote:
wiebe@CARYAFormat Into String is usually the end point, as it's much more flexible. But not always. I'd slightly prefer Number to Hex String over Format Into String, if it fits the job.But it (ie Number to Hex string) does not do the job - in this case.
True, the Number to Hex String won't work if you don't want hex string.
The answer to "why use Number to Hex String at all", in the general context, still applies. (Just crawling back from my Friday afternoon mistake ).
09-21-2018 08:48 AM
@JensG69 wrote:
wiebe@CARYAFormat Into String is usually the end point, as it's much more flexible. But not always. I'd slightly prefer Number to Hex String over Format Into String, if it fits the job.But it (ie Number to Hex string) does not do the job - in this case.
Correct. And the Number To Decimal String will fill the string width with spaces instead of 0s. So Format Into String, or even Format Value, inside of a FOR loop would be the way to handle arrays to get what the OP is asking for.