Hello Guest it is March 28, 2024, 03:29:02 PM

Author Topic: chinese cnc probing macros?  (Read 8117 times)

0 Members and 1 Guest are viewing this topic.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: chinese cnc probing macros?
« Reply #10 on: April 23, 2019, 10:54:42 AM »
The macros on my website already have those changes.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: chinese cnc probing macros?
« Reply #11 on: April 23, 2019, 10:58:17 AM »
i have just found the update for my exact motion card which is the  MKX-IV the last update has this info in the release note for that update, it goes as follows
 "
1.Set the probe user dro 2000,2001,2002 to replace the variable 2000,2001,2002.
so user could getuserdro(2000) to replace the GetVar(2000) when probing.
2. auto update acceleration to card when jogging
3. support slave axis seperate home
V2.39.8 2016.9.12
1.optimize the break resume function. "

do i have to do anything other than copy the  NcUsbPod.dll file into the plugins folder ??
Re: chinese cnc probing macros?
« Reply #12 on: April 23, 2019, 11:00:33 AM »
hi ger21,,,,,i will copy the updated plugin to the plugins folder and see if the update helps,,, i have copied the text from the changelog and placed in my last post i made

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: chinese cnc probing macros?
« Reply #13 on: April 23, 2019, 11:43:26 AM »
Quote
1.Set the probe user dro 2000,2001,2002 to replace the variable 2000,2001,2002.

so user could getuserdro(2000) to replace the GetVar(2000) when probing.

I'm not sure what they mean here. You may need to add DRO's to the screen, numbered 2000,2001, and 2002. Then edit the macros as described.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: chinese cnc probing macros?
« Reply #14 on: April 23, 2019, 11:47:22 AM »
i will have a tinker later and let you know,,,,hopefully the motion controller update cures the issues,,,,,your 2010 screenset is a superb peice of work,,,and would help me alot with Machining times

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: chinese cnc probing macros?
« Reply #15 on: April 23, 2019, 12:53:21 PM »
there is a big difference between GetVar(2000...2002) and GetOEMDro(2000...2002)

a good Motion controler uses the Variables 2000.2002 to strore the axis values exactly when
the probe was hit (allmost realtime), nothing will happen with OEMDro 2000...2002

Quote
V2.38.4 2015.7.8
1. add probe variable 2000-2003,but it maybe still could not compatible with mach3 screen 2010.
if you want to probe with screen 2010, please replace the GetVar(2002) with getoemdro(802),
GetVar(2001) with getoemdro(801),GetVar(2000) with getoemdro(800).

if you use OEMDro 800...802 you will allways get the value from the probe hit + overtravel depending
on the time the axis Needs to stop.
« Last Edit: April 23, 2019, 12:55:21 PM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: chinese cnc probing macros?
« Reply #16 on: April 23, 2019, 01:13:11 PM »
My thought was that they may be writing to OEMDRO2000, 2001,2002, ...

But maybe their notes are completely wrong.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: chinese cnc probing macros?
« Reply #17 on: April 24, 2019, 02:15:43 AM »
from Mach3Mill_1.84 doc
chapter 10.7.12 Straight Probe – G31

description:

After successful probing, parameters 2000 to 2005 will be set to the coordinates of the
location of the controlled point at the time the probe tripped and a triplet giving X, Y and Z
at the trip will be written to the triplet file if it has been opened by the M40
macro/OpenDigFile() function (q.v.)


example code:


N010 (probe to find center and diameter of circular hole)
N020 (This program will not run as given here. You have to)
N030 (insert numbers in place of <description of number>.)
N040 (Delete lines N020, N030, and N040 when you do that.)
N050 G0 Z <Z-value of retracted position> F <feed rate>
N060 #1001=<nominal X-value of hole center>
N070 #1002=<nominal Y-value of hole center>
N080 #1003=<some Z-value inside the hole>
N090 #1004=<probe tip radius>
N100 #1005=[<nominal hole diameter>/2.0 - #1004]
N110 G0 X#1001 Y#1002 (move above nominal hole center)
N120 G0 Z#1003 (move into hole - to be cautious, substitute G1 for G0 here)
N130 G31 X[#1001 + #1005] (probe +X side of hole)
N140 #1011=#2000 (save results)
N150 G0 X#1001 Y#1002 (back to center of hole)
N160 G31 X[#1001 - #1005] (probe -X side of hole)
N170 #1021=[[#1011 + #2000] / 2.0] (find pretty good X-value of hole center)
N180 G0 X#1021 Y#1002 (back to center of hole)
N190 G31 Y[#1002 + #1005] (probe +Y side of hole)
N200 #1012=#2001 (save results)
N210 G0 X#1021 Y#1002 (back to center of hole)
N220 G31 Y[#1002 - #1005] (probe -Y side of hole)
N230 #1022=[[#1012 + #2001] / 2.0] (find very good Y-value of hole center)
N240 #1014=[#1012 - #2001 + [2 * #1004]] (find hole diameter in Y-direction)
N250 G0 X#1021 Y#1022 (back to center of hole)
N260 G31 X[#1021 + #1005] (probe +X side of hole)
N270 #1031=#2000 (save results)
N280 G0 X#1021 Y#1022 (back to center of hole)
N290 G31 X[#1021 - #1005] (probe -X side of hole)
N300 #1041=[[#1031 + #2000] / 2.0] (find very good X-value of hole center)
N310 #1024=[#1031 - #2000 + [2 * #1004]] (find hole diameter in X-direction)
N320 #1034=[[#1014 + #1024] / 2.0] (find average hole diameter)
N330 #1035=[#1024 - #1014] (find difference in hole diameters)
N340 G0 X#1041 Y#1022 (back to center of hole)
N350 M2 (that's all, folks)


as written, a good Motion Controller or PP machine will have the exact result of G31 in
uservars 2000...2002
« Last Edit: April 24, 2019, 02:24:52 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: chinese cnc probing macros?
« Reply #18 on: April 24, 2019, 06:03:15 AM »
My thought was that they may be writing to OEMDRO2000, 2001,2002, ...

But maybe their notes are completely wrong.

you seem to be right, missed the post with the Changelog notes.
Looks like they are writing UserDro 2000...
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline reuelt

*
  •  520 520
    • View Profile
Re: chinese cnc probing macros?
« Reply #19 on: April 24, 2019, 05:22:28 PM »
'This is a Probe z surface macro  supplied by XHC of China

FeedCurrent = GetOemDRO(818) 'Get the current settings, OEM DROs (818)=Feedrate DRO
ZCurrent = GetOemDro(802) 'OEM DROs (802)=Z DRO
GageH = GetOEMDRO(1001) 'OEMDRO(1001)=Gage Block Height
ZNew = ZCurrent - 6 'probe down max. 6 inches
Code "G90F5" 'slow feed rate to 5inches/MIN
SetOemDRO(818,5)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "G31 Z" &ZNew
While IsMoving()
Sleep(10)
Wend
Call SetDro (2,GageH) 'DRO(2)=Z DRO
FinalMove = GageH + 1 ‘move 1 inch above gage height
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate
SetOemDRO(818,FeedCurrent)


'Note that there are also, FRENCH and ITALIAN probing macros (posted in this forum) that DO NOT use those legacy setvar() and getvar() functions.
"the gift of God is eternal life through Jesus Christ our Lord"