Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Oscope Data to waveform

I have an encoder connected to an Oscope. I can record the squarewave TTL voltage data as a CSV file. The Voltage data is synchronously collected at a dt of 0.0004 sec. I use a threshold detector to count rising edges and use the index of each rising edge with the dt to get a timestamp of the rising edge. I know the encoder is 1000 tick/rev so I convert the ticks to radians of angular displacement and I can plot that against the timestamp array of each rising edge. At this point I have a Y array of angular displacement in radians and a T array with a timestamp for each rising edge. I would like to convert that Y-T data to waveform with a synchronous rate so I can do some other calculation of the angular velocity and acceleration.I could do those calculation with my asynchronous arrays, but I have some canned algorithms that I am testing that need the data to be synchronous waveform data to function. I don't see labview functions that take asynchronous data and turn it into a waveform. There are some resampling VIs but I think they only work to change from one synchronous rate to another synchronous rate. Not the problem I have. I don't yet have "real" test data from my test, but I have "fake" data that I generate by spinning the encoder with my fingers. The real data is extremely fast. My acceleration rate is around 40,000 rad/sec^2. I go from 0 to 5000 RPM in a little over half a turn.The entire test is over in about 15 milliseconds. I am currently measuring the displacement data with a laser. The point of this encoder test is to validate the laser data and the algorithms used to filter and differentiate the velocity and acceleration from the angular displacement. So I need to hammer the round asynchronous peg through the square synchronous hole *ahem*

 

The attached files are so you can see how I got this far.

Download All
0 Kudos
Message 1 of 1
(876 Views)