Control RUN FROM HERE from macro ????

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Control RUN FROM HERE from macro ????

Postby beefy » Sat Dec 23, 2017 11:40 pm

Is it possible to control Run From Here in a macro ???

I see that the Run From Here button is number 169 so I’m guessing we can call that button in a macro.

However, after that you need to press the “OK” button in the Run From Here pop up dialog box (titled “Initial Movement Preparation”).

I can’t see any way to call that button, apart from manually clicking on it.
beefy
 
Posts: 153
Joined: Mon Sep 05, 2016 10:34 am

Re: Control RUN FROM HERE from macro ????

Postby Vmax549 » Sun Dec 24, 2017 12:54 am

If memory serves me I think this is what you are looking for.

RemoveRunfromhere()

(;-) TP
Vmax549
 
Posts: 599
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Control RUN FROM HERE from macro ????

Postby beefy » Sun Dec 24, 2017 4:40 am

Cheers Terry,

I'm aware of that function but I thought it does the opposite and prevents the initial movement preparation from happening.

The documentation says:

This function removes the Initial movement Window of the Run from here function to be shown condition after the Run from here button was pressed or the button code was previously called, so the Initial movement Window will not be shown and inital movement will not be made.
The function can be used when a plugin or macro changes the g-code line number to be executed and with calling the Run from here button code and if the plugin or macro don't need the initial movement preparation.


Or am I reading it wrong.

In my case I do want the initial movement preparation.
beefy
 
Posts: 153
Joined: Mon Sep 05, 2016 10:34 am

Re: Control RUN FROM HERE from macro ????

Postby Vmax549 » Sun Dec 24, 2017 9:40 pm

IF you need the prep window and initial move then it will not work for you. It was designed to use in an plasma app where you needed teh RFH but did not want a prep move and wanted it to auto start. I can be used for other applications that RFH would be usefull. Yo can add in teh intial move by scripting then auto start it.

exec.Callbutton(169);
exec. RemoveRunfromhere();
exec.Callbutton(128);
Vmax549
 
Posts: 599
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Control RUN FROM HERE from macro ????

Postby beefy » Mon Dec 25, 2017 1:52 am

That's along the lines of what I'm going to do.

The initial prep movement window seems to automate a thing or two, e.g. if you want to rapid to the run from here position via scripting, you'll have to command G0 then afterwards command G1 again because G0 is modal.

I'm trying to automate plasma restarting but with a dry run and the torch firing during the dry run. Already did it some time ago using your bounding box idea, but was manually doing the Run From Here and clicking the OK button in the initial movement prep pop up window. I'm working towards a single button click solution for plasma mid cut restart but with various goodies built in.

In the new year I might ask Balazs if it's possible to create a function that does the opposite of the RemoveRunfromhere(); function, i.e. it automatically "clicks the OK button" in the initial movement prep window when you do a Cycle Start after pressing Run From Here. You just have to manually do the setup once in the initial movement prep window then it seems to retain those settings each time, and therefore you could automate the initial movement prep work if there's a function to run it. I'd guess that should be quite easy to implement in UCCNC, as everything is already there, just need a function to allow automation in a macro/plugin.
beefy
 
Posts: 153
Joined: Mon Sep 05, 2016 10:34 am

Re: Control RUN FROM HERE from macro ????

Postby Vmax549 » Mon Dec 25, 2017 3:38 pm

Sounds like you want a midline restart which is one of the holy grails of plasma cutting (;-)

It requires that UCCNC gives us access to motion during a feedhold so that teh motion buffer is still intact ready to restart motion at teh point where it stopped.

Feedhold

Jog to change out tip

Move back to restart position.

Cycle start

Just a thought, (;-) TP
Vmax549
 
Posts: 599
Joined: Sun Nov 22, 2015 3:25 am
Location: USA


Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest