LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition of data serial

Hello,

I would like an information about LabView.

I need to monitore a serial line through the C-rio and to convert this digital sign in a binary number or hexadecimal.

To convert the digital sign for binario, it's necessary store the frames in a vector (the message can be from 8 to 572 bits).

The problem is to store in the vector the bytes (the acquisition use a boolean signal).
- How can I make this?
- Do you know some VI to do this convertion?

Already thanking!

FabianoF.
0 Kudos
Message 1 of 8
(2,112 Views)
Fabiano,

I'm not sure I understand your question, but I'll try an answer :
you need to convert a series of bytes received as a string on your serial port. There is a string to byte array function to do this conversion, as shown in the attached png.

Message Edited by chilly charly on 06-12-2005 05:19 PM

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 2 of 8
(2,097 Views)
Hello,

I understood your point but that is not exactly what I need. First, I need to get a group of boolean data and store them in an array. The problem is that I´m working with boolean data , not string data.

Thanks for your help,
FabianoF
0 Kudos
Message 3 of 8
(2,078 Views)
The LV serial tools always return an alphanumeric string.

So, do you mean that you are receiving a string composed of a series of 0 and 1 chars ?
or a string composed of hexadecimal bytes (that could be read either as ASCII chars, or as numeric bytes...) ?

Could you post an example of the received data ? and of the way you want the result displayed ?
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 4 of 8
(2,063 Views)
Hello,

The received data are inicially in hi-level, when the signal goes to low level, I consider that transition my "start bit" of the message. The message is composed of 8 bits, my problem is how can I store these bits
in an array. After acquire 8 messages, I´ll have to store them in another array. I´m sending you a picture
of what I´m trying to do.

Thanks again.

FabianoF.
0 Kudos
Message 5 of 8
(2,052 Views)
Still no sure if I'm helping you or not !
You have to use a shift register, as in the attached simulation example, to store the bit values read at each loop iteration.
Play with the boolean button for a while (data are collected at 2 Hz) and see how it works.

Hope this helps
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 6 of 8
(2,037 Views)
I´m sorry, but what simulation? I guess you didn´t attached the example.
Thanks.

FabianoF.
0 Kudos
Message 7 of 8
(2,036 Views)
Hoops !
That was a busy day ! 🙂
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 8 of 8
(2,033 Views)