I need to modify a plasma post, I have already made changes but it’s not quite there yet.
At present it inserts a pause before each cut, so the sequence is…
Move
Pause
Set ref
Cut
Lift
Move
What I want is…
Pause
Move
Set ref
Cut
Lift
Pause
I have inserted my changes here…
function Reference()
if (firstRef == true) then
--do nothing
else
if (tool == 8) then --Tool 8 is a plasma tool used as a drill-marker
--do nothing
else
post.Text (" M00")
post.Text (" (Paused: Hit RUN to continue)\n")
end
end
Where should I stuff my code to get the right sequence? As you can see it ignores the pause on the first-ref because my post already pauses so you can check the voltage and current settings etc. Tool 8 is a standard plasma tool that I use at minimum current to create pecks where I can later drill with a standard drill.
The issue that came to light at the weekend was that it mis-fired on a cut, then moved to the next cut position, I rewound the code in Mach3 to the pause at the start of the mis-cut but as it positions BEFORE the pause it started the torch then happily dragged itself cutting across the plate until it reached the start position
If I can get it to position AFTER the pause and BEFORE the cut, everything will be sweet
I think I have it sussed now,
I declared a variable at the start of the post
post.DefineVariable(“MyPause”,-1)
At the end of the “OnRapid” block, I put this code
if(MyPause == true) then
if (tool == 8) then --Tool 8 is a plasma tool used as a drill-marker
--do nothing
else
post.Text (" M00")
post.Text (" (Paused: Hit RUN to continue)\n")
end
MyPause = false
end
In the “OnReference” block I put this line…
MyPause = true
So, the variable is false when the job starts - my code does nothing for the first reference and cut.
After the first reference, MyPause is now true.
On the next rapid my code now stops the operation before positioning.
The variable was needed as simply putting the code in the OnRapid block without it seemed to insert multiple pauses.
Seems to work.
Hi,
I am having no clue in the Macro language. Please help me to sort a situation where I want Pauses before every cut in Plasma Rotary Mach3 by editing the post.
I have a situation where I wanted this sequence
Travel from origin
Set Ref
Cut
Lift
Pause
Move to the next cut
Pause
Set Ref
Cut
Lift
Move to the next cut
Pause
Set Ref
Cut
Lift
Move to the next cut
And so on till the last cut
Let me tell what I did
I declared a variable at the start of the post
post.DefineVariable(“MyPause”,-1)
Inside of “OnRapid” block ,At the end I put this code
if(MyPause == true) then
if (tool == 0) then --Tool 0
–do nothing
else
post.Text (" M00")
post.Text (" (Paused: Hit RUN to continue)\n")
end
MyPause = false
End
In the “OnReference” block I put this line…
MyPause = true
I used tool 0 as I don’t want any operation to take place
This stops the torch immediately after the first cut, and doesn’t move to the next cut, which is not I wanted.
Someone please respond.
Hi
For some reason, the code i posted is corrupted, there are lots of figures and junk in there - it will not work,
Her is my own post file, you can study and take what you like but note it will NOT work for you directly because i have a very custom setup here.
DTHC-HYT-TAP-rev11B With Pauses.scpost (23.2 KB)
Dave
You need to put your code at the start of function OnPenDown(). OnPenDown is called just after the move to pierce height.