Hello Guest it is March 29, 2024, 12:00:48 PM

Author Topic: Probing, mcCntlGet/SetPoundVar  (Read 6570 times)

0 Members and 2 Guests are viewing this topic.

Probing, mcCntlGet/SetPoundVar
« on: October 23, 2016, 05:38:31 AM »
Hallo everyone,

I try to get probing working in mach4.2.0.2914 (screen wx4.set) with basic success.
But after each "Probing->Single Surface->Measure X" for example the "Go To Work Zero" at "Program Run" does not work any more.
The reason for this is that the values of the registers #4001 and #4002 are divided by 10 witch each call to
CurAbsMode = mc.mcCntlGetPoundVar(inst, 4003) and mc.mcCntlSetPoundVar(inst, 4003, CurAbsMode).
Is this a bug or a feature ?

Build 3208 has the same behavior at this point.
Additionally in build 3208 the probing failed because the new calculated offsets are not correctly stored in the #vars.
Apparently the meaning of var #4014 has changed and function Probing.SetFixOffset in mcProbing.lua should be adapted.
Can somebody confirm this?

Thanks, Steve

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Probing, mcCntlGet/SetPoundVar
« Reply #1 on: October 24, 2016, 10:51:41 AM »
They #Vars were changed sometime back. The probing module has been updated but I'm not sure if you have the updated version. Not sure what builds it was included in if any. There was also an issue with the #Vars used to set distance modes. I know that is being looked at but not sure if it has been fixed yet or not. Will let you know when I find out.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Probing, mcCntlGet/SetPoundVar
« Reply #2 on: October 24, 2016, 03:12:26 PM »
Thank you, Chaoticone, these informations are most welcome.

Of course I can fix the lua script, but relating to #4001 and #4003, in my opinion a save and restore of a variable shall not change the value of that variable. In this case I presume the bug is located in the mach kernel itself. So "mc.mcCntlSetPoundVar(inst, 4003, CurAbsMode *10)" would fix the symptom and solves my problem with the build I use, but doesn't fix the bug itself.

Var #4014 is a different kettle of fish. With an active G54 #4014 in build 2914 is "1" and in build 3208  #4014 is equal to "54". So it looks like a different interpretation of the value. If this change is permanent the lua script has to be adapted. For this it is very usefully to know something about  the meaning of the #vars. Do you, or someone else, know whether and where the #vars are documented?

Steve
Re: Probing, mcCntlGet/SetPoundVar
« Reply #3 on: October 25, 2016, 07:52:46 AM »
Sorry, there is a typo, the following is correct: With an active G54 #4014 in build 2914 is "0.1"  ...

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Probing, mcCntlGet/SetPoundVar
« Reply #4 on: October 25, 2016, 03:12:15 PM »
I have a fix for you I think. These updates will be in the next release. You have three files in the zip you need to replace some existing files with. They are in the folders they need to be placed in respectively.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Probing, mcCntlGet/SetPoundVar
« Reply #5 on: October 26, 2016, 02:40:47 AM »
Thank you very much! I will test it next weekend.
Steve

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Probing, mcCntlGet/SetPoundVar
« Reply #6 on: October 26, 2016, 10:47:37 AM »
No problem, let me know how it goes.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Probing, mcCntlGet/SetPoundVar
« Reply #7 on: October 30, 2016, 09:24:17 AM »
Hallo Chaoticone,
it goes very well. The save/restore issue is solved and the function Probing.SetFixOffset in mcProbing.lua now works as expected, thank you.
I did some minor fixes in mcProbing.lua so now probing in all available variations operate excellently as long as G69 (no rotation) is active.

With G68 (workpiece coordinate system will be rotated) a new issue surfaces. The calculation of retract and back move destinations fail.
This is being caused by the fact, that in equations like "RetractPoint = ProbePoint - BackOff" (line 608 in mcProbing.lua), for example, RetractPoint and
ProbePoint belong to different coordinate systems. ProbePoint references the rotated coordinates i.e. the real position of the probe relative to the workpiece origin, and
RetractPoint which is used as the destination in G1/G31 will be rotated again.
I started to resolve this problem in conjunction with the retract moves by replacing the absolute moves by relative (G91G1..) ones,
so probing works now even with very small rotation angles.
For the back moves to the starting positions the solution is not as easy.
That moves still may fail when the rotation angle of G68 is bigger and the probing is not done near the rotation center.
For this I need some more time (or should be done by the developers) and a documention of the #vars would be very helpful.

Steve
Re: Probing, mcCntlGet/SetPoundVar
« Reply #8 on: October 30, 2016, 09:27:41 AM »
Ups,...
of course I want attach the changed file, here it is ...

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Probing, mcCntlGet/SetPoundVar
« Reply #9 on: October 31, 2016, 11:34:24 AM »
Thanks Steve,

I will check out your edits. I did not develop the probing module but I think it could (and probably should) be restructured.

I did develop the TouchOff module. Have you used it? If not, give it a go. We have to determine where our effort will be spent. Right now the plan (over time) is to remove the probing tab in the default screens and for the TouchOff module to become the defacto default used by those with probes and/or touch plates. My hopes for structuring it the way I did was that it would be relatively easy for users to customize to their liking but the vast majority of users should never have to. I think it does everything the probing screens do except a rapid find (double touch) and probe calibration. Both of which I may add at some point if I get time to.
« Last Edit: October 31, 2016, 11:36:03 AM by Chaoticone »
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!