11-23-2016 10:25 AM
Greetings, I'm new to both Labview and Arduino.
I'd like to know how to transfer more than one variable (whether it be a char or int) from Labviw to Arduino.
For example, imagine that in my Arduino code I have z = x +y (with all my variables properly declared beforehand). How would I transfer the values of x and y from Labview to Arduino?
11-23-2016 07:07 PM - edited 12-02-2016 11:56 PM
In order to transfer any data via serial communication, you need to break it down into 8-bit segments (a U8 array in LabVIEW). Then, in LabVIEW, you would need to convert that U8 array to a string and send that using NI VISA. Then, when you receive the bytes in the Arduino, you would need to reconstruct them before using them in a formula.
How you break down the values will depend on what type of data you are sending, what precision you need, how fast you need the data to be transmitted, etc.
One of the easier to understand methods is to convert the value to a string, transmit that string, and then read the string and use a string to number function in Arduino.
02-22-2017 09:30 AM
HI Nathan,
I am doing a project and I faced the same problem of InesSilva . and it's really nice to see your answer to this question after much research, yet I didn't fully understand your answer to InesSilva's problem (still beginner). can you explain it more with code if possible?
thanks a lot
musab