As the title suggests, arduino can send data back to labview using the serial.printl() command in the arduino code. Suppose I have one code on the Arduino that measures analog voltage, and the other code that will count the frequency of an analog wave. I coded these three methods of measureing data. But I want to choose from LabVIEW which data to read, making the arduino a acquisition device. I've read about NI-VISA, but there is so clear documentation on how to use it with arduino. I've also known about LINX custom commands but from what I've seen, it only sends a U8 Array as input and recieves one as output, which does not make my understanding any clearer. I have the following questions:
-How do I make LabVIEW send commands to arduino to either measure x or y, and have it sent to various outputs?
-Is this method even possible with LabVIEW or should I pivot to a different form of computer interfacing with Arduino?
I'm sorry but your post is unreadable since you used a super light grey font. Why did you do that?
I'll ask the moderator to fix your message, but since it is the weekend, it might be a few days.
There is nothing special about communication with an Arduino if you think of it as just another device on a serial port.
In fact it's even easier because YOU have full control over the code running on the Arduino.
Pick a serial protocol (9600 Baud, 8 bits, 1 stop bit, No Parity)
Write your Arduino sketch to respond to different queries.
Use VISA Serial to query the Arduino and receive the response in LabVIEW.
Write your Arduino sketch to constantly send the latest measurements in one line separated by a comma using the Arduino Serial.printin function. (it appends a Termination Character)
The use VISA Read (enable the termination character) to read the incoming string and then parse it using Spreadsheet String to Array into a numeric array.
Since you are in control of the code, you just have to define your commands and implement them on both sides. On the LabVIEW side, you use VISA Write to send the command string and VISA Read to read the data.
But if you are looking for some examples, start here: VIWeek 2020/Proper way to communicate over serial