Read Arduino Card Serial Port Data Using LabVIEW

preview_player
Показать описание
Read Arduino Card Serial Port Data Using LabVIEW
Рекомендации по теме
Комментарии
Автор

Hi David, nice video. I have one doubt, why are you keeping the VISA initialization inside the loop. We can place it outside the loop as well. so that it won't initialize each time the loop iterates. I'm not much familiar with hardware interfacing in the LabVIEW. Could you please clear my doubt?

rishidivakar
Автор

Hi Jakkrich, sorry for the slow response. One thing you need to make sure of is that you have the drivers properly installed for LabVIEW to access the serial port. You will need a special disk for this, LabVIEW does not automatically have the drivers for it. You can search for serial port drivers on the national instrument website. If I can find the link i will post it. Most likely that error means you don't have the necessary drivers for LabVIEW to access your serial ports on the computer. Have you loaded these drivers?

davidwisbey
Автор

Configure VISA port can go outside the while loop, because you only need to do it once. Inside the while loop will cause it to re-establish a connection every with iteration, slowing the loop down.

grahamwebb
Автор

Correct, feedback is needed to save the actual value of the serial port before it is deleted

alonsopalazuelos
Автор

Thanks David for warmly reply. Yeah I think so, my pc is see no arduino on it' serial port USB.
Now, I have to use the LINX instead, as suggestion in arduino play ground website.
So, the labview can work with arduino. However, it was unable to connect arduino intermittently whenever I stop-run my program, I try to reset many time to make it recover. Therefore, I have to replace the new Uno board its working better, but a few same trouble so it about 1/10 faulty occurred.
Thank you so much David for your Idea shared through Youtube, you wake me up to starting, and also people around the world. Its a goodness.

jakksify
Автор

Can i make one question to you? If i have a Power Spectrum and i want it's coordinates to be sent to arduino for further processing how would I know in which format they arrive? I know it's in ASCII so first of all i have to translate them, but how would i know if the first number i translate is in Y axis( for me dB) or in X axis ( for me Hz). Do you have any ideas ? I sent them via COM/port to Arduino Uno.
Thank you in advance.

apostolosanastasiadis
Автор

If you put the VISA configure serial port outside the loop that will fix problems with noise or unnecessary characters on your results.

kevinnorman
Автор

Hi david, thank you for this amazing video, But I have a question, I need to have the data from one arduino to 3 different analog input(voltage) and one digital input (temperature) so I have 'text value text value text value text value' format in my serial port.how can I have all of this data in one excel file ?? thanks a lot

ahajer
Автор

Hi David'
First of all, many thanks for the helpful video. I am using HAMAMATSU c12880ma mini-spectrometer. I want to get data from my spectrometer by using arduino UNO and I am gonna use LabView for graphical interface. Do you think if I do the same block diagram with you, it works for me ? Thanks, in advance. My Code ;

/*
* Macro Definitions
*/
#define SPEC_TRG A0
#define SPEC_ST A1
#define SPEC_CLK A2
#define SPEC_VIDEO A3
#define WHITE_LED A4
#define LASER_404 A5

#define SPEC_CHANNELS 288 // New Spec Channel
uint16_t data[SPEC_CHANNELS];

void setup(){

//Set desired pins to OUTPUT
pinMode(SPEC_CLK, OUTPUT);
pinMode(SPEC_ST, OUTPUT);
pinMode(LASER_404, OUTPUT);
pinMode(WHITE_LED, OUTPUT);

digitalWrite(SPEC_CLK, HIGH); // Set SPEC_CLK High
digitalWrite(SPEC_ST, LOW); // Set SPEC_ST Low

Serial.begin(115200); // Baud Rate set to 115200

}

/*
* This functions reads spectrometer data from SPEC_VIDEO
* Look at the Timing Chart in the Datasheet for more info
*/
void readSpectrometer(){

int delayTime = 1; // delay time

// Start clock cycle and set start pulse to signal start
digitalWrite(SPEC_CLK, LOW);

digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);
digitalWrite(SPEC_ST, HIGH);


//Sample for a period of time
for(int i = 0; i < 15; i++){

digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);
delayMicroseconds(delayTime);

}

//Set SPEC_ST to low
digitalWrite(SPEC_ST, LOW);

//Sample for a period of time
for(int i = 0; i < 85; i++){

digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);
delayMicroseconds(delayTime);

}

//One more clock pulse before the actual read
digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);


//Read from SPEC_VIDEO
for(int i = 0; i < SPEC_CHANNELS; i++){

data[i] = analogRead(SPEC_VIDEO);

digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);


}

//Set SPEC_ST to high
digitalWrite(SPEC_ST, HIGH);

//Sample for a small amount of time
for(int i = 0; i < 7; i++){

digitalWrite(SPEC_CLK, HIGH);

digitalWrite(SPEC_CLK, LOW);


}

digitalWrite(SPEC_CLK, HIGH);


}

/*
* The function below prints out data to the terminal or
* processing plot
*/
void printData(){

for (int i = 0; i < SPEC_CHANNELS; i++){

Serial.print(data[i]);
Serial.print(', ');

}

Serial.print("\n");
}

void loop(){

readSpectrometer();
printData();
delay(10);

}

barisakbali
Автор

Hi David, I am sending from the arduino 4 numbers (4 temperatures) and I want to read it in labview to plot it individually; Currently I can read the whole string of data... thus, How can I split the string coming from the arduino into individual temperature values? Thanks in advance...

marioalejandroherediasalga
Автор

Is the arduino code that you show in the video complete? Or is there more code at the top of the file?

maxyboy
Автор

Hi David really great Video, I need some help over reading multiple data from the serial port in my arduino code I send some text and some bytes arrays how can I read the two data types differently thank you

anouarben
Автор

Hi David,
I configure the same program, but when I´m trying to read the data with Labview it gives the wrong numbers. for example I send 5.23 and it read 5.js in Labview.

I have the same baud rate (9600), but even if I change it in both programs It keeps sending the same problem. Do you know what could be the solution? Thanks

dasenz
Автор

Hi sir, i'm having problem converting from read buffer of visa reader to number, it converts only one time .

mohamedalibendhrif
Автор

Thank's bro, very helpful your video to start. Some details to change but very useful, it work for me perfectly. (y)

marwanmakarem
Автор

Hello, how can i start a program with serial communication instead of push button for example

adr
Автор

Dear Sir Kindly post the code for arduino as i am trying to read temperature from the analogue pin of my Arduino mega in Lab view for my final year project . If you upload the sample code for arduino that would be pretty helpful . Thanks waiting for your response.

Dragoneyedoom
Автор

I have made this program but the error pop up always appears

enzoclass_
Автор

Can you provide the arduino code, please?

muhammadamiraltaf