From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-09-2017 03:40 PM
Hi everybody,
I'm trying to realize a simple frequency measurement with Arduino Uno.
The connection between Arduino Uno and LabVIEW is ok, but the value of the measured frequency with LabVIEW is not correct.
You can see from the image that I'm generating a tone from the Arduino digital pin #8 with a frequency of 80Hz, but both the Tone Measurements and Spectral Measurements block gives me inconsistent results compared with the input signal.
I tried to use different LabVIEW blocks but I had always the results.
I also tried different sampling frequencies and different number of samples.
Do someone know why? What can I do?
Thanks.
05-10-2017 09:51 AM
Hello,
How do you communicate between your Arduino Board and Labview?
( via NI.VISA, LIFA_BASE (LabView Interface for Arduino) )?
Could you please attach your VI (analog.vi) ? this would allow to know what is exactly happening inside of your code
05-10-2017 01:45 PM
Thank you for the reply!
I'm using LIFA_BASE. Sure I can attach the VIs, here they are...
In my opinion, the problem is in the data coming from Arduino or there is a problem in reading data with the Continuous Analog Read block.
05-10-2017 01:47 PM
05-11-2017 06:39 AM
Hello,
Since I don’t have the Arduino board, I cannot simulate your signal for tests.
I would suggest that you first debug your code with the lLabVIEW debugging tools
Also insertion of Probe will show you the value (of the wire, cluster…) in real time.
select the wire >> Right Click>> Probe
Like that you can see if the values you wanted to generate from your Board come as expected.
05-19-2017 07:53 AM
Yes, I've already used the probes and the data that I see are not as I expect.
Since I'm acquiring a signal at 80Hz with a 5 kHz sampling rate, I expect 31 high and 31 low pulse samples, but what I see is 29/30 high and low pulse samples.
There is definitely a problem in the data acquisition, but I don't know whether from Arduino side or from the LabVIEW side.