Page 10 of 27

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

Posted: Fri Mar 25, 2022 6:31 pm
by TomKerekes
Ah. I see in CarouselPosition you aren't returning the result. If you would have followed my advice the Validator would have warned you of this:

Validate.png
btw 3 bit binary will be 0 to 7. To have 1 to 8 add 1.

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

Posted: Sat Mar 26, 2022 1:07 am
by NOELNOG
Thanks Tom

the binary program is running now, it can read each tool using three sensors, one more thing regarding to ATC operation, why when i start cycle the spindle goes to the carousel to get the tool already in it, and also the pop up "set value tool in spindle" will always be there when power up the system? or is there some way to hide it and the software remember what tool was the the last one used?

thanks

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

Posted: Sat Mar 26, 2022 2:14 am
by TomKerekes
The ARotateToolChanger.c example has routines to Save and Get the current tool to a disk file on the PC. You may not be calling those routines. You didn't post your current code. There is also a check to only load the tool if the current tool is not equal to the requested tool. In C the "not equal" operator syntax is '!='

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

Posted: Mon Mar 28, 2022 8:59 pm
by NOELNOG
ROTARY TOOL CHANGE BINARY BITS.c
(15.36 KiB) Downloaded 21 times
Hi Tom

this the ATC C. Program, it only needs to recognize the current tool in the spindle, the console prints ok the current tool and requested tool, but spindle still go to carousel with the already tool in it.

thanks

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

Posted: Tue Mar 29, 2022 12:52 am
by TomKerekes
Can you see which lines are skipped? by:

Code: Select all

       if (CurrentTool != Tool)
What section of code do you think should be skipped?

Your poor indentations, unused comments, and unnecessary blank lines make it difficult to see or read. Neatness really helps.

You might read this.

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

Posted: Thu Mar 31, 2022 5:13 pm
by NOELNOG
TomKerekes wrote:
Tue Mar 29, 2022 12:52 am
Can you see which lines are skipped? by:

Code: Select all

       if (CurrentTool != Tool)
What section of code do you think should be skipped?

Your poor indentations, unused comments, and unnecessary blank lines make it difficult to see or read. Neatness really helps.

You might read this.

TOOLCHANGE LAST TOOL,TEST.c
(13.88 KiB) Downloaded 21 times

Hi Tom

i am lost, i tried to guess what section of code should be skipped to perform this operation, i know i have to take a c programming course but for now my time is limited but i will, for now i need to finish this, i aprecciate for your help.


this is the actual program i am using, everything works great the only thing is that it needs to remember the last tool in spindle.

Thanks

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

Posted: Thu Mar 31, 2022 7:43 pm
by TomKerekes
Try the attached code

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

Posted: Thu Mar 31, 2022 9:36 pm
by NOELNOG
Thank you Tom

the program still doing the same,this is what it does: when the tool number requested match with the last tool saved the machine still going to carousel, leave the tool, unclamp, raise z axis then the carousel doesn't rotate because it recognize the tool is already in the spindle, then z axis go down, clamp pull the tool out and go to work, when the tool requested is different to last tool saved it does the same routine but now it rotates until the requested tool position and go to work, looks like the c program is not saving in TOOL_DISK_FILE because everytime i restart the kflop it ask me "tool in spindle" or -1

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

Posted: Fri Apr 01, 2022 10:14 pm
by TomKerekes
We forgot to skip unloading the tool unless the tool is different.

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

Posted: Sat Apr 02, 2022 12:23 am
by NOELNOG
Thank you Tom.

the program is working now, almost done this machine.
regarding to the pop up window at the power up asking for tool in the spindle or -1, it always will be there? or it can be disabled, or it's very important? i mean it doesn't matter if it shows up every time just asking.

regards