Hello Guest it is April 24, 2024, 03:12:57 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 - rhtuttle

31
Mach4 General Discussion / Re: Problem with Mach4 Turn newbee
« on: May 19, 2022, 11:37:54 AM »
Try running it with the ;Simulation Device' motion controller. I ran it on mine and the code executes.  Possible conflict with your spindle being an OB and ESS.
HTH
RT

32
Mach4 General Discussion / Re: Set X diameter
« on: April 13, 2022, 12:01:46 PM »
Under the 'Control Configuration menu there is a list box with a choice of radius or diameter.  TYou will have to edit the screen you are using and change the X dro's 'read Only' property to edit in place or something like that.  There is a video showing how to edit the screen if you are not familiar with that.  Unfortunately this is a bug that has beeen reported multiple times over the last 4 years and for some reason NFS can't seem to remember to fix it.
This is not a 'toolbox' question.  You will have better luck getting answers if you post in the general discussion section.

HTH

RT

33
Mach4 General Discussion / Re: Writing Lathe Custom Canned Cycles?
« on: March 21, 2022, 04:09:01 PM »
My approach would be like the code below.  It uses a sub program that utilizes relative moves rather than absolute.  I didn't fully check this code but you should be able to modify for your use.  If you were to write a macro where you passed the variables you could create the gcode on the fly and forego using relative positioning.

HTH

Code: [Select]
(Lathe Chamfer Corner)
#1=1.0      ( X coord of the corner)
#2=-0.305   ( Z coord of the corner)
#3=1         ( -1 cut to right, 1 cut to left)
#4=1         ( -1 cut outside-in, 1 cut inside-out)
#5=4         ( number of passes/subdivisions)
#6=0.010  ( lead in/out)
#7=1.5  ( feed rate)
#8=600     ( Spindle Speed)
#9=0.008    (depth of Cut)
#10=0.080      (length of cut)

t0202             (Select tool)
g0 z[#2+[#6*#3]]    (Move to z + offset)
g0 x[#1+[#6*#4]]    (Move to x + offset)

m7
m8
m3 s#8                 
m98 p1234 L#5     (do sub 1234 - 5 times)
m5

m30


o1234
g1  f#7 u[#9*#4] w[#9*#3]      (Feed from offset to beginning of cut)
g1 u[#10*#4]                   (Do length of cut)
g0 u[-1*#9*#4] w[-1*#2*#3]     (back out offset)
g1 u[-1*#10*#4]                (Back up length of cut)
g0 u[#9*#4]                    (Advance for next cut)
m99

34
Mach4 General Discussion / Re: Turn off mist/flood on stop/estop
« on: January 13, 2022, 02:01:50 PM »
Thanks guys I'll give it a try later.

RT

35
Not a direct answer to your problem but another approach.
Have your gcode write a value to a file, 1=loaded and at end write another value to the file, 0=done.  Have your c sharp program check the file which leaves Mach alone to do its business uninterupted.

TIA

RT

36
Mach4 General Discussion / Turn off mist/flood on stop/estop
« on: January 11, 2022, 11:00:00 AM »
Is there a setting in Mach4 that will turn off Mist/Flood (m9) whenever a Stop or EStop is issued or do I need to modify something in the screenload script?

TIA

RT

37
Winging it here.  Just an approach.
Create a register: GateState, set it to 0
Add to your M3 macro
local mInst = 0;
if (mcRegGetHandle(mInst, "core/global/GateState", &hReg) == MERROR_NOERROR) {
   rc = mcRegSetValue(hReg, 1);
}
Add to your M5 macro
local mInst = 0;
if (mcRegGetHandle(mInst, "core/global/GateState", &hReg) == MERROR_NOERROR) {
   rc = mcRegSetValue(hReg, 0);
}
in the start script declare a variable LastGateState and set it to 0
In the signal library Check to see if the state has changed
mInst = 0;
if (mcRegGetHandle(mInst, "core/global/GateState", &hReg) == MERROR_NOERROR) {
   local gatestate = mcRegGetValue(hReg, 0);
}
if LastGateState~=gatestate then{
  send your pulse
  lastGateState=gatestate
}

Syntax is probable wrong but you get the idea.  Someone else may have a better method.

HTH

RT

38
Mach4 General Discussion / Re: Laser offset relative to Router spindle
« on: December 23, 2021, 08:35:33 AM »
I'm sure you are aware of it but remember that the laser must be in perfect alignment with the spindle.  If not, as the spindle is raised or lowered the laser will locate at a different offset.  Obviously an easy test.  Mark the spot with the laser at one height and then raise a couple of inches and see if the mark moves.

HTH

RT

39
Mach4 General Discussion / Re: Rotary Axis Setup/Mapping in Mach4
« on: December 20, 2021, 11:37:47 AM »
Not sure if it is possible or not.  My method would be to create a gcode string with the 'f' parameter calculated to the speed you want and distance in a relative mode
local speed=(read a value from a register or screen dro or have a speed for this script)*1
mcCntlGgodeExecute(inst, "g91 g1 f"..tostring(speed).." x.1 g90")
This is a quick example syntax may be incorrect but you should get the drift.

HTH

RT

40
Mach4 General Discussion / Re: Rotary Axis Setup/Mapping in Mach4
« on: December 17, 2021, 10:36:35 AM »
Perhaps: Configure->Control
General tab
Rotary axis
tick the box for the axis you want to roll over

HTH

RT