취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

How to convert a string to binary?

Hello!

We wonder if there is a VI for converting from a string to a binary number?

Best regards!
0 포인트
1/12 메시지
6,557 조회수
In the String palette there is a Num/String conversion sub-palette.
Use the decimal string to number VI.
Right click the indicator you get from this VI, and select Format & Presicion.
Select Binary on the left.
If you want to get a boolean array, there is the number to boolean array VI in the boolean palette.

___________________
Try to take over the world!
0 포인트
2/12 메시지
6,546 조회수
Hi,

Within the string palette is a string to U8 array.

Regards
Ray Farmer
Regards
Ray Farmer
0 포인트
3/12 메시지
6,546 조회수
Hello!

Thank you for your answer. Now we wonder how to be able to use this binary number in VI-s that comes after this? Cause when we do as you suggest we only have an indicator. Then one can´t pick out the numbers. We want to pick out bit number 0 and 1 for example from the binary number we get in the indicator.
Thank´s for your kindness 🙂
0 포인트
4/12 메시지
6,539 조회수
As I suggested earlier, use the number to boolean array VI.

___________________
Try to take over the world!
0 포인트
5/12 메시지
6,536 조회수
By the way, Ray's suggestion is for converting an ASCII character into a number. Mine was for converting a "1101001010..." string into a number. In both cases, after you get the number, you can use the number to boolean array VI and you'll get a 1D boolean array in which each element is a bit.

___________________
Try to take over the world!
0 포인트
6/12 메시지
6,532 조회수
I'm sorry, I seem to be having tremendous difficulty with my lifestyle.
I guess I'm a bit sick, almost everything I wrote until now was pure rubbish.
To compensate, I wrote a small VI to do what you asked, but with the way I'm feeling, I'm probably going to find out that there's a better way to do this.
Anyway, Here's the VI.

___________________
Try to take over the world!
0 포인트
7/12 메시지
6,523 조회수
Or like the attached.
0 포인트
8/12 메시지
6,521 조회수
Hello!

We are very greatful for your help. We might come back 🙂

Best regards!
0 포인트
9/12 메시지
6,494 조회수
Hello again 🙂

Your VI-s has helped us a bit but now we need answer to another thing. We explain the whole problem for you and if anyone would like to give any tip we are greatful.

Here we go: For example we have a string (ASCII-format) that is 1A (two bytes and hexadecimal) that we want to convert to binary. Then we have another string that is for example 1B. This one we want to convert to binary and then pick out two of the bits and put together with the 8 bits we get from the first cinversion. Then we have a ten bits binary number that we want to convert to a decimal number. Is this possible to do? We got a little help of your VI-s that convert to boolean but we have a string that is as we explained now. Have anyone got a tip for us? 🙂 Thank you.
Best regards
0 포인트
10/12 메시지
6,484 조회수