├── Screenshot.JPG ├── Probe Wizard EN ├── Bitmaps │ ├── x+.png │ ├── x-.png │ ├── y+.png │ ├── y-.png │ ├── z.png │ ├── absx.png │ ├── absy.png │ ├── absz.png │ ├── ax+.png │ ├── ax-.png │ ├── ay+.png │ ├── ay-.png │ ├── g91.png │ ├── lxin.png │ ├── lyin.png │ ├── mdi.png │ ├── misc.png │ ├── rott.png │ ├── x+y+.png │ ├── x+y-.png │ ├── x-y+.png │ ├── x-y-.png │ ├── y+x+.png │ ├── y+x-.png │ ├── y-x+.png │ ├── y-x-.png │ ├── absx_r.png │ ├── absy_r.png │ ├── absz_r.png │ ├── angle.png │ ├── angle_r.png │ ├── auto0xy.png │ ├── g8692.png │ ├── inside.png │ ├── lxout.png │ ├── lyout.png │ ├── m6_sett.png │ ├── misc_r.png │ ├── outside.png │ ├── probe_a.png │ ├── probe_d.png │ ├── probe_z.png │ ├── result.png │ ├── rotate.png │ ├── JogSlow+.jpg │ ├── JogSlow+g.jpg │ ├── JogSlow-.jpg │ ├── JogSlow-g.jpg │ ├── Radio LED.png │ ├── X_Ref_LED.png │ ├── Y_Ref_LED.png │ ├── Z_Ref_LED.png │ ├── auto0xy_r.png │ ├── auto_rott.png │ ├── exit-icon.png │ ├── feedrate.png │ ├── inside_r.png │ ├── max_probe.png │ ├── outside_r.png │ ├── probe_lx.png │ ├── probe_ly.png │ ├── probe_vel.png │ ├── probe_xm.png │ ├── probe_xp.png │ ├── probe_ym.png │ ├── probe_yp.png │ ├── result_r.png │ ├── settings.png │ ├── tooldiam.png │ ├── workpiece.png │ ├── Checkbox LED.png │ ├── CycleStart3.jpg │ ├── JogButtonX+.jpg │ ├── JogButtonX+g.jpg │ ├── JogButtonX-.jpg │ ├── JogButtonX-g.jpg │ ├── JogButtonY+.jpg │ ├── JogButtonY+g.jpg │ ├── JogButtonY-.jpg │ ├── JogButtonY-g.jpg │ ├── JogButtonZ+.jpg │ ├── JogButtonZ+g.jpg │ ├── JogButtonZ-.jpg │ ├── JogButtonZ-g.jpg │ ├── Transparent.png │ ├── XYclearance.png │ ├── Zclearance.png │ ├── auto_rott_r.png │ ├── center_out.png │ ├── edge_length.png │ ├── feedrate_r.png │ ├── latch_dist.png │ ├── probe_active.png │ ├── probe_centr.png │ ├── probe_diam.png │ ├── search_vel.png │ ├── settings_r.png │ ├── stop-button.png │ ├── toolsetter.png │ ├── 15x20 Red LED.png │ ├── JogSingleStep.jpg │ ├── probe_active_r.png │ ├── probe_center_x.png │ ├── probe_center_y.png │ ├── return_center.png │ ├── 15x20 Green LED.png │ ├── 15x20 Reset LED.png │ ├── 15x20 Yellow LED.png │ ├── JogStepVelocity.jpg │ ├── return_center_r.png │ ├── probe_wizard_25x25.png │ ├── probe_wizard_32x32.png │ ├── probe_wizard_50x20.png │ └── logo_micro_vers_gray.png ├── Probe Wizard EN.set └── Probe Wizard EN.set.def ├── Probe Wizard RU ├── Bitmaps │ ├── x+.png │ ├── x-.png │ ├── y+.png │ ├── y-.png │ ├── z.png │ ├── absx.png │ ├── absy.png │ ├── absz.png │ ├── ax+.png │ ├── ax-.png │ ├── ay+.png │ ├── ay-.png │ ├── g91.png │ ├── lxin.png │ ├── lyin.png │ ├── mdi.png │ ├── misc.png │ ├── rott.png │ ├── x+y+.png │ ├── x+y-.png │ ├── x-y+.png │ ├── x-y-.png │ ├── y+x+.png │ ├── y+x-.png │ ├── y-x+.png │ ├── y-x-.png │ ├── absx_r.png │ ├── absy_r.png │ ├── absz_r.png │ ├── angle.png │ ├── angle_r.png │ ├── auto0xy.png │ ├── g8692.png │ ├── inside.png │ ├── lxout.png │ ├── lyout.png │ ├── m6_sett.png │ ├── misc_r.png │ ├── outside.png │ ├── probe_a.png │ ├── probe_d.png │ ├── probe_z.png │ ├── result.png │ ├── rotate.png │ ├── JogSlow+.jpg │ ├── JogSlow+g.jpg │ ├── JogSlow-.jpg │ ├── JogSlow-g.jpg │ ├── Radio LED.png │ ├── X_Ref_LED.png │ ├── Y_Ref_LED.png │ ├── Z_Ref_LED.png │ ├── auto0xy_r.png │ ├── auto_rott.png │ ├── exit-icon.png │ ├── feedrate.png │ ├── inside_r.png │ ├── max_probe.png │ ├── outside_r.png │ ├── probe_lx.png │ ├── probe_ly.png │ ├── probe_vel.png │ ├── probe_xm.png │ ├── probe_xp.png │ ├── probe_ym.png │ ├── probe_yp.png │ ├── result_r.png │ ├── settings.png │ ├── tooldiam.png │ ├── workpiece.png │ ├── Checkbox LED.png │ ├── CycleStart3.jpg │ ├── JogButtonX+.jpg │ ├── JogButtonX+g.jpg │ ├── JogButtonX-.jpg │ ├── JogButtonX-g.jpg │ ├── JogButtonY+.jpg │ ├── JogButtonY+g.jpg │ ├── JogButtonY-.jpg │ ├── JogButtonY-g.jpg │ ├── JogButtonZ+.jpg │ ├── JogButtonZ+g.jpg │ ├── JogButtonZ-.jpg │ ├── JogButtonZ-g.jpg │ ├── Transparent.png │ ├── XYclearance.png │ ├── Zclearance.png │ ├── auto_rott_r.png │ ├── center_out.png │ ├── edge_length.png │ ├── feedrate_r.png │ ├── latch_dist.png │ ├── probe_active.png │ ├── probe_centr.png │ ├── probe_diam.png │ ├── search_vel.png │ ├── settings_r.png │ ├── stop-button.png │ ├── toolsetter.png │ ├── 15x20 Red LED.png │ ├── JogSingleStep.jpg │ ├── probe_active_r.png │ ├── probe_center_x.png │ ├── probe_center_y.png │ ├── return_center.png │ ├── 15x20 Green LED.png │ ├── 15x20 Reset LED.png │ ├── 15x20 Yellow LED.png │ ├── JogStepVelocity.jpg │ ├── return_center_r.png │ ├── probe_wizard_25x25.png │ ├── probe_wizard_32x32.png │ ├── probe_wizard_50x20.png │ └── logo_micro_vers_gray.png ├── Probe Wizard RU.set └── Probe Wizard RU.set.def ├── macros ├── M925.m1s ├── M917.m1s ├── M901.m1s ├── M927.m1s ├── M904.m1s ├── M903.m1s ├── M902.m1s ├── M916.m1s ├── M914.m1s ├── M915.m1s ├── M913.m1s ├── M6Start.m1s ├── M926.m1s ├── M921.m1s ├── M920.m1s ├── M922.m1s ├── M6End.m1s ├── M923.m1s ├── M908.m1s └── M906.m1s └── README.md /Screenshot.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Screenshot.JPG -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/z.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/z.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absx.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absy.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absz.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/ax+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/ax+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/ax-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/ax-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/ay+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/ay+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/ay-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/ay-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/g91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/g91.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/lxin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/lxin.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/lyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/lyin.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/mdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/mdi.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/misc.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/rott.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/rott.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x+y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x+y+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x+y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x+y-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x-y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x-y+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/x-y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/x-y-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y+x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y+x+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y+x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y+x-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y-x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y-x+.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/y-x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/y-x-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absx.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absy.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absz.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/ax+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/ax+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/ax-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/ax-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/ay+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/ay+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/ay-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/ay-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/g91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/g91.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/lxin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/lxin.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/lyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/lyin.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/mdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/mdi.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/misc.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/rott.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/rott.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x+y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x+y+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x+y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x+y-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x-y+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x-y+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/x-y-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/x-y-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y+x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y+x+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y+x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y+x-.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y-x+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y-x+.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/y-x-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/y-x-.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absx_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absx_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absy_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absy_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/absz_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/absz_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/angle.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/angle_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/angle_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/auto0xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/auto0xy.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/g8692.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/g8692.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/inside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/inside.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/lxout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/lxout.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/lyout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/lyout.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/m6_sett.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/m6_sett.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/misc_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/misc_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/outside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/outside.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_a.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_d.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_z.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/result.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/rotate.png -------------------------------------------------------------------------------- /Probe Wizard EN/Probe Wizard EN.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Probe Wizard EN.set -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absx_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absx_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absy_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absy_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/absz_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/absz_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/angle.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/angle_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/angle_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/auto0xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/auto0xy.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/g8692.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/g8692.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/inside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/inside.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/lxout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/lxout.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/lyout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/lyout.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/m6_sett.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/m6_sett.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/misc_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/misc_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/outside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/outside.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_a.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_d.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_z.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/result.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/rotate.png -------------------------------------------------------------------------------- /Probe Wizard RU/Probe Wizard RU.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Probe Wizard RU.set -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogSlow+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogSlow+.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogSlow+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogSlow+g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogSlow-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogSlow-.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogSlow-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogSlow-g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Radio LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Radio LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/X_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/X_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Y_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Y_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Z_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Z_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/auto0xy_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/auto0xy_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/auto_rott.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/auto_rott.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/exit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/exit-icon.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/feedrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/feedrate.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/inside_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/inside_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/max_probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/max_probe.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/outside_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/outside_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_lx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_lx.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_ly.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_vel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_vel.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_xm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_xm.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_xp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_xp.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_ym.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_ym.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_yp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_yp.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/result_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/result_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/settings.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/tooldiam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/tooldiam.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/workpiece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/workpiece.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogSlow+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogSlow+.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogSlow+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogSlow+g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogSlow-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogSlow-.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogSlow-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogSlow-g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Radio LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Radio LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/X_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/X_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Y_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Y_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Z_Ref_LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Z_Ref_LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/auto0xy_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/auto0xy_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/auto_rott.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/auto_rott.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/exit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/exit-icon.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/feedrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/feedrate.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/inside_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/inside_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/max_probe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/max_probe.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/outside_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/outside_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_lx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_lx.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_ly.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_vel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_vel.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_xm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_xm.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_xp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_xp.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_ym.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_ym.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_yp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_yp.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/result_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/result_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/settings.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/tooldiam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/tooldiam.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/workpiece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/workpiece.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Checkbox LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Checkbox LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/CycleStart3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/CycleStart3.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonX+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonX+.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonX+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonX+g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonX-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonX-.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonX-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonX-g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonY+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonY+.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonY+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonY+g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonY-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonY-.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonY-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonY-g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonZ+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonZ+.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonZ+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonZ+g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonZ-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonZ-.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogButtonZ-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogButtonZ-g.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Transparent.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/XYclearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/XYclearance.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/Zclearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/Zclearance.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/auto_rott_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/auto_rott_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/center_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/center_out.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/edge_length.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/edge_length.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/feedrate_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/feedrate_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/latch_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/latch_dist.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_active.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_centr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_centr.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_diam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_diam.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/search_vel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/search_vel.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/settings_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/settings_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/stop-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/stop-button.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/toolsetter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/toolsetter.png -------------------------------------------------------------------------------- /Probe Wizard EN/Probe Wizard EN.set.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Probe Wizard EN.set.def -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Checkbox LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Checkbox LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/CycleStart3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/CycleStart3.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonX+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonX+.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonX+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonX+g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonX-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonX-.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonX-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonX-g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonY+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonY+.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonY+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonY+g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonY-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonY-.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonY-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonY-g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonZ+.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonZ+.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonZ+g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonZ+g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonZ-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonZ-.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogButtonZ-g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogButtonZ-g.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Transparent.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/XYclearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/XYclearance.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/Zclearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/Zclearance.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/auto_rott_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/auto_rott_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/center_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/center_out.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/edge_length.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/edge_length.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/feedrate_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/feedrate_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/latch_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/latch_dist.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_active.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_centr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_centr.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_diam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_diam.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/search_vel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/search_vel.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/settings_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/settings_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/stop-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/stop-button.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/toolsetter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/toolsetter.png -------------------------------------------------------------------------------- /Probe Wizard RU/Probe Wizard RU.set.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Probe Wizard RU.set.def -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/15x20 Red LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/15x20 Red LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogSingleStep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogSingleStep.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_active_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_active_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_center_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_center_x.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_center_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_center_y.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/return_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/return_center.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/15x20 Red LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/15x20 Red LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogSingleStep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogSingleStep.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_active_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_active_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_center_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_center_x.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_center_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_center_y.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/return_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/return_center.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/15x20 Green LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/15x20 Green LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/15x20 Reset LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/15x20 Reset LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/15x20 Yellow LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/15x20 Yellow LED.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/JogStepVelocity.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/JogStepVelocity.jpg -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/return_center_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/return_center_r.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/15x20 Green LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/15x20 Green LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/15x20 Reset LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/15x20 Reset LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/15x20 Yellow LED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/15x20 Yellow LED.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/JogStepVelocity.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/JogStepVelocity.jpg -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/return_center_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/return_center_r.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_wizard_25x25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_wizard_25x25.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_wizard_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_wizard_32x32.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/probe_wizard_50x20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/probe_wizard_50x20.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_wizard_25x25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_wizard_25x25.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_wizard_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_wizard_32x32.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/probe_wizard_50x20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/probe_wizard_50x20.png -------------------------------------------------------------------------------- /Probe Wizard EN/Bitmaps/logo_micro_vers_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard EN/Bitmaps/logo_micro_vers_gray.png -------------------------------------------------------------------------------- /Probe Wizard RU/Bitmaps/logo_micro_vers_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/verser-git/ProbeWizard/HEAD/Probe Wizard RU/Bitmaps/logo_micro_vers_gray.png -------------------------------------------------------------------------------- /macros/M925.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Center of rotation G68 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim Angle,pi 9 | Dim X,Y,Xabs,Yabs,Xc,Yc 10 | 11 | pi = 4 * Atn(1) 12 | Angle= GetOEMDRO(118) * pi/180 13 | Xabs=GetOEMDRO(83) 14 | Yabs=GetOEMDRO(84) 15 | X=GetDRO(0) 16 | Y=GetDRO(1) 17 | Xc=-(Xabs+X*Cos(Angle)-Y*Sin(Angle)) 18 | Yc=-(Yabs+X*Sin(Angle)+Y*Cos(Angle)) 19 | If Angle=0 Then 20 | Xc=0 21 | Yc=0 22 | End If 23 | SetUserLabel (22,"A=" & Format(Xc, "###0.###")) 24 | SetUserLabel (23,"B=" & Format(Yc, "###0.###")) 25 | 26 | End Sub -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Probe Wizard for Mach3 2 | 3 | Install. 4 | ----------------------------------------------------------------------------- 5 | 1. The folder Probe Wizard EN from the archive put inside the folder 6 | 7 | ⁄Mach3 ⁄Addons 8 | 9 | 2. All files from the /macros folder from the archive should be placed inside the macro folder with their own machine profile, by default this is 10 | ⁄Mach3 ⁄macros⁄Mach3Mill 11 | 12 | 13 | More details https://vers.by/en/blog/useful-articles/probe_wizard 14 | 15 | 16 | License terms. 17 | ----------------------------------------------------------------------------- 18 | 19 | This is a plugin for Mach3 20 | Copyright 2018 Serguei Glavatski 21 | 22 | This program is free software; you can redistribute it and/or modify 23 | it under the terms of the GNU General Public License as published by 24 | the Free Software Foundation; either version 2 of the License, or 25 | (at your option) any later version. 26 | 27 | This program is distributed in the hope that it will be useful, 28 | but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | GNU General Public License for more details. 31 | 32 | You should have received a copy of the GNU General Public License 33 | along with this program; if not, write to the Free Software 34 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 35 | 36 | 37 | Установка. 38 | ----------------------------------------------------------------------------- 39 | 1. Папку Probe Wizard RU из архива поместить внутрь папки 40 | ⁄Mach3⁄Addons 41 | 42 | 2. Все файлы из папки /macros из архива поместить внутрь папки макросов со своим профилем станка, по умолчанию это 43 | ⁄Mach3⁄macros⁄Mach3Mill 44 | 45 | Подробнее https://vers.by/ru/blog/useful-articles/probe_wizard 46 | 47 | 48 | Условия лицензии. 49 | ----------------------------------------------------------------------------- 50 | 51 | Это плагин для Mach3 52 | Copyright 2018 Serguei Glavatski 53 | 54 | Эта программа является свободным программным обеспечением; Вы можете распространять его и / или изменять 55 |    в соответствии с условиями Стандартной Общественной Лицензии (General Public License) GNU, опубликованной 56 |    Free Software Foundation; либо версия 2 Лицензии, либо 57 |    (на ваше усмотрение) любая более поздняя версия. 58 | 59 | Эта программа распространяется как есть в надежде, что она будет полезна, 60 |    но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ. Смотрите 61 |    GNU General Public License для более подробной информации. 62 | 63 | Для получения копии Стандартной Общественной Лицензии (General Public License) GNU 64 |    обратитесь в: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 65 | -------------------------------------------------------------------------------- /macros/M917.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Z- Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | Zdepth = GetUserDRO(1830) 39 | 40 | If GetOEMLED(1871) Then 41 | AutoZeroFlag=1 42 | Else 43 | AutoZeroFlag=0 44 | End If 45 | 46 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 47 | 48 | 'Temporary save all Axis Scale factors 49 | ZScale = GetOEMDRO(61) 50 | 51 | 'Set Z Scale to 1 52 | SetOEMDRO(61,1) 53 | Sleep(250) 54 | 55 | 56 | 'Check for Errors 57 | 58 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 59 | Message "Please change to working coordinates" 60 | SetOEMDRO(61,ZScale) 61 | Sleep(250) 62 | Exit Sub ' Exit if in Machine Coordinates 63 | End If 64 | 65 | If GetOemLED(825)<>0 Then 66 | Message "Probe is active! Check connection and try again" 67 | Call SetOEMDRO(61,ZScale) 68 | Sleep(250) 69 | Exit Sub ' Exit if probe is tripped 70 | End If 71 | 72 | 73 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 74 | 75 | 'main working 76 | 77 | 'Save Z start position 78 | Zpos = GetDRO(2) 79 | 'Probe Z- 80 | ZHit=ProbeZ(-1,DMax,Latch,FRate1,FRate2) 81 | If ZHit=999999 Then 82 | Exit Sub 83 | End If 84 | SetUserLabel (14, Format(ZHit, "####0.000")) 85 | PushMSG("Z- = " & (ZHit)) 86 | 'Safe back to start position 87 | If Not SafeMoveZ((Zpos-GetDRO(2)),FRate1) Then 88 | PushMSG("Return to the search position is interrupted") 89 | Exit Sub 90 | End If 91 | 92 | 93 | If AutoZeroFlag = 1 Then 94 | SetOEMDRO(802, GetDRO(2)-ZHit) 95 | Sleep(150) 96 | End If 97 | 98 | 'epilog 99 | 100 | SetOEMDRO(61,ZScale) 101 | Sleep(250) 102 | 103 | Call SetLED49(AbsIncFlag) 104 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 105 | Sleep(125) 106 | 107 | End Sub 108 | 109 | 110 | 'Functions 111 | 112 | Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) 113 | Dim Res 114 | Dim Zstart 115 | Dim Ftmp 116 | Dim AbsIncF 117 | ProbeZ=999999 118 | Zstart = GetDRO(2) 119 | Ftmp = FeedRate() 'FeedRate() 120 | AbsIncF=GetOEMLED(49) 121 | 'Fast Probe Z 122 | Code "G91" 123 | Code "F" & FRate1 124 | Sleep(125) 125 | Call WaitProbeReady() 126 | Code "G31 Z" & (Dir*DMax) 127 | While IsMoving() 128 | Wend 129 | Res = GetVar(2002) 130 | ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 131 | If Abs(Res - Zstart - Dir*DMax) < 0.01 Then 132 | PushMSG("Error: G31 Z search finished without making contact") 133 | PushMSG("Manually return to the starting position and repeat the search") 134 | Call SetLED49(AbsIncF) 135 | SetOEMDRO(818,Ftmp) 136 | Sleep(125) 137 | Exit Function 138 | End If 139 | 'Move back 140 | Code "G00 Z" & -Dir*Latch 141 | While IsMoving() 142 | Wend 143 | Call WaitProbeReady() 144 | 'Latch Probe Z 145 | Zstart = GetDRO(2) 146 | Code "F" & FRate2 147 | Sleep(125) 148 | Code "G31 Z" & Dir*Latch*2 149 | While IsMoving() 150 | Wend 151 | 'Save result 152 | Res = GetVar(2002) 153 | If Abs(Res - Zstart - Dir*Latch*2) < 0.01 Then 154 | PushMSG("Error: G31 Z latch finished without making contact") 155 | PushMSG("Manually return to the starting position and repeat the search") 156 | Call SetLED49(AbsIncF) 157 | SetOEMDRO(818,Ftmp) 158 | Sleep(125) 159 | Exit Function 160 | End If 161 | Code "G00 Z" & -Dir*Latch 162 | While IsMoving() 163 | Wend 164 | Call SetLED49(AbsIncF) 165 | SetOEMDRO(818,Ftmp) 166 | Sleep(125) 167 | ProbeZ=Res 168 | End Function 169 | 170 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 171 | Dim Zstart 172 | Dim Ftmp 173 | Dim AbsIncF 174 | SafeMoveZ=True 175 | Zstart = GetDRO(2) 176 | Ftmp = FeedRate() 'FeedRate() 177 | AbsIncF=GetOEMLED(49) 178 | Code "G91" 179 | Code "F" & F1 180 | Sleep(125) 181 | Call WaitProbeReady() 182 | Code "G31 Z" & Z1 183 | While IsMoving() 184 | Sleep(100) 185 | Wend 186 | ZHit = GetVar(2002) 187 | Call SetLED49(AbsIncF) 188 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 189 | SafeMoveZ=False 190 | PushMSG("Error! Probe tripped during Z movement") 191 | End If 192 | SetOEMDRO(818,Ftmp) 193 | Sleep(125) 194 | End Function 195 | 196 | Function PushMSG(Str1 As String) As Boolean 197 | SetUserLabel (21,GetUserLabel(20)) 198 | SetUserLabel (20,GetUserLabel(19)) 199 | SetUserLabel (19,GetUserLabel(18)) 200 | SetUserLabel (18,GetUserLabel(17)) 201 | SetUserLabel (17,Str1) 202 | Message Str1 203 | PushMSG=True 204 | End Function 205 | 206 | Sub WaitProbeReady() 207 | While GetOemLED(825) 208 | Sleep(100) 209 | Wend 210 | End Sub 211 | 212 | Sub SetLED49(Flag) 213 | If Flag Then 214 | Code "G91" 215 | Sleep(125) 216 | Else 217 | Code "G90" 218 | Sleep(125) 219 | End If 220 | End Sub 221 | -------------------------------------------------------------------------------- /macros/M901.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() ' X+ Probing Script ' Author verser ' vers.by - touch probes, tool setters and precision home switches Dim FRate1, FRate2 Dim DMax, Latch, EdgeLength Dim XYclearance Dim AutoZeroFlag Dim ToolNo Dim ToolD Dim ProbeD Dim Zdepth Dim XHit, ZHit Dim Zpos, Xpos,Ypos Dim XScale, YScale, ZScale Dim AbsIncFlag Dim CurrentFeed 'Init vars FRate1 = abs(GetUserDRO(1821)) FRate2 = abs(GetUserDRO(1822)) DMax = abs(GetUserDRO(1823)) ToolNo = GetCurrentTool() ToolD = GetToolParam(ToolNo,1) If GetUserDRO(1829) = 0 then ProbeD = ToolD Else ProbeD = GetUserDRO(1829) End If Latch = abs(GetUserDRO(1825)) XYclearance = GetUserDRO(1826) EdgeLength = GetUserDRO(1828) Zdepth = GetUserDRO(1830) If GetOEMLED(1871) Then AutoZeroFlag=1 Else AutoZeroFlag=0 End If AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 'Temporary save all Axis Scale factors XScale = GetOEMDRO(59) YScale = GetOEMDRO(60) ZScale = GetOEMDRO(61) 'Set All Axis' Scale to 1 SetOEMDRO(59,1) SetOEMDRO(60,1) SetOEMDRO(61,1) Sleep(250) 'Check for Errors If GetOemLED(16)<>0 Then ' Check for Machine Coordinates Message "Please change to working coordinates" SetOEMDRO(59,XScale) SetOEMDRO(60,YScale) SetOEMDRO(61,ZScale) Sleep(250) Exit Sub ' Exit if in Machine Coordinates End If If GetOemLED(825)<>0 Then Message "Probe is active! Check connection and try again" Call SetOEMDRO(59,XScale) Call SetOEMDRO(60,YScale) Call SetOEMDRO(61,ZScale) Sleep(250) Exit Sub ' Exit if probe is tripped End If CurrentFeed = GetOEMDRO(818) 'FeedRate() 'main working 'Save Z start position Zpos = GetDRO(2) 'Safe Go to probe position If Not SafeMoveX((-XYclearance),CurrentFeed) Then PushMSG("Manually return to the starting position and repeat the search") Exit Sub End If If Not SafeMoveZ((-Zdepth),CurrentFeed) Then PushMSG("Manually return to the starting position and repeat the search") Exit Sub End If 'Probe X+ XHit=ProbeX(1,DMax,Latch,FRate1,FRate2) If XHit=999999 Then Exit Sub End If 'Indicate result SetUserLabel (4, Format(XHit+ProbeD/2, "####0.000")) PushMSG("X+ = " & (XHit+ProbeD/2)) 'Safe back to start position If Not SafeMoveZ((Zdepth),CurrentFeed) Then PushMSG("Return to the search position is interrupted") Exit Sub End If If Not SafeMoveX((XHit+ProbeD/2-GetDRO(0)),CurrentFeed) Then PushMSG("Return to the search position is interrupted") Exit Sub End If If AutoZeroFlag = 1 Then SetOEMDRO(800, GetDRO(0)-XHit-ProbeD/2) 'curr - XHit-ProbeD/2 Sleep(150) End If 'epilog SetOEMDRO(59,XScale) SetOEMDRO(60,YScale) SetOEMDRO(61,ZScale) Sleep(250) Call SetLED49(AbsIncFlag) SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) Sleep(125) End Sub 'Functions Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) Dim Res Dim Xstart Dim Ftmp Dim AbsIncF ProbeX=999999 Xstart = GetDRO(0) Ftmp = FeedRate() 'FeedRate() AbsIncF=GetOEMLED(49) 'Fast Probe X Code "G91" Code "F" & FRate1 Sleep(125) Call WaitProbeReady() Code "G31 X" & (Dir*DMax) While IsMoving() Wend Res = GetVar(2000) ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) If Abs(Res - Xstart - Dir*DMax) < 0.01 Then PushMSG("Error: G31 X search finished without making contact") PushMSG("Manually return to the starting position and repeat the search") Call SetLED49(AbsIncF) SetOEMDRO(818,Ftmp) Sleep(125) Exit Function End If 'Move back Code "G00 X" & -Dir*Latch While IsMoving() Wend Call WaitProbeReady() 'Latch Probe X Xstart = GetDRO(0) Code "F" & FRate2 Sleep(125) Code "G31 X" & Dir*Latch*2 While IsMoving() Wend 'Save result Res = GetVar(2000) If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then PushMSG("Error: G31 X latch finished without making contact") PushMSG("Manually return to the starting position and repeat the search") Call SetLED49(AbsIncF) SetOEMDRO(818,Ftmp) Sleep(125) Exit Function End If Code "G00 X" & -Dir*Latch While IsMoving() Wend Call SetLED49(AbsIncF) SetOEMDRO(818,Ftmp) Sleep(125) ProbeX=Res End Function Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped Dim Xstart Dim Ftmp Dim AbsIncF SafeMoveX=True Xstart = GetDRO(0) Ftmp = FeedRate() 'FeedRate() AbsIncF=GetOEMLED(49) Code "G91" Code "F" & F1 Sleep(125) Call WaitProbeReady() Code "G31 X" & X1 While IsMoving() Wend XHit = GetVar(2000) ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) Call SetLED49(AbsIncF) If Abs(XHit - Xstart - X1) > 10 Then SafeMoveX=False PushMSG("Error! Probe tripped during X movement") End If SetOEMDRO(818,Ftmp) Sleep(125) End Function Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped Dim Zstart Dim Ftmp Dim AbsIncF SafeMoveZ=True Zstart = GetDRO(2) Ftmp = FeedRate() 'FeedRate() AbsIncF=GetOEMLED(49) Code "G91" Code "F" & F1 Sleep(125) Call WaitProbeReady() Code "G31 Z" & Z1 While IsMoving() Sleep(100) Wend ZHit = GetVar(2002) Call SetLED49(AbsIncF) ' PushMSG("ZHit=" & ZHit &", Zstart=" & Zstart & ", Z1=" & Z1 & ", Ftmp=" & Ftmp) ' PushMSG("ZHit - Zstart - Z1=" & ZHit - Zstart - Z1) If Abs(ZHit - Zstart - Z1) > 0.01 Then SafeMoveZ=False PushMSG("Error! Probe tripped during Z movement") End If SetOEMDRO(818,Ftmp) Sleep(125) End Function Function PushMSG(Str1 As String) As Boolean SetUserLabel (21,GetUserLabel(20)) SetUserLabel (20,GetUserLabel(19)) SetUserLabel (19,GetUserLabel(18)) SetUserLabel (18,GetUserLabel(17)) SetUserLabel (17,Str1) Message Str1 PushMSG=True End Function Sub WaitProbeReady() While GetOemLED(825) Sleep(100) Wend End Sub Sub SetLED49(Flag) If Flag Then Code "G91" Sleep(125) Else Code "G90" Sleep(125) End If End Sub -------------------------------------------------------------------------------- /macros/M927.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Workpiece Height Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | Dim ToolSetterAbsXPos 8 | Dim ToolSetterAbsYPos 9 | Dim ZAbsSafePlane 10 | Dim ZAbsStartPos 11 | Dim ZMaxDist 12 | 13 | Dim FRate1, FRate2 14 | Dim DMax, Latch, EdgeLength 15 | Dim XYclearance 16 | Dim ToolNo 17 | Dim ToolD 18 | Dim ProbeD 19 | Dim Zdepth 20 | Dim XHit, YHit, ZHit 21 | Dim XbHit, YbHit, Diameter 22 | 23 | Dim Zpos 24 | 25 | Dim XScale, YScale, ZScale 26 | 27 | Dim AbsIncFlag 28 | 29 | Dim CurrentFeed 30 | Dim CurrentSpindle 31 | 32 | 33 | 'Init vars 34 | ToolSetterAbsXPos = GetUserDRO(1835) 35 | ToolSetterAbsYPos = GetUserDRO(1836) 36 | ZAbsSafePlane = GetUserDRO(1837) 37 | ZAbsStartPos = GetUserDRO(1838) 38 | ZMaxDist = GetUserDRO(1839) 39 | FRate1 = abs(GetUserDRO(1821)) 40 | FRate2 = abs(GetUserDRO(1822)) 41 | DMax = abs(GetUserDRO(1823)) 42 | ToolNo = GetCurrentTool() 43 | ToolD = GetToolParam(ToolNo,1) 44 | If GetUserDRO(1829) = 0 then 45 | ProbeD = ToolD 46 | Else 47 | ProbeD = GetUserDRO(1829) 48 | End If 49 | Latch = abs(GetUserDRO(1825)) 50 | XYclearance = GetUserDRO(1826) 51 | EdgeLength = GetUserDRO(1828) 52 | Zdepth = GetUserDRO(1830) 53 | 54 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 55 | 56 | 'Temporary save all Axis Scale factors 57 | XScale = GetOEMDRO(59) 58 | YScale = GetOEMDRO(60) 59 | ZScale = GetOEMDRO(61) 60 | 61 | 'Set All Axis' Scale to 1 62 | SetOEMDRO(59,1) 63 | SetOEMDRO(60,1) 64 | SetOEMDRO(61,1) 65 | Sleep(250) 66 | 67 | 68 | 'Check for Errors 69 | 70 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 71 | Message "Please change to working coordinates" 72 | SetOEMDRO(59,XScale) 73 | SetOEMDRO(60,YScale) 74 | SetOEMDRO(61,ZScale) 75 | Sleep(250) 76 | Exit Sub ' Exit if in Machine Coordinates 77 | End If 78 | 79 | If GetOemLED(825)<>0 Then 80 | Message "Probe is active! Check connection and try again" 81 | Call SetOEMDRO(59,XScale) 82 | Call SetOEMDRO(60,YScale) 83 | Call SetOEMDRO(61,ZScale) 84 | Sleep(250) 85 | Exit Sub ' Exit if probe is tripped 86 | End If 87 | 88 | 89 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 90 | CurrentSpindle = GetOEMDRO(39) 91 | 92 | 'main working 93 | 94 | 'Save Z start position 95 | Zpos = GetDRO(2) 96 | 'Probe Z- 97 | ZHit=ProbeZ(-1,DMax,Latch,FRate1,FRate2) 98 | If ZHit=999999 Then 99 | Exit Sub 100 | End If 101 | 'Indicate result 102 | PushMSG("Z- = " & (ZHit)) 103 | Call SetOEMDRO(1832,ZHit) 104 | If Not SafeMoveZ((Zpos-GetDRO(2)),CurrentFeed) Then 105 | PushMSG("TS Height Probing is interrupted") 106 | Exit Sub 107 | End If 108 | 109 | 110 | 'epilog 111 | 112 | SetOEMDRO(59,XScale) 113 | SetOEMDRO(60,YScale) 114 | SetOEMDRO(61,ZScale) 115 | Sleep(250) 116 | 117 | Call SetLED49(AbsIncFlag) 118 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 119 | Sleep(125) 120 | 121 | End Sub 122 | 123 | 124 | 'Functions 125 | 126 | Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) 127 | Dim Res 128 | Dim Zstart 129 | Dim Ftmp 130 | Dim AbsIncF 131 | ProbeZ=999999 132 | Zstart = GetDRO(2) 133 | Ftmp = FeedRate() 'FeedRate() 134 | AbsIncF=GetOEMLED(49) 135 | 'Fast Probe Z 136 | Code "G91" 137 | Code "F" & FRate1 138 | Sleep(125) 139 | Call WaitProbeReady() 140 | Code "G31 Z" & (Dir*DMax) 141 | While IsMoving() 142 | Wend 143 | Res = GetVar(2002) 144 | ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 145 | If Abs(Res - Zstart - Dir*DMax) < 0.01 Then 146 | PushMSG("Error: G31 Z search finished without making contact") 147 | PushMSG("Manually return to the starting position and repeat the search") 148 | Call SetLED49(AbsIncF) 149 | Code "M05" 150 | Sleep(125) 151 | Code "S" & CurrentSpindle 152 | Sleep(125) 153 | SetOEMDRO(818,Ftmp) 154 | Sleep(125) 155 | Exit Function 156 | End If 157 | 'Move back 158 | Code "G00 Z" & -Dir*Latch 159 | While IsMoving() 160 | Wend 161 | Call WaitProbeReady() 162 | 'Latch Probe Z 163 | Zstart = GetDRO(2) 164 | Code "F" & FRate2 165 | Sleep(125) 166 | Code "G31 Z" & Dir*Latch*2 167 | While IsMoving() 168 | Wend 169 | 'Save result 170 | Res = GetVar(2002) 171 | If Abs(Res - Zstart - Dir*Latch*2) < 0.01 Then 172 | PushMSG("Error: G31 Z latch finished without making contact") 173 | PushMSG("Manually return to the starting position and repeat the search") 174 | Call SetLED49(AbsIncF) 175 | Code "M05" 176 | Sleep(125) 177 | Code "S" & CurrentSpindle 178 | Sleep(125) 179 | SetOEMDRO(818,Ftmp) 180 | Sleep(125) 181 | Exit Function 182 | End If 183 | Code "G00 Z" & -Dir*Latch 184 | While IsMoving() 185 | Wend 186 | Call SetLED49(AbsIncF) 187 | SetOEMDRO(818,Ftmp) 188 | Sleep(125) 189 | ProbeZ=Res 190 | End Function 191 | 192 | 193 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 194 | Dim Zstart 195 | Dim Ftmp 196 | Dim AbsIncF 197 | SafeMoveZ=True 198 | Zstart = GetDRO(2) 199 | Ftmp = FeedRate() 'FeedRate() 200 | AbsIncF=GetOEMLED(49) 201 | Code "G91" 202 | Code "F" & F1 203 | Sleep(125) 204 | Call WaitProbeReady() 205 | Code "G31 Z" & Z1 206 | While IsMoving() 207 | Sleep(100) 208 | Wend 209 | ZHit = GetVar(2002) 210 | Call SetLED49(AbsIncF) 211 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 212 | SafeMoveZ=False 213 | PushMSG("Error! Probe tripped during Z movement") 214 | Code "M05" 215 | Sleep(125) 216 | Code "S" & CurrentSpindle 217 | Sleep(125) 218 | SetOEMDRO(818,Ftmp) 219 | Sleep(125) 220 | End If 221 | SetOEMDRO(818,Ftmp) 222 | Sleep(125) 223 | End Function 224 | 225 | Function PushMSG(Str1 As String) As Boolean 226 | SetUserLabel (21,GetUserLabel(20)) 227 | SetUserLabel (20,GetUserLabel(19)) 228 | SetUserLabel (19,GetUserLabel(18)) 229 | SetUserLabel (18,GetUserLabel(17)) 230 | SetUserLabel (17,Str1) 231 | Message Str1 232 | PushMSG=True 233 | End Function 234 | 235 | Sub WaitProbeReady() 236 | While GetOemLED(825) 237 | Sleep(100) 238 | Wend 239 | End Sub 240 | 241 | Sub SetLED49(Flag) 242 | If Flag Then 243 | Code "G91" 244 | Sleep(125) 245 | Else 246 | Code "G90" 247 | Sleep(125) 248 | End If 249 | End Sub 250 | -------------------------------------------------------------------------------- /macros/M904.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Y- Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim YHit, ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | XYclearance = GetUserDRO(1826) 39 | EdgeLength = GetUserDRO(1828) 40 | Zdepth = GetUserDRO(1830) 41 | 42 | If GetOEMLED(1871) Then 43 | AutoZeroFlag=1 44 | Else 45 | AutoZeroFlag=0 46 | End If 47 | 48 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 49 | 50 | 'Temporary save all Axis Scale factors 51 | XScale = GetOEMDRO(59) 52 | YScale = GetOEMDRO(60) 53 | ZScale = GetOEMDRO(61) 54 | 55 | 'Set All Axis' Scale to 1 56 | SetOEMDRO(59,1) 57 | SetOEMDRO(60,1) 58 | SetOEMDRO(61,1) 59 | Sleep(250) 60 | 61 | 62 | 'Check for Errors 63 | 64 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 65 | Message "Please change to working coordinates" 66 | SetOEMDRO(59,XScale) 67 | SetOEMDRO(60,YScale) 68 | SetOEMDRO(61,ZScale) 69 | Sleep(250) 70 | Exit Sub ' Exit if in Machine Coordinates 71 | End If 72 | 73 | If GetOemLED(825)<>0 Then 74 | Message "Probe is active! Check connection and try again" 75 | Call SetOEMDRO(59,XScale) 76 | Call SetOEMDRO(60,YScale) 77 | Call SetOEMDRO(61,ZScale) 78 | Sleep(250) 79 | Exit Sub ' Exit if probe is tripped 80 | End If 81 | 82 | 83 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 84 | 85 | 'main working 86 | 87 | 'Save Z start position 88 | Zpos = GetDRO(2) 89 | 'Safe Go to probe position 90 | If Not SafeMoveY((XYclearance),CurrentFeed) Then 91 | PushMSG("Manually return to the starting position and repeat the search") 92 | Exit Sub 93 | End If 94 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 95 | PushMSG("Manually return to the starting position and repeat the search") 96 | Exit Sub 97 | End If 98 | 'Probe Y- 99 | YHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 100 | If YHit=999999 Then 101 | Exit Sub 102 | End If 103 | 'Indicate result 104 | SetUserLabel (6, Format(YHit-ProbeD/2, "####0.000")) 105 | PushMSG("Y- = " & (YHit-ProbeD/2)) 106 | 'Safe back to start position 107 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | If Not SafeMoveY((YHit-ProbeD/2-GetDRO(1)),CurrentFeed) Then 112 | PushMSG("Return to the search position is interrupted") 113 | Exit Sub 114 | End If 115 | 116 | 117 | If AutoZeroFlag = 1 Then 118 | SetOEMDRO(801, GetDRO(1)-YHit+ProbeD/2) 'curr - YHit+ProbeD/2 119 | Sleep(150) 120 | End If 121 | 122 | 'epilog 123 | 124 | SetOEMDRO(59,XScale) 125 | SetOEMDRO(60,YScale) 126 | SetOEMDRO(61,ZScale) 127 | Sleep(250) 128 | 129 | Call SetLED49(AbsIncFlag) 130 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 131 | Sleep(125) 132 | 133 | End Sub 134 | 135 | 136 | 'Functions 137 | 138 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 139 | Dim Res 140 | Dim Ystart 141 | Dim Ftmp 142 | Dim AbsIncF 143 | ProbeY=999999 144 | Ystart = GetDRO(1) 145 | Ftmp = FeedRate() 'FeedRate() 146 | AbsIncF=GetOEMLED(49) 147 | 'Fast Probe Y 148 | Code "G91" 149 | Code "F" & FRate1 150 | Sleep(125) 151 | Call WaitProbeReady() 152 | Code "G31 Y" & (Dir*DMax) 153 | While IsMoving() 154 | Wend 155 | Res = GetVar(2001) 156 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 157 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 158 | PushMSG("Error: G31 Y search finished without making contact") 159 | PushMSG("Manually return to the starting position and repeat the search") 160 | Call SetLED49(AbsIncF) 161 | SetOEMDRO(818,Ftmp) 162 | Sleep(125) 163 | Exit Function 164 | End If 165 | 'Move back 166 | Code "G00 Y" & -Dir*Latch 167 | While IsMoving() 168 | Wend 169 | Call WaitProbeReady() 170 | 'Latch Probe Y 171 | Ystart = GetDRO(1) 172 | Code "F" & FRate2 173 | Sleep(125) 174 | Code "G31 Y" & Dir*Latch*2 175 | While IsMoving() 176 | Wend 177 | 'Save result 178 | Res = GetVar(2001) 179 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 180 | PushMSG("Error: G31 Y latch finished without making contact") 181 | PushMSG("Manually return to the starting position and repeat the search") 182 | Call SetLED49(AbsIncF) 183 | SetOEMDRO(818,Ftmp) 184 | Sleep(125) 185 | Exit Function 186 | End If 187 | Code "G00 Y" & -Dir*Latch 188 | While IsMoving() 189 | Wend 190 | Call SetLED49(AbsIncF) 191 | SetOEMDRO(818,Ftmp) 192 | Sleep(125) 193 | ProbeY=Res 194 | End Function 195 | 196 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 197 | Dim Ystart 198 | Dim Ftmp 199 | Dim AbsIncF 200 | SafeMoveY=True 201 | Ystart = GetDRO(1) 202 | Ftmp = FeedRate() 'FeedRate() 203 | AbsIncF=GetOEMLED(49) 204 | Code "G91" 205 | Code "F" & F1 206 | Sleep(125) 207 | Call WaitProbeReady() 208 | Code "G31 Y" & Y1 209 | While IsMoving() 210 | Wend 211 | YHit = GetVar(2001) 212 | Call SetLED49(AbsIncF) 213 | If Abs(YHit - Ystart - Y1) > 0.01 Then 214 | SafeMoveY=False 215 | PushMSG("Error! Probe tripped during Y movement") 216 | End If 217 | SetOEMDRO(818,Ftmp) 218 | Sleep(125) 219 | End Function 220 | 221 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 222 | Dim Zstart 223 | Dim Ftmp 224 | Dim AbsIncF 225 | SafeMoveZ=True 226 | Zstart = GetDRO(2) 227 | Ftmp = FeedRate() 'FeedRate() 228 | AbsIncF=GetOEMLED(49) 229 | Code "G91" 230 | Code "F" & F1 231 | Sleep(125) 232 | Call WaitProbeReady() 233 | Code "G31 Z" & Z1 234 | While IsMoving() 235 | Sleep(100) 236 | Wend 237 | ZHit = GetVar(2002) 238 | Call SetLED49(AbsIncF) 239 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 240 | SafeMoveZ=False 241 | PushMSG("Error! Probe tripped during Z movement") 242 | End If 243 | SetOEMDRO(818,Ftmp) 244 | Sleep(125) 245 | End Function 246 | 247 | Function PushMSG(Str1 As String) As Boolean 248 | SetUserLabel (21,GetUserLabel(20)) 249 | SetUserLabel (20,GetUserLabel(19)) 250 | SetUserLabel (19,GetUserLabel(18)) 251 | SetUserLabel (18,GetUserLabel(17)) 252 | SetUserLabel (17,Str1) 253 | Message Str1 254 | PushMSG=True 255 | End Function 256 | 257 | Sub WaitProbeReady() 258 | While GetOemLED(825) 259 | Sleep(100) 260 | Wend 261 | End Sub 262 | 263 | Sub SetLED49(Flag) 264 | If Flag Then 265 | Code "G91" 266 | Sleep(125) 267 | Else 268 | Code "G90" 269 | Sleep(125) 270 | End If 271 | End Sub 272 | -------------------------------------------------------------------------------- /macros/M903.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Y+ Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim YHit, ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | XYclearance = GetUserDRO(1826) 39 | EdgeLength = GetUserDRO(1828) 40 | Zdepth = GetUserDRO(1830) 41 | 42 | If GetOEMLED(1871) Then 43 | AutoZeroFlag=1 44 | Else 45 | AutoZeroFlag=0 46 | End If 47 | 48 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 49 | 50 | 'Temporary save all Axis Scale factors 51 | XScale = GetOEMDRO(59) 52 | YScale = GetOEMDRO(60) 53 | ZScale = GetOEMDRO(61) 54 | 55 | 'Set All Axis' Scale to 1 56 | SetOEMDRO(59,1) 57 | SetOEMDRO(60,1) 58 | SetOEMDRO(61,1) 59 | Sleep(250) 60 | 61 | 62 | 'Check for Errors 63 | 64 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 65 | Message "Please change to working coordinates" 66 | SetOEMDRO(59,XScale) 67 | SetOEMDRO(60,YScale) 68 | SetOEMDRO(61,ZScale) 69 | Sleep(250) 70 | Exit Sub ' Exit if in Machine Coordinates 71 | End If 72 | 73 | If GetOemLED(825)<>0 Then 74 | Message "Probe is active! Check connection and try again" 75 | Call SetOEMDRO(59,XScale) 76 | Call SetOEMDRO(60,YScale) 77 | Call SetOEMDRO(61,ZScale) 78 | Sleep(250) 79 | Exit Sub ' Exit if probe is tripped 80 | End If 81 | 82 | 83 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 84 | 85 | 'main working 86 | 87 | 'Save Z start position 88 | Zpos = GetDRO(2) 89 | 'Safe Go to probe position 90 | If Not SafeMoveY((-XYclearance),CurrentFeed) Then 91 | PushMSG("Manually return to the starting position and repeat the search") 92 | Exit Sub 93 | End If 94 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 95 | PushMSG("Manually return to the starting position and repeat the search") 96 | Exit Sub 97 | End If 98 | 'Probe Y+ 99 | YHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 100 | If YHit=999999 Then 101 | Exit Sub 102 | End If 103 | 'Indicate result 104 | SetUserLabel (8, Format(YHit+ProbeD/2, "####0.000")) 105 | PushMSG("Y+ = " & (YHit+ProbeD/2)) 106 | 'Safe back to start position 107 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | If Not SafeMoveY((YHit+ProbeD/2-GetDRO(1)),CurrentFeed) Then 112 | PushMSG("Return to the search position is interrupted") 113 | Exit Sub 114 | End If 115 | 116 | 117 | If AutoZeroFlag = 1 Then 118 | SetOEMDRO(801, GetDRO(1)-YHit-ProbeD/2) 'curr - XHit-ProbeD/2 119 | Sleep(150) 120 | End If 121 | 122 | 'epilog 123 | 124 | SetOEMDRO(59,XScale) 125 | SetOEMDRO(60,YScale) 126 | SetOEMDRO(61,ZScale) 127 | Sleep(250) 128 | 129 | Call SetLED49(AbsIncFlag) 130 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 131 | Sleep(125) 132 | 133 | End Sub 134 | 135 | 136 | 'Functions 137 | 138 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 139 | Dim Res 140 | Dim Ystart 141 | Dim Ftmp 142 | Dim AbsIncF 143 | ProbeY=999999 144 | Ystart = GetDRO(1) 145 | Ftmp = FeedRate() 'FeedRate() 146 | AbsIncF=GetOEMLED(49) 147 | 'Fast Probe Y 148 | Code "G91" 149 | Code "F" & FRate1 150 | Sleep(125) 151 | Call WaitProbeReady() 152 | Code "G31 Y" & (Dir*DMax) 153 | While IsMoving() 154 | Wend 155 | Res = GetVar(2001) 156 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 157 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 158 | PushMSG("Error: G31 Y search finished without making contact") 159 | PushMSG("Manually return to the starting position and repeat the search") 160 | Call SetLED49(AbsIncF) 161 | SetOEMDRO(818,Ftmp) 162 | Sleep(125) 163 | Exit Function 164 | End If 165 | 'Move back 166 | Code "G00 Y" & -Dir*Latch 167 | While IsMoving() 168 | Wend 169 | Call WaitProbeReady() 170 | 'Latch Probe Y 171 | Ystart = GetDRO(1) 172 | Code "F" & FRate2 173 | Sleep(125) 174 | Code "G31 Y" & Dir*Latch*2 175 | While IsMoving() 176 | Wend 177 | 'Save result 178 | Res = GetVar(2001) 179 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 180 | PushMSG("Error: G31 Y latch finished without making contact") 181 | PushMSG("Manually return to the starting position and repeat the search") 182 | Call SetLED49(AbsIncF) 183 | SetOEMDRO(818,Ftmp) 184 | Sleep(125) 185 | Exit Function 186 | End If 187 | Code "G00 Y" & -Dir*Latch 188 | While IsMoving() 189 | Wend 190 | Call SetLED49(AbsIncF) 191 | SetOEMDRO(818,Ftmp) 192 | Sleep(125) 193 | ProbeY=Res 194 | End Function 195 | 196 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 197 | Dim Ystart 198 | Dim Ftmp 199 | Dim AbsIncF 200 | SafeMoveY=True 201 | Ystart = GetDRO(1) 202 | Ftmp = FeedRate() 'FeedRate() 203 | AbsIncF=GetOEMLED(49) 204 | Code "G91" 205 | Code "F" & F1 206 | Sleep(125) 207 | Call WaitProbeReady() 208 | Code "G31 Y" & Y1 209 | While IsMoving() 210 | Wend 211 | YHit = GetVar(2001) 212 | Call SetLED49(AbsIncF) 213 | If Abs(YHit - Ystart - Y1) > 0.01 Then 214 | SafeMoveY=False 215 | PushMSG("Error! Probe tripped during Y movement") 216 | End If 217 | SetOEMDRO(818,Ftmp) 'SetFeedRate(Ftmp) 218 | Sleep(125) 219 | End Function 220 | 221 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 222 | Dim Zstart 223 | Dim Ftmp 224 | Dim AbsIncF 225 | SafeMoveZ=True 226 | Zstart = GetDRO(2) 227 | Ftmp = FeedRate() 'FeedRate() 228 | AbsIncF=GetOEMLED(49) 229 | Code "G91" 230 | Code "F" & F1 231 | Sleep(125) 232 | Call WaitProbeReady() 233 | Code "G31 Z" & Z1 234 | While IsMoving() 235 | Sleep(100) 236 | Wend 237 | ZHit = GetVar(2002) 238 | SetUserLED(48,AbsIncF) 239 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 240 | SafeMoveZ=False 241 | PushMSG("Error! Probe tripped during Z movement") 242 | End If 243 | SetOEMDRO(818,Ftmp) 'SetFeedRate(Ftmp) 244 | Sleep(125) 245 | End Function 246 | 247 | Function PushMSG(Str1 As String) As Boolean 248 | SetUserLabel (21,GetUserLabel(20)) 249 | SetUserLabel (20,GetUserLabel(19)) 250 | SetUserLabel (19,GetUserLabel(18)) 251 | SetUserLabel (18,GetUserLabel(17)) 252 | SetUserLabel (17,Str1) 253 | Message Str1 254 | PushMSG=True 255 | End Function 256 | 257 | Sub WaitProbeReady() 258 | While GetOemLED(825) 259 | Sleep(100) 260 | Wend 261 | End Sub 262 | 263 | Sub SetLED49(Flag) 264 | If Flag Then 265 | Code "G91" 266 | Sleep(125) 267 | Else 268 | Code "G90" 269 | Sleep(125) 270 | End If 271 | End Sub 272 | -------------------------------------------------------------------------------- /macros/M902.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' X- Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | XYclearance = GetUserDRO(1826) 39 | EdgeLength = GetUserDRO(1828) 40 | Zdepth = GetUserDRO(1830) 41 | 42 | If GetOEMLED(1871) Then 43 | AutoZeroFlag=1 44 | Else 45 | AutoZeroFlag=0 46 | End If 47 | 48 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 49 | 50 | 'Temporary save all Axis Scale factors 51 | XScale = GetOEMDRO(59) 52 | YScale = GetOEMDRO(60) 53 | ZScale = GetOEMDRO(61) 54 | 55 | 'Set All Axis' Scale to 1 56 | SetOEMDRO(59,1) 57 | SetOEMDRO(60,1) 58 | SetOEMDRO(61,1) 59 | Sleep(250) 60 | 61 | 62 | 'Check for Errors 63 | 64 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 65 | Message "Please change to working coordinates" 66 | SetOEMDRO(59,XScale) 67 | SetOEMDRO(60,YScale) 68 | SetOEMDRO(61,ZScale) 69 | Sleep(250) 70 | Exit Sub ' Exit if in Machine Coordinates 71 | End If 72 | 73 | If GetOemLED(825)<>0 Then 74 | Message "Probe is active! Check connection and try again" 75 | Call SetOEMDRO(59,XScale) 76 | Call SetOEMDRO(60,YScale) 77 | Call SetOEMDRO(61,ZScale) 78 | Sleep(250) 79 | Exit Sub ' Exit if probe is tripped 80 | End If 81 | 82 | 83 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 84 | 85 | 'main working 86 | 87 | 'Save Z start position 88 | Zpos = GetDRO(2) 89 | 'Safe Go to probe position 90 | If Not SafeMoveX((XYclearance),CurrentFeed) Then 91 | PushMSG("Manually return to the starting position and repeat the search") 92 | Exit Sub 93 | End If 94 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 95 | PushMSG("Manually return to the starting position and repeat the search") 96 | Exit Sub 97 | End If 98 | 'Probe X- 99 | XHit=ProbeX(-1,DMax,Latch,FRate1,FRate2) 100 | If XHit=999999 Then 101 | Exit Sub 102 | End If 103 | 'Indicate result 104 | SetUserLabel (2, Format(XHit-ProbeD/2, "####0.000")) 105 | PushMSG("X- = " & (XHit-ProbeD/2)) 106 | 'Safe back to start position 107 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | If Not SafeMoveX((XHit-ProbeD/2-GetDRO(0)),CurrentFeed) Then 112 | PushMSG("Return to the search position is interrupted") 113 | Exit Sub 114 | End If 115 | 116 | 117 | If AutoZeroFlag = 1 Then 118 | SetOEMDRO(800, GetDRO(0)-XHit+ProbeD/2) 'curr - XHit+ProbeD/2 119 | Sleep(150) 120 | End If 121 | 122 | 'epilog 123 | 124 | SetOEMDRO(59,XScale) 125 | SetOEMDRO(60,YScale) 126 | SetOEMDRO(61,ZScale) 127 | Sleep(250) 128 | 129 | Call SetLED49(AbsIncFlag) 130 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 131 | Sleep(125) 132 | 133 | End Sub 134 | 135 | 136 | 'Functions 137 | 138 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 139 | Dim Res 140 | Dim Xstart 141 | Dim Ftmp 142 | Dim AbsIncF 143 | ProbeX=999999 144 | Xstart = GetDRO(0) 145 | Ftmp = FeedRate() 'FeedRate() 146 | AbsIncF=GetOEMLED(49) 147 | 'Fast Probe X 148 | Code "G91" 149 | Code "F" & FRate1 150 | Sleep(125) 151 | Call WaitProbeReady() 152 | Code "G31 X" & (Dir*DMax) 153 | While IsMoving() 154 | Wend 155 | Res = GetVar(2000) 156 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 157 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 158 | PushMSG("Error: G31 X search finished without making contact") 159 | PushMSG("Manually return to the starting position and repeat the search") 160 | Call SetLED49(AbsIncF) 161 | SetOEMDRO(818,Ftmp) 162 | Sleep(125) 163 | Exit Function 164 | End If 165 | 'Move back 166 | Code "G00 X" & -Dir*Latch 167 | While IsMoving() 168 | Wend 169 | Call WaitProbeReady() 170 | 'Latch Probe X 171 | Xstart = GetDRO(0) 172 | Code "F" & FRate2 173 | Sleep(125) 174 | Code "G31 X" & Dir*Latch*2 175 | While IsMoving() 176 | Wend 177 | 'Save result 178 | Res = GetVar(2000) 179 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 180 | PushMSG("Error: G31 X latch finished without making contact") 181 | PushMSG("Manually return to the starting position and repeat the search") 182 | Call SetLED49(AbsIncF) 183 | SetOEMDRO(818,Ftmp) 184 | Sleep(125) 185 | Exit Function 186 | End If 187 | Code "G00 X" & -Dir*Latch 188 | While IsMoving() 189 | Wend 190 | Call SetLED49(AbsIncF) 191 | SetOEMDRO(818,Ftmp) 192 | Sleep(125) 193 | ProbeX=Res 194 | End Function 195 | 196 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 197 | Dim Xstart 198 | Dim Ftmp 199 | Dim AbsIncF 200 | SafeMoveX=True 201 | Xstart = GetDRO(0) 202 | Ftmp = FeedRate() 'FeedRate() 203 | AbsIncF=GetOEMLED(49) 204 | Code "G91" 205 | Code "F" & F1 206 | Sleep(125) 207 | Call WaitProbeReady() 208 | Code "G31 X" & X1 209 | While IsMoving() 210 | Wend 211 | XHit = GetVar(2000) 212 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 213 | Call SetLED49(AbsIncF) 214 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 215 | If Abs(XHit - Xstart - X1) > 10 Then 216 | SafeMoveX=False 217 | PushMSG("Error! Probe tripped during X movement") 218 | End If 219 | SetOEMDRO(818,Ftmp) 220 | Sleep(125) 221 | End Function 222 | 223 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 224 | Dim Zstart 225 | Dim Ftmp 226 | Dim AbsIncF 227 | SafeMoveZ=True 228 | Zstart = GetDRO(2) 229 | Ftmp = FeedRate() 'FeedRate() 230 | AbsIncF=GetOEMLED(49) 231 | Code "G91" 232 | Code "F" & F1 233 | Sleep(125) 234 | Call WaitProbeReady() 235 | Code "G31 Z" & Z1 236 | While IsMoving() 237 | Sleep(100) 238 | Wend 239 | ZHit = GetVar(2002) 240 | Call SetLED49(AbsIncF) 241 | ' PushMSG("ZHit=" & ZHit &", Zstart=" & Zstart & ", Z1=" & Z1 & ", Ftmp=" & Ftmp) 242 | ' PushMSG("ZHit - Zstart - Z1=" & ZHit - Zstart - Z1) 243 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 244 | SafeMoveZ=False 245 | PushMSG("Error! Probe tripped during Z movement") 246 | End If 247 | SetOEMDRO(818,Ftmp) 248 | Sleep(125) 249 | End Function 250 | 251 | Function PushMSG(Str1 As String) As Boolean 252 | SetUserLabel (21,GetUserLabel(20)) 253 | SetUserLabel (20,GetUserLabel(19)) 254 | SetUserLabel (19,GetUserLabel(18)) 255 | SetUserLabel (18,GetUserLabel(17)) 256 | SetUserLabel (17,Str1) 257 | Message Str1 258 | PushMSG=True 259 | End Function 260 | 261 | Sub WaitProbeReady() 262 | While GetOemLED(825) 263 | Sleep(100) 264 | Wend 265 | End Sub 266 | 267 | Sub SetLED49(Flag) 268 | If Flag Then 269 | Code "G91" 270 | Sleep(125) 271 | Else 272 | Code "G90" 273 | Sleep(125) 274 | End If 275 | End Sub 276 | -------------------------------------------------------------------------------- /macros/M916.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Y+Y- Inside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | ToolNo = GetCurrentTool() 32 | ToolD = GetToolParam(ToolNo,1) 33 | If GetUserDRO(1829) = 0 then 34 | ProbeD = ToolD 35 | Else 36 | ProbeD = GetUserDRO(1829) 37 | End If 38 | Latch = abs(GetUserDRO(1825)) 39 | XYclearance = GetUserDRO(1826) 40 | EdgeLength = GetUserDRO(1828) 41 | Zdepth = GetUserDRO(1830) 42 | 43 | If GetOEMLED(1871) Then 44 | AutoZeroFlag=1 45 | Else 46 | AutoZeroFlag=0 47 | End If 48 | 49 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 50 | 51 | 'Temporary save all Axis Scale factors 52 | XScale = GetOEMDRO(59) 53 | YScale = GetOEMDRO(60) 54 | ZScale = GetOEMDRO(61) 55 | 56 | 'Set All Axis' Scale to 1 57 | SetOEMDRO(59,1) 58 | SetOEMDRO(60,1) 59 | SetOEMDRO(61,1) 60 | Sleep(250) 61 | 62 | 63 | 'Check for Errors 64 | 65 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 66 | Message "Please change to working coordinates" 67 | SetOEMDRO(59,XScale) 68 | SetOEMDRO(60,YScale) 69 | SetOEMDRO(61,ZScale) 70 | Sleep(250) 71 | Exit Sub ' Exit if in Machine Coordinates 72 | End If 73 | 74 | If GetOemLED(825)<>0 Then 75 | Message "Probe is active! Check connection and try again" 76 | Call SetOEMDRO(59,XScale) 77 | Call SetOEMDRO(60,YScale) 78 | Call SetOEMDRO(61,ZScale) 79 | Sleep(250) 80 | Exit Sub ' Exit if probe is tripped 81 | End If 82 | 83 | 84 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 85 | 86 | 'main working 87 | 88 | 'Save Z start position 89 | Zpos = GetDRO(2) 90 | 'Safe Go to Y+ start position 91 | If Not SafeMoveY((-XYclearance+EdgeLength),CurrentFeed) Then 92 | PushMSG("Manually return to the starting position and repeat the search") 93 | Exit Sub 94 | End If 95 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 96 | PushMSG("Manually return to the starting position and repeat the search") 97 | Exit Sub 98 | End If 99 | 'Probe Y+ 100 | YHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 101 | If YHit=999999 Then 102 | Exit Sub 103 | End If 104 | 'Indicate result 105 | SetUserLabel (8, Format(YHit+ProbeD/2, "####0.000")) 106 | 'Move to Y+ start position 107 | If Not SafeMoveY(YHit+ProbeD/2-GetDRO(1)-2*EdgeLength+XYclearance,CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Probe Y- 112 | YbHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 113 | If YbHit=999999 Then 114 | Exit Sub 115 | End If 116 | 'Indicate result 117 | SetUserLabel (6, Format(YbHit-ProbeD/2, "####0.000")) 118 | SetUserLabel (7, Format((YbHit+YHit)/2, "####0.000")) 119 | SetUserLabel (9, Format(Abs(YbHit-YHit-ProbeD), "####0.000")) 120 | PushMSG("Y+ = " & (YHit+ProbeD/2) & ", Yc = " & (YbHit+YHit)/2 & ", Y- = " & YbHit-ProbeD/2 & ", Ly = " & Abs(YbHit-YHit-ProbeD)) 121 | 'Safe back to start position 122 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 123 | PushMSG("Return to the search position is interrupted") 124 | Exit Sub 125 | End If 126 | 'Move to Center point 127 | If Not SafeMoveY((YbHit+YHit)/2-GetDRO(1),CurrentFeed) Then 128 | PushMSG("Return to the search position is interrupted") 129 | Exit Sub 130 | End If 131 | 132 | 133 | If AutoZeroFlag = 1 Then 134 | SetOEMDRO(801, GetDRO(1)-(YbHit+YHit)/2) 135 | Sleep(150) 136 | End If 137 | 138 | 'epilog 139 | 140 | SetOEMDRO(59,XScale) 141 | SetOEMDRO(60,YScale) 142 | SetOEMDRO(61,ZScale) 143 | Sleep(250) 144 | 145 | Call SetLED49(AbsIncFlag) 146 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 147 | Sleep(125) 148 | 149 | End Sub 150 | 151 | 152 | 'Functions 153 | 154 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 155 | Dim Res 156 | Dim Ystart 157 | Dim Ftmp 158 | Dim AbsIncF 159 | ProbeY=999999 160 | Ystart = GetDRO(1) 161 | Ftmp = FeedRate() 162 | AbsIncF=GetOEMLED(49) 163 | 'Fast Probe Y 164 | Code "G91" 165 | Code "F" & FRate1 166 | Sleep(125) 167 | Call WaitProbeReady() 168 | Code "G31 Y" & (Dir*DMax) 169 | While IsMoving() 170 | Wend 171 | Res = GetVar(2001) 172 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1 & ", Ftmp=" & Ftmp) 173 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 174 | PushMSG("Error: G31 Y search finished without making contact") 175 | PushMSG("Manually return to the starting position and repeat the search") 176 | Call SetLED49(AbsIncF) 177 | SetOEMDRO(818,Ftmp) 178 | Sleep(125) 179 | Exit Function 180 | End If 181 | 'Move back 182 | Code "G00 Y" & -Dir*Latch 183 | While IsMoving() 184 | Wend 185 | Call WaitProbeReady() 186 | 'Latch Probe Y 187 | Ystart = GetDRO(1) 188 | Code "F" & FRate2 189 | Sleep(125) 190 | Code "G31 Y" & Dir*Latch*2 191 | While IsMoving() 192 | Wend 193 | 'Save result 194 | Res = GetVar(2001) 195 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 196 | PushMSG("Error: G31 Y latch finished without making contact") 197 | PushMSG("Manually return to the starting position and repeat the search") 198 | Call SetLED49(AbsIncF) 199 | SetOEMDRO(818,Ftmp) 200 | Sleep(125) 201 | Exit Function 202 | End If 203 | Code "G00 Y" & -Dir*Latch 204 | While IsMoving() 205 | Wend 206 | Call SetLED49(AbsIncF) 207 | SetOEMDRO(818,Ftmp) 208 | Sleep(125) 209 | ProbeY=Res 210 | End Function 211 | 212 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 213 | Dim Ystart 214 | Dim Ftmp 215 | Dim AbsIncF 216 | SafeMoveY=True 217 | Ystart = GetDRO(1) 218 | Ftmp = FeedRate() 219 | AbsIncF=GetOEMLED(49) 220 | Code "G91" 221 | Code "F" & F1 222 | Sleep(125) 223 | Call WaitProbeReady() 224 | Code "G31 Y" & Y1 225 | While IsMoving() 226 | Wend 227 | YHit = GetVar(2001) 228 | Call SetLED49(AbsIncF) 229 | If Abs(YHit - Ystart - Y1) > 0.01 Then 230 | SafeMoveY=False 231 | PushMSG("Error! Probe tripped during Y movement") 232 | End If 233 | SetOEMDRO(818,Ftmp) 234 | Sleep(125) 235 | End Function 236 | 237 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 238 | Dim Zstart 239 | Dim Ftmp 240 | Dim AbsIncF 241 | SafeMoveZ=True 242 | Zstart = GetDRO(2) 243 | Ftmp = FeedRate() 244 | AbsIncF=GetOEMLED(49) 245 | Code "G91" 246 | Code "F" & F1 247 | Sleep(125) 248 | Call WaitProbeReady() 249 | Code "G31 Z" & Z1 250 | While IsMoving() 251 | Sleep(100) 252 | Wend 253 | ZHit = GetVar(2002) 254 | Call SetLED49(AbsIncF) 255 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 256 | SafeMoveZ=False 257 | PushMSG("Error! Probe tripped during Z movement") 258 | End If 259 | SetOEMDRO(818,Ftmp) 260 | Sleep(125) 261 | End Function 262 | 263 | Function PushMSG(Str1 As String) As Boolean 264 | SetUserLabel (21,GetUserLabel(20)) 265 | SetUserLabel (20,GetUserLabel(19)) 266 | SetUserLabel (19,GetUserLabel(18)) 267 | SetUserLabel (18,GetUserLabel(17)) 268 | SetUserLabel (17,Str1) 269 | Message Str1 270 | PushMSG=True 271 | End Function 272 | 273 | Sub WaitProbeReady() 274 | While GetOemLED(825) 275 | Sleep(100) 276 | Wend 277 | End Sub 278 | 279 | Sub SetLED49(Flag) 280 | If Flag Then 281 | Code "G91" 282 | Sleep(125) 283 | Else 284 | Code "G90" 285 | Sleep(125) 286 | End If 287 | End Sub 288 | -------------------------------------------------------------------------------- /macros/M914.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' X-X+ Inside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | ToolNo = GetCurrentTool() 32 | ToolD = GetToolParam(ToolNo,1) 33 | If GetUserDRO(1829) = 0 then 34 | ProbeD = ToolD 35 | Else 36 | ProbeD = GetUserDRO(1829) 37 | End If 38 | Latch = abs(GetUserDRO(1825)) 39 | XYclearance = GetUserDRO(1826) 40 | EdgeLength = GetUserDRO(1828) 41 | Zdepth = GetUserDRO(1830) 42 | 43 | If GetOEMLED(1871) Then 44 | AutoZeroFlag=1 45 | Else 46 | AutoZeroFlag=0 47 | End If 48 | 49 | AbsIncFlag = GetOEMLED(49) ' Get the current G90/G91 state 50 | 51 | 'Temporary save all Axis Scale factors 52 | XScale = GetOEMDRO(59) 53 | YScale = GetOEMDRO(60) 54 | ZScale = GetOEMDRO(61) 55 | 56 | 'Set All Axis' Scale to 1 57 | SetOEMDRO(59,1) 58 | SetOEMDRO(60,1) 59 | SetOEMDRO(61,1) 60 | Sleep(250) 61 | 62 | 63 | 'Check for Errors 64 | 65 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 66 | Message "Please change to working coordinates" 67 | SetOEMDRO(59,XScale) 68 | SetOEMDRO(60,YScale) 69 | SetOEMDRO(61,ZScale) 70 | Sleep(250) 71 | Exit Sub ' Exit if in Machine Coordinates 72 | End If 73 | 74 | If GetOemLED(825)<>0 Then 75 | Message "Probe is active! Check connection and try again" 76 | Call SetOEMDRO(59,XScale) 77 | Call SetOEMDRO(60,YScale) 78 | Call SetOEMDRO(61,ZScale) 79 | Sleep(250) 80 | Exit Sub ' Exit if probe is tripped 81 | End If 82 | 83 | 84 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 85 | 86 | 'main working 87 | 88 | 'Save Z start position 89 | Zpos = GetDRO(2) 90 | 'Safe Go to X- start position 91 | If Not SafeMoveX((XYclearance-EdgeLength),CurrentFeed) Then 92 | PushMSG("Manually return to the starting position and repeat the search") 93 | Exit Sub 94 | End If 95 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 96 | PushMSG("Manually return to the starting position and repeat the search") 97 | Exit Sub 98 | End If 99 | 'Probe X- 100 | XHit=ProbeX(-1,DMax,Latch,FRate1,FRate2) 101 | If XHit=999999 Then 102 | Exit Sub 103 | End If 104 | 'Indicate result 105 | SetUserLabel (2, Format(XHit-ProbeD/2, "####0.000")) 106 | 'Move to X+ start position 107 | If Not SafeMoveX(XHit-ProbeD/2-GetDRO(0)+2*EdgeLength-XYclearance,CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Probe X+ 112 | XbHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 113 | If XbHit=999999 Then 114 | Exit Sub 115 | End If 116 | 'Indicate result 117 | SetUserLabel (4, Format(XbHit+ProbeD/2, "####0.000")) 118 | SetUserLabel (3, Format((XbHit+XHit)/2, "####0.000")) 119 | SetUserLabel (5, Format(Abs(XbHit-XHit+ProbeD), "####0.000")) 120 | PushMSG("X+ = " & (XBHit+ProbeD/2) & ", Xc = " & (XbHit+XHit)/2 & ", X- = " & (XHit-ProbeD/2) & ", Lx = " & Abs(XbHit-XHit+ProbeD)) 121 | 'Safe back to start position 122 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 123 | PushMSG("Return to the search position is interrupted") 124 | Exit Sub 125 | End If 126 | 'Move to Center point 127 | If Not SafeMoveX((XbHit+XHit)/2-GetDRO(0),CurrentFeed) Then 128 | PushMSG("Return to the search position is interrupted") 129 | Exit Sub 130 | End If 131 | 132 | 133 | If AutoZeroFlag = 1 Then 134 | SetOEMDRO(800, GetDRO(0)-(XbHit+XHit)/2) 135 | Sleep(150) 136 | End If 137 | 138 | 'epilog 139 | 140 | SetOEMDRO(59,XScale) 141 | SetOEMDRO(60,YScale) 142 | SetOEMDRO(61,ZScale) 143 | Sleep(250) 144 | 145 | Call SetLED49(AbsIncFlag) 146 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 147 | Sleep(125) 148 | 149 | End Sub 150 | 151 | 152 | 'Functions 153 | 154 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 155 | Dim Res 156 | Dim Xstart 157 | Dim Ftmp 158 | Dim AbsIncF 159 | ProbeX=999999 160 | Xstart = GetDRO(0) 161 | Ftmp = FeedRate() 'FeedRate() 162 | AbsIncF=GetOEMLED(49) 163 | 'Fast Probe X 164 | Code "G91" 165 | Code "F" & FRate1 166 | Sleep(125) 167 | Call WaitProbeReady() 168 | Code "G31 X" & (Dir*DMax) 169 | While IsMoving() 170 | Wend 171 | Res = GetVar(2000) 172 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 173 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 174 | PushMSG("Error: G31 X search finished without making contact") 175 | PushMSG("Manually return to the starting position and repeat the search") 176 | Call SetLED49(AbsIncF) 177 | SetOEMDRO(818,Ftmp) 178 | Sleep(125) 179 | Exit Function 180 | End If 181 | 'Move back 182 | Code "G00 X" & -Dir*Latch 183 | While IsMoving() 184 | Wend 185 | Call WaitProbeReady() 186 | 'Latch Probe X 187 | Xstart = GetDRO(0) 188 | Code "F" & FRate2 189 | Sleep(125) 190 | Code "G31 X" & Dir*Latch*2 191 | While IsMoving() 192 | Wend 193 | 'Save result 194 | Res = GetVar(2000) 195 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 196 | PushMSG("Error: G31 X latch finished without making contact") 197 | PushMSG("Manually return to the starting position and repeat the search") 198 | Call SetLED49(AbsIncF) 199 | SetOEMDRO(818,Ftmp) 200 | Sleep(125) 201 | Exit Function 202 | End If 203 | Code "G00 X" & -Dir*Latch 204 | While IsMoving() 205 | Wend 206 | Call SetLED49(AbsIncF) 207 | SetOEMDRO(818,Ftmp) 208 | Sleep(125) 209 | ProbeX=Res 210 | End Function 211 | 212 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 213 | Dim Xstart 214 | Dim Ftmp 215 | Dim AbsIncF 216 | Dim XHit 217 | SafeMoveX=True 218 | Xstart = GetDRO(0) 219 | Ftmp = FeedRate() 'FeedRate() 220 | AbsIncF=GetOEMLED(49) 221 | Code "G91" 222 | Code "F" & F1 223 | Sleep(125) 224 | Call WaitProbeReady() 225 | Code "G31 X" & X1 226 | While IsMoving() 227 | Wend 228 | XHit = GetVar(2000) 229 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 230 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 231 | Call SetLED49(AbsIncF) 232 | If Abs(XHit - Xstart - X1) > 0.01 Then 233 | SafeMoveX=False 234 | PushMSG("Error! Probe tripped during X movement") 235 | End If 236 | SetOEMDRO(818,Ftmp) 237 | Sleep(125) 238 | End Function 239 | 240 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 241 | Dim Zstart 242 | Dim Ftmp 243 | Dim AbsIncF 244 | SafeMoveZ=True 245 | Zstart = GetDRO(2) 246 | Ftmp = FeedRate() 'FeedRate() 247 | AbsIncF=GetOEMLED(49) 248 | Code "G91" 249 | Code "F" & F1 250 | Sleep(125) 251 | Call WaitProbeReady() 252 | Code "G31 Z" & Z1 253 | While IsMoving() 254 | Sleep(100) 255 | Wend 256 | ZHit = GetVar(2002) 257 | Call SetLED49(AbsIncF) 258 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 259 | SafeMoveZ=False 260 | PushMSG("Error! Probe tripped during Z movement") 261 | End If 262 | SetOEMDRO(818,Ftmp) 263 | Sleep(125) 264 | End Function 265 | 266 | Function PushMSG(Str1 As String) As Boolean 267 | SetUserLabel (21,GetUserLabel(20)) 268 | SetUserLabel (20,GetUserLabel(19)) 269 | SetUserLabel (19,GetUserLabel(18)) 270 | SetUserLabel (18,GetUserLabel(17)) 271 | SetUserLabel (17,Str1) 272 | Message Str1 273 | PushMSG=True 274 | End Function 275 | 276 | Sub WaitProbeReady() 277 | While GetOemLED(825) 278 | Sleep(100) 279 | Wend 280 | End Sub 281 | 282 | Sub SetLED49(Flag) 283 | If Flag Then 284 | Code "G91" 285 | Sleep(125) 286 | Else 287 | Code "G90" 288 | Sleep(125) 289 | End If 290 | End Sub 291 | -------------------------------------------------------------------------------- /macros/M915.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Y-Y+ Outside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | ToolNo = GetCurrentTool() 32 | ToolD = GetToolParam(ToolNo,1) 33 | If GetUserDRO(1829) = 0 then 34 | ProbeD = ToolD 35 | Else 36 | ProbeD = GetUserDRO(1829) 37 | End If 38 | Latch = abs(GetUserDRO(1825)) 39 | XYclearance = GetUserDRO(1826) 40 | EdgeLength = GetUserDRO(1828) 41 | Zdepth = GetUserDRO(1830) 42 | 43 | If GetOEMLED(1871) Then 44 | AutoZeroFlag=1 45 | Else 46 | AutoZeroFlag=0 47 | End If 48 | 49 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 50 | 51 | 'Temporary save all Axis Scale factors 52 | XScale = GetOEMDRO(59) 53 | YScale = GetOEMDRO(60) 54 | ZScale = GetOEMDRO(61) 55 | 56 | 'Set All Axis' Scale to 1 57 | SetOEMDRO(59,1) 58 | SetOEMDRO(60,1) 59 | SetOEMDRO(61,1) 60 | Sleep(250) 61 | 62 | 63 | 'Check for Errors 64 | 65 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 66 | Message "Please change to working coordinates" 67 | SetOEMDRO(59,XScale) 68 | SetOEMDRO(60,YScale) 69 | SetOEMDRO(61,ZScale) 70 | Sleep(250) 71 | Exit Sub ' Exit if in Machine Coordinates 72 | End If 73 | 74 | If GetOemLED(825)<>0 Then 75 | Message "Probe is active! Check connection and try again" 76 | Call SetOEMDRO(59,XScale) 77 | Call SetOEMDRO(60,YScale) 78 | Call SetOEMDRO(61,ZScale) 79 | Sleep(250) 80 | Exit Sub ' Exit if probe is tripped 81 | End If 82 | 83 | 84 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 85 | 86 | 'main working 87 | 88 | 'Save Z start position 89 | Zpos = GetDRO(2) 90 | 'Safe Go to Y- start position 91 | If Not SafeMoveY((XYclearance+EdgeLength),CurrentFeed) Then 92 | PushMSG("Manually return to the starting position and repeat the search") 93 | Exit Sub 94 | End If 95 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 96 | PushMSG("Manually return to the starting position and repeat the search") 97 | Exit Sub 98 | End If 99 | 'Probe Y- 100 | YHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 101 | If YHit=999999 Then 102 | Exit Sub 103 | End If 104 | 'Indicate result 105 | SetUserLabel (6, Format(YHit-ProbeD/2, "####0.000")) 106 | 'Safe back to start position 107 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Move to Y+ start position 112 | If Not SafeMoveY(YHit+ProbeD/2-GetDRO(1)-2*EdgeLength-XYclearance,CurrentFeed) Then 113 | PushMSG("Return to the search position is interrupted") 114 | Exit Sub 115 | End If 116 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 117 | PushMSG("Manually return to the starting position and repeat the search") 118 | Exit Sub 119 | End If 120 | 'Probe Y+ 121 | YbHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 122 | If YbHit=999999 Then 123 | Exit Sub 124 | End If 125 | 'Indicate result 126 | SetUserLabel (8, Format(YbHit+ProbeD/2, "####0.000")) 127 | SetUserLabel (7, Format((YbHit+YHit)/2, "####0.000")) 128 | SetUserLabel (9, Format(Abs(YbHit-YHit+ProbeD), "####0.000")) 129 | PushMSG("Y+ = " & (YbHit+ProbeD/2) & ", Yc = " & (YbHit+YHit)/2 & ", Y- = " & YHit-ProbeD/2 & ", Ly = " & Abs(YbHit-YHit+ProbeD)) 130 | 'Safe back to start position 131 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 132 | PushMSG("Return to the search position is interrupted") 133 | Exit Sub 134 | End If 135 | 'Move to Center point 136 | If Not SafeMoveY((YbHit+YHit)/2-GetDRO(1),CurrentFeed) Then 137 | PushMSG("Return to the search position is interrupted") 138 | Exit Sub 139 | End If 140 | 141 | 142 | If AutoZeroFlag = 1 Then 143 | SetOEMDRO(801, GetDRO(1)-(YbHit+YHit)/2) 144 | Sleep(150) 145 | End If 146 | 147 | 'epilog 148 | 149 | SetOEMDRO(59,XScale) 150 | SetOEMDRO(60,YScale) 151 | SetOEMDRO(61,ZScale) 152 | Sleep(250) 153 | 154 | Call SetLED49(AbsIncFlag) 155 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 156 | Sleep(125) 157 | 158 | End Sub 159 | 160 | 161 | 'Functions 162 | 163 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 164 | Dim Res 165 | Dim Ystart 166 | Dim Ftmp 167 | Dim AbsIncF 168 | ProbeY=999999 169 | Ystart = GetDRO(1) 170 | Ftmp = FeedRate() 'FeedRate() 171 | AbsIncF=GetOEMLED(49) 172 | 'Fast Probe Y 173 | Code "G91" 174 | Code "F" & FRate1 175 | Sleep(125) 176 | Call WaitProbeReady() 177 | Code "G31 Y" & (Dir*DMax) 178 | While IsMoving() 179 | Wend 180 | Res = GetVar(2001) 181 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 182 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 183 | PushMSG("Error: G31 Y search finished without making contact") 184 | PushMSG("Manually return to the starting position and repeat the search") 185 | Call SetLED49(AbsIncF) 186 | SetOEMDRO(818,Ftmp) 187 | Sleep(125) 188 | Exit Function 189 | End If 190 | 'Move back 191 | Code "G00 Y" & -Dir*Latch 192 | While IsMoving() 193 | Wend 194 | Call WaitProbeReady() 195 | 'Latch Probe Y 196 | Ystart = GetDRO(1) 197 | Code "F" & FRate2 198 | Sleep(125) 199 | Code "G31 Y" & Dir*Latch*2 200 | While IsMoving() 201 | Wend 202 | 'Save result 203 | Res = GetVar(2001) 204 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 205 | PushMSG("Error: G31 Y latch finished without making contact") 206 | PushMSG("Manually return to the starting position and repeat the search") 207 | Call SetLED49(AbsIncF) 208 | SetOEMDRO(818,Ftmp) 209 | Sleep(125) 210 | Exit Function 211 | End If 212 | Code "G00 Y" & -Dir*Latch 213 | While IsMoving() 214 | Wend 215 | Call SetLED49(AbsIncF) 216 | SetOEMDRO(818,Ftmp) 217 | Sleep(125) 218 | ProbeY=Res 219 | End Function 220 | 221 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 222 | Dim Ystart 223 | Dim Ftmp 224 | Dim AbsIncF 225 | SafeMoveY=True 226 | Ystart = GetDRO(1) 227 | Ftmp = FeedRate() 'FeedRate() 228 | AbsIncF=GetOEMLED(49) 229 | Code "G91" 230 | Code "F" & F1 231 | Sleep(125) 232 | Call WaitProbeReady() 233 | Code "G31 Y" & Y1 234 | While IsMoving() 235 | Wend 236 | YHit = GetVar(2001) 237 | Call SetLED49(AbsIncF) 238 | If Abs(YHit - Ystart - Y1) > 0.01 Then 239 | SafeMoveY=False 240 | PushMSG("Error! Probe tripped during Y movement") 241 | End If 242 | SetOEMDRO(818,Ftmp) 243 | Sleep(125) 244 | End Function 245 | 246 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 247 | Dim Zstart 248 | Dim Ftmp 249 | Dim AbsIncF 250 | SafeMoveZ=True 251 | Zstart = GetDRO(2) 252 | Ftmp = FeedRate() 'FeedRate() 253 | AbsIncF=GetOEMLED(49) 254 | Code "G91" 255 | Code "F" & F1 256 | Sleep(125) 257 | Call WaitProbeReady() 258 | Code "G31 Z" & Z1 259 | While IsMoving() 260 | Sleep(100) 261 | Wend 262 | ZHit = GetVar(2002) 263 | Call SetLED49(AbsIncF) 264 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 265 | SafeMoveZ=False 266 | PushMSG("Error! Probe tripped during Z movement") 267 | End If 268 | SetOEMDRO(818,Ftmp) 269 | Sleep(125) 270 | End Function 271 | 272 | Function PushMSG(Str1 As String) As Boolean 273 | SetUserLabel (21,GetUserLabel(20)) 274 | SetUserLabel (20,GetUserLabel(19)) 275 | SetUserLabel (19,GetUserLabel(18)) 276 | SetUserLabel (18,GetUserLabel(17)) 277 | SetUserLabel (17,Str1) 278 | Message Str1 279 | PushMSG=True 280 | End Function 281 | 282 | Sub WaitProbeReady() 283 | While GetOemLED(825) 284 | Sleep(100) 285 | Wend 286 | End Sub 287 | 288 | Sub SetLED49(Flag) 289 | If Flag Then 290 | Code "G91" 291 | Sleep(125) 292 | Else 293 | Code "G90" 294 | Sleep(125) 295 | End If 296 | End Sub 297 | -------------------------------------------------------------------------------- /macros/M913.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' X+X- Outside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | ToolNo = GetCurrentTool() 32 | ToolD = GetToolParam(ToolNo,1) 33 | If GetUserDRO(1829) = 0 then 34 | ProbeD = ToolD 35 | Else 36 | ProbeD = GetUserDRO(1829) 37 | End If 38 | Latch = abs(GetUserDRO(1825)) 39 | XYclearance = GetUserDRO(1826) 40 | EdgeLength = GetUserDRO(1828) 41 | Zdepth = GetUserDRO(1830) 42 | 43 | If GetOEMLED(1871) Then 44 | AutoZeroFlag=1 45 | Else 46 | AutoZeroFlag=0 47 | End If 48 | 49 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 50 | 51 | 'Temporary save all Axis Scale factors 52 | XScale = GetOEMDRO(59) 53 | YScale = GetOEMDRO(60) 54 | ZScale = GetOEMDRO(61) 55 | 56 | 'Set All Axis' Scale to 1 57 | SetOEMDRO(59,1) 58 | SetOEMDRO(60,1) 59 | SetOEMDRO(61,1) 60 | Sleep(250) 61 | 62 | 63 | 'Check for Errors 64 | 65 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 66 | Message "Please change to working coordinates" 67 | SetOEMDRO(59,XScale) 68 | SetOEMDRO(60,YScale) 69 | SetOEMDRO(61,ZScale) 70 | Sleep(250) 71 | Exit Sub ' Exit if in Machine Coordinates 72 | End If 73 | 74 | If GetOemLED(825)<>0 Then 75 | Message "Probe is active! Check connection and try again" 76 | Call SetOEMDRO(59,XScale) 77 | Call SetOEMDRO(60,YScale) 78 | Call SetOEMDRO(61,ZScale) 79 | Sleep(250) 80 | Exit Sub ' Exit if probe is tripped 81 | End If 82 | 83 | 84 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 85 | 86 | 'main working 87 | 88 | 'Save Z start position 89 | Zpos = GetDRO(2) 90 | 'Safe Go to X+ start position 91 | If Not SafeMoveX((-XYclearance-EdgeLength),CurrentFeed) Then 92 | PushMSG("Manually return to the starting position and repeat the search") 93 | Exit Sub 94 | End If 95 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 96 | PushMSG("Manually return to the starting position and repeat the search") 97 | Exit Sub 98 | End If 99 | 'Probe X+ 100 | XHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 101 | If XHit=999999 Then 102 | Exit Sub 103 | End If 104 | 'Indicate result 105 | SetUserLabel (4, Format(XHit+ProbeD/2, "####0.000")) 106 | 'Safe back to start position 107 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Move to X- start position 112 | If Not SafeMoveX(XHit+ProbeD/2-GetDRO(0)+2*EdgeLength+XYclearance,CurrentFeed) Then 113 | PushMSG("Return to the search position is interrupted") 114 | Exit Sub 115 | End If 116 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 117 | PushMSG("Manually return to the starting position and repeat the search") 118 | Exit Sub 119 | End If 120 | 'Probe X- 121 | XbHit=ProbeX(-1,DMax,Latch,FRate1,FRate2) 122 | If XbHit=999999 Then 123 | Exit Sub 124 | End If 125 | 'Indicate result 126 | SetUserLabel (2, Format(XbHit-ProbeD/2, "####0.000")) 127 | SetUserLabel (3, Format((XbHit+XHit)/2, "####0.000")) 128 | SetUserLabel (5, Format(Abs(XbHit-XHit-ProbeD), "####0.000")) 129 | PushMSG("X+ = " & (XHit+ProbeD/2) & ", Xc = " & (XbHit+XHit)/2 & ", X- = " & (XbHit-ProbeD/2) & ", Lx = " & Abs(XbHit-XHit-ProbeD)) 130 | 'Safe back to start position 131 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 132 | PushMSG("Return to the search position is interrupted") 133 | Exit Sub 134 | End If 135 | 'Move to Center point 136 | If Not SafeMoveX((XbHit+XHit)/2-GetDRO(0),CurrentFeed) Then 137 | PushMSG("Return to the search position is interrupted") 138 | Exit Sub 139 | End If 140 | 141 | 142 | If AutoZeroFlag = 1 Then 143 | SetOEMDRO(800, GetDRO(0)-(XbHit+XHit)/2) 144 | Sleep(150) 145 | End If 146 | 147 | 'epilog 148 | 149 | SetOEMDRO(59,XScale) 150 | SetOEMDRO(60,YScale) 151 | SetOEMDRO(61,ZScale) 152 | Sleep(250) 153 | 154 | Call SetLED49(AbsIncFlag) 155 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 156 | Sleep(125) 157 | 158 | End Sub 159 | 160 | 161 | 'Functions 162 | 163 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 164 | Dim Res 165 | Dim Xstart 166 | Dim Ftmp 167 | Dim AbsIncF 168 | ProbeX=999999 169 | Xstart = GetDRO(0) 170 | Ftmp = FeedRate() 'FeedRate() 171 | AbsIncF=GetOEMLED(49) 172 | 'Fast Probe X 173 | Code "G91" 174 | Code "F" & FRate1 175 | Sleep(125) 176 | Call WaitProbeReady() 177 | Code "G31 X" & (Dir*DMax) 178 | While IsMoving() 179 | Wend 180 | Res = GetVar(2000) 181 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 182 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 183 | PushMSG("Error: G31 X search finished without making contact") 184 | PushMSG("Manually return to the starting position and repeat the search") 185 | Call SetLED49(AbsIncF) 186 | SetOEMDRO(818,Ftmp) 187 | Sleep(125) 188 | Exit Function 189 | End If 190 | 'Move back 191 | Code "G00 X" & -Dir*Latch 192 | While IsMoving() 193 | Wend 194 | Call WaitProbeReady() 195 | 'Latch Probe X 196 | Xstart = GetDRO(0) 197 | Code "F" & FRate2 198 | Sleep(125) 199 | Code "G31 X" & Dir*Latch*2 200 | While IsMoving() 201 | Wend 202 | 'Save result 203 | Res = GetVar(2000) 204 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 205 | PushMSG("Error: G31 X latch finished without making contact") 206 | PushMSG("Manually return to the starting position and repeat the search") 207 | Call SetLED49(AbsIncF) 208 | SetOEMDRO(818,Ftmp) 209 | Sleep(125) 210 | Exit Function 211 | End If 212 | Code "G00 X" & -Dir*Latch 213 | While IsMoving() 214 | Wend 215 | Call SetLED49(AbsIncF) 216 | SetOEMDRO(818,Ftmp) 217 | Sleep(125) 218 | ProbeX=Res 219 | End Function 220 | 221 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 222 | Dim Xstart 223 | Dim Ftmp 224 | Dim AbsIncF 225 | SafeMoveX=True 226 | Xstart = GetDRO(0) 227 | Ftmp = FeedRate() 'FeedRate() 228 | AbsIncF=GetOEMLED(49) 229 | Code "G91" 230 | Code "F" & F1 231 | Sleep(125) 232 | Call WaitProbeReady() 233 | Code "G31 X" & X1 234 | While IsMoving() 235 | Wend 236 | XHit = GetVar(2000) 237 | Call SetLED49(AbsIncF) 238 | If Abs(XHit - Xstart - X1) > 0.01 Then 239 | SafeMoveX=False 240 | PushMSG("Error! Probe tripped during X movement") 241 | End If 242 | SetOEMDRO(818,Ftmp) 243 | Sleep(125) 244 | End Function 245 | 246 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 247 | Dim Zstart 248 | Dim Ftmp 249 | Dim AbsIncF 250 | SafeMoveZ=True 251 | Zstart = GetDRO(2) 252 | Ftmp = FeedRate() 'FeedRate() 253 | AbsIncF=GetOEMLED(49) 254 | Code "G91" 255 | Code "F" & F1 256 | Sleep(125) 257 | Call WaitProbeReady() 258 | Code "G31 Z" & Z1 259 | While IsMoving() 260 | Sleep(100) 261 | Wend 262 | ZHit = GetVar(2002) 263 | Call SetLED49(AbsIncF) 264 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 265 | SafeMoveZ=False 266 | PushMSG("Error! Probe tripped during Z movement") 267 | End If 268 | SetOEMDRO(818,Ftmp) 269 | Sleep(125) 270 | End Function 271 | 272 | Function PushMSG(Str1 As String) As Boolean 273 | SetUserLabel (21,GetUserLabel(20)) 274 | SetUserLabel (20,GetUserLabel(19)) 275 | SetUserLabel (19,GetUserLabel(18)) 276 | SetUserLabel (18,GetUserLabel(17)) 277 | SetUserLabel (17,Str1) 278 | Message Str1 279 | PushMSG=True 280 | End Function 281 | 282 | Sub WaitProbeReady() 283 | While GetOemLED(825) 284 | Sleep(100) 285 | Wend 286 | End Sub 287 | 288 | Sub SetLED49(Flag) 289 | If Flag Then 290 | Code "G91" 291 | Sleep(125) 292 | Else 293 | Code "G90" 294 | Sleep(125) 295 | End If 296 | End Sub 297 | -------------------------------------------------------------------------------- /macros/M6Start.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Auto Tool Measurement M6Start Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | Dim ToolChangeAbsXPos 8 | Dim ToolChangeAbsYPos 9 | Dim ZAbsSafePlane 10 | Dim ZAbsStartPos 11 | Dim ZMaxDist 12 | 13 | Dim FRate1, FRate2 14 | Dim DMax, Latch, EdgeLength 15 | Dim XYclearance 16 | Dim ToolNo 17 | Dim ToolD 18 | Dim ProbeD 19 | Dim Zdepth 20 | Dim XHit, YHit, ZHit 21 | Dim XbHit, YbHit, Diameter 22 | 23 | Dim Zpos 24 | 25 | Dim XScale, YScale, ZScale 26 | 27 | Dim AbsIncFlag 28 | 29 | Dim CurrentFeed 30 | Dim CurrentSpindle 31 | 32 | 33 | 'Init vars 34 | ToolChangeAbsXPos = GetUserDRO(1833) 35 | ToolChangeAbsYPos = GetUserDRO(1834) 36 | ZAbsSafePlane = GetUserDRO(1837) 37 | ZAbsStartPos = GetUserDRO(1838) 38 | ZMaxDist = GetUserDRO(1839) 39 | FRate1 = abs(GetUserDRO(1821)) 40 | FRate2 = abs(GetUserDRO(1822)) 41 | DMax = abs(GetUserDRO(1823)) 42 | ToolNo = GetCurrentTool() 43 | ToolD = GetToolParam(ToolNo,1) 44 | If GetUserDRO(1829) = 0 then 45 | ProbeD = ToolD 46 | Else 47 | ProbeD = GetUserDRO(1829) 48 | End If 49 | Latch = abs(GetUserDRO(1825)) 50 | XYclearance = GetUserDRO(1826) 51 | EdgeLength = GetUserDRO(1828) 52 | Zdepth = GetUserDRO(1830) 53 | 54 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 55 | 56 | 'Temporary save all Axis Scale factors 57 | XScale = GetOEMDRO(59) 58 | YScale = GetOEMDRO(60) 59 | ZScale = GetOEMDRO(61) 60 | 61 | 'Set All Axis' Scale to 1 62 | SetOEMDRO(59,1) 63 | SetOEMDRO(60,1) 64 | SetOEMDRO(61,1) 65 | Sleep(250) 66 | 67 | 68 | 'Check for Errors 69 | 70 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 71 | Message "Please change to working coordinates" 72 | SetOEMDRO(59,XScale) 73 | SetOEMDRO(60,YScale) 74 | SetOEMDRO(61,ZScale) 75 | Sleep(250) 76 | Exit Sub ' Exit if in Machine Coordinates 77 | End If 78 | 79 | If GetOemLED(825)<>0 Then 80 | Message "Probe is active! Check connection and try again" 81 | Call SetOEMDRO(59,XScale) 82 | Call SetOEMDRO(60,YScale) 83 | Call SetOEMDRO(61,ZScale) 84 | Sleep(250) 85 | Exit Sub ' Exit if probe is tripped 86 | End If 87 | 88 | 89 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 90 | CurrentSpindle = GetOEMDRO(39) 91 | 92 | 'main working 93 | 94 | 'Save Z start position 95 | Zpos = GetDRO(2) 96 | 'Safe Go to start position under toolsetter 97 | If Not SafeMoveZ(ZAbsSafePlane-GetOEMDRO(85),CurrentFeed) Then 98 | PushMSG("M6Start Script is interrupted") 99 | Exit Sub 100 | End If 101 | If Not SafeMoveXY(ToolChangeAbsXPos-GetOEMDRO(83),ToolChangeAbsYPos-GetOEMDRO(84),CurrentFeed) Then 102 | PushMSG("M6Start Script is interrupted") 103 | Exit Sub 104 | End If 105 | 106 | 'epilog 107 | 108 | SetOEMDRO(59,XScale) 109 | SetOEMDRO(60,YScale) 110 | SetOEMDRO(61,ZScale) 111 | Sleep(250) 112 | 113 | Call SetLED49(AbsIncFlag) 114 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 115 | Sleep(125) 116 | 117 | End Sub 118 | 119 | 120 | 'Functions 121 | 122 | Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) 123 | Dim Res 124 | Dim Zstart 125 | Dim Ftmp 126 | Dim AbsIncF 127 | ProbeZ=999999 128 | Zstart = GetDRO(2) 129 | Ftmp = FeedRate() 'FeedRate() 130 | AbsIncF=GetOEMLED(49) 131 | 'Fast Probe Z 132 | Code "G91" 133 | Code "F" & FRate1 134 | Sleep(125) 135 | Call WaitProbeReady() 136 | Code "G31 Z" & (Dir*DMax) 137 | While IsMoving() 138 | Wend 139 | Res = GetVar(2002) 140 | ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 141 | If Abs(Res - Zstart - Dir*DMax) < 0.01 Then 142 | PushMSG("Error: G31 Z search finished without making contact") 143 | PushMSG("Manually return to the starting position and repeat the search") 144 | Call SetLED49(AbsIncF) 145 | Code "M05" 146 | Sleep(125) 147 | Code "S" & CurrentSpindle 148 | Sleep(125) 149 | SetOEMDRO(818,Ftmp) 150 | Sleep(125) 151 | Exit Function 152 | End If 153 | 'Move back 154 | Code "G00 Z" & -Dir*Latch 155 | While IsMoving() 156 | Wend 157 | Call WaitProbeReady() 158 | 'Latch Probe Z 159 | Zstart = GetDRO(2) 160 | Code "F" & FRate2 161 | Sleep(125) 162 | Code "G31 Z" & Dir*Latch*2 163 | While IsMoving() 164 | Wend 165 | 'Save result 166 | Res = GetVar(2002) 167 | If Abs(Res - Zstart - Dir*Latch*2) < 0.01 Then 168 | PushMSG("Error: G31 Z latch finished without making contact") 169 | PushMSG("Manually return to the starting position and repeat the search") 170 | Call SetLED49(AbsIncF) 171 | Code "M05" 172 | Sleep(125) 173 | Code "S" & CurrentSpindle 174 | Sleep(125) 175 | SetOEMDRO(818,Ftmp) 176 | Sleep(125) 177 | Exit Function 178 | End If 179 | Code "G00 Z" & -Dir*Latch 180 | While IsMoving() 181 | Wend 182 | Call SetLED49(AbsIncF) 183 | SetOEMDRO(818,Ftmp) 184 | Sleep(125) 185 | ProbeZ=Res 186 | End Function 187 | 188 | 189 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 190 | Dim Xstart 191 | Dim Ftmp 192 | Dim AbsIncF 193 | SafeMoveX=True 194 | Xstart = GetDRO(0) 195 | Ftmp = FeedRate() 'FeedRate() 196 | AbsIncF=GetOEMLED(49) 197 | Code "G91" 198 | Code "F" & F1 199 | Sleep(125) 200 | Call WaitProbeReady() 201 | Code "G31 X" & X1 202 | While IsMoving() 203 | Wend 204 | XHit = GetVar(2000) 205 | Call SetLED49(AbsIncF) 206 | If Abs(XHit - Xstart - X1) > 0.01 Then 207 | SafeMoveX=False 208 | PushMSG("Error! Probe tripped during X movement") 209 | Code "M05" 210 | Sleep(125) 211 | Code "S" & CurrentSpindle 212 | Sleep(125) 213 | SetOEMDRO(818,Ftmp) 214 | Sleep(125) 215 | End If 216 | SetOEMDRO(818,Ftmp) 217 | Sleep(125) 218 | End Function 219 | 220 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 221 | Dim Ystart 222 | Dim Ftmp 223 | Dim AbsIncF 224 | SafeMoveY=True 225 | Ystart = GetDRO(1) 226 | Ftmp = FeedRate() 'FeedRate() 227 | AbsIncF=GetOEMLED(49) 228 | Code "G91" 229 | Code "F" & F1 230 | Sleep(125) 231 | Call WaitProbeReady() 232 | Code "G31 Y" & Y1 233 | While IsMoving() 234 | Wend 235 | YHit = GetVar(2001) 236 | Call SetLED49(AbsIncF) 237 | If Abs(YHit - Ystart - Y1) > 0.01 Then 238 | SafeMoveY=False 239 | PushMSG("Error! Probe tripped during Y movement") 240 | Code "M05" 241 | Sleep(125) 242 | Code "S" & CurrentSpindle 243 | Sleep(125) 244 | SetOEMDRO(818,Ftmp) 245 | Sleep(125) 246 | End If 247 | SetOEMDRO(818,Ftmp) 248 | Sleep(125) 249 | End Function 250 | 251 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 252 | Dim Xstart 253 | Dim Ystart 254 | Dim Ftmp 255 | Dim AbsIncF 256 | SafeMoveXY=True 257 | Xstart = GetDRO(0) 258 | Ystart = GetDRO(1) 259 | Ftmp = FeedRate() 'FeedRate() 260 | AbsIncF=GetOEMLED(49) 261 | Code "G91" 262 | Code "F" & F1 263 | Sleep(125) 264 | Call WaitProbeReady() 265 | Code "G31 X" & X1 & "Y" & Y1 266 | While IsMoving() 267 | Wend 268 | XHit = GetVar(2000) 269 | YHit = GetVar(2001) 270 | Call SetLED49(AbsIncF) 271 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 272 | SafeMoveXY=False 273 | PushMSG("Error! Probe tripped during XY movement") 274 | Code "M05" 275 | Sleep(125) 276 | Code "S" & CurrentSpindle 277 | Sleep(125) 278 | SetOEMDRO(818,Ftmp) 279 | Sleep(125) 280 | End If 281 | SetOEMDRO(818,Ftmp) 282 | Sleep(125) 283 | End Function 284 | 285 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 286 | Dim Zstart 287 | Dim Ftmp 288 | Dim AbsIncF 289 | SafeMoveZ=True 290 | Zstart = GetDRO(2) 291 | Ftmp = FeedRate() 'FeedRate() 292 | AbsIncF=GetOEMLED(49) 293 | Code "G91" 294 | Code "F" & F1 295 | Sleep(125) 296 | Call WaitProbeReady() 297 | Code "G31 Z" & Z1 298 | While IsMoving() 299 | Sleep(100) 300 | Wend 301 | ZHit = GetVar(2002) 302 | Call SetLED49(AbsIncF) 303 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 304 | SafeMoveZ=False 305 | PushMSG("Error! Probe tripped during Z movement") 306 | Code "M05" 307 | Sleep(125) 308 | Code "S" & CurrentSpindle 309 | Sleep(125) 310 | SetOEMDRO(818,Ftmp) 311 | Sleep(125) 312 | End If 313 | SetOEMDRO(818,Ftmp) 314 | Sleep(125) 315 | End Function 316 | 317 | Function PushMSG(Str1 As String) As Boolean 318 | SetUserLabel (21,GetUserLabel(20)) 319 | SetUserLabel (20,GetUserLabel(19)) 320 | SetUserLabel (19,GetUserLabel(18)) 321 | SetUserLabel (18,GetUserLabel(17)) 322 | SetUserLabel (17,Str1) 323 | Message Str1 324 | PushMSG=True 325 | End Function 326 | 327 | Sub WaitProbeReady() 328 | While GetOemLED(825) 329 | Sleep(100) 330 | Wend 331 | End Sub 332 | 333 | Sub SetLED49(Flag) 334 | If Flag Then 335 | Code "G91" 336 | Sleep(125) 337 | Else 338 | Code "G90" 339 | Sleep(125) 340 | End If 341 | End Sub 342 | -------------------------------------------------------------------------------- /macros/M926.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' TS Height Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | Dim ToolSetterAbsXPos 8 | Dim ToolSetterAbsYPos 9 | Dim ToolChangeAbsXPos 10 | Dim ToolChangeAbsYPos 11 | Dim ZAbsSafePlane 12 | Dim ZAbsStartPos 13 | Dim ZMaxDist 14 | 15 | Dim FRate1, FRate2 16 | Dim DMax, Latch, EdgeLength 17 | Dim XYclearance 18 | Dim ToolNo 19 | Dim ToolD 20 | Dim ProbeD 21 | Dim Zdepth 22 | Dim XHit, YHit, ZHit 23 | Dim XbHit, YbHit, Diameter 24 | 25 | Dim Zpos 26 | 27 | Dim XScale, YScale, ZScale 28 | 29 | Dim AbsIncFlag 30 | 31 | Dim CurrentFeed 32 | Dim CurrentSpindle 33 | 34 | 35 | 'Init vars 36 | ToolSetterAbsXPos = GetUserDRO(1835) 37 | ToolSetterAbsYPos = GetUserDRO(1836) 38 | ToolChangeAbsXPos = GetUserDRO(1833) 39 | ToolChangeAbsYPos = GetUserDRO(1834) 40 | ZAbsSafePlane = GetUserDRO(1837) 41 | ZAbsStartPos = GetUserDRO(1838) 42 | ZMaxDist = GetUserDRO(1839) 43 | FRate1 = abs(GetUserDRO(1821)) 44 | FRate2 = abs(GetUserDRO(1822)) 45 | DMax = abs(GetUserDRO(1823)) 46 | ToolNo = GetCurrentTool() 47 | ToolD = GetToolParam(ToolNo,1) 48 | If GetUserDRO(1829) = 0 then 49 | ProbeD = ToolD 50 | Else 51 | ProbeD = GetUserDRO(1829) 52 | End If 53 | Latch = abs(GetUserDRO(1825)) 54 | XYclearance = GetUserDRO(1826) 55 | EdgeLength = GetUserDRO(1828) 56 | Zdepth = GetUserDRO(1830) 57 | 58 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 59 | 60 | 'Temporary save all Axis Scale factors 61 | XScale = GetOEMDRO(59) 62 | YScale = GetOEMDRO(60) 63 | ZScale = GetOEMDRO(61) 64 | 65 | 'Set All Axis' Scale to 1 66 | SetOEMDRO(59,1) 67 | SetOEMDRO(60,1) 68 | SetOEMDRO(61,1) 69 | Sleep(250) 70 | 71 | 72 | 'Check for Errors 73 | 74 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 75 | Message "Please change to working coordinates" 76 | SetOEMDRO(59,XScale) 77 | SetOEMDRO(60,YScale) 78 | SetOEMDRO(61,ZScale) 79 | Sleep(250) 80 | Exit Sub ' Exit if in Machine Coordinates 81 | End If 82 | 83 | If GetOemLED(825)<>0 Then 84 | Message "Probe is active! Check connection and try again" 85 | Call SetOEMDRO(59,XScale) 86 | Call SetOEMDRO(60,YScale) 87 | Call SetOEMDRO(61,ZScale) 88 | Sleep(250) 89 | Exit Sub ' Exit if probe is tripped 90 | End If 91 | 92 | 93 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 94 | CurrentSpindle = GetOEMDRO(39) 95 | 96 | 'main working 97 | 98 | 'Save Z start position 99 | Zpos = GetDRO(2) 100 | 101 | Code "G91" 102 | Code "F" & CurrentFeed 103 | Sleep(125) 104 | 105 | 'Safe Go to start position under toolsetter 106 | Code "G0 Z" & (ZAbsSafePlane-GetOEMDRO(85)) 107 | While IsMoving() 108 | Sleep(100) 109 | Wend 110 | 111 | Code "G0 X" & (ToolSetterAbsXPos-GetOEMDRO(83)) & "Y" & (ToolSetterAbsYPos-GetOEMDRO(84)) 112 | While IsMoving() 113 | Sleep(100) 114 | Wend 115 | 116 | Code "G0 Z" & (ZAbsStartPos-GetOEMDRO(85)) 117 | While IsMoving() 118 | Sleep(100) 119 | Wend 120 | 'Probe Z- 121 | ZHit=ProbeZ(-1,ZMaxDist,Latch,FRate1,FRate2) 122 | If ZHit=999999 Then 123 | Code "G90" 124 | Exit Sub 125 | End If 126 | 'Indicate result 127 | PushMSG("Z- = " & (ZHit)) 128 | Call SetOEMDRO(1831,ZHit) 129 | Code "G0 Z" & (ZAbsStartPos-GetOEMDRO(85)) 130 | While IsMoving() 131 | Sleep(100) 132 | Wend 133 | 'Safe Go to start position under toolsetter 134 | Code "G0 Z" & (ZAbsSafePlane-GetOEMDRO(85)) 135 | While IsMoving() 136 | Sleep(100) 137 | Wend 138 | 139 | Code "G0 X" & (ToolChangeAbsXPos-GetOEMDRO(83)) & "Y" & (ToolChangeAbsYPos-GetOEMDRO(84)) 140 | While IsMoving() 141 | Sleep(100) 142 | Wend 143 | 144 | Code "G90" 145 | 146 | 'epilog 147 | 148 | SetOEMDRO(59,XScale) 149 | SetOEMDRO(60,YScale) 150 | SetOEMDRO(61,ZScale) 151 | Sleep(250) 152 | 153 | Call SetLED49(AbsIncFlag) 154 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 155 | Sleep(125) 156 | 157 | End Sub 158 | 159 | 160 | 'Functions 161 | 162 | Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) 163 | Dim Res 164 | Dim Zstart 165 | Dim Ftmp 166 | Dim AbsIncF 167 | ProbeZ=999999 168 | Zstart = GetDRO(2) 169 | Ftmp = FeedRate() 'FeedRate() 170 | AbsIncF=GetOEMLED(49) 171 | 'Fast Probe Z 172 | Code "G91" 173 | Code "F" & FRate1 174 | Sleep(125) 175 | Call WaitProbeReady() 176 | Code "G31 Z" & (Dir*DMax) 177 | While IsMoving() 178 | Wend 179 | Res = GetVar(2002) 180 | ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 181 | 'Move back 182 | Code "G00 Z" & -Dir*Latch 183 | While IsMoving() 184 | Wend 185 | Call WaitProbeReady() 186 | 'Latch Probe Z 187 | Zstart = GetDRO(2) 188 | Code "F" & FRate2 189 | Sleep(125) 190 | Code "G31 Z" & Dir*Latch*2 191 | While IsMoving() 192 | Wend 193 | 'Save result 194 | Res = GetVar(2002) 195 | Code "G00 Z" & -Dir*Latch 196 | While IsMoving() 197 | Wend 198 | Call SetLED49(AbsIncF) 199 | SetOEMDRO(818,Ftmp) 200 | Sleep(125) 201 | ProbeZ=Res 202 | End Function 203 | 204 | 205 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 206 | Dim Xstart 207 | Dim Ftmp 208 | Dim AbsIncF 209 | SafeMoveX=True 210 | Xstart = GetDRO(0) 211 | Ftmp = FeedRate() 'FeedRate() 212 | AbsIncF=GetOEMLED(49) 213 | Code "G91" 214 | Code "F" & F1 215 | Sleep(125) 216 | Call WaitProbeReady() 217 | Code "G31 X" & X1 218 | While IsMoving() 219 | Wend 220 | XHit = GetVar(2000) 221 | Call SetLED49(AbsIncF) 222 | If Abs(XHit - Xstart - X1) > 0.01 Then 223 | SafeMoveX=False 224 | PushMSG("Error! Probe tripped during X movement") 225 | Code "M05" 226 | Sleep(125) 227 | Code "S" & CurrentSpindle 228 | Sleep(125) 229 | SetOEMDRO(818,Ftmp) 230 | Sleep(125) 231 | End If 232 | SetOEMDRO(818,Ftmp) 233 | Sleep(125) 234 | End Function 235 | 236 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 237 | Dim Ystart 238 | Dim Ftmp 239 | Dim AbsIncF 240 | SafeMoveY=True 241 | Ystart = GetDRO(1) 242 | Ftmp = FeedRate() 'FeedRate() 243 | AbsIncF=GetOEMLED(49) 244 | Code "G91" 245 | Code "F" & F1 246 | Sleep(125) 247 | Call WaitProbeReady() 248 | Code "G31 Y" & Y1 249 | While IsMoving() 250 | Wend 251 | YHit = GetVar(2001) 252 | Call SetLED49(AbsIncF) 253 | If Abs(YHit - Ystart - Y1) > 0.01 Then 254 | SafeMoveY=False 255 | PushMSG("Error! Probe tripped during Y movement") 256 | Code "M05" 257 | Sleep(125) 258 | Code "S" & CurrentSpindle 259 | Sleep(125) 260 | SetOEMDRO(818,Ftmp) 261 | Sleep(125) 262 | End If 263 | SetOEMDRO(818,Ftmp) 264 | Sleep(125) 265 | End Function 266 | 267 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 268 | Dim Xstart 269 | Dim Ystart 270 | Dim Ftmp 271 | Dim AbsIncF 272 | SafeMoveXY=True 273 | Xstart = GetDRO(0) 274 | Ystart = GetDRO(1) 275 | Ftmp = FeedRate() 'FeedRate() 276 | AbsIncF=GetOEMLED(49) 277 | Code "G91" 278 | Code "F" & F1 279 | Sleep(125) 280 | Call WaitProbeReady() 281 | Code "G31 X" & X1 & "Y" & Y1 282 | While IsMoving() 283 | Wend 284 | XHit = GetVar(2000) 285 | YHit = GetVar(2001) 286 | Call SetLED49(AbsIncF) 287 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 288 | SafeMoveXY=False 289 | PushMSG("Error! Probe tripped during XY movement") 290 | Code "M05" 291 | Sleep(125) 292 | Code "S" & CurrentSpindle 293 | Sleep(125) 294 | SetOEMDRO(818,Ftmp) 295 | Sleep(125) 296 | End If 297 | SetOEMDRO(818,Ftmp) 298 | Sleep(125) 299 | End Function 300 | 301 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 302 | Dim Zstart 303 | Dim Ftmp 304 | Dim AbsIncF 305 | SafeMoveZ=True 306 | Zstart = GetDRO(2) 307 | Ftmp = FeedRate() 'FeedRate() 308 | AbsIncF=GetOEMLED(49) 309 | Code "G91" 310 | Code "F" & F1 311 | Sleep(125) 312 | Call WaitProbeReady() 313 | Code "G31 Z" & Z1 314 | While IsMoving() 315 | Sleep(100) 316 | Wend 317 | ZHit = GetVar(2002) 318 | Call SetLED49(AbsIncF) 319 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 320 | SafeMoveZ=False 321 | PushMSG("Error! Probe tripped during Z movement") 322 | Code "M05" 323 | Sleep(125) 324 | Code "S" & CurrentSpindle 325 | Sleep(125) 326 | SetOEMDRO(818,Ftmp) 327 | Sleep(125) 328 | End If 329 | SetOEMDRO(818,Ftmp) 330 | Sleep(125) 331 | End Function 332 | 333 | Function PushMSG(Str1 As String) As Boolean 334 | SetUserLabel (21,GetUserLabel(20)) 335 | SetUserLabel (20,GetUserLabel(19)) 336 | SetUserLabel (19,GetUserLabel(18)) 337 | SetUserLabel (18,GetUserLabel(17)) 338 | SetUserLabel (17,Str1) 339 | Message Str1 340 | PushMSG=True 341 | End Function 342 | 343 | Sub WaitProbeReady() 344 | While GetOemLED(825) 345 | Sleep(100) 346 | Wend 347 | End Sub 348 | 349 | Sub SetLED49(Flag) 350 | If Flag Then 351 | Code "G91" 352 | Sleep(125) 353 | Else 354 | Code "G90" 355 | Sleep(125) 356 | End If 357 | End Sub 358 | -------------------------------------------------------------------------------- /macros/M921.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Angle Y-Y- Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength, Angle 10 | Dim XYclearance 11 | Dim AutoRottFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | 'Angle = GetUserDRO(1824) 32 | ToolNo = GetCurrentTool() 33 | ToolD = GetToolParam(ToolNo,1) 34 | If GetUserDRO(1829) = 0 then 35 | ProbeD = ToolD 36 | Else 37 | ProbeD = GetUserDRO(1829) 38 | End If 39 | Latch = abs(GetUserDRO(1825)) 40 | XYclearance = GetUserDRO(1826) 41 | EdgeLength = GetUserDRO(1828) 42 | Zdepth = GetUserDRO(1830) 43 | 44 | If GetOEMLED(1870) Then 45 | AutoRottFlag=1 46 | Else 47 | AutoRottFlag=0 48 | End If 49 | 50 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 51 | 52 | 'Temporary save all Axis Scale factors 53 | XScale = GetOEMDRO(59) 54 | YScale = GetOEMDRO(60) 55 | ZScale = GetOEMDRO(61) 56 | 57 | 'Set All Axis' Scale to 1 58 | SetOEMDRO(59,1) 59 | SetOEMDRO(60,1) 60 | SetOEMDRO(61,1) 61 | Sleep(250) 62 | 63 | 64 | 'Check for Errors 65 | 66 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 67 | Message "Please change to working coordinates" 68 | SetOEMDRO(59,XScale) 69 | SetOEMDRO(60,YScale) 70 | SetOEMDRO(61,ZScale) 71 | Sleep(250) 72 | Exit Sub ' Exit if in Machine Coordinates 73 | End If 74 | 75 | If GetOemLED(825)<>0 Then 76 | Message "Probe is active! Check connection and try again" 77 | Call SetOEMDRO(59,XScale) 78 | Call SetOEMDRO(60,YScale) 79 | Call SetOEMDRO(61,ZScale) 80 | Sleep(250) 81 | Exit Sub ' Exit if probe is tripped 82 | End If 83 | 84 | 85 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 86 | 87 | 'main working 88 | 89 | 'Save Z start position 90 | Zpos = GetDRO(2) 91 | 'Safe Go to Y- start position 92 | If Not SafeMoveY((XYclearance),CurrentFeed) Then 93 | PushMSG("Manually return to the starting position and repeat the search") 94 | Exit Sub 95 | End If 96 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 97 | PushMSG("Manually return to the starting position and repeat the search") 98 | Exit Sub 99 | End If 100 | 'Probe Y- 101 | YHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 102 | If YHit=999999 Then 103 | Exit Sub 104 | End If 105 | 'Indicate result 106 | SetUserLabel (6, Format(YHit-ProbeD/2, "####0.000")) 107 | 'Safe back to start position 108 | If Not SafeMoveY(XYclearance-ProbeD/2-Latch,CurrentFeed) Then 109 | PushMSG("Return to the search position is interrupted") 110 | Exit Sub 111 | End If 112 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 113 | PushMSG("Return to the search position is interrupted") 114 | Exit Sub 115 | End If 116 | 117 | 118 | 'Move to new Y- start position 119 | If Not SafeMoveX(-EdgeLength,CurrentFeed) Then 120 | PushMSG("Return to the search position is interrupted") 121 | Exit Sub 122 | End If 123 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 124 | PushMSG("Manually return to the starting position and repeat the search") 125 | Exit Sub 126 | End If 127 | 'Probe Y- 128 | YbHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 129 | If YbHit=999999 Then 130 | Exit Sub 131 | End If 132 | 'Indicate result 133 | If YHit=YbHit Then 134 | Angle=0 135 | Else 136 | Angle=Atn((YHit-YbHit)/EdgeLength)*180/3.14159265 137 | End If 138 | SetOEMDRO(1824,Angle) 139 | SetUserLabel (10, Format(Angle, "####0.000")) 140 | PushMSG("Y+ = " & (YHit+ProbeD/2) &", new Y+ = " & (YbHit+ProbeD/2) & ", Angle = " & Angle) 141 | 'Safe back to start position 142 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 143 | PushMSG("Return to the search position is interrupted") 144 | Exit Sub 145 | End If 146 | If Not SafeMoveXY(EdgeLength,YHit+ProbeD/2-GetDRO(1),CurrentFeed) Then 147 | PushMSG("Return to the search position is interrupted") 148 | Exit Sub 149 | End If 150 | 151 | 152 | If AutoRottFlag = 1 Then 153 | Sleep(150) 154 | End If 155 | 156 | 'epilog 157 | 158 | SetOEMDRO(59,XScale) 159 | SetOEMDRO(60,YScale) 160 | SetOEMDRO(61,ZScale) 161 | Sleep(250) 162 | 163 | Call SetLED49(AbsIncFlag) 164 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 165 | Sleep(125) 166 | 167 | End Sub 168 | 169 | 170 | 'Functions 171 | 172 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 173 | Dim Res 174 | Dim Ystart 175 | Dim Ftmp 176 | Dim AbsIncF 177 | ProbeY=999999 178 | Ystart = GetDRO(1) 179 | Ftmp = FeedRate() 'FeedRate() 180 | AbsIncF=GetOEMLED(49) 181 | 'Fast Probe Y 182 | Code "G91" 183 | Code "F" & FRate1 184 | Sleep(125) 185 | Call WaitProbeReady() 186 | Code "G31 Y" & (Dir*DMax) 187 | While IsMoving() 188 | Wend 189 | Res = GetVar(2001) 190 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 191 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 192 | PushMSG("Error: G31 Y search finished without making contact") 193 | PushMSG("Manually return to the starting position and repeat the search") 194 | Call SetLED49(AbsIncF) 195 | SetOEMDRO(818,Ftmp) 196 | Sleep(125) 197 | Exit Function 198 | End If 199 | 'Move back 200 | Code "G00 Y" & -Dir*Latch 201 | While IsMoving() 202 | Wend 203 | Call WaitProbeReady() 204 | 'Latch Probe Y 205 | Ystart = GetDRO(1) 206 | Code "F" & FRate2 207 | Sleep(125) 208 | Code "G31 Y" & Dir*Latch*2 209 | While IsMoving() 210 | Wend 211 | 'Save result 212 | Res = GetVar(2001) 213 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 214 | PushMSG("Error: G31 Y latch finished without making contact") 215 | PushMSG("Manually return to the starting position and repeat the search") 216 | Call SetLED49(AbsIncF) 217 | SetOEMDRO(818,Ftmp) 218 | Sleep(125) 219 | Exit Function 220 | End If 221 | Code "G00 Y" & -Dir*Latch 222 | While IsMoving() 223 | Wend 224 | Call SetLED49(AbsIncF) 225 | SetOEMDRO(818,Ftmp) 226 | Sleep(125) 227 | ProbeY=Res 228 | End Function 229 | 230 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 231 | Dim Xstart 232 | Dim Ftmp 233 | Dim AbsIncF 234 | SafeMoveX=True 235 | Xstart = GetDRO(0) 236 | Ftmp = FeedRate() 'FeedRate() 237 | AbsIncF=GetOEMLED(49) 238 | Code "G91" 239 | Code "F" & F1 240 | Sleep(125) 241 | Call WaitProbeReady() 242 | Code "G31 X" & X1 243 | While IsMoving() 244 | Wend 245 | XHit = GetVar(2000) 246 | Call SetLED49(AbsIncF) 247 | If Abs(XHit - Xstart - X1) > 0.01 Then 248 | SafeMoveX=False 249 | PushMSG("Error! Probe tripped during X movement") 250 | End If 251 | SetOEMDRO(818,Ftmp) 252 | Sleep(125) 253 | End Function 254 | 255 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 256 | Dim Ystart 257 | Dim Ftmp 258 | Dim AbsIncF 259 | SafeMoveY=True 260 | Ystart = GetDRO(1) 261 | Ftmp = FeedRate() 'FeedRate() 262 | AbsIncF=GetOEMLED(49) 263 | Code "G91" 264 | Code "F" & F1 265 | Sleep(125) 266 | Call WaitProbeReady() 267 | Code "G31 Y" & Y1 268 | While IsMoving() 269 | Wend 270 | YHit = GetVar(2001) 271 | Call SetLED49(AbsIncF) 272 | If Abs(YHit - Ystart - Y1) > 0.01 Then 273 | SafeMoveY=False 274 | PushMSG("Error! Probe tripped during Y movement") 275 | End If 276 | SetOEMDRO(818,Ftmp) 277 | Sleep(125) 278 | End Function 279 | 280 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 281 | Dim Xstart 282 | Dim Ystart 283 | Dim Ftmp 284 | Dim AbsIncF 285 | SafeMoveXY=True 286 | Xstart = GetDRO(0) 287 | Ystart = GetDRO(1) 288 | Ftmp = FeedRate() 'FeedRate() 289 | AbsIncF=GetOEMLED(49) 290 | Code "G91" 291 | Code "F" & F1 292 | Sleep(125) 293 | Call WaitProbeReady() 294 | Code "G31 X" & X1 & "Y" & Y1 295 | While IsMoving() 296 | Wend 297 | XHit = GetVar(2000) 298 | YHit = GetVar(2001) 299 | Call SetLED49(AbsIncF) 300 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 301 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 302 | ' PushMSG("YHit=" & YHit &", Ystart=" & Ystart & ", Y1=" & Y1 & ", Ftmp=" & Ftmp) 303 | ' PushMSG("YHit - Ystart - Y1=" & YHit - Ystart - Y1) 304 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 305 | SafeMoveXY=False 306 | PushMSG("Error! Probe tripped during XY movement") 307 | End If 308 | SetOEMDRO(818,Ftmp) 309 | Sleep(125) 310 | End Function 311 | 312 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 313 | Dim Zstart 314 | Dim Ftmp 315 | Dim AbsIncF 316 | SafeMoveZ=True 317 | Zstart = GetDRO(2) 318 | Ftmp = FeedRate() 'FeedRate() 319 | AbsIncF=GetOEMLED(49) 320 | Code "G91" 321 | Code "F" & F1 322 | Sleep(125) 323 | Call WaitProbeReady() 324 | Code "G31 Z" & Z1 325 | While IsMoving() 326 | Sleep(100) 327 | Wend 328 | ZHit = GetVar(2002) 329 | Call SetLED49(AbsIncF) 330 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 331 | SafeMoveZ=False 332 | PushMSG("Error! Probe tripped during Z movement") 333 | End If 334 | SetOEMDRO(818,Ftmp) 335 | Sleep(125) 336 | End Function 337 | 338 | Function PushMSG(Str1 As String) As Boolean 339 | SetUserLabel (21,GetUserLabel(20)) 340 | SetUserLabel (20,GetUserLabel(19)) 341 | SetUserLabel (19,GetUserLabel(18)) 342 | SetUserLabel (18,GetUserLabel(17)) 343 | SetUserLabel (17,Str1) 344 | Message Str1 345 | PushMSG=True 346 | End Function 347 | 348 | Sub WaitProbeReady() 349 | While GetOemLED(825) 350 | Sleep(100) 351 | Wend 352 | End Sub 353 | 354 | Sub SetLED49(Flag) 355 | If Flag Then 356 | Code "G91" 357 | Sleep(125) 358 | Else 359 | Code "G90" 360 | Sleep(125) 361 | End If 362 | End Sub 363 | -------------------------------------------------------------------------------- /macros/M920.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Angle X+X+ Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength, Angle 10 | Dim XYclearance 11 | Dim AutoRottFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | 'Angle = GetUserDRO(1824) 32 | ToolNo = GetCurrentTool() 33 | ToolD = GetToolParam(ToolNo,1) 34 | If GetUserDRO(1829) = 0 then 35 | ProbeD = ToolD 36 | Else 37 | ProbeD = GetUserDRO(1829) 38 | End If 39 | Latch = abs(GetUserDRO(1825)) 40 | XYclearance = GetUserDRO(1826) 41 | EdgeLength = GetUserDRO(1828) 42 | Zdepth = GetUserDRO(1830) 43 | 44 | If GetOEMLED(1870) Then 45 | AutoRottFlag=1 46 | Else 47 | AutoRottFlag=0 48 | End If 49 | 50 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 51 | 52 | 'Temporary save all Axis Scale factors 53 | XScale = GetOEMDRO(59) 54 | YScale = GetOEMDRO(60) 55 | ZScale = GetOEMDRO(61) 56 | 57 | 'Set All Axis' Scale to 1 58 | SetOEMDRO(59,1) 59 | SetOEMDRO(60,1) 60 | SetOEMDRO(61,1) 61 | Sleep(250) 62 | 63 | 64 | 'Check for Errors 65 | 66 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 67 | Message "Please change to working coordinates" 68 | SetOEMDRO(59,XScale) 69 | SetOEMDRO(60,YScale) 70 | SetOEMDRO(61,ZScale) 71 | Sleep(250) 72 | Exit Sub ' Exit if in Machine Coordinates 73 | End If 74 | 75 | If GetOemLED(825)<>0 Then 76 | Message "Probe is active! Check connection and try again" 77 | Call SetOEMDRO(59,XScale) 78 | Call SetOEMDRO(60,YScale) 79 | Call SetOEMDRO(61,ZScale) 80 | Sleep(250) 81 | Exit Sub ' Exit if probe is tripped 82 | End If 83 | 84 | 85 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 86 | 87 | 'main working 88 | 89 | 'Save Z start position 90 | Zpos = GetDRO(2) 91 | 'Safe Go to X+ start position 92 | If Not SafeMoveX((-XYclearance),CurrentFeed) Then 93 | PushMSG("Manually return to the starting position and repeat the search") 94 | Exit Sub 95 | End If 96 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 97 | PushMSG("Manually return to the starting position and repeat the search") 98 | Exit Sub 99 | End If 100 | 'Probe X+ 101 | XHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 102 | If XHit=999999 Then 103 | Exit Sub 104 | End If 105 | 'Indicate result 106 | SetUserLabel (4, Format(XHit+ProbeD/2, "####0.000")) 107 | 'Safe back to start position 108 | If Not SafeMoveX((-XYclearance+ProbeD/2+Latch),CurrentFeed) Then 109 | PushMSG("Return to the search position is interrupted") 110 | Exit Sub 111 | End If 112 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 113 | PushMSG("Return to the search position is interrupted") 114 | Exit Sub 115 | End If 116 | 117 | 118 | 'Move to new X+ start position 119 | If Not SafeMoveY(-EdgeLength,CurrentFeed) Then 120 | PushMSG("Return to the search position is interrupted") 121 | Exit Sub 122 | End If 123 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 124 | PushMSG("Manually return to the starting position and repeat the search") 125 | Exit Sub 126 | End If 127 | 'Probe X+ 128 | XbHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 129 | If XbHit=999999 Then 130 | Exit Sub 131 | End If 132 | 'Indicate result 133 | If EdgeLength=0 Then 134 | Angle=90 135 | Else 136 | Angle=Atn((XHit-XbHit)/EdgeLength)*180/3.14159265 137 | End If 138 | SetOEMDRO(1824,Angle) 139 | SetUserLabel (10, Format(Angle, "####0.000")) 140 | PushMSG("X+ = " & (XHit+ProbeD/2) &", new X+ = " & (XbHit+ProbeD/2) & ", Angle = " & Angle) 141 | 'Safe back to start position 142 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 143 | PushMSG("Return to the search position is interrupted") 144 | Exit Sub 145 | End If 146 | If Not SafeMoveXY(XHit+ProbeD/2-GetDRO(0),EdgeLength,CurrentFeed) Then 147 | PushMSG("Return to the search position is interrupted") 148 | Exit Sub 149 | End If 150 | 151 | 152 | If AutoRottFlag = 1 Then 153 | Sleep(150) 154 | End If 155 | 156 | 'epilog 157 | 158 | SetOEMDRO(59,XScale) 159 | SetOEMDRO(60,YScale) 160 | SetOEMDRO(61,ZScale) 161 | Sleep(250) 162 | 163 | Call SetLED49(AbsIncFlag) 164 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 165 | Sleep(125) 166 | 167 | End Sub 168 | 169 | 170 | 'Functions 171 | 172 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 173 | Dim Res 174 | Dim Xstart 175 | Dim Ftmp 176 | Dim AbsIncF 177 | ProbeX=999999 178 | Xstart = GetDRO(0) 179 | Ftmp = FeedRate() 'FeedRate() 180 | AbsIncF=GetOEMLED(49) 181 | 'Fast Probe X 182 | Code "G91" 183 | Code "F" & FRate1 184 | Sleep(125) 185 | Call WaitProbeReady() 186 | Code "G31 X" & (Dir*DMax) 187 | While IsMoving() 188 | Wend 189 | Res = GetVar(2000) 190 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 191 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 192 | PushMSG("Error: G31 X search finished without making contact") 193 | PushMSG("Manually return to the starting position and repeat the search") 194 | Call SetLED49(AbsIncF) 195 | SetOEMDRO(818,Ftmp) 196 | Sleep(125) 197 | Exit Function 198 | End If 199 | 'Move back 200 | Code "G00 X" & -Dir*Latch 201 | While IsMoving() 202 | Wend 203 | Call WaitProbeReady() 204 | 'Latch Probe X 205 | Xstart = GetDRO(0) 206 | Code "F" & FRate2 207 | Sleep(125) 208 | Code "G31 X" & Dir*Latch*2 209 | While IsMoving() 210 | Wend 211 | 'Save result 212 | Res = GetVar(2000) 213 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 214 | PushMSG("Error: G31 X latch finished without making contact") 215 | PushMSG("Manually return to the starting position and repeat the search") 216 | Call SetLED49(AbsIncF) 217 | SetOEMDRO(818,Ftmp) 218 | Sleep(125) 219 | Exit Function 220 | End If 221 | Code "G00 X" & -Dir*Latch 222 | While IsMoving() 223 | Wend 224 | Call SetLED49(AbsIncF) 225 | SetOEMDRO(818,Ftmp) 226 | Sleep(125) 227 | ProbeX=Res 228 | End Function 229 | 230 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 231 | Dim Xstart 232 | Dim Ftmp 233 | Dim AbsIncF 234 | SafeMoveX=True 235 | Xstart = GetDRO(0) 236 | Ftmp = FeedRate() 'FeedRate() 237 | AbsIncF=GetOEMLED(49) 238 | Code "G91" 239 | Code "F" & F1 240 | Sleep(125) 241 | Call WaitProbeReady() 242 | Code "G31 X" & X1 243 | While IsMoving() 244 | Wend 245 | XHit = GetVar(2000) 246 | Call SetLED49(AbsIncF) 247 | If Abs(XHit - Xstart - X1) > 0.01 Then 248 | SafeMoveX=False 249 | PushMSG("Error! Probe tripped during X movement") 250 | End If 251 | SetOEMDRO(818,Ftmp) 252 | Sleep(125) 253 | End Function 254 | 255 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 256 | Dim Ystart 257 | Dim Ftmp 258 | Dim AbsIncF 259 | SafeMoveY=True 260 | Ystart = GetDRO(1) 261 | Ftmp = FeedRate() 'FeedRate() 262 | AbsIncF=GetOEMLED(49) 263 | Code "G91" 264 | Code "F" & F1 265 | Sleep(125) 266 | Call WaitProbeReady() 267 | Code "G31 Y" & Y1 268 | While IsMoving() 269 | Wend 270 | YHit = GetVar(2001) 271 | Call SetLED49(AbsIncF) 272 | If Abs(YHit - Ystart - Y1) > 0.01 Then 273 | SafeMoveY=False 274 | PushMSG("Error! Probe tripped during Y movement") 275 | End If 276 | SetOEMDRO(818,Ftmp) 277 | Sleep(125) 278 | End Function 279 | 280 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 281 | Dim Xstart 282 | Dim Ystart 283 | Dim Ftmp 284 | Dim AbsIncF 285 | SafeMoveXY=True 286 | Xstart = GetDRO(0) 287 | Ystart = GetDRO(1) 288 | Ftmp = FeedRate() 'FeedRate() 289 | AbsIncF=GetOEMLED(49) 290 | Code "G91" 291 | Code "F" & F1 292 | Sleep(125) 293 | Call WaitProbeReady() 294 | Code "G31 X" & X1 & "Y" & Y1 295 | While IsMoving() 296 | Wend 297 | XHit = GetVar(2000) 298 | YHit = GetVar(2001) 299 | Call SetLED49(AbsIncF) 300 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 301 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 302 | ' PushMSG("YHit=" & YHit &", Ystart=" & Ystart & ", Y1=" & Y1 & ", Ftmp=" & Ftmp) 303 | ' PushMSG("YHit - Ystart - Y1=" & YHit - Ystart - Y1) 304 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 305 | SafeMoveXY=False 306 | PushMSG("Error! Probe tripped during XY movement") 307 | End If 308 | SetOEMDRO(818,Ftmp) 309 | Sleep(125) 310 | End Function 311 | 312 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 313 | Dim Zstart 314 | Dim Ftmp 315 | Dim AbsIncF 316 | SafeMoveZ=True 317 | Zstart = GetDRO(2) 318 | Ftmp = FeedRate() 'FeedRate() 319 | AbsIncF=GetOEMLED(49) 320 | Code "G91" 321 | Code "F" & F1 322 | Sleep(125) 323 | Call WaitProbeReady() 324 | Code "G31 Z" & Z1 325 | While IsMoving() 326 | Sleep(100) 327 | Wend 328 | ZHit = GetVar(2002) 329 | Call SetLED49(AbsIncF) 330 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 331 | SafeMoveZ=False 332 | PushMSG("Error! Probe tripped during Z movement") 333 | End If 334 | SetOEMDRO(818,Ftmp) 335 | Sleep(125) 336 | End Function 337 | 338 | Function PushMSG(Str1 As String) As Boolean 339 | SetUserLabel (21,GetUserLabel(20)) 340 | SetUserLabel (20,GetUserLabel(19)) 341 | SetUserLabel (19,GetUserLabel(18)) 342 | SetUserLabel (18,GetUserLabel(17)) 343 | SetUserLabel (17,Str1) 344 | Message Str1 345 | PushMSG=True 346 | End Function 347 | 348 | Sub WaitProbeReady() 349 | While GetOemLED(825) 350 | Sleep(100) 351 | Wend 352 | End Sub 353 | 354 | Sub SetLED49(Flag) 355 | If Flag Then 356 | Code "G91" 357 | Sleep(125) 358 | Else 359 | Code "G90" 360 | Sleep(125) 361 | End If 362 | End Sub 363 | -------------------------------------------------------------------------------- /macros/M922.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Angle X-X- Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength, Angle 10 | Dim XYclearance 11 | Dim AutoRottFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | 19 | Dim Zpos 20 | 21 | Dim XScale, YScale, ZScale 22 | 23 | Dim AbsIncFlag 24 | 25 | Dim CurrentFeed 26 | 27 | 'Init vars 28 | FRate1 = abs(GetUserDRO(1821)) 29 | FRate2 = abs(GetUserDRO(1822)) 30 | DMax = abs(GetUserDRO(1823)) 31 | 'Angle = GetUserDRO(1824) 32 | ToolNo = GetCurrentTool() 33 | ToolD = GetToolParam(ToolNo,1) 34 | If GetUserDRO(1829) = 0 then 35 | ProbeD = ToolD 36 | Else 37 | ProbeD = GetUserDRO(1829) 38 | End If 39 | Latch = abs(GetUserDRO(1825)) 40 | XYclearance = GetUserDRO(1826) 41 | EdgeLength = GetUserDRO(1828) 42 | Zdepth = GetUserDRO(1830) 43 | 44 | If GetOEMLED(1870) Then 45 | AutoRottFlag=1 46 | Else 47 | AutoRottFlag=0 48 | End If 49 | 50 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 51 | 52 | 'Temporary save all Axis Scale factors 53 | XScale = GetOEMDRO(59) 54 | YScale = GetOEMDRO(60) 55 | ZScale = GetOEMDRO(61) 56 | 57 | 'Set All Axis' Scale to 1 58 | SetOEMDRO(59,1) 59 | SetOEMDRO(60,1) 60 | SetOEMDRO(61,1) 61 | Sleep(250) 62 | 63 | 64 | 'Check for Errors 65 | 66 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 67 | Message "Please change to working coordinates" 68 | SetOEMDRO(59,XScale) 69 | SetOEMDRO(60,YScale) 70 | SetOEMDRO(61,ZScale) 71 | Sleep(250) 72 | Exit Sub ' Exit if in Machine Coordinates 73 | End If 74 | 75 | If GetOemLED(825)<>0 Then 76 | Message "Probe is active! Check connection and try again" 77 | Call SetOEMDRO(59,XScale) 78 | Call SetOEMDRO(60,YScale) 79 | Call SetOEMDRO(61,ZScale) 80 | Sleep(250) 81 | Exit Sub ' Exit if probe is tripped 82 | End If 83 | 84 | 85 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 86 | 87 | 'main working 88 | 89 | 'Save Z start position 90 | Zpos = GetDRO(2) 91 | 'Safe Go to X- start position 92 | If Not SafeMoveX((XYclearance),CurrentFeed) Then 93 | PushMSG("Manually return to the starting position and repeat the search") 94 | Exit Sub 95 | End If 96 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 97 | PushMSG("Manually return to the starting position and repeat the search") 98 | Exit Sub 99 | End If 100 | 'Probe X- 101 | XHit=ProbeX(-1,DMax,Latch,FRate1,FRate2) 102 | If XHit=999999 Then 103 | Exit Sub 104 | End If 105 | 'Indicate result 106 | SetUserLabel (4, Format(XHit-ProbeD/2, "####0.000")) 107 | 'Safe back to start position 108 | If Not SafeMoveX((XYclearance-ProbeD/2-Latch),CurrentFeed) Then 109 | PushMSG("Return to the search position is interrupted") 110 | Exit Sub 111 | End If 112 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 113 | PushMSG("Return to the search position is interrupted") 114 | Exit Sub 115 | End If 116 | 117 | 118 | 'Move to new X- start position 119 | If Not SafeMoveY(EdgeLength,CurrentFeed) Then 120 | PushMSG("Return to the search position is interrupted") 121 | Exit Sub 122 | End If 123 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 124 | PushMSG("Manually return to the starting position and repeat the search") 125 | Exit Sub 126 | End If 127 | 'Probe X- 128 | XbHit=ProbeX(-1,DMax,Latch,FRate1,FRate2) 129 | If XbHit=999999 Then 130 | Exit Sub 131 | End If 132 | 'Indicate result 133 | If EdgeLength=0 Then 134 | Angle=90 135 | Else 136 | Angle=Atn((XbHit-XHit)/EdgeLength)*180/3.14159265 137 | End If 138 | SetOEMDRO(1824,Angle) 139 | SetUserLabel (10, Format(Angle, "####0.000")) 140 | PushMSG("X+ = " & (XHit+ProbeD/2) &", new X+ = " & (XbHit+ProbeD/2) & ", Angle = " & Angle) 141 | 'Safe back to start position 142 | If Not SafeMoveX(XYclearance,CurrentFeed) Then 143 | PushMSG("Return to the search position is interrupted") 144 | Exit Sub 145 | End If 146 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 147 | PushMSG("Return to the search position is interrupted") 148 | Exit Sub 149 | End If 150 | If Not SafeMoveXY(XHit-ProbeD/2-GetDRO(0),-EdgeLength,CurrentFeed) Then 151 | PushMSG("Return to the search position is interrupted") 152 | Exit Sub 153 | End If 154 | 155 | 156 | If AutoRottFlag = 1 Then 157 | Sleep(150) 158 | End If 159 | 160 | 'epilog 161 | 162 | SetOEMDRO(59,XScale) 163 | SetOEMDRO(60,YScale) 164 | SetOEMDRO(61,ZScale) 165 | Sleep(250) 166 | 167 | Call SetLED49(AbsIncFlag) 168 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 169 | Sleep(125) 170 | 171 | End Sub 172 | 173 | 174 | 'Functions 175 | 176 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 177 | Dim Res 178 | Dim Xstart 179 | Dim Ftmp 180 | Dim AbsIncF 181 | ProbeX=999999 182 | Xstart = GetDRO(0) 183 | Ftmp = FeedRate() 'FeedRate() 184 | AbsIncF=GetOEMLED(49) 185 | 'Fast Probe X 186 | Code "G91" 187 | Code "F" & FRate1 188 | Sleep(125) 189 | Call WaitProbeReady() 190 | Code "G31 X" & (Dir*DMax) 191 | While IsMoving() 192 | Wend 193 | Res = GetVar(2000) 194 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 195 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 196 | PushMSG("Error: G31 X search finished without making contact") 197 | PushMSG("Manually return to the starting position and repeat the search") 198 | Call SetLED49(AbsIncF) 199 | SetOEMDRO(818,Ftmp) 200 | Sleep(125) 201 | Exit Function 202 | End If 203 | 'Move back 204 | Code "G00 X" & -Dir*Latch 205 | While IsMoving() 206 | Wend 207 | Call WaitProbeReady() 208 | 'Latch Probe X 209 | Xstart = GetDRO(0) 210 | Code "F" & FRate2 211 | Sleep(125) 212 | Code "G31 X" & Dir*Latch*2 213 | While IsMoving() 214 | Wend 215 | 'Save result 216 | Res = GetVar(2000) 217 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 218 | PushMSG("Error: G31 X latch finished without making contact") 219 | PushMSG("Manually return to the starting position and repeat the search") 220 | Call SetLED49(AbsIncF) 221 | SetOEMDRO(818,Ftmp) 222 | Sleep(125) 223 | Exit Function 224 | End If 225 | Code "G00 X" & -Dir*Latch 226 | While IsMoving() 227 | Wend 228 | Call SetLED49(AbsIncF) 229 | SetOEMDRO(818,Ftmp) 230 | Sleep(125) 231 | ProbeX=Res 232 | End Function 233 | 234 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 235 | Dim Xstart 236 | Dim Ftmp 237 | Dim AbsIncF 238 | SafeMoveX=True 239 | Xstart = GetDRO(0) 240 | Ftmp = FeedRate() 'FeedRate() 241 | AbsIncF=GetOEMLED(49) 242 | Code "G91" 243 | Code "F" & F1 244 | Sleep(125) 245 | Call WaitProbeReady() 246 | Code "G31 X" & X1 247 | While IsMoving() 248 | Wend 249 | XHit = GetVar(2000) 250 | Call SetLED49(AbsIncF) 251 | If Abs(XHit - Xstart - X1) > 0.01 Then 252 | SafeMoveX=False 253 | PushMSG("Error! Probe tripped during X movement") 254 | End If 255 | SetOEMDRO(818,Ftmp) 256 | Sleep(125) 257 | End Function 258 | 259 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 260 | Dim Ystart 261 | Dim Ftmp 262 | Dim AbsIncF 263 | SafeMoveY=True 264 | Ystart = GetDRO(1) 265 | Ftmp = FeedRate() 'FeedRate() 266 | AbsIncF=GetOEMLED(49) 267 | Code "G91" 268 | Code "F" & F1 269 | Sleep(125) 270 | Call WaitProbeReady() 271 | Code "G31 Y" & Y1 272 | While IsMoving() 273 | Wend 274 | YHit = GetVar(2001) 275 | Call SetLED49(AbsIncF) 276 | If Abs(YHit - Ystart - Y1) > 0.01 Then 277 | SafeMoveY=False 278 | PushMSG("Error! Probe tripped during Y movement") 279 | End If 280 | SetOEMDRO(818,Ftmp) 281 | Sleep(125) 282 | End Function 283 | 284 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 285 | Dim Xstart 286 | Dim Ystart 287 | Dim Ftmp 288 | Dim AbsIncF 289 | SafeMoveXY=True 290 | Xstart = GetDRO(0) 291 | Ystart = GetDRO(1) 292 | Ftmp = FeedRate() 'FeedRate() 293 | AbsIncF=GetOEMLED(49) 294 | Code "G91" 295 | Code "F" & F1 296 | Sleep(125) 297 | Call WaitProbeReady() 298 | Code "G31 X" & X1 & "Y" & Y1 299 | While IsMoving() 300 | Wend 301 | XHit = GetVar(2000) 302 | YHit = GetVar(2001) 303 | Call SetLED49(AbsIncF) 304 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 305 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 306 | ' PushMSG("YHit=" & YHit &", Ystart=" & Ystart & ", Y1=" & Y1 & ", Ftmp=" & Ftmp) 307 | ' PushMSG("YHit - Ystart - Y1=" & YHit - Ystart - Y1) 308 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 309 | SafeMoveXY=False 310 | PushMSG("Error! Probe tripped during XY movement") 311 | End If 312 | SetOEMDRO(818,Ftmp) 313 | Sleep(125) 314 | End Function 315 | 316 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 317 | Dim Zstart 318 | Dim Ftmp 319 | Dim AbsIncF 320 | SafeMoveZ=True 321 | Zstart = GetDRO(2) 322 | Ftmp = FeedRate() 'FeedRate() 323 | AbsIncF=GetOEMLED(49) 324 | Code "G91" 325 | Code "F" & F1 326 | Sleep(125) 327 | Call WaitProbeReady() 328 | Code "G31 Z" & Z1 329 | While IsMoving() 330 | Sleep(100) 331 | Wend 332 | ZHit = GetVar(2002) 333 | Call SetLED49(AbsIncF) 334 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 335 | SafeMoveZ=False 336 | PushMSG("Error! Probe tripped during Z movement") 337 | End If 338 | SetOEMDRO(818,Ftmp) 339 | Sleep(125) 340 | End Function 341 | 342 | Function PushMSG(Str1 As String) As Boolean 343 | SetUserLabel (21,GetUserLabel(20)) 344 | SetUserLabel (20,GetUserLabel(19)) 345 | SetUserLabel (19,GetUserLabel(18)) 346 | SetUserLabel (18,GetUserLabel(17)) 347 | SetUserLabel (17,Str1) 348 | Message Str1 349 | PushMSG=True 350 | End Function 351 | 352 | Sub WaitProbeReady() 353 | While GetOemLED(825) 354 | Sleep(100) 355 | Wend 356 | End Sub 357 | 358 | Sub SetLED49(Flag) 359 | If Flag Then 360 | Code "G91" 361 | Sleep(125) 362 | Else 363 | Code "G90" 364 | Sleep(125) 365 | End If 366 | End Sub 367 | -------------------------------------------------------------------------------- /macros/M6End.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | 4 | ' Auto Tool Measurement M6End Script 5 | ' Author verser 6 | ' vers.by - touch probes, tool setters and precision home switches 7 | 8 | 9 | Dim TSHeight 10 | Dim WorkpieceHeight 11 | Dim ToolChangeAbsXPos 12 | Dim ToolChangeAbsYPos 13 | Dim ToolSetterAbsXPos 14 | Dim ToolSetterAbsYPos 15 | Dim ZAbsSafePlane 16 | Dim ZAbsStartPos 17 | Dim ZMaxDist 18 | 19 | Dim CurrToolNumber 20 | 21 | Dim FRate1, FRate2 22 | Dim DMax, Latch, EdgeLength 23 | Dim XYclearance 24 | Dim ToolNo 25 | Dim ToolD 26 | Dim ProbeD 27 | Dim Zdepth 28 | Dim XHit, YHit, ZHit 29 | Dim XbHit, YbHit, Diameter 30 | 31 | Dim Zpos 32 | 33 | Dim XScale, YScale, ZScale 34 | 35 | Dim AbsIncFlag 36 | 37 | Dim CurrentFeed 38 | Dim CurrentSpindle 39 | 40 | 41 | 'Init vars 42 | TSHeight = GetUserDRO(1831) 43 | WorkpieceHeight = GetUserDRO(1832) 44 | ToolChangeAbsXPos = GetUserDRO(1833) 45 | ToolChangeAbsYPos = GetUserDRO(1834) 46 | ToolSetterAbsXPos = GetUserDRO(1835) 47 | ToolSetterAbsYPos = GetUserDRO(1836) 48 | ZAbsSafePlane = GetUserDRO(1837) 49 | ZAbsStartPos = GetUserDRO(1838) 50 | ZMaxDist = GetUserDRO(1839) 51 | FRate1 = abs(GetUserDRO(1821)) 52 | FRate2 = abs(GetUserDRO(1822)) 53 | DMax = abs(GetUserDRO(1823)) 54 | ToolNo = GetCurrentTool() 55 | ToolD = GetToolParam(ToolNo,1) 56 | If GetUserDRO(1829) = 0 then 57 | ProbeD = ToolD 58 | Else 59 | ProbeD = GetUserDRO(1829) 60 | End If 61 | Latch = abs(GetUserDRO(1825)) 62 | XYclearance = GetUserDRO(1826) 63 | EdgeLength = GetUserDRO(1828) 64 | Zdepth = GetUserDRO(1830) 65 | 66 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 67 | 68 | 'Temporary save all Axis Scale factors 69 | XScale = GetOEMDRO(59) 70 | YScale = GetOEMDRO(60) 71 | ZScale = GetOEMDRO(61) 72 | 73 | 'Set All Axis' Scale to 1 74 | SetOEMDRO(59,1) 75 | SetOEMDRO(60,1) 76 | SetOEMDRO(61,1) 77 | Sleep(250) 78 | 79 | 80 | 'Check for Errors 81 | 82 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 83 | Message "Please change to working coordinates" 84 | SetOEMDRO(59,XScale) 85 | SetOEMDRO(60,YScale) 86 | SetOEMDRO(61,ZScale) 87 | Sleep(250) 88 | Exit Sub ' Exit if in Machine Coordinates 89 | End If 90 | 91 | If GetOemLED(825)<>0 Then 92 | Message "Probe is active! Check connection and try again" 93 | Call SetOEMDRO(59,XScale) 94 | Call SetOEMDRO(60,YScale) 95 | Call SetOEMDRO(61,ZScale) 96 | Sleep(250) 97 | Exit Sub ' Exit if probe is tripped 98 | End If 99 | 100 | 101 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 102 | CurrentSpindle = GetOEMDRO(39) 103 | 104 | 'main working 105 | 106 | 'Safe Go to start position under toolsetter 107 | If Not SafeMoveZ(ZAbsSafePlane-GetOEMDRO(85),CurrentFeed) Then 108 | PushMSG("M6End Script is interrupted") 109 | Exit Sub 110 | End If 111 | If Not SafeMoveXY(ToolSetterAbsXPos-GetOEMDRO(83),ToolSetterAbsYPos-GetOEMDRO(84),CurrentFeed) Then 112 | PushMSG("M6End Script is interrupted") 113 | Exit Sub 114 | End If 115 | If Not SafeMoveZ(ZAbsStartPos-GetOEMDRO(85),CurrentFeed) Then 116 | PushMSG("M6End Script is interrupted") 117 | Exit Sub 118 | End If 119 | 'Probe Z- 120 | ZHit=ProbeZ(-1,ZMaxDist,Latch,FRate1,FRate2) 121 | If ZHit=999999 Then 122 | Exit Sub 123 | End If 124 | 'Indicate result 125 | ' PushMSG("Z- = " & (ZHit)) 126 | 'Set current tool offset to table 127 | 128 | ' Call setOEMDRO(42, (ZHit-TSHeight+WorkpieceHeight)) 129 | CurrToolNumber=GetSelectedTool() 'Load the tool number 130 | Code "G90" & "G10" & "L1" & "P" & CurrToolNumber &"Z" & (ZHit-TSHeight+WorkpieceHeight) 131 | SetCurrentTool(CurrToolNumber) 'Set the tool 132 | Code "g43 H" & CurrToolNumber 'Set the height 133 | 134 | If Not SafeMoveZ(ZAbsSafePlane-GetOEMDRO(85),CurrentFeed) Then 135 | PushMSG("M6End Script is interrupted") 136 | Exit Sub 137 | End If 138 | If Not SafeMoveXY(ToolChangeAbsXPos-GetOEMDRO(83),ToolChangeAbsYPos-GetOEMDRO(84),CurrentFeed) Then 139 | PushMSG("M6End Script is interrupted") 140 | Exit Sub 141 | End If 142 | 143 | 144 | 'epilog 145 | 146 | SetOEMDRO(59,XScale) 147 | SetOEMDRO(60,YScale) 148 | SetOEMDRO(61,ZScale) 149 | Sleep(250) 150 | 151 | Call SetLED49(AbsIncFlag) 152 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 153 | Sleep(125) 154 | 155 | End Sub 156 | 157 | 158 | 'Functions 159 | 160 | Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) 161 | Dim Res 162 | Dim Zstart 163 | Dim Ftmp 164 | Dim AbsIncF 165 | ProbeZ=999999 166 | Zstart = GetDRO(2) 167 | Ftmp = FeedRate() 'FeedRate() 168 | AbsIncF=GetOEMLED(49) 169 | 'Fast Probe Z 170 | Code "G91" 171 | Code "F" & FRate1 172 | Sleep(125) 173 | Call WaitProbeReady() 174 | Code "G31 Z" & (Dir*DMax) 175 | While IsMoving() 176 | Wend 177 | Res = GetVar(2002) 178 | ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 179 | If Abs(Res - Zstart - Dir*DMax) < 0.01 Then 180 | PushMSG("Error: G31 Z search finished without making contact") 181 | PushMSG("Manually return to the starting position and repeat the search") 182 | Call SetLED49(AbsIncF) 183 | Code "M05" 184 | Sleep(125) 185 | Code "S" & CurrentSpindle 186 | Sleep(125) 187 | SetOEMDRO(818,Ftmp) 188 | Sleep(125) 189 | Exit Function 190 | End If 191 | 'Move back 192 | Code "G00 Z" & -Dir*Latch 193 | While IsMoving() 194 | Wend 195 | Call WaitProbeReady() 196 | 'Latch Probe Z 197 | Zstart = GetDRO(2) 198 | Code "F" & FRate2 199 | Sleep(125) 200 | Code "G31 Z" & Dir*Latch*2 201 | While IsMoving() 202 | Wend 203 | 'Save result 204 | Res = GetVar(2002) 205 | If Abs(Res - Zstart - Dir*Latch*2) < 0.01 Then 206 | PushMSG("Error: G31 Z latch finished without making contact") 207 | PushMSG("Manually return to the starting position and repeat the search") 208 | Call SetLED49(AbsIncF) 209 | Code "M05" 210 | Sleep(125) 211 | Code "S" & CurrentSpindle 212 | Sleep(125) 213 | SetOEMDRO(818,Ftmp) 214 | Sleep(125) 215 | Exit Function 216 | End If 217 | Code "G00 Z" & -Dir*Latch 218 | While IsMoving() 219 | Wend 220 | Call SetLED49(AbsIncF) 221 | SetOEMDRO(818,Ftmp) 222 | Sleep(125) 223 | ProbeZ=Res 224 | End Function 225 | 226 | 227 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 228 | Dim Xstart 229 | Dim Ftmp 230 | Dim AbsIncF 231 | SafeMoveX=True 232 | Xstart = GetDRO(0) 233 | Ftmp = FeedRate() 'FeedRate() 234 | AbsIncF=GetOEMLED(49) 235 | Code "G91" 236 | Code "F" & F1 237 | Sleep(125) 238 | Call WaitProbeReady() 239 | Code "G31 X" & X1 240 | While IsMoving() 241 | Wend 242 | XHit = GetVar(2000) 243 | Call SetLED49(AbsIncF) 244 | If Abs(XHit - Xstart - X1) > 0.01 Then 245 | SafeMoveX=False 246 | PushMSG("Error! Probe tripped during X movement") 247 | Code "M05" 248 | Sleep(125) 249 | Code "S" & CurrentSpindle 250 | Sleep(125) 251 | SetOEMDRO(818,Ftmp) 252 | Sleep(125) 253 | End If 254 | SetOEMDRO(818,Ftmp) 255 | Sleep(125) 256 | End Function 257 | 258 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 259 | Dim Ystart 260 | Dim Ftmp 261 | Dim AbsIncF 262 | SafeMoveY=True 263 | Ystart = GetDRO(1) 264 | Ftmp = FeedRate() 'FeedRate() 265 | AbsIncF=GetOEMLED(49) 266 | Code "G91" 267 | Code "F" & F1 268 | Sleep(125) 269 | Call WaitProbeReady() 270 | Code "G31 Y" & Y1 271 | While IsMoving() 272 | Wend 273 | YHit = GetVar(2001) 274 | Call SetLED49(AbsIncF) 275 | If Abs(YHit - Ystart - Y1) > 0.01 Then 276 | SafeMoveY=False 277 | PushMSG("Error! Probe tripped during Y movement") 278 | Code "M05" 279 | Sleep(125) 280 | Code "S" & CurrentSpindle 281 | Sleep(125) 282 | SetOEMDRO(818,Ftmp) 283 | Sleep(125) 284 | End If 285 | SetOEMDRO(818,Ftmp) 286 | Sleep(125) 287 | End Function 288 | 289 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 290 | Dim Xstart 291 | Dim Ystart 292 | Dim Ftmp 293 | Dim AbsIncF 294 | SafeMoveXY=True 295 | Xstart = GetDRO(0) 296 | Ystart = GetDRO(1) 297 | Ftmp = FeedRate() 'FeedRate() 298 | AbsIncF=GetOEMLED(49) 299 | Code "G91" 300 | Code "F" & F1 301 | Sleep(125) 302 | Call WaitProbeReady() 303 | Code "G31 X" & X1 & "Y" & Y1 304 | While IsMoving() 305 | Wend 306 | XHit = GetVar(2000) 307 | YHit = GetVar(2001) 308 | Call SetLED49(AbsIncF) 309 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 310 | SafeMoveXY=False 311 | PushMSG("Error! Probe tripped during XY movement") 312 | Code "M05" 313 | Sleep(125) 314 | Code "S" & CurrentSpindle 315 | Sleep(125) 316 | SetOEMDRO(818,Ftmp) 317 | Sleep(125) 318 | End If 319 | SetOEMDRO(818,Ftmp) 320 | Sleep(125) 321 | End Function 322 | 323 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 324 | Dim Zstart 325 | Dim Ftmp 326 | Dim AbsIncF 327 | SafeMoveZ=True 328 | Zstart = GetDRO(2) 329 | Ftmp = FeedRate() 'FeedRate() 330 | AbsIncF=GetOEMLED(49) 331 | Code "G91" 332 | Code "F" & F1 333 | Sleep(125) 334 | Call WaitProbeReady() 335 | Code "G31 Z" & Z1 336 | While IsMoving() 337 | Sleep(100) 338 | Wend 339 | ZHit = GetVar(2002) 340 | Call SetLED49(AbsIncF) 341 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 342 | SafeMoveZ=False 343 | PushMSG("Error! Probe tripped during Z movement") 344 | Code "M05" 345 | Sleep(125) 346 | Code "S" & CurrentSpindle 347 | Sleep(125) 348 | SetOEMDRO(818,Ftmp) 349 | Sleep(125) 350 | End If 351 | SetOEMDRO(818,Ftmp) 352 | Sleep(125) 353 | End Function 354 | 355 | Function PushMSG(Str1 As String) As Boolean 356 | SetUserLabel (21,GetUserLabel(20)) 357 | SetUserLabel (20,GetUserLabel(19)) 358 | SetUserLabel (19,GetUserLabel(18)) 359 | SetUserLabel (18,GetUserLabel(17)) 360 | SetUserLabel (17,Str1) 361 | Message Str1 362 | PushMSG=True 363 | End Function 364 | 365 | Sub WaitProbeReady() 366 | While GetOemLED(825) 367 | Sleep(100) 368 | Wend 369 | End Sub 370 | 371 | Sub SetLED49(Flag) 372 | If Flag Then 373 | Code "G91" 374 | Sleep(125) 375 | Else 376 | Code "G90" 377 | Sleep(125) 378 | End If 379 | End Sub 380 | -------------------------------------------------------------------------------- /macros/M923.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' Angle Y+Y+ Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength, Angle 10 | Dim XYclearance 11 | Dim AutoRottFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | Dim XbHit, YbHit 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim Xc,Yc 23 | 24 | Dim AbsIncFlag 25 | 26 | Dim CurrentFeed 27 | 28 | 'Init vars 29 | FRate1 = abs(GetUserDRO(1821)) 30 | FRate2 = abs(GetUserDRO(1822)) 31 | DMax = abs(GetUserDRO(1823)) 32 | 'Angle = GetUserDRO(1824) 33 | ToolNo = GetCurrentTool() 34 | ToolD = GetToolParam(ToolNo,1) 35 | If GetUserDRO(1829) = 0 then 36 | ProbeD = ToolD 37 | Else 38 | ProbeD = GetUserDRO(1829) 39 | End If 40 | Latch = abs(GetUserDRO(1825)) 41 | XYclearance = GetUserDRO(1826) 42 | EdgeLength = GetUserDRO(1828) 43 | Zdepth = GetUserDRO(1830) 44 | 45 | If GetOEMLED(1870) Then 46 | AutoRottFlag=1 47 | Else 48 | AutoRottFlag=0 49 | End If 50 | 51 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 52 | 53 | 'Temporary save all Axis Scale factors 54 | XScale = GetOEMDRO(59) 55 | YScale = GetOEMDRO(60) 56 | ZScale = GetOEMDRO(61) 57 | 58 | 'Set All Axis' Scale to 1 59 | SetOEMDRO(59,1) 60 | SetOEMDRO(60,1) 61 | SetOEMDRO(61,1) 62 | Sleep(250) 63 | 64 | 65 | 'Check for Errors 66 | 67 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 68 | Message "Please change to working coordinates" 69 | SetOEMDRO(59,XScale) 70 | SetOEMDRO(60,YScale) 71 | SetOEMDRO(61,ZScale) 72 | Sleep(250) 73 | Exit Sub ' Exit if in Machine Coordinates 74 | End If 75 | 76 | If GetOemLED(825)<>0 Then 77 | Message "Probe is active! Check connection and try again" 78 | Call SetOEMDRO(59,XScale) 79 | Call SetOEMDRO(60,YScale) 80 | Call SetOEMDRO(61,ZScale) 81 | Sleep(250) 82 | Exit Sub ' Exit if probe is tripped 83 | End If 84 | 85 | 86 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 87 | 88 | 'main working 89 | 90 | 'Save Z start position 91 | Zpos = GetDRO(2) 92 | 'Safe Go to Y+ start position 93 | If Not SafeMoveY((-XYclearance),CurrentFeed) Then 94 | PushMSG("Manually return to the starting position and repeat the search") 95 | Exit Sub 96 | End If 97 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 98 | PushMSG("Manually return to the starting position and repeat the search") 99 | Exit Sub 100 | End If 101 | 'Probe Y+ 102 | YHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 103 | If YHit=999999 Then 104 | Exit Sub 105 | End If 106 | 'Indicate result 107 | SetUserLabel (6, Format(YHit+ProbeD/2, "####0.000")) 108 | 'Safe back to start position 109 | If Not SafeMoveY(-XYclearance+ProbeD/2+Latch,CurrentFeed) Then 110 | PushMSG("Return to the search position is interrupted") 111 | Exit Sub 112 | End If 113 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 114 | PushMSG("Return to the search position is interrupted") 115 | Exit Sub 116 | End If 117 | 118 | 119 | 'Move to new Y+ start position 120 | If Not SafeMoveX(EdgeLength,CurrentFeed) Then 121 | PushMSG("Return to the search position is interrupted") 122 | Exit Sub 123 | End If 124 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 125 | PushMSG("Manually return to the starting position and repeat the search") 126 | Exit Sub 127 | End If 128 | 'Probe Y+ 129 | YbHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 130 | If YbHit=999999 Then 131 | Exit Sub 132 | End If 133 | 'Indicate result 134 | If YHit=YbHit Then 135 | Angle=0 136 | Else 137 | Angle=Atn((YbHit-YHit)/EdgeLength)*180/3.14159265 138 | End If 139 | SetOEMDRO(1824,Angle) 140 | SetUserLabel (10, Format(Angle, "####0.000")) 141 | PushMSG("Y+ = " & (YHit+ProbeD/2) &", new Y+ = " & (YbHit+ProbeD/2) & ", Angle = " & Angle) 142 | 'Safe back to start position 143 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 144 | PushMSG("Return to the search position is interrupted") 145 | Exit Sub 146 | End If 147 | If Not SafeMoveXY(-EdgeLength,YHit+ProbeD/2-GetDRO(1),CurrentFeed) Then 148 | PushMSG("Return to the search position is interrupted") 149 | Exit Sub 150 | End If 151 | 152 | 153 | If AutoRottFlag = 1 Then 154 | Xc=GetDRO(0) 155 | Yc=GetDRO(1) 156 | Code "G68 A" & Xc & " B" & Yc & " R" & Angle 157 | Sleep(150) 158 | SetUserLabel (22,"A=" & Format(Xc, "###0.###")) 159 | SetUserLabel (23,"B=" & Format(Yc, "###0.###")) 160 | End If 161 | 162 | 'epilog 163 | 164 | SetOEMDRO(59,XScale) 165 | SetOEMDRO(60,YScale) 166 | SetOEMDRO(61,ZScale) 167 | Sleep(250) 168 | 169 | Call SetLED49(AbsIncFlag) 170 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 171 | Sleep(125) 172 | 173 | End Sub 174 | 175 | 176 | 'Functions 177 | 178 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 179 | Dim Res 180 | Dim Ystart 181 | Dim Ftmp 182 | Dim AbsIncF 183 | ProbeY=999999 184 | Ystart = GetDRO(1) 185 | Ftmp = FeedRate() 'FeedRate() 186 | AbsIncF=GetOEMLED(49) 187 | 'Fast Probe Y 188 | Code "G91" 189 | Code "F" & FRate1 190 | Sleep(125) 191 | Call WaitProbeReady() 192 | Code "G31 Y" & (Dir*DMax) 193 | While IsMoving() 194 | Wend 195 | Res = GetVar(2001) 196 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 197 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 198 | PushMSG("Error: G31 Y search finished without making contact") 199 | PushMSG("Manually return to the starting position and repeat the search") 200 | Call SetLED49(AbsIncF) 201 | SetOEMDRO(818,Ftmp) 202 | Sleep(125) 203 | Exit Function 204 | End If 205 | 'Move back 206 | Code "G00 Y" & -Dir*Latch 207 | While IsMoving() 208 | Wend 209 | Call WaitProbeReady() 210 | 'Latch Probe Y 211 | Ystart = GetDRO(1) 212 | Code "F" & FRate2 213 | Sleep(125) 214 | Code "G31 Y" & Dir*Latch*2 215 | While IsMoving() 216 | Wend 217 | 'Save result 218 | Res = GetVar(2001) 219 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 220 | PushMSG("Error: G31 Y latch finished without making contact") 221 | PushMSG("Manually return to the starting position and repeat the search") 222 | Call SetLED49(AbsIncF) 223 | SetOEMDRO(818,Ftmp) 224 | Sleep(125) 225 | Exit Function 226 | End If 227 | Code "G00 Y" & -Dir*Latch 228 | While IsMoving() 229 | Wend 230 | Call SetLED49(AbsIncF) 231 | SetOEMDRO(818,Ftmp) 232 | Sleep(125) 233 | ProbeY=Res 234 | End Function 235 | 236 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 237 | Dim Xstart 238 | Dim Ftmp 239 | Dim AbsIncF 240 | SafeMoveX=True 241 | Xstart = GetDRO(0) 242 | Ftmp = FeedRate() 'FeedRate() 243 | AbsIncF=GetOEMLED(49) 244 | Code "G91" 245 | Code "F" & F1 246 | Sleep(125) 247 | Call WaitProbeReady() 248 | Code "G31 X" & X1 249 | While IsMoving() 250 | Wend 251 | XHit = GetVar(2000) 252 | Call SetLED49(AbsIncF) 253 | If Abs(XHit - Xstart - X1) > 0.01 Then 254 | SafeMoveX=False 255 | PushMSG("Error! Probe tripped during X movement") 256 | End If 257 | SetOEMDRO(818,Ftmp) 258 | Sleep(125) 259 | End Function 260 | 261 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 262 | Dim Ystart 263 | Dim Ftmp 264 | Dim AbsIncF 265 | SafeMoveY=True 266 | Ystart = GetDRO(1) 267 | Ftmp = FeedRate() 'FeedRate() 268 | AbsIncF=GetOEMLED(49) 269 | Code "G91" 270 | Code "F" & F1 271 | Sleep(125) 272 | Call WaitProbeReady() 273 | Code "G31 Y" & Y1 274 | While IsMoving() 275 | Wend 276 | YHit = GetVar(2001) 277 | Call SetLED49(AbsIncF) 278 | If Abs(YHit - Ystart - Y1) > 0.01 Then 279 | SafeMoveY=False 280 | PushMSG("Error! Probe tripped during Y movement") 281 | End If 282 | SetOEMDRO(818,Ftmp) 283 | Sleep(125) 284 | End Function 285 | 286 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 287 | Dim Xstart 288 | Dim Ystart 289 | Dim Ftmp 290 | Dim AbsIncF 291 | SafeMoveXY=True 292 | Xstart = GetDRO(0) 293 | Ystart = GetDRO(1) 294 | Ftmp = FeedRate() 'FeedRate() 295 | AbsIncF=GetOEMLED(49) 296 | Code "G91" 297 | Code "F" & F1 298 | Sleep(125) 299 | Call WaitProbeReady() 300 | Code "G31 X" & X1 & "Y" & Y1 301 | While IsMoving() 302 | Wend 303 | XHit = GetVar(2000) 304 | YHit = GetVar(2001) 305 | Call SetLED49(AbsIncF) 306 | ' PushMSG("XHit=" & XHit &", Xstart=" & Xstart & ", X1=" & X1 & ", Ftmp=" & Ftmp) 307 | ' PushMSG("XHit - Xstart - X1=" & XHit - Xstart - X1) 308 | ' PushMSG("YHit=" & YHit &", Ystart=" & Ystart & ", Y1=" & Y1 & ", Ftmp=" & Ftmp) 309 | ' PushMSG("YHit - Ystart - Y1=" & YHit - Ystart - Y1) 310 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 311 | SafeMoveXY=False 312 | PushMSG("Error! Probe tripped during XY movement") 313 | End If 314 | SetOEMDRO(818,Ftmp) 315 | Sleep(125) 316 | End Function 317 | 318 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 319 | Dim Zstart 320 | Dim Ftmp 321 | Dim AbsIncF 322 | SafeMoveZ=True 323 | Zstart = GetDRO(2) 324 | Ftmp = FeedRate() 'FeedRate() 325 | AbsIncF=GetOEMLED(49) 326 | Code "G91" 327 | Code "F" & F1 328 | Sleep(125) 329 | Call WaitProbeReady() 330 | Code "G31 Z" & Z1 331 | While IsMoving() 332 | Sleep(100) 333 | Wend 334 | ZHit = GetVar(2002) 335 | Call SetLED49(AbsIncF) 336 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 337 | SafeMoveZ=False 338 | PushMSG("Error! Probe tripped during Z movement") 339 | End If 340 | SetOEMDRO(818,Ftmp) 341 | Sleep(125) 342 | End Function 343 | 344 | Function PushMSG(Str1 As String) As Boolean 345 | SetUserLabel (21,GetUserLabel(20)) 346 | SetUserLabel (20,GetUserLabel(19)) 347 | SetUserLabel (19,GetUserLabel(18)) 348 | SetUserLabel (18,GetUserLabel(17)) 349 | SetUserLabel (17,Str1) 350 | Message Str1 351 | PushMSG=True 352 | End Function 353 | 354 | Sub WaitProbeReady() 355 | While GetOemLED(825) 356 | Sleep(100) 357 | Wend 358 | End Sub 359 | 360 | Sub SetLED49(Flag) 361 | If Flag Then 362 | Code "G91" 363 | Sleep(125) 364 | Else 365 | Code "G90" 366 | Sleep(125) 367 | End If 368 | End Sub 369 | -------------------------------------------------------------------------------- /macros/M908.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' X+Y- Inside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | XYclearance = GetUserDRO(1826) 39 | EdgeLength = GetUserDRO(1828) 40 | Zdepth = GetUserDRO(1830) 41 | 42 | If GetOEMLED(1871) Then 43 | AutoZeroFlag=1 44 | Else 45 | AutoZeroFlag=0 46 | End If 47 | 48 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 49 | 50 | 'Temporary save all Axis Scale factors 51 | XScale = GetOEMDRO(59) 52 | YScale = GetOEMDRO(60) 53 | ZScale = GetOEMDRO(61) 54 | 55 | 'Set All Axis' Scale to 1 56 | SetOEMDRO(59,1) 57 | SetOEMDRO(60,1) 58 | SetOEMDRO(61,1) 59 | Sleep(250) 60 | 61 | 62 | 'Check for Errors 63 | 64 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 65 | Message "Please change to working coordinates" 66 | SetOEMDRO(59,XScale) 67 | SetOEMDRO(60,YScale) 68 | SetOEMDRO(61,ZScale) 69 | Sleep(250) 70 | Exit Sub ' Exit if in Machine Coordinates 71 | End If 72 | 73 | If GetOemLED(825)<>0 Then 74 | Message "Probe is active! Check connection and try again" 75 | Call SetOEMDRO(59,XScale) 76 | Call SetOEMDRO(60,YScale) 77 | Call SetOEMDRO(61,ZScale) 78 | Sleep(250) 79 | Exit Sub ' Exit if probe is tripped 80 | End If 81 | 82 | 83 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 84 | 85 | 'main working 86 | 87 | 'Save Z start position 88 | Zpos = GetDRO(2) 89 | 'Safe Go to probe position 90 | If Not SafeMoveXY((-XYclearance),EdgeLength,CurrentFeed) Then 91 | PushMSG("Manually return to the starting position and repeat the search") 92 | Exit Sub 93 | End If 94 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 95 | PushMSG("Manually return to the starting position and repeat the search") 96 | Exit Sub 97 | End If 98 | 'Probe X+ 99 | XHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 100 | If XHit=999999 Then 101 | Exit Sub 102 | End If 103 | 'Indicate result 104 | SetUserLabel (4, Format(XHit+ProbeD/2, "####0.000")) 105 | PushMSG("X+ = " & (XHit+ProbeD/2)) 106 | 'Move to Y+ start position 107 | If Not SafeMoveXY(XHit+ProbeD/2-GetDRO(0)-EdgeLength,-EdgeLength+XYclearance,CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Probe Y- 112 | YHit=ProbeY(-1,DMax,Latch,FRate1,FRate2) 113 | If YHit=999999 Then 114 | Exit Sub 115 | End If 116 | 'Indicate result 117 | SetUserLabel (6, Format(YHit-ProbeD/2, "####0.000")) 118 | PushMSG("Y- = " & (YHit-ProbeD/2)) 119 | 'Safe back to start position 120 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 121 | PushMSG("Return to the search position is interrupted") 122 | Exit Sub 123 | End If 124 | If Not SafeMoveXY(EdgeLength,YHit-ProbeD/2-GetDRO(1),CurrentFeed) Then 125 | PushMSG("Return to the search position is interrupted") 126 | Exit Sub 127 | End If 128 | 129 | 130 | If AutoZeroFlag = 1 Then 131 | SetOEMDRO(800, GetDRO(0)-XHit-ProbeD/2) 'curr - XHit-ProbeD/2 132 | Sleep(150) 133 | SetOEMDRO(801, GetDRO(1)-YHit+ProbeD/2) 'curr - YHit+ProbeD/2 134 | Sleep(150) 135 | End If 136 | 137 | 'epilog 138 | 139 | SetOEMDRO(59,XScale) 140 | SetOEMDRO(60,YScale) 141 | SetOEMDRO(61,ZScale) 142 | Sleep(250) 143 | 144 | Call SetLED49(AbsIncFlag) 145 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 146 | Sleep(125) 147 | 148 | End Sub 149 | 150 | 151 | 'Functions 152 | 153 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 154 | Dim Res 155 | Dim Xstart 156 | Dim Ftmp 157 | Dim AbsIncF 158 | ProbeX=999999 159 | Xstart = GetDRO(0) 160 | Ftmp = FeedRate() 'FeedRate() 161 | AbsIncF=GetOEMLED(49) 162 | 'Fast Probe X 163 | Code "G91" 164 | Code "F" & FRate1 165 | Sleep(125) 166 | Call WaitProbeReady() 167 | Code "G31 X" & (Dir*DMax) 168 | While IsMoving() 169 | Wend 170 | Res = GetVar(2000) 171 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 172 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 173 | PushMSG("Error: G31 X search finished without making contact") 174 | PushMSG("Manually return to the starting position and repeat the search") 175 | Call SetLED49(AbsIncF) 176 | SetOEMDRO(818,Ftmp) 177 | Sleep(125) 178 | Exit Function 179 | End If 180 | 'Move back 181 | Code "G00 X" & -Dir*Latch 182 | While IsMoving() 183 | Wend 184 | Call WaitProbeReady() 185 | 'Latch Probe X 186 | Xstart = GetDRO(0) 187 | Code "F" & FRate2 188 | Sleep(125) 189 | Code "G31 X" & Dir*Latch*2 190 | While IsMoving() 191 | Wend 192 | 'Save result 193 | Res = GetVar(2000) 194 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 195 | PushMSG("Error: G31 X latch finished without making contact") 196 | PushMSG("Manually return to the starting position and repeat the search") 197 | Call SetLED49(AbsIncF) 198 | SetOEMDRO(818,Ftmp) 199 | Sleep(125) 200 | Exit Function 201 | End If 202 | Code "G00 X" & -Dir*Latch 203 | While IsMoving() 204 | Wend 205 | Call SetLED49(AbsIncF) 206 | SetOEMDRO(818,Ftmp) 207 | Sleep(125) 208 | ProbeX=Res 209 | End Function 210 | 211 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 212 | Dim Res 213 | Dim Ystart 214 | Dim Ftmp 215 | Dim AbsIncF 216 | ProbeY=999999 217 | Ystart = GetDRO(1) 218 | Ftmp = FeedRate() 'FeedRate() 219 | AbsIncF=GetOEMLED(49) 220 | 'Fast Probe Y 221 | Code "G91" 222 | Code "F" & FRate1 223 | Sleep(125) 224 | Call WaitProbeReady() 225 | Code "G31 Y" & (Dir*DMax) 226 | While IsMoving() 227 | Wend 228 | Res = GetVar(2001) 229 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 230 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 231 | PushMSG("Error: G31 Y search finished without making contact") 232 | PushMSG("Manually return to the starting position and repeat the search") 233 | Call SetLED49(AbsIncF) 234 | SetOEMDRO(818,Ftmp) 235 | Sleep(125) 236 | Exit Function 237 | End If 238 | 'Move back 239 | Code "G00 Y" & -Dir*Latch 240 | While IsMoving() 241 | Wend 242 | Call WaitProbeReady() 243 | 'Latch Probe Y 244 | Ystart = GetDRO(1) 245 | Code "F" & FRate2 246 | Sleep(125) 247 | Code "G31 Y" & Dir*Latch*2 248 | While IsMoving() 249 | Wend 250 | 'Save result 251 | Res = GetVar(2001) 252 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 253 | PushMSG("Error: G31 Y latch finished without making contact") 254 | PushMSG("Manually return to the starting position and repeat the search") 255 | Call SetLED49(AbsIncF) 256 | SetOEMDRO(818,Ftmp) 257 | Sleep(125) 258 | Exit Function 259 | End If 260 | Code "G00 Y" & -Dir*Latch 261 | While IsMoving() 262 | Wend 263 | Call SetLED49(AbsIncF) 264 | SetOEMDRO(818,Ftmp) 265 | Sleep(125) 266 | ProbeY=Res 267 | End Function 268 | 269 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 270 | Dim Xstart 271 | Dim Ftmp 272 | Dim AbsIncF 273 | SafeMoveX=True 274 | Xstart = GetDRO(0) 275 | Ftmp = FeedRate() 'FeedRate() 276 | AbsIncF=GetOEMLED(49) 277 | Code "G91" 278 | Code "F" & F1 279 | Sleep(125) 280 | Call WaitProbeReady() 281 | Code "G31 X" & X1 282 | While IsMoving() 283 | Wend 284 | XHit = GetVar(2000) 285 | Call SetLED49(AbsIncF) 286 | If Abs(XHit - Xstart - X1) > 0.01 Then 287 | SafeMoveX=False 288 | PushMSG("Error! Probe tripped during X movement") 289 | End If 290 | SetOEMDRO(818,Ftmp) 291 | Sleep(125) 292 | End Function 293 | 294 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 295 | Dim Ystart 296 | Dim Ftmp 297 | Dim AbsIncF 298 | SafeMoveY=True 299 | Ystart = GetDRO(1) 300 | Ftmp = FeedRate() 'FeedRate() 301 | AbsIncF=GetOEMLED(49) 302 | Code "G91" 303 | Code "F" & F1 304 | Sleep(125) 305 | Call WaitProbeReady() 306 | Code "G31 Y" & Y1 307 | While IsMoving() 308 | Wend 309 | YHit = GetVar(2001) 310 | Call SetLED49(AbsIncF) 311 | If Abs(YHit - Ystart - Y1) > 0.01 Then 312 | SafeMoveY=False 313 | PushMSG("Error! Probe tripped during Y movement") 314 | End If 315 | SetOEMDRO(818,Ftmp) 316 | Sleep(125) 317 | End Function 318 | 319 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 320 | Dim Xstart 321 | Dim Ystart 322 | Dim Ftmp 323 | Dim AbsIncF 324 | SafeMoveXY=True 325 | Xstart = GetDRO(0) 326 | Ystart = GetDRO(1) 327 | Ftmp = FeedRate() 'FeedRate() 328 | AbsIncF=GetOEMLED(49) 329 | Code "G91" 330 | Code "F" & F1 331 | Sleep(125) 332 | Call WaitProbeReady() 333 | Code "G31 X" & X1 & "Y" & Y1 334 | While IsMoving() 335 | Wend 336 | XHit = GetVar(2000) 337 | YHit = GetVar(2001) 338 | Call SetLED49(AbsIncF) 339 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 340 | SafeMoveXY=False 341 | PushMSG("Error! Probe tripped during XY movement") 342 | End If 343 | SetOEMDRO(818,Ftmp) 344 | Sleep(125) 345 | End Function 346 | 347 | 348 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 349 | Dim Zstart 350 | Dim Ftmp 351 | Dim AbsIncF 352 | SafeMoveZ=True 353 | Zstart = GetDRO(2) 354 | Ftmp = FeedRate() 'FeedRate() 355 | AbsIncF=GetOEMLED(49) 356 | Code "G91" 357 | Code "F" & F1 358 | Sleep(125) 359 | Call WaitProbeReady() 360 | Code "G31 Z" & Z1 361 | While IsMoving() 362 | Sleep(100) 363 | Wend 364 | ZHit = GetVar(2002) 365 | Call SetLED49(AbsIncF) 366 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 367 | SafeMoveZ=False 368 | PushMSG("Error! Probe tripped during Z movement") 369 | End If 370 | SetOEMDRO(818,Ftmp) 371 | Sleep(125) 372 | End Function 373 | 374 | Function PushMSG(Str1 As String) As Boolean 375 | SetUserLabel (21,GetUserLabel(20)) 376 | SetUserLabel (20,GetUserLabel(19)) 377 | SetUserLabel (19,GetUserLabel(18)) 378 | SetUserLabel (18,GetUserLabel(17)) 379 | SetUserLabel (17,Str1) 380 | Message Str1 381 | PushMSG=True 382 | End Function 383 | 384 | Sub WaitProbeReady() 385 | While GetOemLED(825) 386 | Sleep(100) 387 | Wend 388 | End Sub 389 | 390 | Sub SetLED49(Flag) 391 | If Flag Then 392 | Code "G91" 393 | Sleep(125) 394 | Else 395 | Code "G90" 396 | Sleep(125) 397 | End If 398 | End Sub 399 | -------------------------------------------------------------------------------- /macros/M906.m1s: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | 3 | ' X+Y+ Inside Probing Script 4 | ' Author verser 5 | ' vers.by - touch probes, tool setters and precision home switches 6 | 7 | 8 | Dim FRate1, FRate2 9 | Dim DMax, Latch, EdgeLength 10 | Dim XYclearance 11 | Dim AutoZeroFlag 12 | Dim ToolNo 13 | Dim ToolD 14 | Dim ProbeD 15 | Dim Zdepth 16 | Dim XHit, YHit, ZHit 17 | 18 | Dim Zpos 19 | 20 | Dim XScale, YScale, ZScale 21 | 22 | Dim AbsIncFlag 23 | 24 | Dim CurrentFeed 25 | 26 | 'Init vars 27 | FRate1 = abs(GetUserDRO(1821)) 28 | FRate2 = abs(GetUserDRO(1822)) 29 | DMax = abs(GetUserDRO(1823)) 30 | ToolNo = GetCurrentTool() 31 | ToolD = GetToolParam(ToolNo,1) 32 | If GetUserDRO(1829) = 0 then 33 | ProbeD = ToolD 34 | Else 35 | ProbeD = GetUserDRO(1829) 36 | End If 37 | Latch = abs(GetUserDRO(1825)) 38 | XYclearance = GetUserDRO(1826) 39 | EdgeLength = GetUserDRO(1828) 40 | Zdepth = GetUserDRO(1830) 41 | 42 | If GetOEMLED(1871) Then 43 | AutoZeroFlag=1 44 | Else 45 | AutoZeroFlag=0 46 | End If 47 | 48 | AbsIncFlag = GetOEMLED(49) ' Get the current G91 state 49 | 50 | 'Temporary save all Axis Scale factors 51 | XScale = GetOEMDRO(59) 52 | YScale = GetOEMDRO(60) 53 | ZScale = GetOEMDRO(61) 54 | 55 | 'Set All Axis' Scale to 1 56 | SetOEMDRO(59,1) 57 | SetOEMDRO(60,1) 58 | SetOEMDRO(61,1) 59 | Sleep(250) 60 | 61 | 62 | 'Check for Errors 63 | 64 | If GetOemLED(16)<>0 Then ' Check for Machine Coordinates 65 | Message "Please change to working coordinates" 66 | SetOEMDRO(59,XScale) 67 | SetOEMDRO(60,YScale) 68 | SetOEMDRO(61,ZScale) 69 | Sleep(250) 70 | Exit Sub ' Exit if in Machine Coordinates 71 | End If 72 | 73 | If GetOemLED(825)<>0 Then 74 | Message "Probe is active! Check connection and try again" 75 | Call SetOEMDRO(59,XScale) 76 | Call SetOEMDRO(60,YScale) 77 | Call SetOEMDRO(61,ZScale) 78 | Sleep(250) 79 | Exit Sub ' Exit if probe is tripped 80 | End If 81 | 82 | 83 | CurrentFeed = GetOEMDRO(818) 'FeedRate() 84 | 85 | 'main working 86 | 87 | 'Save Z start position 88 | Zpos = GetDRO(2) 89 | 'Safe Go to probe position 90 | If Not SafeMoveXY((-XYclearance),(-EdgeLength),CurrentFeed) Then 91 | PushMSG("Manually return to the starting position and repeat the search") 92 | Exit Sub 93 | End If 94 | If Not SafeMoveZ((-Zdepth),CurrentFeed) Then 95 | PushMSG("Manually return to the starting position and repeat the search") 96 | Exit Sub 97 | End If 98 | 'Probe X+ 99 | XHit=ProbeX(1,DMax,Latch,FRate1,FRate2) 100 | If XHit=999999 Then 101 | Exit Sub 102 | End If 103 | 'Indicate result 104 | SetUserLabel (4, Format(XHit+ProbeD/2, "####0.000")) 105 | PushMSG("X+ = " & (XHit+ProbeD/2)) 106 | 'Move to Y+ start position 107 | If Not SafeMoveXY(XHit+ProbeD/2-GetDRO(0)-EdgeLength,EdgeLength-XYclearance,CurrentFeed) Then 108 | PushMSG("Return to the search position is interrupted") 109 | Exit Sub 110 | End If 111 | 'Probe Y+ 112 | YHit=ProbeY(1,DMax,Latch,FRate1,FRate2) 113 | If YHit=999999 Then 114 | Exit Sub 115 | End If 116 | 'Indicate result 117 | SetUserLabel (8, Format(YHit+ProbeD/2, "####0.000")) 118 | PushMSG("Y+ = " & (YHit+ProbeD/2)) 119 | 'Safe move to corner position 120 | If Not SafeMoveZ((Zdepth),CurrentFeed) Then 121 | PushMSG("Return to the search position is interrupted") 122 | Exit Sub 123 | End If 124 | If Not SafeMoveXY(EdgeLength,YHit+ProbeD/2-GetDRO(1),CurrentFeed) Then 125 | PushMSG("Return to the search position is interrupted") 126 | Exit Sub 127 | End If 128 | 129 | 130 | If AutoZeroFlag = 1 Then 131 | SetOEMDRO(800, GetDRO(0)-XHit-ProbeD/2) 'curr - XHit-ProbeD/2 132 | Sleep(150) 133 | SetOEMDRO(801, GetDRO(1)-YHit-ProbeD/2) 'curr - YHit-ProbeD/2 134 | Sleep(150) 135 | End If 136 | 137 | 'epilog 138 | 139 | SetOEMDRO(59,XScale) 140 | SetOEMDRO(60,YScale) 141 | SetOEMDRO(61,ZScale) 142 | Sleep(250) 143 | 144 | Call SetLED49(AbsIncFlag) 145 | SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed) 146 | Sleep(125) 147 | 148 | End Sub 149 | 150 | 151 | 'Functions 152 | 153 | Function ProbeX(Dir,DMax,Latch,FRate1,FRate2) 154 | Dim Res 155 | Dim Xstart 156 | Dim Ftmp 157 | Dim AbsIncF 158 | ProbeX=999999 159 | Xstart = GetDRO(0) 160 | Ftmp = FeedRate() 'FeedRate() 161 | AbsIncF=GetOEMLED(49) 162 | 'Fast Probe X 163 | Code "G91" 164 | Code "F" & FRate1 165 | Sleep(125) 166 | Call WaitProbeReady() 167 | Code "G31 X" & (Dir*DMax) 168 | While IsMoving() 169 | Wend 170 | Res = GetVar(2000) 171 | ' PushMSG("Res=" & Res &", Xstart=" & Xstart & ", DMax=" & DMax & ", FRate1=" & FRate1) 172 | If Abs(Res - Xstart - Dir*DMax) < 0.01 Then 173 | PushMSG("Error: G31 X search finished without making contact") 174 | PushMSG("Manually return to the starting position and repeat the search") 175 | Call SetLED49(AbsIncF) 176 | SetOEMDRO(818,Ftmp) 177 | Sleep(125) 178 | Exit Function 179 | End If 180 | 'Move back 181 | Code "G00 X" & -Dir*Latch 182 | While IsMoving() 183 | Wend 184 | Call WaitProbeReady() 185 | 'Latch Probe X 186 | Xstart = GetDRO(0) 187 | Code "F" & FRate2 188 | Sleep(125) 189 | Code "G31 X" & Dir*Latch*2 190 | While IsMoving() 191 | Wend 192 | 'Save result 193 | Res = GetVar(2000) 194 | If Abs(Res - Xstart - Dir*Latch*2) < 0.01 Then 195 | PushMSG("Error: G31 X latch finished without making contact") 196 | PushMSG("Manually return to the starting position and repeat the search") 197 | Call SetLED49(AbsIncF) 198 | SetOEMDRO(818,Ftmp) 199 | Sleep(125) 200 | Exit Function 201 | End If 202 | Code "G00 X" & -Dir*Latch 203 | While IsMoving() 204 | Wend 205 | Call SetLED49(AbsIncF) 206 | SetOEMDRO(818,Ftmp) 207 | Sleep(125) 208 | ProbeX=Res 209 | End Function 210 | 211 | Function ProbeY(Dir,DMax,Latch,FRate1,FRate2) 212 | Dim Res 213 | Dim Ystart 214 | Dim Ftmp 215 | Dim AbsIncF 216 | ProbeY=999999 217 | Ystart = GetDRO(1) 218 | Ftmp = FeedRate() 'FeedRate() 219 | AbsIncF=GetOEMLED(49) 220 | 'Fast Probe Y 221 | Code "G91" 222 | Code "F" & FRate1 223 | Sleep(125) 224 | Call WaitProbeReady() 225 | Code "G31 Y" & (Dir*DMax) 226 | While IsMoving() 227 | Wend 228 | Res = GetVar(2001) 229 | ' PushMSG("Res=" & Res &", Ystart=" & Ystart & ", DMax=" & DMax & ", FRate1=" & FRate1) 230 | If Abs(Res - Ystart - Dir*DMax) < 0.01 Then 231 | PushMSG("Error: G31 Y search finished without making contact") 232 | PushMSG("Manually return to the starting position and repeat the search") 233 | Call SetLED49(AbsIncF) 234 | SetOEMDRO(818,Ftmp) 235 | Sleep(125) 236 | Exit Function 237 | End If 238 | 'Move back 239 | Code "G00 Y" & -Dir*Latch 240 | While IsMoving() 241 | Wend 242 | Call WaitProbeReady() 243 | 'Latch Probe Y 244 | Ystart = GetDRO(1) 245 | Code "F" & FRate2 246 | Sleep(125) 247 | Code "G31 Y" & Dir*Latch*2 248 | While IsMoving() 249 | Wend 250 | 'Save result 251 | Res = GetVar(2001) 252 | If Abs(Res - Ystart - Dir*Latch*2) < 0.01 Then 253 | PushMSG("Error: G31 Y latch finished without making contact") 254 | PushMSG("Manually return to the starting position and repeat the search") 255 | Call SetLED49(AbsIncF) 256 | SetOEMDRO(818,Ftmp) 257 | Sleep(125) 258 | Exit Function 259 | End If 260 | Code "G00 Y" & -Dir*Latch 261 | While IsMoving() 262 | Wend 263 | Call SetLED49(AbsIncF) 264 | SetOEMDRO(818,Ftmp) 265 | Sleep(125) 266 | ProbeY=Res 267 | End Function 268 | 269 | Function SafeMoveX(X1, F1) As Boolean 'return 1 (error) if probe tripped 270 | Dim Xstart 271 | Dim Ftmp 272 | Dim AbsIncF 273 | SafeMoveX=True 274 | Xstart = GetDRO(0) 275 | Ftmp = FeedRate() 'FeedRate() 276 | AbsIncF=GetOEMLED(49) 277 | Code "G91" 278 | Code "F" & F1 279 | Sleep(125) 280 | Call WaitProbeReady() 281 | Code "G31 X" & X1 282 | While IsMoving() 283 | Wend 284 | XHit = GetVar(2000) 285 | Call SetLED49(AbsIncF) 286 | If Abs(XHit - Xstart - X1) > 0.01 Then 287 | SafeMoveX=False 288 | PushMSG("Error! Probe tripped during X movement") 289 | End If 290 | SetOEMDRO(818,Ftmp) 'SetFeedRate(Ftmp) 291 | Sleep(125) 292 | End Function 293 | 294 | Function SafeMoveY(Y1, F1) As Boolean 'return 1 (error) if probe tripped 295 | Dim Ystart 296 | Dim Ftmp 297 | Dim AbsIncF 298 | SafeMoveY=True 299 | Ystart = GetDRO(1) 300 | Ftmp = FeedRate() 'FeedRate() 301 | AbsIncF=GetOEMLED(49) 302 | Code "G91" 303 | Code "F" & F1 304 | Sleep(125) 305 | Call WaitProbeReady() 306 | Code "G31 Y" & Y1 307 | While IsMoving() 308 | Wend 309 | YHit = GetVar(2001) 310 | Call SetLED49(AbsIncF) 311 | If Abs(YHit - Ystart - Y1) > 0.01 Then 312 | SafeMoveY=False 313 | PushMSG("Error! Probe tripped during Y movement") 314 | End If 315 | SetOEMDRO(818,Ftmp) 316 | Sleep(125) 317 | End Function 318 | 319 | Function SafeMoveXY(X1, Y1, F1) As Boolean 'return 1 (error) if probe tripped 320 | Dim Xstart 321 | Dim Ystart 322 | Dim Ftmp 323 | Dim AbsIncF 324 | SafeMoveXY=True 325 | Xstart = GetDRO(0) 326 | Ystart = GetDRO(1) 327 | Ftmp = FeedRate() 'FeedRate() 328 | AbsIncF=GetOEMLED(49) 329 | Code "G91" 330 | Code "F" & F1 331 | Sleep(125) 332 | Call WaitProbeReady() 333 | Code "G31 X" & X1 & "Y" & Y1 334 | While IsMoving() 335 | Wend 336 | XHit = GetVar(2000) 337 | YHit = GetVar(2001) 338 | Call SetLED49(AbsIncF) 339 | If (Abs(XHit - Xstart - X1) > 0.01) or (Abs(YHit - Ystart - Y1) > 0.01) Then 340 | SafeMoveXY=False 341 | PushMSG("Error! Probe tripped during XY movement") 342 | End If 343 | SetOEMDRO(818,Ftmp) 344 | Sleep(125) 345 | End Function 346 | 347 | 348 | Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped 349 | Dim Zstart 350 | Dim Ftmp 351 | Dim AbsIncF 352 | SafeMoveZ=True 353 | Zstart = GetDRO(2) 354 | Ftmp = FeedRate() 'FeedRate() 355 | AbsIncF=GetOEMLED(49) 356 | Code "G91" 357 | Code "F" & F1 358 | Sleep(125) 359 | Call WaitProbeReady() 360 | Code "G31 Z" & Z1 361 | While IsMoving() 362 | Sleep(100) 363 | Wend 364 | ZHit = GetVar(2002) 365 | Call SetLED49(AbsIncF) 366 | If Abs(ZHit - Zstart - Z1) > 0.01 Then 367 | SafeMoveZ=False 368 | PushMSG("Error! Probe tripped during Z movement") 369 | End If 370 | SetOEMDRO(818,Ftmp) 371 | Sleep(125) 372 | End Function 373 | 374 | Function PushMSG(Str1 As String) As Boolean 375 | SetUserLabel (21,GetUserLabel(20)) 376 | SetUserLabel (20,GetUserLabel(19)) 377 | SetUserLabel (19,GetUserLabel(18)) 378 | SetUserLabel (18,GetUserLabel(17)) 379 | SetUserLabel (17,Str1) 380 | Message Str1 381 | PushMSG=True 382 | End Function 383 | 384 | Sub WaitProbeReady() 385 | While GetOemLED(825) 386 | Sleep(100) 387 | Wend 388 | End Sub 389 | 390 | Sub SetLED49(Flag) 391 | If Flag Then 392 | Code "G91" 393 | Sleep(125) 394 | Else 395 | Code "G90" 396 | Sleep(125) 397 | End If 398 | End Sub 399 | --------------------------------------------------------------------------------