05-31-2017 10:55 AM
Hi,
I am trying to write floats from Labview to Arduino. I am first converting the numbers to strings followed by \n then passing them to VISA write in a sequence. In Arduino IDE I am using Serial.read() to read the characters and parsing them to get the string. I am then converting the string to a float using String.toFloat() and writing them to the pins. I am using the same port and baud rate for communicating labview with Arduino. I run the arduino program before running labview sometimes I get an error that the port is busy, and if both programs run I don't get any output on the pins.
05-31-2017 12:01 PM
Have you looked into the Arduino toolkits? LIFA is the older one for Arduinos only, targeting Uno and Mega, and LINX is the newer version that supports more devices, and has more features. Both are completely open code and you can see how the functions like setting an analog output work, and how the command gets from LabVIEW VISA to the serial read of the Arduino, to writing the value to the analog out pin.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-31-2017 12:02 PM
You either have a problem with the code (which we can't see), with the wiring (which we can't see), or you forgot to turn on the power. How would you like us to help you? Do you want us to guess at your code and wiring?
Bob Schor