Hello Guest it is April 24, 2024, 02:42:34 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DazTheGas

231
It must be getting called from somewhere?? copy and paste your lua script into a txt editor and do a search for minimal.

DazTheGas

232
I would prob go down the lines of not starting the minimal wizard when mach4 starts and then try other wizards, if you have changed anything in the minimal that is causeing the lua plugin to crash then nothing else will run correctly.

DazTheGas

233
Mach4 General Discussion / Re: lua script require() question
« on: April 03, 2017, 04:55:09 PM »
The require function is to load modules, take a look in the Screen Load Script and see how its being used there.

DazTheGas

234
Mach4 General Discussion / Re: Signal before spindle turns on.
« on: April 03, 2017, 03:25:32 PM »
The signalwait command has a timeout setting mc.mcSignalWait(number mInst, number sigId, number waitMode, number timeoutSecs)

I think the way I would go is to lengthen the timeout and then put the rest of the macro in an if statement, if sig ==1 then continue...................

DazTheGas

235
Mach4 General Discussion / Re: Signal before spindle turns on.
« on: April 03, 2017, 02:00:05 PM »
Have you tried increasing the timeout value

DazTheGas

236
Mach4 General Discussion / Re: wxLua functions
« on: April 01, 2017, 05:28:39 PM »
In formbuilder highlight your button and then go into the events tab top right and enter something in say mouse left up and this will put something on the screen like

Code: [Select]
YourButtonName:Connect( wx.wxEVT_LEFT_DOWN, function(event)
--implements your function here

event:Skip()
end )

DazTheGas

237
Mach4 General Discussion / Re: wxLua functions
« on: April 01, 2017, 05:08:56 PM »
Simply put you cant, hence the name "FormBuilder" wxLua is not built into it,  personally myself I tend to make what I require and copy the code into a file using notepad++ - add all functions etc.
If I make any changes to the wxFormBuilder project then I do a compare so I can copy and paste any changes.

DazTheGas

238
I dont think mach4 loses them, more like when starting up it doesnt know where it is until homed.

Something you can try though is create a button and as a test put

Code: [Select]
local inst = mc.mcGetInstance()
mc.mcMotorSetHomePos(inst, 0, 175 * mc.mcProfileGetDouble(inst, 'Motor0','CountsPerUnit',0)) --X

jog x to 175 and shut down mach4 and restart, press button you should find your machine coords now at 175, however I cannot tell you how this will look on your system with say softlimits or offsets but worth atry.

DazTheGas

239
Mach4 General Discussion / Re: wxLua functions
« on: April 01, 2017, 04:37:10 PM »
Put the code in the wizards directory with the extension .mcs 
one thing missing from wxFormbuilder is it doesnt put the Show function at bottom of file so a simple frame should look like this

Code: [Select]
UI = {}

UI.MyFrame1 = wx.wxFrame (wx.NULL, wx.wxID_ANY, "", wx.wxDefaultPosition, wx.wxSize( 500,300 ), wx.wxDEFAULT_FRAME_STYLE+wx.wxTAB_TRAVERSAL )
UI.MyFrame1:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )


UI.MyFrame1:Centre( wx.wxBOTH )

UI.MyFrame1:Show() -- Missing from wxFormBuilder


You should now be able to open this from the wizards dialog.

DazTheGas