LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture and manipulate rs232 binary data

Hello, I am very new to lab view 7 and I need to do the following for work. I am using the rs232 serial port on the computer to communicate with a prototype circuit. The communication is a simple 8bit (byte) of 1's and 0's to and from the computer. How do I take this byte and sepearte it to individual bits, so I can display the results in the front panel? I would need to both create the byte from 8 individual controls then concatinate the bits, and send through the serial port. Also take the byte from the serial port and seperate the individual bits. Thanks alot for any help I can get in pointing me in the right direction.
0 Kudos
Message 1 of 6
(3,855 Views)
Message 2 of 6
(3,855 Views)
Wow, thank you very much for the quick reply, it is exaclty what I needed. I am not quite sure what the "data read" and "data out" function is. It works perfect, but it is magic to me.
0 Kudos
Message 3 of 6
(3,855 Views)
They are just clusters of Booleans. In the string to Data Out, the binary string is converted to a number, the number to a Boolean array, and then an array to cluster. The bottom is the reverse with cluster tot array, Boolean array to number, number to binary string. I could have skipped the cluster parts and just used arrays but I've found it beneficial for users to look at clusters because then you can rearrange the elements like I did with bit7 overe on the left. If you expand an array to show 8 elements, the least significant bit is the first element in the array and that is displayed over on the left.
0 Kudos
Message 4 of 6
(3,855 Views)
Ok, great thanks again.
0 Kudos
Message 5 of 6
(3,855 Views)
Use Number to Boolean array.

"jorge" escreveu na mensagem
news:506500000008000000BCC70000-1079395200000@exchange.ni.com...
> Hello, I am very new to lab view 7 and I need to do the following for
> work. I am using the rs232 serial port on the computer to communicate
> with a prototype circuit. The communication is a simple 8bit (byte)
> of 1's and 0's to and from the computer. How do I take this byte and
> sepearte it to individual bits, so I can display the results in the
> front panel? I would need to both create the byte from 8 individual
> controls then concatinate the bits, and send through the serial port.
> Also take the byte from the serial port and seperate the individual
> bits. Thanks alot for any help I can get in po
inting me in the right
> direction.
0 Kudos
Message 6 of 6
(3,855 Views)