LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you split a byte in 8 bits?



@mukkel wrote:
The type cast 4X doesnt work how i wanted. If i placed that one it sends 2 bytes thats 1 to much Smiley Wink

This does not sound right. Could you attach an example showing the 2byte behavior.

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 11 of 19
(1,978 Views)
Here is a pic you c that the bytes verzonden (bytes send)  in the tcp write block shows the value 2
Also on the server i recieve 2 bytes.
 
The VI is a attachment too..
 
 
 

Message Edited by mukkel on 09-14-2005 06:48 AM

0 Kudos
Message 12 of 19
(1,967 Views)
Yes, you're right. The help actually mentions that it uses 2 bytes at a time. You could just trim the string to the right lenght.

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 13 of 19
(1,949 Views)

Firstly, sorry for my english. I hope you will understand what I want.

 

I have similar problem like author of this topic. But I don't want boolean on the end but I want to see 8 bits (for example: 1000101). I have array whit bits in numbers and now I don't know what to do next. Looking for solution for almost a day and I can't find what I'm looking for.

 

I need this for parity bit check. Unless I can check parity without single bit.

 

This is how my array looks

biti.jpg

0 Kudos
Message 14 of 19
(1,113 Views)
You can simply right click and select Display Format and then choose binary. The display format is irrelevant to calculating parity so you better explain what you really need.
0 Kudos
Message 15 of 19
(1,099 Views)

@arozma wrote:

But I don't want boolean on the end but I want to see 8 bits (for example: 1000101). I have array whit bits in numbers and now I don't know what to do next. Looking for solution for almost a day and I can't find what I'm looking for.


In computers, everything is "bits", one way or another, so "bits in numbers" does not give any useful additional information. Please explain in more details.

 

If these are integers, all you need to "see" the bits, is change the display format to binary. No code needed.

 


arozma wrote:

I have similar problem like author of this topic.


No, your problems is not similar. Also, the existing thread is  seven years old. Try to start a new thread next time.


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 16 of 19
(1,097 Views)

It is usually better to start a new thread than to post to one which is 8 years old.

 

Use Index Array to get the last element.  The wire the output to Number to Boolean Array. That will give you a boolean array of 8 elements (assuming that your data is U8).

 

You can use the Rotate with Carry function in a loop to evaluate parity without converting to boolean. Whether it is faster, I have not checked.

 

Lynn

0 Kudos
Message 17 of 19
(1,090 Views)

Compliments of the season to you all.....

0 Kudos
Message 18 of 19
(1,077 Views)
@Dennis_Knutson wrote:
You can simply right click and select Display Format and then choose binary. The display format is irrelevant to calculating parity so you better explain what you really need.

Thank you. This is what I needed. I didn't know that is so easy. 

 

Yes I'm new in Labview programing so sorry for may stupid questions. 

 


@johnsold wrote:

It is usually better to start a new thread than to post to one which is 8 years old.

 

Use Index Array to get the last element.  The wire the output to Number to Boolean Array. That will give you a boolean array of 8 elements (assuming that your data is U8).

 

You can use the Rotate with Carry function in a loop to evaluate parity without converting to boolean. Whether it is faster, I have not checked.

 

Lynn


Ok. Next time I will start new thread. I tod that is beter to use old thread for questions like was mine.

 

Thank you for parity check example.

0 Kudos
Message 19 of 19
(1,044 Views)