09-06-2015 10:17 PM
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?
Solved! Go to Solution.
09-06-2015 11:48 PM
In for loop
hope it helps.
09-07-2015 12:09 AM
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.
09-07-2015 07:18 AM
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.
09-07-2015 09:48 PM
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?
09-08-2015 07:49 AM - edited 09-08-2015 07:49 AM
@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.
09-08-2015 08:11 AM - edited 09-08-2015 08:12 AM
Awesome, Will try something like that. Thanks!