Kirkcreelman Posted November 8, 2020 Share Posted November 8, 2020 I’m using the AC input from an accelerometer that is attached to a motor housing. The motor also has a1 pulse / rev flag that I’m using for rpm and indexing of the motor location. What I’m trying to do is capture, a) the peak to peak amplitude of the ac signal. b) when, during the revolution, this peak values occur. I have the rpm working on a counter but can switch it to timer if required. This is occurring at about a 100 revs/ second. I can average many rev to improve statistical accuracy. If I simply log the start time of each rev I can find out where The peak AC value falls in relation. My trouble is I don’t know how to capture the peak AC values and the time they occurred. I would likely need to stream the AC signal at 1 kHz to get some decent resolution? I’m using a LJ U6. This is kind of like a task for a scope with me wanting to see a peak at a certain time after the trigger event. I don’t need to graph it. Any thoughts on the best approach would be appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted November 9, 2020 Share Posted November 9, 2020 You'll need to stream data to get enough sampling to see the AC signal (assuming it is 60hz or so). You'll then likely need to do post calculations. The max() and min() function will give you the size of the two peaks over any time range. Doing gettime() on the result of max() and Min() give you the time stamp of that max or min point. I suppose you could use the pulse flag to trigger the calculation. Use the timestamp of the pulse flag to subset the data from the last pulse, for example: max(mySig[pulse.time[0], pulse.time[1]+0.01]) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.