08-19-2022 03:33 AM
I've connected an I2C sensor to Arduino, uploaded a code to get the data and I'm getting the output on Arduino IDE.
I want to get that that sensor data on Labview.
I've made the program using VISA, and I'm even getting the Arduino data on Labview, but that data is all text in one line, in ASCII, whereas I only want that specific sensor value.
This is my current Labview program:
This is the output on Arduino IDE:
I want to get data on Labview like this:
Is there any way to do this?
08-19-2022 04:02 AM
Hi sarwat,
@sarwatsarfaraz wrote:
Is there any way to do this?
Yes.
You just need to parse the incoming data in LabVIEW!
Recommendation: change your Arduino code to deliver all data values in one line, separated by a common char like comma or semicolon...
08-19-2022 05:31 AM
Okay so I'm trying Spreadsheet String to Array
This is the program I've designed, but I'm not getting any value in the array.
What am I doing wrong?
08-19-2022 09:24 AM - edited 08-19-2022 09:26 AM
Try using a single dimension array here
If you are using the Arduino Serial.PrintLn command to send your data. Enable the Termination Character in the VISA Serial Setup and make sure it matches what the Arduino is sending
Serial.println()
Description
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or '\r') and a newline character (ASCII 10, or '\n'). This command takes the same forms as Serial.print().
08-19-2022 01:16 PM
Hi sarwat,
@sarwatsarfaraz wrote:
What am I doing wrong?
Why do you think you need a 4-dimensional array to store 4 elements in a 1D-array (aka vector)?
Did you do the basic LabVIEW courses? Have you learned about basic array handling in LabVIEW?