开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

Any word on the fix of the jogging increment problem? I have the latest version of mach4 available on the web site unless i am missing something. If I start mach4 and set the jog increment to .01" Shut down and start again. the increment shown is .01" but it moves 1"? it is real easy to break bits when it moves out of control? a while inch. If this is difficult to fix at least make the default .001" not 1"

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#155080) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [spencer@...]

_._,_._,_
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: Question about Macros and dialog box's, and or messagebox

 

Ok Thanks Brian

I have run into another problem, not sure what the cause..

when i load the gcode file it never shows the machining to start in the parts center in the tool path display... form a couple of my profiles, if i start a run and then stop re zero the dro's and regen the tool path its now starting in the middle.. in the tool path display..

but i do have a couple profiles that don't have that problem i don't see any setting's that are different.
Do the profiles go bad? or get some sort of glitch, don't see any difference other than the way the tool path starts when the gcode is first loaded and its way off center position

Gary


Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

Guess I need to play with this thing some more. I just did it in the editor and not in the Gcode file. Let me see what I can do


Thanks

Brian


______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/8/2021 9:57 PM, Gary wrote:

Thanks brian

It seems to work, but always a but!

When i run the M6 Macro alone though the editor or mdi line it seems ok on dro changes..

if i load a Gcode file and run that when it runs the M6 Macro line the Z axis dro on the screen jumps to 5.0 from 0..

There is no code in the Gcode file or the M6 macro to move the Z axis before the M6 T line..

it doesn't move like its jogging it just go's from 0 to 5.0 instantly

also got this error a couple times

Lua: Error while running chunk
?:-1: attempt to yield across a C-call boundary
stack traceback:
?? ??: in function <?:59>
?? ?[C]: in method 'ShowModal'
?? ??: in function 'M6Message'
?? ??: in function 'm6'

Thanks gary


Re: [MachCNC jogging

 

开云体育

the version on the web site is 4612 and that is what i have and the problem was not fixed as far as I know. i recently tested it but who knows i am getting flaky. pleae check the logs or whatever.

On 12/8/2021 1:30 PM, Brian Barker wrote:

I fixed that issue long ago (or so I remember ) I can crank through the SVN logs tomorrow and see what I can find.


Thanks for the rev number


______________________________

Brian Barker

Webpage: 
On 12/7/2021 3:30 PM, spencer@... wrote:

version 4.2-0.4612 making wooden stuff. the problem is not with making stuff it is jut the fact that the displayed jog increment shown when mach4 boots is not necessarily what it will move. it pretty mush always shows .01" which was the last used increment but it can move 1 inch instead. i have mentioned this a t least a few times.

On 12/7/2021 10:50 AM, Brian Barker wrote:

I don't think so ... What Rev are you on and what are you doing?

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:00 PM, spencer@... wrote:


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: Question about Macros and dialog box's, and or messagebox

 

Thanks brian

It seems to work, but always a but!

When i run the M6 Macro alone though the editor or mdi line it seems ok on dro changes..

if i load a Gcode file and run that when it runs the M6 Macro line the Z axis dro on the screen jumps to 5.0 from 0..

There is no code in the Gcode file or the M6 macro to move the Z axis before the M6 T line..

it doesn't move like its jogging it just go's from 0 to 5.0 instantly

also got this error a couple times

Lua: Error while running chunk
?:-1: attempt to yield across a C-call boundary
stack traceback:
?? ??: in function <?:59>
?? ?[C]: in method 'ShowModal'
?? ??: in function 'M6Message'
?? ??: in function 'm6'

Thanks gary


Re: [MachCNC jogging

 

开云体育

so the current rev is higher than mine? the last time i checked mine was current. any special place to get the new one and do i need to find reg number again or???

On 12/8/2021 1:30 PM, Brian Barker wrote:

I fixed that issue long ago (or so I remember ) I can crank through the SVN logs tomorrow and see what I can find.


Thanks for the rev number


______________________________

Brian Barker

Webpage: 
On 12/7/2021 3:30 PM, spencer@... wrote:

version 4.2-0.4612 making wooden stuff. the problem is not with making stuff it is jut the fact that the displayed jog increment shown when mach4 boots is not necessarily what it will move. it pretty mush always shows .01" which was the last used increment but it can move 1 inch instead. i have mentioned this a t least a few times.

On 12/7/2021 10:50 AM, Brian Barker wrote:

I don't think so ... What Rev are you on and what are you doing?

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:00 PM, spencer@... wrote:


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: [MachCNC jogging

 

开云体育

I fixed that issue long ago (or so I remember ) I can crank through the SVN logs tomorrow and see what I can find.


Thanks for the rev number


______________________________

Brian Barker

Webpage: 
On 12/7/2021 3:30 PM, spencer@... wrote:

version 4.2-0.4612 making wooden stuff. the problem is not with making stuff it is jut the fact that the displayed jog increment shown when mach4 boots is not necessarily what it will move. it pretty mush always shows .01" which was the last used increment but it can move 1 inch instead. i have mentioned this a t least a few times.

On 12/7/2021 10:50 AM, Brian Barker wrote:

I don't think so ... What Rev are you on and what are you doing?

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:00 PM, spencer@... wrote:


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

As I thought :) You can do it!


Replace your : wx.wxGetApp():MainLoop()


With : ?? MyDialog1:ShowModal()


And you can put it in your Mcode! It will stop the execution.



______________________________

Brian Barker

Webpage: 
On 12/7/2021 2:56 PM, Gary wrote:

Here is an example of the code in the PLC
I did try the dialog in the macro but didn't seem to work it would display the dialog, but no text or buttons would display.. and i couldn't close the dialog
as far as a a semaphore and spin lock looking at the flag not sure how to implement that above my skill level i'm thinking..

Thanks gary
-------------------------------------------------------
--? M6 message
-------------------------------------------------------
local M6DialogReg = mc.mcRegGetHandle(inst,"gRegs0/M6Message")
local M6Flag = mc.mcRegGetValue(M6DialogReg)

if (M6Flag == 1) then -- and state == idle

ID_RETURN_GCODE = 1
ID_CLOSE_BUTTON = 2

-- create MyDialog1
???? MyDialog1 = wx.wxDialog (wx.NULL, wx.wxID_ANY, "M6 Manual Tool Change Avtivated", wx.wxDefaultPosition, wx.wxSize( 327,325 ), wx.wxDEFAULT_DIALOG_STYLE )
?? ? MyDialog1:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

?? ? gSizer3 = wx.wxGridSizer( 0, 2, 0, 0 )

?? ? m_staticText1 = wx.wxStaticText(? MyDialog1, wx.wxID_ANY, "TURN OFF SPINDLE, then jog to a safe tool change position\n\nSwap to new tool\n\nThen migrate to the probing screen and PRESS PROBE Z\n\nOR mannual jog Z down and use a feeler gauge for Z hight\nWhen Finished move Z up to 1\" or so..\n\nOnce tool probe is finished, or feeler gauge test Complete\nTURN ON SPINDLE\n\nPRESS OK to return control back to the running G_Code\n\nPress ABORT to Stop ALL\nMachine will be disabled and Gcode Stopped", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? m_staticText1:Wrap( -1 )

?? ? gSizer3:Add(? m_staticText1, 0, wx.wxALL, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 50, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )

?? ? fgSizer1 = wx.wxFlexGridSizer( 0, 2, 0, 50 )
?? ? fgSizer1:SetFlexibleDirection( wx.wxBOTH )
?? ? fgSizer1:SetNonFlexibleGrowMode( wx.wxFLEX_GROWMODE_SPECIFIED )

?? ? m_button8 = wx.wxButton(? MyDialog1, ID_RETURN_GCODE, "OK", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button8, 0, wx.wxALL, 5 )
?? ?
?? ? m_button9 = wx.wxButton(? MyDialog1, ID_CLOSE_BUTTON, "Abort", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button9, 0, wx.wxALIGN_CENTER+wx.wxALL, 2 )

?? ? gSizer3:Add(? fgSizer1, 1, wx.wxEXPAND, 0 )

?? ? MyDialog1:SetSizer(? gSizer3 )
?? ? MyDialog1:Layout()

?? ? MyDialog1:Centre( wx.wxBOTH )
?? ? MyDialog1:Show( true )
?? ?
???? MyDialog1:Connect(ID_CLOSE_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
?? ?
???? MyDialog1:Connect(ID_RETURN_GCODE, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
??? wx.wxGetApp():MainLoop()

? ???? local rc = mc.mcRegSetValue(M6DialogReg, 0)
end


Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

We can SO do this! Testing now

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 2:56 PM, Gary wrote:

Here is an example of the code in the PLC
I did try the dialog in the macro but didn't seem to work it would display the dialog, but no text or buttons would display.. and i couldn't close the dialog
as far as a a semaphore and spin lock looking at the flag not sure how to implement that above my skill level i'm thinking..

Thanks gary
-------------------------------------------------------
--? M6 message
-------------------------------------------------------
local M6DialogReg = mc.mcRegGetHandle(inst,"gRegs0/M6Message")
local M6Flag = mc.mcRegGetValue(M6DialogReg)

if (M6Flag == 1) then -- and state == idle

ID_RETURN_GCODE = 1
ID_CLOSE_BUTTON = 2

-- create MyDialog1
???? MyDialog1 = wx.wxDialog (wx.NULL, wx.wxID_ANY, "M6 Manual Tool Change Avtivated", wx.wxDefaultPosition, wx.wxSize( 327,325 ), wx.wxDEFAULT_DIALOG_STYLE )
?? ? MyDialog1:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

?? ? gSizer3 = wx.wxGridSizer( 0, 2, 0, 0 )

?? ? m_staticText1 = wx.wxStaticText(? MyDialog1, wx.wxID_ANY, "TURN OFF SPINDLE, then jog to a safe tool change position\n\nSwap to new tool\n\nThen migrate to the probing screen and PRESS PROBE Z\n\nOR mannual jog Z down and use a feeler gauge for Z hight\nWhen Finished move Z up to 1\" or so..\n\nOnce tool probe is finished, or feeler gauge test Complete\nTURN ON SPINDLE\n\nPRESS OK to return control back to the running G_Code\n\nPress ABORT to Stop ALL\nMachine will be disabled and Gcode Stopped", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? m_staticText1:Wrap( -1 )

?? ? gSizer3:Add(? m_staticText1, 0, wx.wxALL, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 50, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )

?? ? fgSizer1 = wx.wxFlexGridSizer( 0, 2, 0, 50 )
?? ? fgSizer1:SetFlexibleDirection( wx.wxBOTH )
?? ? fgSizer1:SetNonFlexibleGrowMode( wx.wxFLEX_GROWMODE_SPECIFIED )

?? ? m_button8 = wx.wxButton(? MyDialog1, ID_RETURN_GCODE, "OK", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button8, 0, wx.wxALL, 5 )
?? ?
?? ? m_button9 = wx.wxButton(? MyDialog1, ID_CLOSE_BUTTON, "Abort", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button9, 0, wx.wxALIGN_CENTER+wx.wxALL, 2 )

?? ? gSizer3:Add(? fgSizer1, 1, wx.wxEXPAND, 0 )

?? ? MyDialog1:SetSizer(? gSizer3 )
?? ? MyDialog1:Layout()

?? ? MyDialog1:Centre( wx.wxBOTH )
?? ? MyDialog1:Show( true )
?? ?
???? MyDialog1:Connect(ID_CLOSE_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
?? ?
???? MyDialog1:Connect(ID_RETURN_GCODE, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
??? wx.wxGetApp():MainLoop()

? ???? local rc = mc.mcRegSetValue(M6DialogReg, 0)
end


Re: Question about Macros and dialog box's, and or messagebox

 

I am assuming its not possible to do this...

But i do have another question.

What mc command can be used and how, to check a button press to see when its up and when its down

Thanks gary


Re: [MachCNC jogging

 

开云体育

version 4.2-0.4612 making wooden stuff. the problem is not with making stuff it is jut the fact that the displayed jog increment shown when mach4 boots is not necessarily what it will move. it pretty mush always shows .01" which was the last used increment but it can move 1 inch instead. i have mentioned this a t least a few times.

On 12/7/2021 10:50 AM, Brian Barker wrote:

I don't think so ... What Rev are you on and what are you doing?

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:00 PM, spencer@... wrote:


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: Question about Macros and dialog box's, and or messagebox

 

Here is an example of the code in the PLC
I did try the dialog in the macro but didn't seem to work it would display the dialog, but no text or buttons would display.. and i couldn't close the dialog
as far as a a semaphore and spin lock looking at the flag not sure how to implement that above my skill level i'm thinking..

Thanks gary

-------------------------------------------------------
--? M6 message
-------------------------------------------------------
local M6DialogReg = mc.mcRegGetHandle(inst,"gRegs0/M6Message")
local M6Flag = mc.mcRegGetValue(M6DialogReg)

if (M6Flag == 1) then -- and state == idle

ID_RETURN_GCODE = 1
ID_CLOSE_BUTTON = 2

-- create MyDialog1
???? MyDialog1 = wx.wxDialog (wx.NULL, wx.wxID_ANY, "M6 Manual Tool Change Avtivated", wx.wxDefaultPosition, wx.wxSize( 327,325 ), wx.wxDEFAULT_DIALOG_STYLE )
?? ? MyDialog1:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

?? ? gSizer3 = wx.wxGridSizer( 0, 2, 0, 0 )

?? ? m_staticText1 = wx.wxStaticText(? MyDialog1, wx.wxID_ANY, "TURN OFF SPINDLE, then jog to a safe tool change position\n\nSwap to new tool\n\nThen migrate to the probing screen and PRESS PROBE Z\n\nOR mannual jog Z down and use a feeler gauge for Z hight\nWhen Finished move Z up to 1\" or so..\n\nOnce tool probe is finished, or feeler gauge test Complete\nTURN ON SPINDLE\n\nPRESS OK to return control back to the running G_Code\n\nPress ABORT to Stop ALL\nMachine will be disabled and Gcode Stopped", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? m_staticText1:Wrap( -1 )

?? ? gSizer3:Add(? m_staticText1, 0, wx.wxALL, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 50, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )
?? ? gSizer3:Add( 0, 0, 1, wx.wxEXPAND, 5 )

?? ? fgSizer1 = wx.wxFlexGridSizer( 0, 2, 0, 50 )
?? ? fgSizer1:SetFlexibleDirection( wx.wxBOTH )
?? ? fgSizer1:SetNonFlexibleGrowMode( wx.wxFLEX_GROWMODE_SPECIFIED )

?? ? m_button8 = wx.wxButton(? MyDialog1, ID_RETURN_GCODE, "OK", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button8, 0, wx.wxALL, 5 )
?? ?
?? ? m_button9 = wx.wxButton(? MyDialog1, ID_CLOSE_BUTTON, "Abort", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
?? ? fgSizer1:Add(? m_button9, 0, wx.wxALIGN_CENTER+wx.wxALL, 2 )

?? ? gSizer3:Add(? fgSizer1, 1, wx.wxEXPAND, 0 )

?? ? MyDialog1:SetSizer(? gSizer3 )
?? ? MyDialog1:Layout()

?? ? MyDialog1:Centre( wx.wxBOTH )
?? ? MyDialog1:Show( true )
?? ?
???? MyDialog1:Connect(ID_CLOSE_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
?? ?
???? MyDialog1:Connect(ID_RETURN_GCODE, wx.wxEVT_COMMAND_BUTTON_CLICKED,
??? function(event)
???? MyDialog1:Destroy()
??? end)
??? wx.wxGetApp():MainLoop()

? ???? local rc = mc.mcRegSetValue(M6DialogReg, 0)
end


Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

If you would like to stop the macro you will need to make the dialog in the Macro... The other way to do it would be with a semaphore and spin lock looking at the flag... I don't h think that would be a good way but I have no idea what the screen is doing.


Thanks

Brian


______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:43 PM, Gary wrote:

Hi brian

What i am doing is setting a register flag when in the Macro Mcode and have the dialog in the PLC script, that displays when the flag is set, that seems to works, except it shows the dialog and button's but doesn't stop the Macro it just keeps running with the dialog box on the screen, i still can press the button and the dialog will closed and resets the register flag.

Making any sense?

Thanks gary


Re: [MachCNC jogging

 

开云体育

I don't think so ... What Rev are you on and what are you doing?

______________________________

Brian Barker
Engineering / Development
ArtSoft | Newfangled Solutions
Livermore Falls, Maine (USA)
Phone: 207(618)1449
Webpage: 
On 12/7/2021 1:00 PM, spencer@... wrote:


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Re: Question about Macros and dialog box's, and or messagebox

 

Hi brian

What i am doing is setting a register flag when in the Macro Mcode and have the dialog in the PLC script, that displays when the flag is set, that seems to works, except it shows the dialog and button's but doesn't stop the Macro it just keeps running with the dialog box on the screen, i still can press the button and the dialog will closed and resets the register flag.

Making any sense?

Thanks gary


Re: Question about Macros and dialog box's, and or messagebox

 

开云体育

Hello,

I think we can make this happen. Are you talking about a dialog in an Mcode ? Or some function in the screen ? Please tell me what we are doing and I think we can make it happen :)


Thanks

Brian

______________________________

Brian Barker

Webpage: 
On 12/7/2021 12:49 PM, Gary wrote:

Hopefully you can help me with this Brian..

I got the wxlua dialog to display with buttons in the PLC when running a gcode file but it, just displays the dialog box and button's, but doesn't wait for a button press to return to the gcode it just keeps running the gcode with the dialog box still on the screen..

Any way to go about this and not have the gcode keep running?.. till i hit one of the buttons..

Checking to see if a dialog box or messagebox is called from a gcode macro..
yes will allow? the dialog to be displayed on the screen, and all buttons,? but when the dialog is displayed control? is sent right back to the gcode .and doesn't wait for any buttons to be pressed
The dialog remains on the screen while the gcode is running now, and i can close it with a button press.

Is it possible to stop the gcode from running while in the dialog box?

Or just not possible?

Thanks Gary


Re: [MachCNC jogging

 

开云体育


was there ever a fix to the bug that causes the displayed jog increment to not necessarily be what it actually is when starting mach4? i am using very expensive router bits now and would be really pissed if i snapped one off because the jog increment showed .01" and it moved an inch instead. i try to remember to reset it each time i start mach4 but i am good at forgetting things and this could cost me $60 or more in one bad move. i jog to edges to set my home position for a piece.

there is a big difference between .01" and 1 " that would be about .99" certainly enough to break a new compression router bit.

Thanks Gary
-- 
Spencer Chase
67550 Bell Springs Rd.
Garberville , CA 95542 USPS mail only 
Laytonville, CA 9545 UPS/Fedex only


Question about Macros and dialog box's, and or messagebox

 

Hopefully you can help me with this Brian..

I got the wxlua dialog to display with buttons in the PLC when running a gcode file but it, just displays the dialog box and button's, but doesn't wait for a button press to return to the gcode it just keeps running the gcode with the dialog box still on the screen..

Any way to go about this and not have the gcode keep running?.. till i hit one of the buttons..

Checking to see if a dialog box or messagebox is called from a gcode macro..
yes will allow? the dialog to be displayed on the screen, and all buttons,? but when the dialog is displayed control? is sent right back to the gcode .and doesn't wait for any buttons to be pressed
The dialog remains on the screen while the gcode is running now, and i can close it with a button press.

Is it possible to stop the gcode from running while in the dialog box?

Or just not possible?

Thanks Gary


Re: Mach4 Lathe - Turn Cycles

 

开云体育

Hi Konrad,

My current plan is to get this working after a few other projects I am working on. I want to make something like the Mach Motion cycles but with a much better "part" designer. I want this for my machine so everyone else will get it too. The interface is not to bad, here is how you feed moves to the profile:


local profile = {};
?? ?local startp = {};
?? ?local endp = {};
?? ?local movenum = 1
?? ?startp.x = .1
?? ?startp.z = 0.0
?? ?endp.x = .5
?? ?endp.z = -.4
?? ?profile[movenum] = ProArcCreate(startp, endp, .4, "CW")
?? ?movenum = movenum +1
?? ?startp.x = endp.x
?? ?startp.z = endp.z
?? ?endp.x = .5
?? ?endp.z = -1
?? ?profile[movenum] = ProLineCreate(startp, endp)


That code makes an Arc than it makes a line.. My test had many more entities. Then when that is finished you can fillet the corners with commands like this :

??? profile = ProFilletCorner(profile,7,.5)
?? ?profile = ProFilletCorner(profile,6,.25)

The 6 and 7 are the entities that it would like to fillet the end of in the profile


Then you have to run some magic like this:

roughGcode = roughGcode .. ProfileRoughX(profile, .05, .01, -.12)--rough

That tells it to rough the profile with .05 left in the X, .01 in the Z and doing passes of .12 DOC.

For a finish pass


??? roughGcode = roughGcode .. "(Finish Pass)\n".. ProfileFinish(profile,.030, .003)--semi finish, this will be taken out at some point

That is all you need to do to make it work at this point but I really want to have some way to pump the settings in graphically on the screen. I made this for a customer that had to make the same-ish parts. I wanted to make a more generic? solution and in the end figured out that I made a full roughing cycle for turn.


I hope that gives you a little light into what it is and how it works for an interface. It is a bit raw :( but I think with a little work we can make this into something that is a ton of fun to use on the machines!

______________________________

Brian Barker

Webpage: 
On 12/7/2021 4:29 AM, Konrad Krüger wrote:

Hi Brian,

it’s great news that the idea and the code is still alive.

Although I fear programming the interface will be beyond my abilities, I would love to have a look on it just for couriosity.


Have a nice day,
Konrad

Von: [email protected] <[email protected]> Im Auftrag von Brian Barker
Gesendet: Freitag, 3. Dezember 2021 14:23
An: [email protected]
Betreff: Re: [MachCNC] Mach4 Lathe - Turn Cycles

?

Funny I was playing with that code 2 days ago for fun... My goal is go get back on it as soon as I finish the engraving software update we are doing. I try to do little pet projects like this for some fun night time programming :)

?

I can give you the code as it is but it needs an interface to feed in the "profile"

?

______________________________
?
Brian Barker
?
Webpage: 

On 12/3/2021 7:19 AM, Konrad Krüger wrote:

Hi Brian,

?

I just found this quite old mail about a new LUA roughing routine for Mach4 Lathe…

Did there arise any news on this? - I would love to give it a try.


best regards, Konrad

?

Von: [email protected] <[email protected]> Im Auftrag von Brian Barker
Gesendet: Freitag, 11. September 2020 18:36
An: [email protected]
Betreff: Re: [MachCNC] Mach4 Lathe-G76 and Turn Cycles

?

I think we can now send attachments ... I did a new roughing bit of code for turn in LUA! I just got it to work on my test profile. This is going to be as good as Cam software.

______________________________
?
Brian Barker
?
Webpage: 

On 9/10/2020 4:43 PM, Andy Wander wrote:

Hey, man, any word?

?

From: [email protected] <[email protected]> On Behalf Of Brian Barker
Sent: Wednesday, September 2, 2020 7:29 AM
To: [email protected]
Subject: Re: [MachCNC] Mach4 Lathe-G76 and Turn Cycles

?

Good question! Let me talk to the guys. This slipped my mind. I am getting old or something :)

______________________________

?

?


Re: Mach4 Lathe - Turn Cycles

 

开云体育

Hi Brian,

it’s great news that the idea and the code is still alive.

Although I fear programming the interface will be beyond my abilities, I would love to have a look on it just for couriosity.


Have a nice day,
Konrad

Von: [email protected] <[email protected]> Im Auftrag von Brian Barker
Gesendet: Freitag, 3. Dezember 2021 14:23
An: [email protected]
Betreff: Re: [MachCNC] Mach4 Lathe - Turn Cycles

?

Funny I was playing with that code 2 days ago for fun... My goal is go get back on it as soon as I finish the engraving software update we are doing. I try to do little pet projects like this for some fun night time programming :)

?

I can give you the code as it is but it needs an interface to feed in the "profile"

?

______________________________
?
Brian Barker
?
Webpage: 

On 12/3/2021 7:19 AM, Konrad Krüger wrote:

Hi Brian,

?

I just found this quite old mail about a new LUA roughing routine for Mach4 Lathe…

Did there arise any news on this? - I would love to give it a try.


best regards, Konrad

?

Von: [email protected] <[email protected]> Im Auftrag von Brian Barker
Gesendet: Freitag, 11. September 2020 18:36
An: [email protected]
Betreff: Re: [MachCNC] Mach4 Lathe-G76 and Turn Cycles

?

I think we can now send attachments ... I did a new roughing bit of code for turn in LUA! I just got it to work on my test profile. This is going to be as good as Cam software.

______________________________
?
Brian Barker
?
Webpage: 

On 9/10/2020 4:43 PM, Andy Wander wrote:

Hey, man, any word?

?

From: [email protected] <[email protected]> On Behalf Of Brian Barker
Sent: Wednesday, September 2, 2020 7:29 AM
To: [email protected]
Subject: Re: [MachCNC] Mach4 Lathe-G76 and Turn Cycles

?

Good question! Let me talk to the guys. This slipped my mind. I am getting old or something :)

______________________________

?

?