Hello Guest it is April 28, 2024, 08:41:11 PM

Author Topic: loadGcodeFile with api how cheack its compleate  (Read 1073 times)

0 Members and 1 Guest are viewing this topic.

Re: loadGcodeFile with api how cheack its compleate
« Reply #10 on: January 17, 2022, 12:32:03 PM »
finally what i did its wait according file length there some files 100k need wait several second there files 4 k need 2seconds so what i didi is wait 2 sec+ value according file length,but i think its not correct way
if from any reason mch not finish load but you start run you can get very dangerous move
But you cant add too much delay for safety
Re: loadGcodeFile with api how cheack its compleate
« Reply #11 on: January 17, 2022, 12:38:29 PM »
finally what i did its wait according file length there some files 100k need wait several second there files 4 k need 2seconds so what i didi is wait 2 sec+ value according file length,but i think its not correct way
if from any reason mch not finish load but you start run you can get very dangerous move
But you cant add too much delay for safety

Okay...so just read number of lines in the file in C#, put a gcode comment at the end of your .tap files, then use  mcCntlGetGcodeLineNbr using the number of lines found (last line -- your comment) and break on that condition. If the last line after loading the file is equal to that comment then the complete file is loaded.

But i doubt the file is loaded in chunks. Once it's loaded it should be completely loaded.