10-15-2020 09:16 PM - edited 10-15-2020 09:19 PM
Hi, I'm new to this forum, i'm trying to receive an EMG Myoware Sensor data through my Arduino Uno using the ADC and store that data with Labview. In the Arduino IDE i can visualize the data properly (Monitor Serie and Serial Plotter); nevertheless, when i try to start the data visualization using the waveform chart, there's simple no data, i receive nothing, i don't know what's wrong with my code and any help would be amazing. What i'm trying to do in the code is to receive the A0 pin data for just 6 seconds and then finish the data acquisition, i receive nothing in Voltage nor Waveform Chart
10-15-2020 09:56 PM - edited 10-15-2020 09:56 PM
Put an indicator on the error wire that comes out of the Arduino read function.
Are you sure you have the serial settings set properly?
You might need to attach your Arduino code. Often the problem is that the Arduino code is not written properly to communicate with LabVIEW.
10-15-2020 11:02 PM - edited 10-15-2020 11:05 PM
Thanks for your fast response,
It's a really simple code, i have checked the NI-Visa Driver and there's the Arduino driver, when i see the Error out indicator there's simply nothing...
int valorA0;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(A0,INPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
valorA0 = analogRead(A0);
Serial.println(valorA0); //print the A0 pin value
}
I have changed the baud rate because i wanted to see the data better but basically it's all the same
10-16-2020 10:12 AM - edited 10-16-2020 10:12 AM
I believe LIFA uses special sketches for the Arduino. So if you wrote your own, I'm not sure it will work. Just use standard VISA calls to read the data.
10-16-2020 08:03 PM - edited 10-16-2020 08:04 PM
Hello, actually yesterday i was searching why i couldn't use the LAbview intervface for Arduino and it seems that the tool is not long supported, i tried to use linx, but linx doesn't give the option to change the baud rate.
Thanks you so much for the file, actually why i wanted to ask you is how could i manipulate the sample rate, i store the data in the waveform chart but it only gives about 1000 samples in 6 seconds and that's a 1000/6 Hz sample rate. EMG values are in the range of 40-500hz so i need a sampling rate of minimum 1000hz, i don't care if it's a little bit higher. In theory, i would need something like 6000 samples so i could reach the 6000/6 Hz i need, in my arduino IDE, using 115200 Baud Rate i get something like 10000 samples in 6 seconds (i haven't measured it properly, it's just an estimation) but in labview (might it be for the byte count or for the elapsed time?) i don't even reach the 6000 samples, do you know how could i increase it?
10-16-2020 08:24 PM
Assuming 115200 baud rate and 10 bytes per data point, you should be getting ~1152 points/second. And since there are no waits in your LabVIEW code, your limitation is in the Arduino. I have almost 0 experience with an Arduino, so I cannot help any more than that.