Hello Guest it is March 29, 2024, 09:40: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.


Messages - Azalin

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »
51
Mach4 General Discussion / Re: Strange mach4 behavior
« on: May 05, 2022, 09:02:29 AM »
It is unbelievable that Mach4 has weird bugs like this.

I tested almost 20 Mach4 versions and here are my findings.

4385 good
4524 good
4543 good
4559 good
4566 good
4563 good
4580 good
4582 good

4584 bad
4596 bad
4682 bad
4744 bad

As you can see this problem occurs in build 4584 and persists. 4582 and previous builds are good.

52
Mach4 General Discussion / Re: Strange mach4 behavior
« on: May 04, 2022, 06:09:23 PM »
1 the first time i run gcode the tool is set, height is set, but the first z move is often wrong by 10mm or so.  after re-setting the wpc 0 its fine.

I am having the exact same problem. Z axis exactly moves down about 10mm and crashes. I ruined countless end mills.

Have you find a solution?

53
Mach4 Plugins / ShuttlePRO Spindle Override ++ and --
« on: May 04, 2022, 10:10:29 AM »
Hi,
In my lathe I have a ShuttlePRO. I have assigned 2 buttons as "Spindle Override ++" and "Spindle Override --". These functions works but the increments are too big. In my case, my spindle motor RPM range is 100 to 1510. When I press the ++ button the increments are like:
100 > 600 > 1100 > 1510

However I'd like to get smaller increments like 100 RPM each press. And same amount for -- (decrease RPM).

I've searched the lua scripts and couldn't fine any related spindle override method or similar.

How can I control the ShuttlePRO plugin spindle override values?

Thanks,
Suat

54
Mach4 General Discussion / Re: Crash after tool change
« on: April 15, 2022, 11:29:19 AM »
In the meantime Rob send me an email with an M6 function. I tested it and it worked fine too. Only difference from the stock M6 is it has an extra line which is:
mc.mcMotionSync(inst)

Since it is official I prefer this one.

Thanks Rob


function m6()

   local inst = mc.mcGetInstance()
   local selectedTool = mc.mcToolGetSelected(inst)
   selectedTool = math.tointeger(selectedTool)
   local currentTool = mc.mcToolGetCurrent(inst)
   currentTool = math.tointeger(currentTool)
   
   if selectedTool == currentTool then
      mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
   else
      --Remove this line if you would not like the Z axis to move
      --mc.mcCntlGcodeExecute(inst, "G90 G53 G0 Z0.0");--Move the Z axis all the way up
      mc.mcCntlSetLastError(inst, "Change to tool " .. tostring(selectedTool) .. " and press start to continue") --Message at beginning of tool change
      mc.mcCntlToolChangeManual(inst, true) --This will pause the tool change here and wait for a press of cycle start to continue
      mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedTool) .. "   Previous Tool == " .. tostring(currentTool)) --Message that shows after Cycle Start
      mc.mcToolSetCurrent(inst, selectedTool)
      mc.mcMotionSync(inst)
   end
end

if (mc.mcInEditor() == 1) then
   m6()
end

55
Mach4 General Discussion / Re: Crash after tool change
« on: April 14, 2022, 03:29:30 PM »
This M6 function seems to be working fine. I found this code from this video: https://www.youtube.com/watch?v=tCU1bzuDNvI. I simplified and removed some unnecessary (for me) code.


function m6()
 local inst = mc.mcGetInstance() ;
 
 local currentTool = mc.mcToolGetCurrent(inst)
 local selectedTool = mc.mcToolGetSelected(inst)
 local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --get the current mode so we can return to it when macro ends
         
  --Get positions before moving to do tool change
 local valX, rc = mc.mcAxisGetMachinePos(inst, mc.X_AXIS) --Get the position of the X axis in Machine Position
 local valY, rc = mc.mcAxisGetMachinePos(inst, mc.Y_AXIS) --Get the position of the Y axis in Machine Position
 local valZ, rc = mc.mcAxisGetMachinePos(inst, mc.Z_AXIS) --Get the position of the Z axis in Machine Position
 
 
 if selectedTool == currentTool then
  return
  mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
 else
  mc.mcCntlSetLastError(inst, "Change to tool " .. tostring(selectedTool) .. " and press start to continue") --Message at beginning of tool change
  mc.mcCntlToolChangeManual(inst, true) --This will pause the tool change here and wait for a press of cycle start to continue

  mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedTool) .. "   Previous Tool == " .. tostring(currentTool)) --Message that shows after Cycle Start
  mc.mcToolSetCurrent(inst, selectedTool) --sets the current tool displayed in mach to the selected tool

  local probedz = mc.mcCntlGetPoundVar(inst, 5073) --this retreives the Saved varible of the z position (#5073) in machine coordinates and assigns it to the name probedz
   local ToolLength = math.abs(9.5238 + probedz)  -- this calculates the value of the tool lenght by using a gage line off of my spindle to the tool setter.  uses the absolute value fuction
 
  mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, selectedTool, ToolLength)  --- this sets the tool length value into the tool table into the selected tool position number, Note - i havent reassigned current tool varible so i have to use the "selectedTool" name

  mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
     
 end
 
end

if (mc.mcInEditor() == 1) then
 m6()
enda

56
Hi,
there are various examples of toolchanger scripts in:

Mach4Hobby/LuaExamples/Toolchanger

Craig

Looks like this file/folder is removed from recent versions.

57
Mach4 General Discussion / Re: Crash after tool change
« on: April 04, 2022, 02:44:13 PM »
Am I the only one having this problem?

58
Mach4 General Discussion / Re: Crash after tool change
« on: April 04, 2022, 09:15:17 AM »
Hi,

The doc says:
"Once the tool change is complete in the MDI tab, enter G43 H1, and hit Cycle Start. This will activate the tool offset for tool 1. These
commands can also be on the same line."

I do the tool changing manually so I don't use G43 but Mach4 keeps behaving there is G43 in the code. When there is no G43 in the code Mach4 moves the Z axis down and crashes.

Have you watched the two videos I posted?

59
Mach4 General Discussion / Re: Crash after tool change
« on: April 04, 2022, 06:57:30 AM »
I tried all these builds. I can confirm that the build 4582 and previous versions are good. I mean removing G43 works on these builds however the problem starts on build 4584 and remains. The latest build is also buggy.


4385 good
4524 good
4543 good
4559 good
4566 good
4563 good
4580 good
4582 good

4584 bad
4596 bad
4682 bad
4744 bad
.....
4824 bad (latest build)

60
Mach4 General Discussion / Re: Crash after tool change
« on: April 03, 2022, 06:26:42 PM »
I uploaded a new video. Mach4 version in the video is 4.2.0.4385 and it works perfect.

So my new question is what is the different between the latest Mach4 and 4.2.0.4385 that causes this problem? Is there a workaround I can apply to the latest version I have in my machine? I need to use the latest because I have lots of custom things in it. I mean I can't simply give up the latest and use 4.2.0.4385.

https://www.youtube.com/watch?v=eO5-Z0OttI0

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »