08-22-2017 09:29 AM
Hello everyone,
I'm using data communications to read two sensor (arduino) and represent the valuees in Labview. I don't know how to separate those measurement from the diferents sensors. I think that it should be easy, but I haven't too much experience with labview.
Thank you
Best Regards,
Jose S.
08-22-2017 09:50 AM
Hi Jose,
yes, that should be easy! 😄
Two notes:
- don't use BytesAtPort here. Either use a TermChar (as you have configured) or a fixed byte count
- the answer to your question is found in your Arduino sketch: how do you send those values on the Arduino side of the serial communication? You need to read/parse the received string in the same fashion…
08-22-2017 09:51 AM
The first thing we need to know is what does your data string look like? And then what is it supposed to look like once split.
I expect you can use the scan from string function, or some other string manipulation, depending on what your string is.
08-22-2017 09:59 AM
Thank you for your response GerdW,
I send the values using "Serial.println(temperature)" (temperature is a double) and actually I can see the values in the box, one second aprox from one sensor, and the next second the other, but I want to representate them in diferent boxes, and I don't know how separate them.
Thank you,
Jose S
08-22-2017 10:04 AM
08-22-2017 11:36 AM - edited 08-22-2017 11:39 AM
I would have used a "spreadsheet string to array" (or whatever it's called these days). Would that have been Rube-ish?
Edit: I guess actually "spreadsheet string to array" (or whatever it's called these days) would be more scalable?
08-22-2017 12:00 PM
@billko wrote:
I would have used a "spreadsheet string to array" (or whatever it's called these days). Would that have been Rube-ish?
Edit: I guess actually "spreadsheet string to array" (or whatever it's called these days) would be more scalable?
Spreadsheet String To Array (the name has not changed for many, many years) is more scalable. But for just 2 items, I would use the Scan From String. Any more than that, then I would go to the Spreadsheet String To Array. At that point, I would likely be using an array indicator anyways.