Hello Guest it is April 19, 2024, 09:28:07 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 - barneskite28

Pages: 1
1
Mach4 General Discussion / Mach4 software crash at same point in gcode
« on: March 28, 2023, 06:38:40 PM »
I have a weird problem, where (repeatably) when i run a certain gcode file, the software just exits at the same point and there is no mach present..
Machine just halts but does not stop spindle etc
No errors or warnings

Ant ideas??

2
Mach4 General Discussion / Strange mach4 behavior
« on: April 21, 2022, 11:49:26 AM »
Hi Guys,
  its been a while since i had a need to post but i have an issue with mach4.

First a bit of background - its a home built machine and i have been running mach for a while now.  i have noticed sometimes there is some odd behaviour as below
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.
2 Every few months the config messes up somehow - not sure what causes it but i have to restore and get back to square 1
3 Sometimes when homing for the first time there is a small delay - 1 or 2 seconds - between moving the axis.  This is not all the time but sometimes

Now i have a new problem.....

After some tidying yesterday i changed the usb port for my rs485 adapter (spindle running through modbus), today i go to use my machine and firstly the tool change option is set to 'm6 is the next tool' - after changing back 3 times it finally stayed and i went to do an m6 (which includes tool height measure).  The routine started as normal and moved to tool change pos, waited for the tool, and then moved to the probe, air blast and start the probe movement.  When the tool reched the probe, the machine stopped and seemed to get 'stuck'- - no error, no e-stop, but no further movement and could only be moved after a reset.  The normal behaviour would be to move z back u and return to previous state.

I have no clue what could be causing this.... very weird.  I dont know why it wont move past the tool probing routine - it has done 1000's using the same m6 script no issue!

3
Mach4 General Discussion / LUA set modbus register
« on: November 07, 2021, 10:16:18 AM »
Hi Guys, this is a follow on and a broader question to scripting gurus....

I have a modbus connection, and i am trying to update the register from the cmd rpm but i am having no luck.  Joeaverage has been helping me but i am still not successful, would much appreciate dazthegaz or anyone else taking a look at this for me please?
The spindle specs
12000rpm
register values 100% = 10000 etc

Code: [Select]
local registerHandle=mc.mcRegGetHandle(mInst,"modbus0/wrtvfdspeed")
local commandedSpeed=mc.mcSpindleGetCommandRPM(mInst)
local registerValue=(commandedSpeed/12000)*10000
mc.mcRegSetValue(registerHandle,registerValue)   

this does not seem to be writing the register as expected, any help appreciated!

4
Mach4 General Discussion / Modbus control huanyang GT vfd
« on: October 31, 2021, 12:49:00 PM »
Hi guys,
  Just upgraded my VFD to huanyang GT, got modbus connected and talking thanks to the little tutorial
https://caldwellfam.net/bill/wp-content/uploads/2019/04/Connecting-a-VFD-to-Mach4-through-the-Modbus-v5.pdf

I have copied the script as instructed and i have the VFD turning on with the spindle on button, but the spindle is not turning - cant seem to set the RPM.  I dont quite get what i should be looking at!

I can control via regfile initially but now when i enter new values the actual value does not change

5
I have found that mach is pretty unstable in my case, I just turned my machine on and the z steps are all wrong. Was working fine about a month ago but now its all screwed up.  Mach support is next to useless, they just kept closing tickets on me and not resolving any issues at all.
Anyone else feeling the same?

6
Mach4 General Discussion / Buggy config in mach4
« on: May 23, 2021, 11:47:45 AM »
Hi Guys,
 In my ongoing saga trying to get a smooth toolchange working, i have found that the radio buttons for config>control>tools keeps reverting to t on m6 line is next tool! i have reset this multiple times but it keeps reverting back to the same setting.
Has anyone experienced this before?

7
Mach4 General Discussion / TLO and calculated tool length
« on: May 02, 2021, 05:08:43 PM »
So i am try but failing at setting my tool lengths from the gauge line with a tool setter and m6 script.
i have measured the spindle face (bt30 spindle) in machin coordinates at -161.2219, and when i probe the tool ( with tool offsets off) the machine coordinates are -65.4 . However the tool length being set in the tool table is -30 ish.... it should be  +90 ish.... not sure whats happening

Question, should i have tool lenght offsets on or off when probing?
How do i get the tool lengths to reflect actual lengths from the gauge line?

8
Mach4 General Discussion / Again with the tool setter
« on: May 01, 2021, 08:52:16 AM »
Ok guys, so after digging around i found some script in the Mach4 scripting manual.  The supporting paragraph describes exactly what i need, but refers to 'customization manual' that doesn't exist.
Below is the script copied direct from the manual
Code: [Select]
-----------------------------------------------------------------------------
-- Auto Tool Setting Macro
-----------------------------------------------------------------------------
--[[
 Requires the following instance registers to be defined
 TS_XPos-----------X position of probe (machine position)
 TS_YPos-----------Y position of probe (machine position)
 TS_Type-----------Offset type (1 or 2)
 TS_TouchPos-------Z position of touch off surface (machine position)
 TS_ProbeH---------Height of probe above touch off surface
 TS_DefaultL-------Default tool length guess
 TS_Retract--------Retract distance after probe touch
 Offset Type 1-----Length of tool from gauge line to tip
 Offset Type 2-----Distance from tip of tool to the touch position
]]
--The function GetRegister() must be defined for use by macros
function m1005()
 local inst = mc.mcGetInstance()

 ------------- Define Vars -------------
 local ProbeSignal = mc.ISIG_DIGITIZE
 ------------- Get current state -------------
 local CurTool = mc.mcToolGetCurrent(inst)
 local CurHNum = mc.mcCntlGetPoundVar(inst, 2032)
 local CurFeed = mc.mcCntlGetPoundVar(inst, 2134)
 local CurZOffset = mc.mcCntlGetPoundVar(inst, 4102)
26
 local CurFeedMode = mc.mcCntlGetPoundVar(inst, 4001)
 local CurAbsMode = mc.mcCntlGetPoundVar(inst, 4003)
 ------------- Get touch off parameters -------------
 local Xpos = GetRegister("TS_XPos", 1)
 local Ypos = GetRegister("TS_YPos", 1)
 local OffsetType = GetRegister("TS_Type", 1)
 local TouchPos = GetRegister("TS_TouchPos", 1)
 local ProbeHeight = GetRegister("TS_ProbeH", 1)
 local RetractDistance = GetRegister("TS_Retract", 1)
 local ToolLengthGuess = GetRegister("TS_DefaultL", 1)
 ------------- Check Probe -------------
 local hsig = mc.mcSignalGetHandle(inst, ProbeSignal)
 local ProbeState = mc.mcSignalGetState(hsig)
 if (ProbeState == true) then
 mc.mcCntlSetLastError(inst, "ERROR: Probe signal is activated")
 do return end
 end

 ------------- Calculations for Gcode -------------
 local StartHeight = TouchPos + ProbeHeight + ToolLengthGuess + .5

 ------------- Generate GCode -------------
 AutoToolSetGCode = ""
 AutoToolSetGCode = AutoToolSetGCode .. "G00 G80 G40 G49 G90\n"
 AutoToolSetGCode = AutoToolSetGCode .. "G00 G53 Z0.0\n"
 AutoToolSetGCode = AutoToolSetGCode .. string.format("G00 G53 X%.4f Y%.4f\n", Xpos, Ypos)
 AutoToolSetGCode = AutoToolSetGCode .. string.format("G00 G53 Z%.4f\n", StartHeight)
 AutoToolSetGCode = AutoToolSetGCode .. "G91 G31 Z-2.0 F25.\n"

 mc.mcCntlGcodeExecuteWait(inst, AutoToolSetGCode)
 --Check probe contact
 ProbeState = mc.mcSignalGetState(hsig)
 if (ProbeState ~= 1) then
 mc.mcCntlSetLastError(inst, "ERROR: No contact with probe")
 mc.mcCntlGcodeExecuteWait(inst, "G0 G90 G53 Z0.0\n")
 do return end
 end

 AutoToolSetGCode = ""
 AutoToolSetGCode = AutoToolSetGCode .. string.format("G91 G00 Z%.4f\n", RetractDistance)
 AutoToolSetGCode = AutoToolSetGCode .. "G91 G31 Z-1.0 F10.\n"

 mc.mcCntlGcodeExecuteWait(inst, AutoToolSetGCode)
 --Check probe contact
 ProbeState = mc.mcSignalGetState(hsig)
 if (ProbeState ~= 1) then
 mc.mcCntlSetLastError(inst, "ERROR: No contact with probe")
 mc.mcCntlGcodeExecuteWait(inst, "G0 G90 G53 Z0.0\n")
 do return end
 end

 AutoToolSetGCode = ""
 AutoToolSetGCode = AutoToolSetGCode .. "G90 G00 G53 Z0.0\n"
 mc.mcCntlGcodeExecuteWait(inst, AutoToolSetGCode)
 ------------- Get touch position and set offset -------------
 local ZProbed = mc.mcCntlGetPoundVar(inst, 5063)
 local ZOffset = ZProbed - ProbeHeight + CurZOffset
 if (OffsetType == 1) then
 ZOffset = math.abs(TouchPos - ZOffset)
 end

 mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, CurTool, ZOffset)
 mc.mcCntlSetLastError(inst, string.format("Auto tool setting complete, Offset = %.4f",
ZOffset))

I have managed to touch off the spindle face in machine coords, and have the spindle face (gauge line- without holder) at -161.2219.  My tool setter position is at x24.0 y436.0

Can someone help me understand where to put these values and how to get this damn thing to work please?

Tim

9
Mach4 General Discussion / Tool setter, M6, tool length offsets
« on: April 04, 2021, 07:27:10 AM »
Hi Guys,
  I am having an issue with a fixed tool setter and the m6 macro.
I'm no expert at Lua - and thats being generous!
I have tried a few different scripts to allow a manual tool change followed by a tool height probe to a fixed tool setter.  I tried DazTheGaz's script but my machine just froze and didnt move.  I  found the script for the m6 toolchange on the mach4 basics video (https://www.youtube.com/watch?v=6-4JkDv9AgM) and all seemed good but a bit clunky.  The machine did its thing, then measured the tool all good. The problem comes it does not set the WCS zero correctly so is basically useless.... not sure what is going on or if im missing something in the tool change/offsets !!
Any advice is very welcome!!
TIA Tim

10
General Mach Discussion / Huanyang 3kw, Mach4 mb2 ess connections
« on: January 22, 2021, 03:11:29 PM »
Hi Guys,
  I have been trying to get the spindle control right for my Huanyang vfd and MB2.. i previously had the MB2 wired to my nowforever 2.2 kw vfd, but now i am struggling with the spindle control.
  I have tried setting up Modbus, with a usb rs485 adaptor but cannot get it to work at all...First time i have used ModBus and i cant get it working...
 gone back to the analogue connections, made +10 > AH, ACM  > AL, VI > AO. Still no joy.

Any help or Advice?  Maybe K.Weerasak could help?
Thanks
Tim

Pages: 1