SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Moderators: TomKerekes, dynomotion

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Mon Oct 16, 2023 11:32 pm

Hi Noel,

If everything is properly reset there shouldn’t be a problem. Does the machine run away before everything is reset?
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Mon Oct 16, 2023 11:42 pm

No it run away when reset the main starter sometimes but not when reset init button, the machine has been working for one year with no problems but we think the problem come from power failure because we noted that when one phase fails and the other two phases still on the drives still powered on but they blink so maybe they are lost when missing one phase,

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Tue Oct 31, 2023 3:05 pm

Hi Tom
this is the Init C program we are using on the cnc router from one year ago, we still having issues when main power fails, the machine runs away when power goes out and come back, it drives crazy, and crashed the tool against bed.
we have the pc, kflop and kanalog powered from UPS to keep them on when power goes out, but do you think is that wrong? is there a chance that when power goes out the controller still accumulating data from software since the pc and conroller still on by the UPS and when the drives turns back on runs fast to execute that accumulated data? do you think it is better to power the controller from a non UPS outlet?
maybe my C init program is not correct, and behaves erratic when power goes out.

Thanks in advance
INITreset,FINAL.c
(13.94 KiB) Downloaded 83 times

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Tue Oct 31, 2023 5:06 pm

Hi Noel,

If when you lose motor power and the motors stop and the trajectory continues there will be huge errors and the Servo will output max to try to reduce the errors which of course it can't do with power off. If you turn power back on the motors will take off violently at maximum trying to correct the huge errors that have accumulated.

A loss of power signal should be input to KFLOP so that it is aware of power loss and can disable the axis which will then require a re-initialization on power up.

Another approach is to use Maximum Following Error to detect errors. I see they are currently set at 1000000000 so effectively disabled. If loss of motor power the Position will not be able to follow the trajectory and a relatively large error will occur and the axis will disable. This avoids any violent corrections that might otherwise occur when power comes back on. The Step Response Screen might be used to determine the maximum following errors for the axis under all normal conditions. Then set Max Following Error to a somewhat larger value. For example if the axis normally always follows with less than 100 counts of error the Max Following Error might then be set to 150.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Tue Oct 31, 2023 5:19 pm

Thank you Tom

I will try that way, i am sure there is a remedy for that, :D just still learning, i am about to order two kflop cards and some konnects for other two machines, so need more training

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Fri Nov 03, 2023 5:22 pm

Hi Tom

what function can i use in the init c program to use one single button to do two things, for example, click the button once and enable the axis, then click it again and execute reset home etc. right now it does enable the axis but it execute home reset at same time since i don't have the code to wait until press the button again.

thank you

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

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by TomKerekes » Fri Nov 03, 2023 6:37 pm

Hi Noel,

You might check at the beginning if the axes are all enabled, if so home. Otherwise initialize the axes and enable them.

Code: Select all

    if (ch0->Enable && ch1->Enable && ch2->Enable)
    {
    	//Home
    {
    else
    {
    	// Initialize and enable
    }
Regards,

Tom Kerekes
Dynomotion, Inc.

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Fri Nov 03, 2023 11:27 pm

Thank you Tom

it works ok now :D

NOELNOG
Posts: 165
Joined: Wed Nov 10, 2021 3:54 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by NOELNOG » Mon Nov 27, 2023 3:19 pm

Hi Tom.

I am trying to understand more about Threads, i am reading and reading but it is not clear to me how they works, on my already cnc machine working configuration, all threads are in number 1, I modified some of them to other numbers between 1 to 7 but the machine stop doing some functions, so i return them where it was, but i need to understand what are they for.

thank you.

Moray
Posts: 288
Joined: Thu Apr 26, 2018 10:16 pm

Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT

Post by Moray » Tue Nov 28, 2023 12:27 am

Without going through all your C programs, it's hard to give any specific advise.

Generally you'd have your main init.c (your main configuration program, typically combined with an endless loop for machine monitoring) running in one thread.
You'd then use other threads to carryout specific tasks, such as homing, tool change.
Which thread you run those in, depends on on what they are doing.
You may have individual programs for homing each axis, in which case you'd probably want to run them in different threads, just to avoid any issues with killing a C program mid-homing.

Post Reply