Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can text and convert dec to binary

Solved!
Go to solution

i am trying to convert the text file numbers (dec) into binary

and use those values to decode it.

can someone help me..

i am facing some issues because its 2d array?

can someone help me one this..

 

0 Kudos
Message 1 of 8
(4,205 Views)

Convert to binary text? Or a numeric. Assuming LabVIEW, with a numeric, you can just change the display options.

 

'facing issues' is extremely vague. Details.

 

What 2D array are you talking about?

 

Why did you post to this board?

Message 2 of 8
(4,197 Views)

sorry, i was looking at this forum for VISA and usb and i forgot to change it before I post the questions.

i have the results.txt.

I just want to convert those string to numeric to binary numbers.

i tried it by doing this..but I was getting a 2D array instead of 1D array like the text file.

Is there a reason why?

 

0 Kudos
Message 3 of 8
(4,186 Views)
Solution
Accepted by topic author Giangliang

The All Rows output of Read From Spreadsheet is supposed to be a 2D array. You just need to use the Index Array function to get column 0.

 

Look at the attached modification.

Message 4 of 8
(4,183 Views)

whoa...your vi works on 8.5

but i tried the same on another computer running 7.0 and i didnt get the binary numbers, i only got the decimal number?

0 Kudos
Message 5 of 8
(4,179 Views)
It would if you had used my VI in 7.0 or if you had set the format & Precision for binary display
0 Kudos
Message 6 of 8
(4,168 Views)

oh..i didnt know that..

that works...

hmm..

sorry to borther with your time..

but the reason why i am donig this because i want to use those values in this form.

 

how would i transpose it to 

that form? in a continous fashion instead of one frame at a time.

i also want to count the number of bits when the numbers are converted to binary.

i think it should come out to be something like 1728 bits...

i hope it is because its what i am looking for..i have never worked with binary and bits before in labview so i am very lost in this sense.

 

Message Edited by Giangliang on 04-02-2009 04:28 PM
0 Kudos
Message 7 of 8
(4,166 Views)

i got this...

but I am not sure its right..

it has enough bits, i think..

but i am not sure unless i put the bits in the order as indicated above..

0 Kudos
Message 8 of 8
(4,152 Views)