871
Show"N"Tell ( What you have made with your CNC machine.) / Re: congreve clock
« on: December 24, 2014, 12:24:26 PM »
This will go in my little book of favorites! Awesome!
Brett
Brett
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.
local inst = mc.mcGetInstance();
--Becasue Mach4 can run multiple instances, we need to tell the script which instance to run in.
mc.mcCntlGcodeExecute (inst, "G53 G90 G0 Z0\n G53 G0 X0 Y0");
--The above line will be executed as 2 lines of Gcode. G53 G90 G0 Z0 will be executed then
--\n means a new line so G53 G0 X0 Y0 will be executed after the code before the \n is finished.
--Everything between the quotation marks " " will be interpreted as a string.
Code "G00 Y-380"
While IsMoving ()
Sleep 100
Wend
ActivateSignal(OUTPUT2)
local inst = mc.mcGetInstance();
mc.mcCntlGcodeExecute(inst, "G1 X10 Y10 F50");--run some g-code
wx.wxMilliSleep(10);
mcState = mc.mcCntlGetState(inst);
while (mcState ~= mc.MC_STATE_IDLE) do
mcState = mc.mcCntlGetState(inst);
wx.wxMilliSleep(10);
end
mc.mcAxisSetPos(inst, 0, 0.000)
mc.mcAxisSetPos(inst, 1, 0.000)
mc.mcAxisSetPos(inst, 2, 0.000)
Are any of you guys using the XHC-MK3 usb bob?
The spindle would stop after jogging awhile. The output for the spindle remained on.