I was wondering if I could get some advice on how best to interface with my Saleae Logic 16 for a project I am working on.
Basically I have a stepper motor with a quadrature encoder and I am looking to characterise that motor within a mechanical system. The quadrature encoder outputs two square wave signals as shown below:
Basically the number of rising edges gives you the distance moved, the time between the rising edges gives you the velocity, and finally the phase of the two signals gives you the direction. In this test setup I am only interested in distance and velocity, so will only need to analyse one signal.
What I would like is to be able to begin recording before the motor begins to move, wait for a predetermined time for the motor to finish moving, and then to stop recording. When recording has commenced I would then like to plot a graph of distance and velocity against time, and also print out the total distance moved and average velocity.
I am happy to have some user intervention (starting and stopping the capture or a script for example) but would like to automate as much as possible - we will be conducting hundreds of 10s tests.
My question then (and thanks for sticking with me this far) is what would be the recommended way to do something like this? Can this be done as an extension or measurement from within the Saleae Logic 2 software or do I need to use the automation SDK without the Logic Software?
In principle if I could get a dump of the edges, the time of the edge, and it’s type (rising or falling) then the velocity and distance I am looking to measure would be easy to compute in python. I would like to ideally automatically start the logic 16 and save the dump somewhere before reading and processing all in one script.