07-03-2014 12:16 PM - edited 07-03-2014 12:16 PM
Hello,
I am currently plotting the samples after collectign them with collector and specifying the number of samples int eh collector like '1500' or '2000'.
Can someone explain me of how to plot the samples in a graph after 'x' time inplace of specifying the number of samples collected I would like use seconds duration.
The vi plotting the samples collected with collector is attached.
Thanks.
07-03-2014 12:56 PM
07-03-2014 01:07 PM
There are properties for graphs that allow you to set an offset (starting count for the x axis) and a multiplier (how much the x axis value increments between samples.
Of course this will only work if the data is being sampled at a constant rate.
Mike...
07-03-2014 01:18 PM
Hello,
The thing is that I am not able to get the same number of samples for evry second I verified this by running it a number of seconds with checkign each time the number fo iterations ( I think the microcotroller at the other end sending the sampling is not sampling at constant rate).
So,I want to plot the samples collected after every 'x' seocnds instead of plotttign them after collecting some 'x' samples.
The vi that I am getting samples from microcontroller is attached.
Thanks.
07-03-2014 03:18 PM
Ah, then you will have to use an XY graph. There is an example that shows all the various datatypes that work with an XY plot, the one I use most is a cluster consisting of an array of X values and an array of Y values.
How does the microcontroller work - is it constantly reading the inputs and you are fetching data from an onboard buffer (sort of like a DAQ board) or does it not read the inputs until you send the command?
If the later is the case, the issue is that there will always be variability because Windows (with all its varying latency) is timing the loop.
Mike...