LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write from Labview to Arduino

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.

0 Kudos
Message 1 of 3
(2,508 Views)

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.

0 Kudos
Message 2 of 3
(2,469 Views)

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

0 Kudos
Message 3 of 3
(2,468 Views)