Restart from the any position of the trajectory

Post anything you want to discuss with others about the software.

Restart from the any position of the trajectory

Postby shad » Sun Feb 12, 2017 1:57 pm

Hello Balasz!
Is it possible to stop cutting program in any time, then move back on the any previous position using G0 command (I know exactly this position)? Then continue to move from this position.
Just I am make any tests and see that this is possible.
But any time when I am restart from desired position of the trajectory, I have incorrect moves - torch can move near trajectory and then return on the correct path. Usually if I am try to restart from arc.

Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby shad » Sun Feb 12, 2017 2:30 pm

This is the short video about issue. Look when I am try to restart cutting. Torch restart to move near of the exact path, but then return to path.
For continue the moves I am use:
Code: Select all
UC.Codesync("M3");
UC.Callbutton(128);

https://www.dropbox.com/s/iopd2snru8kw29k/RestartFromAny%20point.wmv?dl=0
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby shad » Sun Feb 12, 2017 3:22 pm

Balasz, I think the problem in incorrect number of the code line. Just I am return on the desired position on previous line and when try to restart UCCNC use the next line. Please tell me, how I can set line of the code for execution from plugin?
I am try to set desired line via Setfield and Validatefield functions for #866 field, but when M3 issue, gcode line number return to the next line value where motion was stopped.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby shad » Sun Feb 12, 2017 7:26 pm

For example I have arc lost issue on the line #34. Plugin store arc lost position and current line number, but since there is a delay in the "THCarconsignalon_emulation" I have delayed stop of the motion.
If stop was on the same code line (#34) all fine. But any time motion stop on the next line, for example #35.
In this case I can move on the stored arc lost position with G0 command and change line number to #34 with Setfield and Validatefield functions, but when "M3" issue, UCCNC change line number to the #35 and line #35 movement begins.
Question - how I can start in this situation?
Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby cncdrive » Sun Feb 12, 2017 8:13 pm

Hi Andrew,

What you have to do to change the current line number is you have to call the Setnextline button code 169.
How the g-code execution and Code and Codesync and MDI functions work is that they passing an ID to the API with every motion command which ID is basicly the g-code line number.
And when the API executes a g-code line it gives back the ID of that line, so the software knows where the g-code execution is at.
When it is an MDI, Code or Codesync command when the g-code execution is stall then the ID is simply the current line ID, in other words the ID of the last line executed.
When you change the current line number DRO and call the Setnextline button code then the software sends a dummy command with the ID of that line number,
so the motion controller will update the line number and will feedback that ID, so the g-code to be executed next time will be that line.

I see one issue though is that the Run From here window will show up after you call the Setnextline button,
I don't know if it is a problem for your application or not, but if it is then I could add a function to the plugininterface which could set the Run From here window run on next cycle start variable to false.
Just let me know if it is an issue and I will do this...
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Restart from the any position of the trajectory

Postby shad » Mon Feb 13, 2017 5:35 am

Thank you Balasz!
Yes, I am understand. But RFH function always return torch on the start position of the selected code line.
I need to restart from any position of the line, for example from the middle of the code line.
It's will be great if you can add RFH function to the API for ability select g code line and ability to set coordinates from which to start movement within this code line.
For example Runfromhere(showmessage,line, xpos, ypos, zpos,apos,bpos); :)
Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby cncdrive » Mon Feb 13, 2017 5:49 am

Hi Andrew,

I think you maybe have a missunderstanding about how it works, or I missunderstand your explanation.
The g-code line executed contains only one point of the movement which point is the endpoint for that line, they do not contain the startpoint.

For example you have a simple code:

N001 G0 X0
N002 G0 X10

You executed the G0 X0 already and the G0 X10 is ongoing and you reach for example X = 5 and you stop the machine.
Now you are on the N002 line and if you press cycle start again then N002 will continue from the X5 current coordinate to the X10 endpoint.

If you press the run from here in the same situatuin, when X=5 then on the next cycle start the software will calculate through the previous lines of g-codes from the beginning to see what the endpoint is before N002, in this example case it will be X=0, so the RFH will really move your machine back to X=0 before executing the G0 X10 command.
So, if you don't want this initial movement then as said I could add a function which will disable the RFH once.
Then you could call the function right after you called the RFH button 169., so then the RFH will not show up at all and then the initial movement will not be done,
so you can continue the movement from any point you want.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Restart from the any position of the trajectory

Postby shad » Mon Feb 13, 2017 6:31 am

Oh, Balasz, it's great!
Now I am understand - the difference in the initial movement. :P
Please add this function to the API and macro side!
If this is easy to implement? Or we have to wait new release?
May be new exe file and dll for testing?
Thank you!!!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: Restart from the any position of the trajectory

Postby cncdrive » Wed Feb 15, 2017 11:22 pm

Hi Andrew,

A new test release is out with the new function you asked for: viewtopic.php?f=2&t=240&start=30
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Restart from the any position of the trajectory

Postby shad » Thu Feb 16, 2017 7:41 am

Hello Balasz!
Thank you!
I'll try to check it out and let you know.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 40 guests