Hello Guest it is March 29, 2024, 08:40:17 AM

Author Topic: Screen Set Ideas  (Read 183787 times)

0 Members and 2 Guests are viewing this topic.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #200 on: December 01, 2014, 01:35:33 PM »
your doing good work on the screens I am just trying to save my self as I need to do 3 different screens
Re: Screen Set Ideas
« Reply #201 on: December 01, 2014, 04:34:03 PM »
Thanks but, Who is saving ME?  :P

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #202 on: December 01, 2014, 05:49:08 PM »
true
Re: Screen Set Ideas
« Reply #203 on: December 02, 2014, 10:44:00 PM »
Working on a typical gcode file for probing, uses variables passed back and forth to the screen set probing tab.
just to give you an idea.
BTW: I'm not a fan of G91 so you will hardly, if ever see that in my code, (sorry incremental is lazy coding to me) I like to know where I'm at at all times.
This is a work in process so might need some tweaking yet. Only tested in sim.

Code: [Select]
([#100] -X Probed Position)
([#101] +X Probed Position)
([#102] -Y Probed Position)
([#103] +Y Probed Position)
([#200] Estimated Diameter of hole)
([#202] Tip or Tool Diameter)
([#203] Probe X Travel Distance)
([#204] Probe Y Travel Distance)
([#206] Retract Distance)
([#225] Rough Probe Speed)
([#226] Fine Probe Speed)
([#230] Computed Diameter of hole)

([#5061] G31 X probe position)
([#5062] G31 Y probe position)

#320=[#5021] (Current machine X)
#321=[#5022] (Current machine Y)
#322=[#5023] (Current machine Z)

#323=[#4100] (machine X fixture offset difference)
#324=[#4101] (machine Y fixture offset difference)
#325=[#4102] (machine Z fixture offset difference)

#326=[#320 - #323] (machine X fixture offset)
#327=[#321 - #324] (machine Y fixture offset)
#328=[#322 - #325] (machine Z fixture offset)

#330=[#326 - [#200 * 0.7]] (X- New Position to Probe to)
#331=[#326 + [#200 * 0.7]] (X+ New Position to Probe to)
#332=[#327 - [#200 * 0.7]] (Y- New Position to Probe to)
#333=[#327 + [#200 * 0.7]] (Y+ New Position to Probe to)

g61
g90

g31 x[#330] f[#225]
#100 = #5061
g01 x[#100+#206]
g4p1
g31 x[[#100]+[#203*-1]] f[#226]
#100 = #5061
g0 x[#320]
g4p1

g31 x[#331] f[#225]
#101 = #5061
g01 x[[#101]+[#206*-1]]
g4p1
g31 x[#101+#203] f[#226]
#101 = #5061

#105 = [[#100+#101]/2]
g0 X#105


g31 y[#332] f[#225]
#102 = #5062
g01 y[#102+#206]
g4p1
g31 y[[#102]+[#204*-1]] f[#226]
#102 = #5062
g0 y[#321]
g4p1

g31 y[#333] f[#225]
#103 = #5062
g01 y[[#103]+[#206*-1]]
g4p1
g31 y[[#103]+[#204]] f[#226]
#103 = #5062

#104 = [[#102+#103]/2]
g0 Y#104
g4p1

z[#206]

#230=[[[[-#100+#101]+[-#102+#103]]/2]+#202]

g64
m30
« Last Edit: December 02, 2014, 11:40:37 PM by Ya-Nvr-No »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Screen Set Ideas
« Reply #204 on: December 02, 2014, 11:15:36 PM »
G91  ;D  So when you are using G31 you do it ALL in G90  ???

In some instances G91 is the only way to fly.   >:D

Nice screen by the way, (;-) TP

 
Re: Screen Set Ideas
« Reply #205 on: December 02, 2014, 11:18:58 PM »
In some instances G91 is the only way to fly.   >:D

Only if your a hack  :D

Thanks Terry
Re: Screen Set Ideas
« Reply #206 on: December 04, 2014, 10:46:17 PM »
Kind of liking these new Dual DRO's

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #207 on: December 04, 2014, 10:52:04 PM »
is there anything you cant do, I am stubling along just to do the scripts I wont

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Screen Set Ideas
« Reply #208 on: December 04, 2014, 10:54:45 PM »
I'm liking that too!
Re: Screen Set Ideas
« Reply #209 on: December 04, 2014, 10:57:58 PM »
Thanks, I'm trying to show what can be done and create Ideas that other fly with.  :)

Steve your the main man that's making this all possible,  8) Thanks again

this code is what was added to the PLC script, and of course had to make some additions and changes to the screen
I did add some registers to beable to pass the data to other resources.
but it takes very little to get a screen you might like.
 
Code: [Select]
   local valxinch = mc.mcAxisGetPos(inst, 0);
    local valyinch = mc.mcAxisGetPos(inst, 1);
    local valzinch = mc.mcAxisGetPos(inst, 2);
    local valadeg = mc.mcAxisGetPos(inst, 3);
    local metricConvert = 25.40007660663105

    local valxmm = valxinch * metricConvert;
    local valymm = valyinch * metricConvert;
    local valzmm = valzinch * metricConvert;
    hReg = mc.mcRegGetHandle(inst, "iRegs0/xmm");
    mc.mcRegSetValue(hReg,valxmm);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/ymm");
    mc.mcRegSetValue(hReg,valymm);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/zmm");
    mc.mcRegSetValue(hReg,valzmm);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/xinch");
    mc.mcRegSetValue(hReg,valxinch);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/yinch");
    mc.mcRegSetValue(hReg,valyinch);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/zinch");
    mc.mcRegSetValue(hReg,valzinch);
    hReg = mc.mcRegGetHandle(inst, "iRegs0/adeg");
    mc.mcRegSetValue(hReg,valadeg);

    scr.SetProperty('xdro1', 'Units', '0');
    scr.SetProperty('ydro1', 'Units', '0');
    scr.SetProperty('zdro1', 'Units', '0');
    scr.SetProperty('xdro1mm', 'Units', '1');
    scr.SetProperty('ydro1mm', 'Units', '1');
    scr.SetProperty('zdro1mm', 'Units', '1');

    scr.SetProperty('xdro1', 'Value', tostring(valxinch));
    scr.SetProperty('ydro1', 'Value', tostring(valyinch));
    scr.SetProperty('zdro1', 'Value', tostring(valzinch));

    scr.SetProperty('xdro1mm', 'Value', tostring(valxmm));
    scr.SetProperty('ydro1mm', 'Value', tostring(valymm));
    scr.SetProperty('zdro1mm', 'Value', tostring(valzmm));
« Last Edit: December 04, 2014, 11:32:20 PM by Ya-Nvr-No »