LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Read

Hi,
I am using Serial Read.vi to read 25 bytes of a device, this it is OK.
Now, as I do to verify each byte and later each bit.
How can I make this?
All help always well apreciated.
Tanks
Roby
0 Kudos
Message 1 of 4
(2,672 Views)
Hallo, Roby,

Du meintest am 07.12.99 zum Thema Serial Read:

> I am using Serial Read.vi to read 25 bytes of a device, this it is
> OK. Now, as I do to verify each byte and later each bit.

What do you mean with "verify"? You should tell how you detect "right" and
"wrong".

Viele Gruesse!
Helmut
0 Kudos
Message 2 of 4
(2,672 Views)
Using Serial Read.vi,I have the following reads string. (HEX)
Example: 8000 0134 0145 00FF
My document of the Programer Guide, define as:
80 1. byte is Syncronize Start Packet
00 2. byte is Version Protocol
01 3. byte is Revision Protocol
34 4. byte is information 1
01 5. byte is information 2
45 6. byte is information 3
00 7. byte is information 4
FF 8. byte Syncronize End Packet
I need to present in an indicator the status of these information.
Thanks
0 Kudos
Message 3 of 4
(2,672 Views)
There are two ways I can think of.
First, you can use "Scan From String" wired to your string output to get the
particular byte that you are interested in.
Or, you can convert the string to an array with "String to Byte Array" and
then use
"Index Array" to get the proper byte. I like this method best. It's easier
to work
with arrays than strings.

Alan Brause


Roby wrote in message news:384e31c6@newsgroups.ni.com...
>
> Using Serial Read.vi,I have the following reads string. (HEX)
> Example: 8000 0134 0145 00FF
> My document of the Programer Guide, define as:
> 80 1. byte is Syncronize Start Packet
> 00 2. byte is Version Protocol
> 01 3. byte is Revision Protocol
> 34 4. byte is information 1
> 01 5. byte is information 2
> 45
6. byte is information 3
> 00 7. byte is information 4
> FF 8. byte Syncronize End Packet
> I need to present in an indicator the status of these information.
> Thanks
0 Kudos
Message 4 of 4
(2,672 Views)