Hello Guest it is May 23, 2024, 05:24:10 AM

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.


Topics - Bill_O

Pages: « 1 2 3 4 5 6 7 8 9 10 11 »
21
Mach4 General Discussion / Custom m7
« on: July 30, 2020, 10:57:24 AM »
I have a custom m7 that i wrote.
When the gcode gets to M07 it does not even go into the macro.
Is there a setting I need to change to use the custom macro instead of the standard?

Code: [Select]
function M07()
--wx.wxMessageBox('In M07')
mc.mcCntlSetLastError(inst, "In M07")
local inst = mc.mcGetInstance()
--Get Mist On and Mister Auto handles
local hMist = mc.mcSignalGetHandle(inst, mc.OSIG_MISTON)
local hreg = mc.mcRegGetHandle(inst, 'iRegs0/MisterAuto')
--Get Mister Auto value
local MistVal = mc.mcRegGetValue(hreg)
if (MistVal == 0) then
mc.mcSignalSetState(hMist, 0)
--wx.wxMessageBox('Mist OFF')
else
mc.mcSignalSetState(hMist, 1)
--wx.wxMessageBox('Mist ON')
end
end
if (mc.mcInEditor() == 1) then
M07()
end

22
Mach4 General Discussion / spindle dwell before run
« on: July 28, 2020, 05:25:57 PM »
In Mach3 there was a delay you could set for the spindle to get (up or down) to speed before the file started to run.
I am unable to find a similar setting in Mach4 .
Or do I need to make a custom m3 and use mcSpindleSetAccelTime?

Thanks,
Bill

23
Mach4 General Discussion / loop help
« on: July 28, 2020, 05:21:55 PM »
I am trying to make a loop that will turn off all outputs.
I know it is probably something I have wrong in the format but I have tried many different ways and can not get it.

local OutputNum = 0
   while (OutputNum <= 63) do
      OutputName = (mc.OSIG_Output .. 'OutputNum')
      hsig = mc.mcSignalGetHandle(inst, 'OutputName')
      mc.mcSignalSetState(hsig, 0)
      OutputNum = OutputNum + 1
   end

Any help is greatly appreciated.
Bill

24
Mach4 General Discussion / Mach4 Lua for Dummies
« on: June 17, 2020, 05:21:53 PM »
Hopefully this will help anyone starting to write their own code in Mach4.
I am not a programmer and it has taken me some time to understand how all of this works.
I tried to put the information in here in a format I wish was available to us non programmers to understand.
I am fairly certain this is all correct.
Can those of you who know this well make sure I do not have any errors.

25
Mach4 General Discussion / pInst and pcall
« on: May 12, 2020, 01:53:52 PM »
I am looking through some scripts that others have written to see what I can steal or modify.
I came across a script that uses pInst and pcall.
What is the p for?
I understand and have used Inst and call but do not know what they do if p is added.
Hope this is clear enough.

Bill

26
Mach4 General Discussion / message box button color
« on: October 25, 2019, 04:33:10 PM »
Is it possible to change the color of the button in a message box?
If so, how?

Thanks,
Bill

27
Mach4 General Discussion / error in mcs file code
« on: October 25, 2019, 04:15:24 PM »
I have a very specialized machine running Mach4.
I have one macro that is to cut the material and return to a starting position.
The operator of the machine has the choice to have the machine cut the material automatically or manual where they must press a button.
I made a message box to pop up when they chose the manual telling them to press the button.
On the first m60 of the program it works perfect.
On the second I get the error screen. If I click No the message box pops up and everything functions.
If I comment out the message box if-then section I do not get the error.
I have attached the error in a picture, the m60 code and the file that I was running.
Any ideas what I am missing?

Bill

28
Mach4 General Discussion / luac files
« on: September 06, 2019, 05:21:19 PM »
How can I look at luac files?
I would like to look at the mctrace.luac to probably use some in my profile.
Specifically the align portion.

Bill

29
Mach4 General Discussion / Jog Speed DRO
« on: August 14, 2019, 04:57:12 PM »
I am having a little problem with the Lua on a couple of buttons I am making.
The script changes the value but does not change the actual speed.
If I type in the DRO the speed will actually change.

Bill

30
Mach4 General Discussion / number of registers
« on: June 17, 2019, 09:12:50 AM »
Is the number of registers in Mach4 limited to 17?
It will not let me add any more.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 »