LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use LabVIEW to sort through Raw Serial Data

Solved!
Go to solution

I have an FPGA which is programmed to dump all its memory bytes containing voltages, currents, temperatures etc. when a serial communication is estabilished with it from LabVIEW.

 

I  know how to establish the serial connection, check for any bytes at the serial port, and read the data at the serial port (using VISA).

What i need to do now is sort through what is being read.

So it is reading data in a sequence of 24 integers (16-bit) sent with Least significant bit first. I need to sort each integer and display it as a decimal. How can i do this?

0 Kudos
Message 1 of 7
(3,730 Views)

In for loop

  1. Sort each 16 Bits (String subset function with proper shift register input for ‘offset’)
  2. Reverse string (now MSB is first)
  3. Use attached VI(MSB first) to convert into decimal(U16).

hope it helps.

-
Amit
CLAD
0 Kudos
Message 2 of 7
(3,700 Views)

Sorry my description was incorrect.

 

It is actually reading unsigned 8-bit integers. What I need to do is

 

1. Convert it into a signed 16-bit integer

2. Shift left by 8 and add significant bits

3. Convert into a decimal

 

I also need to sort each value and assign it its own desctiprion, i.e. Vin, Vout etc.

0 Kudos
Message 3 of 7
(3,687 Views)

1. I would use Unflatten From String, probably in a loop, to convert your string into I16s.  From there you can do whatever math is required to get your decimal values.  In the end, I would put the values into a cluster.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,653 Views)

How do you actually extract each individual value. For example the first value would be Vin, the second Vout, etc and I want to display each value seperatly?

0 Kudos
Message 5 of 7
(3,614 Views)
Solution
Accepted by topic author sout23

@sout23 wrote:

How do you actually extract each individual value. For example the first value would be Vin, the second Vout, etc and I want to display each value seperatly?


I would do something like this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,581 Views)

Awesome, Will try something like that. Thanks!

0 Kudos
Message 7 of 7
(3,567 Views)