Step and direction in to analog out

06 Nov 2010

I am currently using mach3 for a CNC front end and am trying to make a step and direction input to analog output with PID to control my servo drives. Can anyone help me as far as how to get the step and direction in. I have my servo encoder working and can see the output of the encoder either via serial to hyperterm or using the nokia lcd display.  I found a lot of examples for PID and PWM but nothing with step and direction input.

Thanks in advance,

Mike

07 Nov 2010

I do not understand most of the terms you are using.

You can use a mosfet driver to switch direction of a motor. For example a TC4427A.

Switch the voltage level on pin IN A en IN B ( A=0, B=1 or A=1, B=0). Connect the motor to Out A and Out B.

Not sure that is what you want.

08 Nov 2010

I am not looking to make the output stage I want to bring step and direction into the mbed and have it out put an analog signal similar to this:

http://www.max-mod-shop.com/index.php?option=com_content&view=article&catid=17:-yapsc&id=47:yapsc10v

"YAPSC:10V is a board allowing to control servomechanism, thanks to a motor power amplifier.
It is different from YAPSC because it has no power stage capable of driving directly a motor and outputs an analog command (+-10V) to a power amp. Position feedback comes from a incremental (quadrature) encoder, with either differential or TTL link."

Thanks for the reply.

 

 

09 Jul 2011

The setpoint-counter is the result of pulses from mach3 (increment or decrement depends of direction input signal ) , The actual-position-counter is the encoder counter result. The difference between that 2 counters is the error for the PID algolritm for calculating a analog output for motor speed.