idk why lathe changes

Moderators: TomKerekes, dynomotion

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Sun Feb 18, 2024 3:20 am

Ok, I'll give it another go in the morning

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Sun Feb 18, 2024 6:47 pm

ok, so i set all the CSS in the cnc tool set up screen...

Image


i also load each one in the program C code and save,compile,download and run them all

Image

then i get this error

Image

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Sun Feb 18, 2024 6:49 pm

is there anything like delete everything on the kflop and start fresh?
when i do arduino stuff each download is all that is on it. on here you download multiple codes i guess?

also i am Leary of wiring the servo amp drives to kmotioncnc to Estop disable, as when the program locks up on windows the servo (in the real world) would still be doing scary stuff

chatbots take on my concern from above. lol

"While I recognize the convenience of wiring the servo amplifier drives to KMotionCNC for E-stop disable functionality, I harbor reservations about this approach. My concern stems from the possibility of program lock-ups occurring on the Windows platform. In such scenarios, while the software may become unresponsive, the servo system, operating in the physical world, could continue to execute commands, potentially leading to hazardous situations. Thus, I believe it's imperative to explore alternative solutions or additional safety measures to mitigate these risks effectively."

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Sun Feb 18, 2024 7:01 pm

i have 10 hundred more questions and pics but i will wait for a reply to not muddy this up

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

Re: idk why lathe changes

Post by TomKerekes » Sun Feb 18, 2024 7:21 pm

Hi
i also load each one in the program C code and save,compile,download and run them all
That isn't necessary unless you wish to check them for compile errors. As KMotionCNC will automatically Compile/Download/Run them whenever needed.

then i get this error
CSSJog.c is a function not a program so it can't be compiled by itself. It is meant to be included in your INit C Program and called in a forever loop in order to do CSS (Constant Surface Speed).

The Spindle C Program to be used for the 'S' Action is SpindleJog.c

Also you should pick a different Thread for the 4 Spindle Programs. Thread 1 is normally used by your Init C Program and may continue to run forever to handle things like CSS. If another program uses Thread 1 it will kill it.

is there anything like delete everything on the kflop and start fresh?
Normally nothing is saved in KFLOP so it always remains in its default state unless you have flashed something to KFLOP by mistake. There's no need to save anything in KFLOP as the PC loads/sets whatever it needs whenever it needs it. To be absolutely sure KFLOP is in its default/virgin state re-Flash New Version.

also i am Leary of wiring the servo amp drives to kmotioncnc to Estop disable, as when the program locks up on windows the servo (in the real world) would still be doing scary stuff
That is very true. Relying completely on software for safety protection is not good practice. I think there should always be a pure hardware mechanism for EStop. But note that KFLOP is not dependent on the PC. It can perform actions even if the PC is locked up. I think the best approach is to have both. A way for KFLOP to be able to disable things but also have EStop disable things in hardware.
Regards,

Tom Kerekes
Dynomotion, Inc.

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Sun Feb 18, 2024 9:10 pm

TomKerekes wrote:
Sun Feb 18, 2024 7:21 pm
Hi
i also load each one in the program C code and save,compile,download and run them all

That isn't necessary unless you wish to check them for compile errors. As KMotionCNC will automatically Compile/Download/Run them whenever needed.
Kmotioncnc will run them from where? in the C codes folder?
i thought it would only run c codes from what is downloaded to it?

then i get this error

CSSJog.c is a function not a program so it can't be compiled by itself. It is meant to be included in your INit C Program and called in a forever loop in order to do CSS (Constant Surface Speed).
ok i will do that
i did not do any of this before and a couple weeks ago the lathe functioned flawless


Also you should pick a different Thread for the 4 Spindle Programs. Thread 1 is normally used by your Init C Program and may continue to run forever to handle things like CSS. If another program uses Thread 1 it will kill it.
where is this information at? is there other thread numbers i should not use?

There's no need to save anything in KFLOP as the PC loads/sets whatever it needs whenever it needs it.


loads from where?

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

Re: idk why lathe changes

Post by TomKerekes » Sun Feb 18, 2024 11:06 pm

i also load each one in the program C code and save,compile,download and run them all

That isn't necessary unless you wish to check them for compile errors. As KMotionCNC will automatically Compile/Download/Run them whenever needed.
Kmotioncnc will run them from where? in the C codes folder?
i thought it would only run c codes from what is downloaded to it?
Whatever C Program file in whatever folder you specify will be compiled, downloaded, and Run. The KMotion.exe C Program Screen is useful to write and test C Programs. After the C Program file on the PC is created it can be used by KMotionCNC and executed in any Thread (not necessarily the Thread that you tested it originally in KMotion.exe). Think of a Thread as a worker capable of following a list of instructions. KFLOP has 7 workers (7 Threads available). You can pass any list of instruction to any worker to follow. The worker doesn't already have to have the list already or memorized. If a worker is performing a list of instructions and is given a new list he throws away the current list and starts working on the new list.

CSSJog.c is a function not a program so it can't be compiled by itself. It is meant to be included in your INit C Program and called in a forever loop in order to do CSS (Constant Surface Speed).
ok i will do that
i did not do any of this before and a couple weeks ago the lathe functioned flawless
Once the machine was working flawlessly you should have saved everything so you could restore it. Evidently things have been changed. The original default KMotionCNC Configuration should have been close to working for you.

Also you should pick a different Thread for the 4 Spindle Programs. Thread 1 is normally used by your Init C Program and may continue to run forever to handle things like CSS. If another program uses Thread 1 it will kill it.
where is this information at? is there other thread numbers i should not use?
Threads are explained here. KFLOP doesn't use User Threads for anything. Its up to you to keep track of how you use the Threads (workers) so as to not assign multiple tasks to the same Thread (worker) at the same time. Most CNC systems just need 2 Threads. #1 for Initialization and possibly a forever loop to continuously monitor things. #2 for Spindle operations. If you have other things like for example a Tool Changer Program then you might use a 3rd Thread even though it is probably unlikely to do Spindle stuff and Tool Change Stuff at the same time since there are 7 available better to use a separate one to be safe.

There's no need to save anything in KFLOP as the PC loads/sets whatever it needs whenever it needs it.


loads from where?
C Program files reside on the PC Disk in folders.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Mon Feb 19, 2024 12:21 am

excellent. that makes a lot of sense to me
Once the machine was working flawlessly you should have saved everything so you could restore it. Evidently things have been changed. The original default KMotionCNC Configuration should have been close to working for you.
in my other thread i posted my working settings and put them back in after a clean kmotion download and get erratic behavior still. i try and save some stuff in the threads when they work so me or others can see them anytime


so when you load/try a C code and smash that button, that is the only thing immediately functioning? like a temp or volatile memory kinda thing?
Image

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

Re: idk why lathe changes

Post by TomKerekes » Mon Feb 19, 2024 3:48 am

i try and save some stuff in the threads when they work so me or others can see them anytime
Well like I tried to explain the Threads don't "save" anything. Think of the KMotionCNC Program Screen as a text editor that can be used to view and edit C Programs files. Not necessarily what is in the corresponding KFLOP Thread memory. KMotion does remember the last file that was edited but not necessarily what is currently in KFLOP, if anything.

The Save/Compile/Download/Run button does just that. It takes the C file you are looking at, saves it to the PC Disk (as you might have changed something), Compiles the file, Downloads it to KFLOP into the selected Thread, and tells KFLOP to execute it.

You are right KFLOP's Memory, including the memory used for Threads, is volatile dynamic memory. When power goes off it is lost. But no matter whenever something is needed to execute it is first downloaded to KFLOP.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

turbothis
Posts: 310
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

Re: idk why lathe changes

Post by turbothis » Mon Feb 19, 2024 3:07 pm

cool
saves it to the PC Disk
is this something i can open and look at?

Post Reply