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: 449
Joined: Mon Sep 05, 2016 10:34 am

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: 449
Joined: Mon Sep 05, 2016 10:34 am

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: 449
Joined: Mon Sep 05, 2016 10:34 am


Return to Macros

Who is online

Users browsing this forum: No registered users and 13 guests