Servo Driver Needs Dual PWM per axis
Posted: Sun Mar 28, 2021 2:32 am
Hi,
My servo driver seems to require a PWM+ and PWM- signal. I attached a scope to these signals with the system being controlled by the original electronics. (Southwest Industries Trak 1745P lathe).
With the axis at rest, the PWM+ signal is square wave with 50% PWM. PWM goes from about +1V to +4V. PWM- looks like PWM+ but is inverted (voltage still +1 to +4 volts).
With the axis moving forward, the PWM+ duty cycle increases (ie 60% high, 40% low). PWM- is 60% low, 40% high)
With the axis moving in reverse, PWM+ duty cycle decreases (40% high, 60% low), PWM- is 40% low, 60% high).
I have KFLOP and KANALOG.
Seems I might use the opto outputs 0 and 1 for the X axis, and opto outputs 2 and 3 for the Z axis.
I might need to add resistor divider to get the right voltage levels, but I'd bet they work ok with 0-5V.
I have not found any C code examples for the opto outputs? Would I have to make my own PWM signals using the thread loop count for duty cycle timing?
Another choice might be to use the KFLOP PWM outputs.. Are they available on KANALOG screw terminals? (I don't see this in the documentation)..
I guess I would then write C code to direct OUTPUT 0 to two PWM channels,
FPGA(IO_PWMS+0) = ch0->Output + 128, , FPGA(PWMS+1) = 256 - (ch0->Output + 128)
My servo driver seems to require a PWM+ and PWM- signal. I attached a scope to these signals with the system being controlled by the original electronics. (Southwest Industries Trak 1745P lathe).
With the axis at rest, the PWM+ signal is square wave with 50% PWM. PWM goes from about +1V to +4V. PWM- looks like PWM+ but is inverted (voltage still +1 to +4 volts).
With the axis moving forward, the PWM+ duty cycle increases (ie 60% high, 40% low). PWM- is 60% low, 40% high)
With the axis moving in reverse, PWM+ duty cycle decreases (40% high, 60% low), PWM- is 40% low, 60% high).
I have KFLOP and KANALOG.
Seems I might use the opto outputs 0 and 1 for the X axis, and opto outputs 2 and 3 for the Z axis.
I might need to add resistor divider to get the right voltage levels, but I'd bet they work ok with 0-5V.
I have not found any C code examples for the opto outputs? Would I have to make my own PWM signals using the thread loop count for duty cycle timing?
Another choice might be to use the KFLOP PWM outputs.. Are they available on KANALOG screw terminals? (I don't see this in the documentation)..
I guess I would then write C code to direct OUTPUT 0 to two PWM channels,
FPGA(IO_PWMS+0) = ch0->Output + 128, , FPGA(PWMS+1) = 256 - (ch0->Output + 128)