LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change four-digit number into four, single-digit arrays?

Solved!
Go to solution

Using LabVIEW 2010, is there a way to change a four-digit integer (DBL, SGL, whatever) into an array of four, single-digit integers of the same type? Wasn't sure if there was a way to extract a number from the thousands place, hundreds place, etc...

 

-Ian

0 Kudos
Message 1 of 4
(2,535 Views)
Solution
Accepted by topic author iyeager

Quotient remainder (modulus math) in a for loop using 10 as the denominator autoindex the remainder out of the loop, loop 4x.  There are numerous quick ways to do this.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 4
(2,532 Views)

Convert to string, pick out each character piece by piece in a loop converting each character back to a number.

 

But I would rather use Paul's method.

0 Kudos
Message 3 of 4
(2,526 Views)

I knew there was a simple answer I was overlooking. Thanks.

 

-Ian

0 Kudos
Message 4 of 4
(2,518 Views)