KFLOP disables axis when starting inverter for the spindle

Moderators: TomKerekes, dynomotion

Photojet
Posts: 11
Joined: Mon Sep 27, 2021 2:06 pm

KFLOP disables axis when starting inverter for the spindle

Post by Photojet » Thu Nov 04, 2021 3:50 pm

Hi,
I finally managed to setup my KFLOP CNC and ran a G-code in KmotionCNC with the spindle OFF.
However, as soon as I start the inverter for the spindle, or if it's already on before running the G-code, KFLOP almost instantaneously disables the axis. The limit switches are NOT triggered when the axis is disabled(looked at the digital IO screen). The inverter is NOT connected to the KFLOP, I switch it on manually for the tests,

Thinking that there might be interference due to the close proximity of the inverter and the KFLOP, I moved the inverter 2 meters away, and also moved the power cables out of the cable chain, so that they are completely separated from all other cables. Still the same happens. Everything works if the spindle is off and if it's on the axis is disabled!???

Took out the spindle and installed it on another CNC, close by, which runs on a cheap Chinese USB BOB and much to my surprise Kmotion CNC again disables the axis as soon as I run the inverter, which is now on a completely different machine and there is no physical connection between the KFLOP CNC and the inverter nor the cables and spindle!??? It's like your coffee machine stopping if you turn on the lights.

Both CNCs are plugged in the same mains power strip. The one with the Chines BOB runs just fine with the inverter and spindle on and off.

KFLOP is powered from the computer running the Kmotion CNC, which is connected on the same mains power strip as well as all the other electronics.

Please advise what might be the issue and how to solve it. Thanks a lot!
Martin

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

Re: KFLOP disables axis when starting inverter for the spindle

Post by TomKerekes » Fri Nov 05, 2021 12:42 am

Hi Martin,

Any messages on the KMotion.exe Console?
or if it's already on before running the G-code, KFLOP almost instantaneously disables the axis.
I don't fully understand. So the axis doesn't disable until you run GCode?

The limit switches are NOT triggered when the axis is disabled(looked at the digital IO screen).
You may not see anything on the Digital IO screen. It only samples a few times per second. A noise spike might be a microsecond. Are your Limits Opto Isolated?

Do you have any C Programs running?

What type machine do you have? What type of Axes configurations?

Which axes disable?
Regards,

Tom Kerekes
Dynomotion, Inc.

Photojet
Posts: 11
Joined: Mon Sep 27, 2021 2:06 pm

Re: KFLOP disables axis when starting inverter for the spindle

Post by Photojet » Fri Nov 05, 2021 8:27 am

Hi Tom,

If the inverter, respectively the spindle, is running and you try to jog any axis in the KmotionCNC, it moves a fraction of a millimeter and gets disables and it's DRO becomes yellow. Neither the inverter nor the spindle is attached to the CNC running on KFLOP. Those are just plugged in the same mains power strip.

Kmotion CNC initializes and all DROs are green and if the spindle is off you can jog, run G-code and all is fine. Once you start the spindle you can't jog nor run G-code, the respective axis that you're trying to move gets disabled instantaneously.
The optical limit switches- as per the attached picture, are connected to inputs 0 through 5 on the KFLOP(2 for each of the 3 axis) and Kmotion CNC reacts properly to those when the spindle is off. You jog to the limit and movement stops when you reach it and after re-init you move away from the limit.
I have added a button to KmotionCNC that runs the original SimpleHomeIndexFunctionTest.c in which I just replaced the limit bit values(138, etc.) with the ones on my CNC, namely 5 for Z, 0 for X and 2 for Y but when you press the button, this just moves all axis maybe 10 mm and then returns them to a position that it considers 0. It doesn't go to the limit switches at all. Starts moving towards them, stops shortly, moves away and is considered zeroed.
The other C program is the INIT that runs fine.

It's a simple 3 axis CNC with a slaved Y axis for the gantry but all this works fine as long as the inverter is OFF!??
The axis that you try to jog when the spindle is on gets disabled.
Hope this helps clarify the mystery.
LimitSwitch.jpg

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

Re: KFLOP disables axis when starting inverter for the spindle

Post by TomKerekes » Fri Nov 05, 2021 8:59 pm

Hi Martin,

Seems you have noise on the limit inputs.

Any messages on the KMotion.exe Console?

How are the Limits configured? I'm guessing "Disallow Drive into Limit" which would disable as soon as the axis moves and a noise glitch occurs.

KFLOP inputs are 3.3V and very fast. Normally 24V opto isolated signals are run out to the machine. See our Konnect Option.

Does the Homing routine fail with the Spindle off? If so you might have the wrong polarity.
Regards,

Tom Kerekes
Dynomotion, Inc.

Photojet
Posts: 11
Joined: Mon Sep 27, 2021 2:06 pm

Re: KFLOP disables axis when starting inverter for the spindle

Post by Photojet » Tue Nov 09, 2021 1:28 pm

Hi Tom,

The limits are configured "Disallow drive into limit".
The Console's message is "Pos Limit Disabled Axis", followed by the respective axis No.

On a small prototype board I have soldered the cables from the KFLOP to connectors for all the limit switches and motors. The cable is 20 cm long.
On this board I connected a 100 nF capacitor between the each signal and GND of the limit switches. Didn't have any effect whatsoever.

After that, I tried and disconnected all 6 limit switches from the KFLOP(the capacitors were still there) but much to my surprise, when I ran the spindle and tried to jog, KFLOP again blocked the movement and gave "Pos Limit Disabled Axis" although NO limit switches are connected!??
Hope you can come up with a solution as I really need to get this CNC running and certainly wouldn't want to replace the KFLOP with the $20 Chinese USB BOB , which on the other hand worked!? Thank you!

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

Re: KFLOP disables axis when starting inverter for the spindle

Post by TomKerekes » Tue Nov 09, 2021 7:26 pm

Hi Martin,
The limits are configured "Disallow drive into limit".
The Console's message is "Pos Limit Disabled Axis", followed by the respective axis No.
That would confirm noise on the inputs.
On a small prototype board I have soldered the cables from the KFLOP to connectors for all the limit switches and motors. The cable is 20 cm long.
On this board I connected a 100 nF capacitor between the each signal and GND of the limit switches. Didn't have any effect whatsoever.
Its not clear what you mean by "GND of the limit switches". It should be a short connection to KFLOP GND.
After that, I tried and disconnected all 6 limit switches from the KFLOP(the capacitors were still there) but much to my surprise, when I ran the spindle and tried to jog, KFLOP again blocked the movement and gave "Pos Limit Disabled Axis" although NO limit switches are connected!??
That would indicate noise being introduced into your prototype board or the cable from it to KFLOP.

You might describe your grounding. What is the topology? Is everything isolated from Earth GND?

What type of circuit are you using? KFLOP inputs must be driven high and low. Not left open.

What Voltage is on the input? When driven high and low?

As a test you might add the capacitor very close to KFLOP with an approach like this.

CapacitorOnReset-9011.jpg
Regards,

Tom Kerekes
Dynomotion, Inc.

Photojet
Posts: 11
Joined: Mon Sep 27, 2021 2:06 pm

Re: KFLOP disables axis when starting inverter for the spindle

Post by Photojet » Wed Nov 10, 2021 1:19 pm

Hi Tom,
TomKerekes wrote:
Tue Nov 09, 2021 7:26 pm
Its not clear what you mean by "GND of the limit switches". It should be a short connection to KFLOP GND.
I mean the GND pin of the limit switch, which is connected to the KFLOP GND.
TomKerekes wrote:
Tue Nov 09, 2021 7:26 pm
You might describe your grounding. What is the topology? Is everything isolated from Earth GND?
Grounds from all 6 limit switches are shorted and connected to pins 25 and 26 of JP7 on the KFLOP.
Pins 23 and 24 supply the 5V for the 6 limit switches and the 4 stepper drivers.
To power up the KFLOP I disconnected the PC power supply and used a 5V/2A adapter where the KFLOP GND is isolated from Earth GND.
However, I'm using a PC to run KFLOP and I get Earth GND to the KFLOP from the USB.
TomKerekes wrote:
Tue Nov 09, 2021 7:26 pm
What Voltage is on the input? When driven high and low?
The input voltage on the limit switches is 0.5V when they are open and 3.66 V when they have been triggered. The supplied voltage to the
KFLOP is 5.2V and I don't know why the limit switches don't go to 5V.

I'll also try and add the capacitors as you suggested, just have to solder 3 pins together in order to use the 2 GND pin openings for the 6 switches.
Is 1 nF enough?

Kind regards,
Martin

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

Re: KFLOP disables axis when starting inverter for the spindle

Post by TomKerekes » Wed Nov 10, 2021 4:35 pm

Hi Martin,
The input voltage on the limit switches is 0.5V when they are open and 3.66 V when they have been triggered. The supplied voltage to the
KFLOP is 5.2V and I don't know why the limit switches don't go to 5V.
0.5V for a low is a little bit high. LVTTL inputs should register low below 0.8V but outputs should drive below 0.4V for good noise margin. Most outputs drive below 0.2V especially when connected to CMOS inputs like KFLOP that have virtually zero load. It makes me wonder if the switch outputs are actually driving low or are they just going open? Do you have the specification?

KFLOP inputs are 3.3V LVTTL and are diode clamped to the 3.3V supply. Although they tolerate 5V they should never be intentionally driven above 3.3V plus one diode drop or ~3.8V or there will be large clamping currents. Most 5V TTL outputs do not do this. Minimum level for a High is 2V.

I'll also try and add the capacitors as you suggested, just have to solder 3 pins together in order to use the 2 GND pin openings for the 6 switches.
Is 1 nF enough?
1 nF is normally sufficient unless the noise pulses are exceptionally wide and large. Since the limits aren't relatively fast a larger value such as 100nF might be used. Although bigger isn't always better. Do you have an oscilloscope? Here is a good article.
Last edited by TomKerekes on Wed Nov 10, 2021 4:37 pm, edited 1 time in total.
Reason: typo
Regards,

Tom Kerekes
Dynomotion, Inc.

Photojet
Posts: 11
Joined: Mon Sep 27, 2021 2:06 pm

Re: KFLOP disables axis when starting inverter for the spindle

Post by Photojet » Thu Nov 11, 2021 8:00 pm

Hi Tom,

Managed to find the model of the optical limit switches. Attached is the datasheet.
Still can't get the board to work although no limit switched are connected.
Checked the soldering of the connectors on the prototype board and there are no shorts and 5V are supplied by the KFLOP to all
limit switches and the drivers.
As mentioned, KFLOP is not isolated from Earth GND as I get it from the USB cable.
Any suggestions?

Kind regards,
Martin
Attachments
moc70t2.pdf
(562.6 KiB) Downloaded 131 times

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

Re: KFLOP disables axis when starting inverter for the spindle

Post by TomKerekes » Thu Nov 11, 2021 9:38 pm

Hi Martin,
Managed to find the model of the optical limit switches. Attached is the datasheet.
Good. But that's the sensor. What is the circuitry on that board and what is on your prototype board?

Still can't get the board to work although no limit switched are connected.
What do you mean by this? Without anything connected the signals would be floating and would likely operate randomly.

As mentioned, KFLOP is not isolated from Earth GND as I get it from the USB cable.
That's normal. Are you sure there are no other Eath ground connections? You might try a USB isolator.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply