09-29-2016 11:38 PM
hie everyone.. here im new to arduino as well as labview.. i want to send some text like abc from arduino to labview serially.. could anyone help me please.. i have arduino mega board
09-29-2016 11:41 PM
hi.. im new to arduino and labview.. i want to send text abc from arduino mega and want to read it on labview serialy. could u help me.. regarding codes
09-30-2016 01:22 PM
From the Arduino, you use the PrintLn command to send your data.
On the LabVIEW side, you just use Configure Serial Port to set up your port to make that of the Arduino. Make sure you leave the Termination Character on. Then with the VISA Read, you just tell it to read more bytes than you will ever expect to recieve in a single message. The read will complete when the termination character (the carriage return, 0xA, \n) is recieved.
10-03-2016 03:04 AM
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// send an intro:
Serial.println("\n\nString Constructors:");
Serial.println();
}
void loop()
{
// using a constant String:
String stringOne = "12345";
Serial.println(stringOne); // prints "Hello String"
// do nothing while true:
while (true);
}
this code returns 12345 in serial monitor now i want to send it on labview.. can u provide vi for this
10-03-2016 03:05 AM
BTW... thank you so much for ur quick reply
10-04-2016 09:43 AM
There's a serial Read VI available in LabVIEW. You must configure first with appropriate Serial settings and then have a loop set up to read the Serial Buffer. These VIs you are looking for are available in NI LabVIEW examples. But you're not going to understand what they do or how to use them properly without doing some LabVIEW research and homework. That means learning your LabVIEW Core 1 and Core 2 (fundamentals).
11-24-2016 03:29 PM
hi. i have one array in labview that varies it continuous and i want use dates of this array for control speed of motor.help me.
tanks a lot
04-12-2017 10:59 AM
Hi Folks,
I am pretty new to labview and would like to work into it using a arduino like users did before here in this thread.
I want to measure voltages with the arduino. I took the model uploaded by the users here what is a great base to start from. Then I adapted it to write a command to the arduino, what actually works sometimes.
What my adaption of the code does:
1) open serial connection (works)
2) write command 7 (worked one time, what I saw in the string window)
3) loop read the output of voltages loop from arduino
4) put them in the string window (only worked one time)
So I think it might need correct timing to read the buffer because it only sometimes goes into the "standard case" that reads something to the string window. all the other times it just does not read anything.
do you guys have any idea? Is my approach correct?
Many thanks
Anna 🙂
04-12-2017 11:16 AM
From the image, it looks like your Arduino is going back to waiting for a command. Perhaps you should create a state machine so that you can go back and forth between reading data and sending the command.
04-25-2017 10:31 AM
running this VI i am getting this error
Error -1073807360 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->serial_arduino_ABC (1).vi