Hello Guest it is April 19, 2024, 06:44:17 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 - rgodin

Pages: 1
1
Mach4 General Discussion / Re: Multiple selections in screen editor
« on: June 02, 2021, 02:49:40 PM »
Thanks for your answer. For me it’s impossible to select several items with CTRL...
The CTRL key is OK because I can cut and past with  the shortcuts CYRL C or V... I don’t understand

2
Mach4 General Discussion / Multiple selections in screen editor
« on: June 01, 2021, 01:38:08 PM »
Hi,
Few weeks ago I updated to Mach4.4612.
But now I can’t select multiple items (to align them for example)
I can only select them one by one.
In my previous version of Mach4, everything run well. I can do multiple selections.
Is there any trick in version 4612 ? Did I miss something ?
Thanks for your help

3
Hello,
I tried to understand the example of automatic tool height setting from mach 4 scripting guide.
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 a question about one variable : TS_ProbeH -> The height of probe above touch off surface.
I don't understand what is this variable...
I understand that the TS_TouchPos is the distance between the gage line of the spindle and the touch off surface of the sensor in machine position (-100 for example)
So could you please explain me how to use this variable ? Could someone can draw a schematic ?

Thank you for your help...

Rodolphe


4
Mach4 Toolbox / Re: Clear history with a screen button
« on: April 07, 2021, 11:17:26 AM »
Thank you for your answer Steve

5
PoKeys / Re: PoKeys57CNC, support for g31.1,g31.2,g31.3
« on: April 07, 2021, 08:48:11 AM »
I have the same problem... Multiple probes seem not to work. If PoKeys Team read this post’ it would be great to add this feature....

6
Show"N"Tell ( Your Machines) / Re: Microstep with encoder
« on: January 01, 2021, 11:28:07 PM »
Ok
Thank you

7
Show"N"Tell ( Your Machines) / Re: Microstep with encoder
« on: January 01, 2021, 10:19:11 PM »
Hi Craig
Thank you for your answer.
Informations about motor
https://www.omc-stepperonline.com/closed-loop-stepper-motor/p-series-nema-34-closed-loop-stepper-motor-8-5nm-1203-94oz-in-with-encoder-1000cpr.html?mfp=161-motor-nema-size%5BNema%2034%5D
P Series Nema 34 Closed Loop Stepper Motor 8.5Nm/1203.94oz.in with Encoder 1000CPR
Encoder Specification
Output Circuit Type: Differential type
Output Signal Channels: 2 channels
Supply Voltage Min: 5V
Supply Voltage Max: 5V
Output High Voltage: <4V
Output Low Voltage: <1V


Driver
https://www.omc-stepperonline.com/closed-loop-stepper-driver/closed-loop-stepper-driver-0-8-2a-24-110vdc-18-80vac-for-nema-34-stepper-motor.html

So if I understand I must choose a microstep to match the encoder max value If the value of encoder is 1000 I must set the micro step to 5 (1000/200) ?

8
Show"N"Tell ( Your Machines) / Microstep with encoder
« on: December 27, 2020, 10:02:38 AM »
Hello, I’m building a CNC router. I have ball screws 2010 with closed loop Nema34. The encoder have 1000 CPR. My calculations for 20 micro steps :
(200 steps motors X 20) / 10 = 4000 / 10 = 400 counts per units in Mach4
Accuracy 1 / 400 = 0.0025mm

Do you agree with me ?
I’ve already used open loop stepper motors, but never with closed loop systems. I don’t know which value of micro step I have to use with an encoder of 1000 CPR ?

Thank you for your help

9
Mach4 Toolbox / Clear history with a screen button
« on: September 13, 2020, 03:58:57 AM »
Hi,
I would like to clear the history directly with a dedicated button on my screenset instead of clicking first on the History button and then Clear button.
Is there anyway to do this with a little script ?
I found nothing in the Mach4 API Core.
Thank you

Pages: 1