LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to split binary stream ?

Hello !
I am wondering that what is the fastest technique to split a binary stream
coming into to serial port. Data comes in two byte packets from
microcontroller .The binary stream have data from four devices. The binary
string conversion methods seem to be quite slow ?
Or are they ?
0 Kudos
Message 1 of 3
(3,075 Views)
Hi Jack,

Its hard to answer your question without a great deal of specifics. I will try to answer in general. There are two things you want to watch out for when designing an interface of this sort. First, you do not want to move the data around more than is required. This means take the string returned from the interface and store it in a shift-register or something similar. All subsequent processing can then be done by selecting only that portion of the data that you need to deal with at the moment.

The second thing to remember is that boolean data types are I32's. I genearlly wait until the very last moment to convert strings to booleans.

If you could provide the format of the packets and what types of data is being passed, we may be able to suggest more s
pecific answers.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(3,075 Views)
> The second thing to remember is that boolean data types are I32's. I
> genearlly wait until the very last moment to convert strings to
> booleans.


Actually, Booleans in LabVIEW are stored as bytes. Still bigger than
when packed into strings or an array of bytes, but not as large as I32s.

Greg McKaskle
0 Kudos
Message 3 of 3
(3,075 Views)