04-08-2018 12:18 PM
Hey Everyone!
I am new to the LabVIEW. I am acquiring the data from daq device (Potiometere) and calibrate it to angular position (which is already provided along with QNET Mechatronic sensor board). Now I want it to modify to revolution per minute. For which I need to count some true values over the interval of 1 minute.
All the components are inside the control and simulation loop. The calibrated angular position is displayed in a waveform named Potentiometer (deg). I want to count how many time the potentiometer angle becomes 90 degrees in last 60 seconds only.
QNET_Drivers.llb and Quanser_DAQ.....llb are liberary file.
04-09-2018 10:31 PM
Could you make a more punctual question? do you get an error or are you getting an unexpected result?
04-10-2018 04:15 AM
@ARVega wrote:
Could you make a more punctual question? do you get an error or are you getting an unexpected result?
Thanks for your response.
In the block diagram below, I want to get Potentiometer (deg) chart data (x and y) instantly rather than at the end of control and simulation loop. But the attached block Collector is giving me the data at the end of the control and simulation loop.
04-10-2018 04:43 AM
Hi Gazing,
I want to get Potentiometer (deg) chart data (x and y) instantly rather than at the end of control and simulation loop.
Why do you need a CS loop at all? You should use a "normal" while loop here…
When you want to plot "y vs x" data you should use a XY graph…
Which sample rate are you using? Are you sure you should read just one sample per iteration?
04-10-2018 05:36 AM
@GerdW wrote:
Hi Gazing,
I want to get Potentiometer (deg) chart data (x and y) instantly rather than at the end of control and simulation loop.
Why do you need a CS loop at all? You should use a "normal" while loop here…
When you want to plot "y vs x" data you should use a XY graph…
Which sample rate are you using? Are you sure you should read just one sample per iteration?
I want a sample rate of 100. I am using the CS loop because I need the data in real time. I will give it a try, of course.
04-10-2018 05:44 AM
Hi Gazing,
I am using the CS loop because I need the data in real time.
And why do you need a CS loop to read data in "real time"???
The sample will be read when it becomes available according to your sample rate - regardless of the loop around the DAQmxRead function!
04-10-2018 06:34 AM
I have enclosed all the stuff in "Time Loop", that's work fine, but still I can't get x and y data array so that I add it and find the summation of last 60 seconds for revolution per minute. Here I attache the VI and the library. Please have a look at it.
04-10-2018 07:56 AM
04-10-2018 01:02 PM
@GerdW wrote:
Hi Gazing,
why do you use a timed while loop? The timing is enforced by your DAQmx task!
You only read one sample per iteration: where does your X and y information come into play?
So that I would be able to convert the iteration number to time (seconds) by multiplying with sample rate.
04-10-2018 01:14 PM - edited 04-10-2018 01:15 PM
Thanks for your cooperation and help. I have almost achieved my task.
I am comparing the "Y data" with two thresholds, i.e. 9.9 > and <10.1 to detect if the value has crossed 10 or not because it is very rare to the DAQ will collect the sample exactly at 10 (degrees) position despite I have selected 100 as the sampling rate.
But sometimes it collects more than one sample in the said range, which increment the counter multiple times and unexpected.