Beginner: KFLOP only wiring

Moderators: TomKerekes, dynomotion

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Fri May 15, 2020 3:50 pm

Hi Marcio,
This is the situation I talked about: I press "move" with proper speed and acceleration values. The machine moves ok and this plot is shown.
Should the movement (red line from the encoder) be exactly coincident with the blue command line? If so, which parameters should I adjust?
They should match up better than that. The plot shows a significant scaling error of about:

3000/2800 = 1.07 -> 7% scaling error

You didn't provide all the information requested. What are your configuration screen settings?

The encoder resolution should be scaled to motor steps resolution using the InputGain0 parameter. It seems your system is using KStep so the motor resolution should be 200 x 16X = 3200 steps/rev

I understand your encoder is 400ppr or 1600 counts/rev

So I would expect to need an InputGain0 of 2.0 to match them. But from the machine photo is the encoder connected to the motor with some belt ratio?


When I force a stall with a speed set too high, I can observe the position fails to follow the command, the red line seems to reflect the failed movement:
PID values are 1,0 and 0, but results don't seem to change when I set non-zero values for Integral and derivative.
As stated in my previous post you must set the Output Mode to "CL Step" for there to be any closed loop corrections.

As stated before please start with I gain only.

Note that feedback is unlikely to help with motor stalls. In some cases it can help dampen resonances. But in general once the motor stalls the feedback will command the motor faster to try to catch up, but this will likely make matters worse as trying to go too fast is the problem in the first place.

Big size 34 Steppers tend to have tremendous torque but are slow. 36000steps/sec / 3200 x 60 = 675RPM which is probably over what those big steppers can do. Do youhave the specs on those motors? Resistance? Inductance? Current? What supply voltage are you using?

I understand my encoders are working, but I am missing something, because the output green line is always flat.
Am I correct? should the green line (output) reflect the adjustment to be made to the movement?
You are probably not in CL Step mode as described above and in my previous post.

Here is my filters screen
IIR Filters looks reasonable. Note rather than taking photos it is clearer to do a screen capture with Alt+Print Screen, then paste into a program like Paint, then save as an *.png file.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

MarcioMadruga
Posts: 9
Joined: Tue Mar 17, 2020 2:44 pm

Re: Beginner: KFLOP only wiring

Post by MarcioMadruga » Fri May 15, 2020 9:40 pm

Hi Tom,

You were right (as usual). I changed back to CL STEP and now I can see command, position and output curves being plotted accordingly.
My settings:
Image 1 - step response.jpg
Image 2 - Config.jpg
I tried to set the encoder gain to 0.041666 because:

Stepper 200ppr, encoder 1600 pulses per rev. plus 3:1 ratio toothed belt, so 200/1600/3 = 0.041666

Stepper:
Nema 34, 9.5N/cm, 2.8A/phase, 1.6ohm/phase, 15mH/phase. 610N.cm/Min

Encoder:
H38S400B Rotary incremental 1600 pulses/rev

Again, sorry about the images. I must photograph them because my CNC computer isn't connected to the network.

Thank you very much

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Sat May 16, 2020 5:11 pm

Hi Marcio,

It seems your InputGain0 is wrong. The encoder seems to be counting about half what it should be. Hard to tell because your graph is only of the very beginning of the move.

Please test open loop Moves (P=I=D=0) until the encoder is working and configured correctly.

What kind of drives do you have? Do they have microstepping capability? Full stepping at 200 steps/rev would be very rough.

The encoder position looks somewhat noisy. How do you have the encoder interfaced to KFLOP? I found a spec on H38S400B and it says the outputs are open collector. So a pull up resistor would be needed to work reliably.
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: Beginner: KFLOP only wiring

Post by daredevil » Sun May 17, 2020 8:36 am

Hi there,
me too I have started a CNC 3+2 table/table axis project (I will use kmotioncnc SW cause I need RTCP) with only a KFLOP card and nema34 open loop steppers motors and standard switches/home limits, so thank you for this topic.
I have a 1.5kw Huanyang VFD with a chinese air spindle and in the past I have used them with parallel port+ "royaumedeole" Mach3 plugin and USB/RS485 interface connected to PC without problems.
I have read a lot about Kflop spindle management possibilities, but having only the kflop card I have to understand which could be the simplest way to connect my vfd/spindle, I do not need CSS just M3, M4, M5 and speed setup (min6000-max24000rpm @400hz) so using usb/rs485 adapter could be good for me.

Which is the setup/code in kmotioncnc sw in order to work with rs485-usb connected to pc (i have downloaded modpoll sw if could be useful)? I have a win10 64 bit system.

thanks in advance for your help!

PS
I will update also my project results in order to have a common help for Kflop only wiring system

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Sun May 17, 2020 6:12 pm

Hi daredevil,

You might read this archived Thread.
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: Beginner: KFLOP only wiring

Post by daredevil » Sun May 17, 2020 7:21 pm

Thank you Tom
I will try with VFD connected to pc via modbus,
all my best

MarcioMadruga
Posts: 9
Joined: Tue Mar 17, 2020 2:44 pm

Re: Beginner: KFLOP only wiring

Post by MarcioMadruga » Tue May 19, 2020 3:32 am

DareDevil,

I took a PWM output from the KFLOP (the code to multiplex it to JP7 and enable it is described by Tom Kerekes somewhere in the begging of this post).
I connected this PWM output to a small board which converts PWM to 0-10 volt and then this 0-10 volts to the analog input of the VFD.

Regards

MarcioMadruga
Posts: 9
Joined: Tue Mar 17, 2020 2:44 pm

Re: Beginner: KFLOP only wiring

Post by MarcioMadruga » Tue May 19, 2020 4:57 am

Hi Tom,

I had some urgent mills to do, so I created an alternate init file in pure open loop mode. The machine runs consistently and fast, but can do better.
I got some help here too, and we made good progress. We managed to match the encoders to the motors and get good readings, without that pesky noise.

My drives are Longs DM860A, 80VDC 7.8A, capable up to 51200 pulse/rev micro stepping.
Motors are Nema 34, 9.5N/cm, 2.8A/phase, 1.6ohm/phase, 15mH/phase. 610N.cm/Min.
I set them to 400 (minimal setting) in order to get maximum torque and speed. My screw is 5mm/rev, so 0.0125mm seemed precise enough,
so I never tried micro stepping, but will do if you recommend so.

Tomorrow I'll turn back to CL-STEPDIR init file, follow your recent directions and will come back to you with the results.

Thank you very much

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Tue May 19, 2020 2:54 pm

Hi Marcio,

That sounds like good progress.

Higher microstep resolution normally allows smoother motion which reduces the vibrations and oscillations that can cause a stepper motor to stall. Which often allows a bit higher velocity and/or acceleration. Higher microstepping doesn't reduce motor torque. Higher microstepping doesn't reduce speed unless the step pulse rate becomes too high for the Drive (which is unlikely).

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply