Creating Quadrature Pulses to simulate Quadrature Encoder for testing control c
cnc002
Posts: 2
Hello:
Has anyone here tried creating Quadruature Pulses that would emulate a Rotary/Linear Quadrature Encoder?· I can do this with discrete TTL or CMOS devices but would like the ability to progam different frequencies, and maybe other functions as well.· Right now, I would like to know if anyone has created a circuit using the BS2 or other Basic Stamp to generate Quadrature Pulses.· I need to be able to created a channel A pulse, channel B pulse in quadrature (90 degree shift) format.· Also, I would need to create an inverted pulse, call it NOT B for emulating a reverse direction.
Any help would be appreciated so I don't have to re-invent the wheel if I don't have to.
Randy Abernathy
Has anyone here tried creating Quadruature Pulses that would emulate a Rotary/Linear Quadrature Encoder?· I can do this with discrete TTL or CMOS devices but would like the ability to progam different frequencies, and maybe other functions as well.· Right now, I would like to know if anyone has created a circuit using the BS2 or other Basic Stamp to generate Quadrature Pulses.· I need to be able to created a channel A pulse, channel B pulse in quadrature (90 degree shift) format.· Also, I would need to create an inverted pulse, call it NOT B for emulating a reverse direction.
Any help would be appreciated so I don't have to re-invent the wheel if I don't have to.
Randy Abernathy
Comments
Write a simple program that does the following:
Define a pause value (I'll call it pvalue for the example)
····· pvalue should be defined as the number of milliseconds between each step.
Clear both outputs
start:
Turn chA on
pause pvalue
Turn chB on
pause pvalue
Turn chA off
pause pvalue
Turn chB off
pause pvalue
loop back to start
If you start with chB, you will go in reverse.
Dennis
·