SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Moderators: TomKerekes, dynomotion
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
one more question regarding to parameters, i am making some voice WAV. messages to better explain the operator when something is wrong.
I im trying to use a C program with parameters and use only one Mxx code to call them, just like i did to activate a multisipndle boring drills in other machine, so that way i can save the rest of the Mxx number available, but i don't know how to execute the powershell bat. file from C program, do you think is this possible?
regards
I im trying to use a C program with parameters and use only one Mxx code to call them, just like i did to activate a multisipndle boring drills in other machine, so that way i can save the rest of the Mxx number available, but i don't know how to execute the powershell bat. file from C program, do you think is this possible?
regards
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
Regarding boring head: if you don't mind using the A Axis why not just use that. The GCode would move A when you need to bore and move Z when you want to use the normal Spindle. No need to disable one or the other just only move the one you need.
Regarding WAV file. You could use a ScreenScript command to execute an Action to execute a PC Batch file. Such as:
Regarding boring head: if you don't mind using the A Axis why not just use that. The GCode would move A when you need to bore and move Z when you want to use the normal Spindle. No need to disable one or the other just only move the one you need.
Regarding WAV file. You could use a ScreenScript command to execute an Action to execute a PC Batch file. Such as:
Code: Select all
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
void main()
{
if (ScreenScript("Action:7;0;0;0;0;0;C:\\Temp\\LimitSwitch.bat"))
printf("Screen Script Failed\n");
else
printf("Screen Script Success\n");
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Tom.
thank you for the previous answers you gave me, programs works perfect now.
I have an other issue with the cnc router that has been working almost two years with kflop and kannalog, most of the time it works perfect, but sometimes it skip C program functions, for example it uses 4 independent spindles, they are controlled by M codes, the operator said sometimes when the machine finish using one spindle and switch to use a different spindle, it does not turn on or it does not orient spindle down, although the g code and machine keeps running normal, so he has to stop the machine, do reset home and cycle start over again, that issue happen sometimes only, it may work for weeks or days all day long with no problem, and sometimes happen.
thank you for the previous answers you gave me, programs works perfect now.
I have an other issue with the cnc router that has been working almost two years with kflop and kannalog, most of the time it works perfect, but sometimes it skip C program functions, for example it uses 4 independent spindles, they are controlled by M codes, the operator said sometimes when the machine finish using one spindle and switch to use a different spindle, it does not turn on or it does not orient spindle down, although the g code and machine keeps running normal, so he has to stop the machine, do reset home and cycle start over again, that issue happen sometimes only, it may work for weeks or days all day long with no problem, and sometimes happen.
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
I don't see anything obvious.
Please post your GCodeConfigCNC.txt so we can see how things are configured.
The next time it happens you might stop and investigate what went wrong. What was the GCode that last executed. What was the last MCode? What should the Outputs be? Check KMotion.exe Digital IO Screen to see what they actually are? If the Bits are on and off are the Relays actually on and off respectively? Anything printed on the Console? Is it always the same spindle?
Maybe add printf statements in the Spindle Change Programs to see if/what was actually called.
Although it shouldn't be necessary, you might add switches/inputs to verify the Spindle actually came down or on. That could help diagnosing the problem.
What Version are you running?
Sorry for no simple solution.
I don't see anything obvious.
Please post your GCodeConfigCNC.txt so we can see how things are configured.
The next time it happens you might stop and investigate what went wrong. What was the GCode that last executed. What was the last MCode? What should the Outputs be? Check KMotion.exe Digital IO Screen to see what they actually are? If the Bits are on and off are the Relays actually on and off respectively? Anything printed on the Console? Is it always the same spindle?
Maybe add printf statements in the Spindle Change Programs to see if/what was actually called.
Although it shouldn't be necessary, you might add switches/inputs to verify the Spindle actually came down or on. That could help diagnosing the problem.
What Version are you running?
Sorry for no simple solution.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
I have tested the external contactors and and valves, they work ok. also i teach the operator to open the digital IO screen and see if the respective bits are on, but he say they doesn't turn on when that happen. console doesn't show any errors, i recently updated the last version 5.3.1 but it did it again last week, the machine works 8 to 10 hours a day anyway, like i said it only happen two or three times not very often.
also the machine is running always the same operation same G code program.
thank you
also the machine is running always the same operation same G code program.
thank you
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
You might record which MCode didn't work and which Bits were not set properly. It may help to find the issue. It doesn't look like you posted all the C Programs for every MCodes. It might be an issue with Virtual bits vs hardware bits.
You might add the printfs to determine if the C Program actually executed or not.
I see the MCodes are set to "Execute Prog". In this case the GCode doesn't wait for the C Program to finish before going on. The danger would be that another C Program to use the same Thread Kills the Thread and downloads the next program to the Thread before the first C Program finishes. Probably unlikely as these programs mostly only set bits so should only take microseconds. But it would be better to change to "Exec/wait/sync" so the GCode doesn't continue until the MCode has finished. Please try this to see if it has an effect.
You might record which MCode didn't work and which Bits were not set properly. It may help to find the issue. It doesn't look like you posted all the C Programs for every MCodes. It might be an issue with Virtual bits vs hardware bits.
You might add the printfs to determine if the C Program actually executed or not.
I see the MCodes are set to "Execute Prog". In this case the GCode doesn't wait for the C Program to finish before going on. The danger would be that another C Program to use the same Thread Kills the Thread and downloads the next program to the Thread before the first C Program finishes. Probably unlikely as these programs mostly only set bits so should only take microseconds. But it would be better to change to "Exec/wait/sync" so the GCode doesn't continue until the MCode has finished. Please try this to see if it has an effect.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Tom
regards
I think that will be the solution changing to "Exec/wait/sync", because it seems that there is not enough time to execute the action, now i see why, thank you, i almost sure that would work.TomKerekes wrote: ↑Wed Feb 07, 2024 1:26 amI see the MCodes are set to "Execute Prog". In this case the GCode doesn't wait for the C Program to finish before going on. The danger would be that another C Program to use the same Thread Kills the Thread and downloads the next program to the Thread before the first C Program finishes. Probably unlikely as these programs mostly only set bits so should only take microseconds. But it would be better to change to "Exec/wait/sync" so the GCode doesn't continue until the MCode has finished. Please try this to see if it has an effect.
how can add this pritfs? will that appear in console?TomKerekes wrote: ↑Wed Feb 07, 2024 1:26 amYou might add the printfs to determine if the C Program actually executed or not.
regards
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
Add for example:
When the printf executes the message will go to the KMotion Console.
Add for example:
Code: Select all
printf("MCode 101 switching to Spindle #2\n");
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Thank you Tom.
is there some way to save all history in a folder or file, where i can see the functions record from days or weeks? console clears when turn kflop off right?
is there some way to save all history in a folder or file, where i can see the functions record from days or weeks? console clears when turn kflop off right?
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SETTING UP KFLOP, KANALOG FOR NEW CNC ROUTER RETROFIT
Hi Noel,
Console messages are accumulated into the file \KMotion\Data\LogFile.txt
But Console messages are only logged when KMotion.exe is running.
Console messages are accumulated into the file \KMotion\Data\LogFile.txt
But Console messages are only logged when KMotion.exe is running.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.