Beginner: KFLOP only wiring

Moderators: TomKerekes, dynomotion

Post Reply
MarcioMadruga
Posts: 3
Joined: Tue Mar 17, 2020 2:44 pm

Beginner: KFLOP only wiring

Post by MarcioMadruga » Tue Mar 17, 2020 3:23 pm

Hi, I’m starting this thread because it is kind of rare to see people working with a KFLOP only setup. No other boards.
The manual indicates KFLOP JP7 as GPIO, I wired my 3 stepdir drivers to IO8 and 9 (X), IO10 and 11 (Y) and IO pins 12 and 13 for the Z axis, as directed. To this point, everything works fine.
The problem: Limit switches and encoder inputs (which I also need to connect) share the same IO pins. Where can I configure/route/define connector pins for each input? I searched KMotion config screens, C files and even Kmotiondef.h, to no avail.

JP7 has 16 5v IO pins, 6 for my 3 axis stepdir, 6 for my home and limit switches, and 4 for my (X and Y only) encoders (AB).
I just need to know where to go for pin assignment, or if I should be using pins from the other connectors. Is there a default,
Standard wiring for “3 axis 3 encoder, home and limit switches + Pwm output for VFD (spindle driver)”?

Thank you very much

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Tue Mar 17, 2020 6:23 pm

Hi Marcio,
The problem: Limit switches and encoder inputs (which I also need to connect) share the same IO pins. Where can I configure/route/define connector pins for each input? I searched KMotion config screens, C files and even Kmotiondef.h, to no avail.
The labels for Home and Limits are only suggestions. Those are handled in software so any Input can be used for them.

Step/Dir Outputs, Encoder Inputs, and PWM Outputs are hardware devices and have dedicated pins with some options to be multiplexed to alternate connectors.


JP7 has 16 5v IO pins, 6 for my 3 axis stepdir, 6 for my home and limit switches, and 4 for my (X and Y only) encoders (AB).
I just need to know where to go for pin assignment, or if I should be using pins from the other connectors. Is there a default,
Standard wiring for “3 axis 3 encoder, home and limit switches + Pwm output for VFD (spindle driver)”?
You might use the standard IO for your Step/Dir outputs and Encoder Inputs on JP7. Then assign any unused IO for your Home and Limits. They can be configured as described here.

PWM outputs are on KFLOP JP6 by default. See here. PWM0 can be switched to IO44 on JP7 if that is more convienient for you with this code:

Code: Select all

	FPGA(KAN_TRIG_REG)=4;  	// Mux PWM0 to JP7 Pin5 IO 44  
If you create a wiring diagram we can check it for you.
Regards,

Tom Kerekes
Dynomotion, Inc.

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

Re: Beginner: KFLOP only wiring

Post by MarcioMadruga » Wed Mar 18, 2020 4:38 am

Thank you very much.

I will reroute my breakout board, and will take advantage of the PWM0 mux to JP7. Very neat feature.
For some reason, I assumed all pin labels were mere suggestions. I’ll let you know the results. Thanks again.

Best Regards

Marcio

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

Re: Beginner: KFLOP only wiring

Post by MarcioMadruga » Mon Mar 30, 2020 5:19 am

Hi Tom,

Regarding Spindle control: I set KFLOP to output PWM to IO44 as you directed. I use this signal to drive a converter, which drives the 0-10V input on
my VFD -> spindle. It works manually. I have to recompile and run the init program to change the speed and direction (I had two IO bits from JP6 connected to digital inputs in the VFD to enable and set direction).

Would it be possible to configure IO bits to perform this controls, as described in "KMotionCNC Spindle Control"? I found rich documentation there,
but I don't have the Kanalog board to use DAC output for speed control. Is it possible to configure "Two IO Bits" in the Tool Setup Screen for M3, 4 and 5,
and route the speed value to the S parameter?

Thank you

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

Re: Beginner: KFLOP only wiring

Post by TomKerekes » Mon Mar 30, 2020 3:54 pm

Hi Marcio,

Yes you should be able to use a similar configuration as used with KStep Spindle Control. See the Spindle_S_Kstep.c, Spindle_Off_KStep.c, Spindle_CW_Kstep.c, Spindle_CCW_KStep.c examples in the \C Programs\KStep\KMotionCNC directory. Configure them in the KMotionCNC Tool Setup for the S, M5, M3, M4 Actions respectively. Use any unused Thread and Var=1

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply