Servo Driver Needs Dual PWM per axis

Moderators: TomKerekes, dynomotion

Post Reply
skeitzer
Posts: 4
Joined: Sun Mar 28, 2021 1:49 am

Servo Driver Needs Dual PWM per axis

Post by skeitzer » 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)

User avatar
TomKerekes
Posts: 2677
Joined: Mon Dec 04, 2017 1:49 am

Re: Servo Driver Needs Dual PWM per axis

Post by TomKerekes » Tue Mar 30, 2021 1:29 am

What frequency is the PWM signal?

I think you will likely need to use a KFLOP PWM signal. Opto outputs would likely be too slow.

You might add a differential driver such as this.
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)
Clever. That might work for a poor man's differential signal.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply