Issue with Getcurrentgcodelinenumber()

If you think you've found a bug post it here.

Issue with Getcurrentgcodelinenumber()

Postby kig23 » Wed Sep 27, 2023 2:39 pm

Hi,
i'm using in plugin the method Getcurrentgcodelinenumber(), but returns 0 when there is a gcode file loaded and the line number DRO shows not 0. I tested with version 1.2113 and 1.2115 with realy simple code that handles button press and should display the line number using Getcurrentgcodelinenumber(), but the method returns 0. Am i missing something?
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Issue with Getcurrentgcodelinenumber()

Postby kig23 » Fri Sep 29, 2023 10:17 am

Thanks. No need to replay. Solved
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Issue with Getcurrentgcodelinenumber()

Postby tau » Fri Sep 29, 2023 3:10 pm

what was the problem?!
tau
 
Posts: 19
Joined: Sun Feb 26, 2017 8:06 pm

Re: Issue with Getcurrentgcodelinenumber()

Postby kig23 » Fri Sep 29, 2023 4:14 pm

Hi tau,
when you load gcode file and without start it scroll the gcode to go to certain line and execute Getcurrentgcodelinenumber (), the function will return 0 instead of the number writen in gcode line dro. But if you start the gcode and then stop it the function returns the correct value (the line that the gcode was stoped). I suppose the function works that way by design.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Issue with Getcurrentgcodelinenumber()

Postby cncdrive » Fri Sep 29, 2023 8:01 pm

Yes, it works that way by design.
Or you can press the run from here after scrolling the code if you don't want to start the code.
cncdrive
Site Admin
 
Posts: 4901
Joined: Tue Aug 12, 2014 11:17 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 2 guests