Hello Guest it is March 29, 2024, 05:39:47 AM

Author Topic: learning to probe in Mach4 with LUA  (Read 2888 times)

0 Members and 1 Guest are viewing this topic.

learning to probe in Mach4 with LUA
« on: November 20, 2016, 09:10:51 AM »
Is the module for probing open source so I can learn how to write my own code in Lua to probe a 2D surface?  and if so how do I see the programming?
Otherwise, is Brett's module for probing still available?

Thanks
Keith

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: learning to probe in Mach4 with LUA
« Reply #1 on: November 20, 2016, 09:36:17 AM »
Hello Keith,

Yes, both the mcProbing.lua and the mcTouchOff.lua modules can be viewed in Machs editor, Notepad++, standard text editor, etc.

They will be in the Mach4Hobby\Modules directory.
;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: learning to probe in Mach4 with LUA
« Reply #2 on: November 20, 2016, 11:12:48 AM »
Fantastic!  Just putting together new components for the prototype and trying to learn Lua at the same time as figuring out all the electronics... 
Really hoping the probe routine will be better than the original linear probe approach but I don't see how probing can complete as rapidly as the linear
probe approach did.  Probing does avoid the need to program to collect data from the serial port and the probe is much cheaper than the linear probe encoder.

Appreciate the help and quick response!

Keith
Re: learning to probe in Mach4 with LUA
« Reply #3 on: November 20, 2016, 11:20:43 AM »
So I looked at the very extensive Lua code in the 2 programs.  Are these examples or are they used by the Mach4 screen for probing.  I and am not sure what is included in Mach4 probing routine as far as being able to digitize a 2D edge.  I understand touch off and tool length setting functions are there as well as some canned centering etc.  However, is edge or shape digitizing already available or is this something to develop?

Thanks
Keith

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: learning to probe in Mach4 with LUA
« Reply #4 on: November 21, 2016, 08:46:07 AM »
mcProbing is used by the probing screens. mcTouchOff has its own dialog that pops up when activated by the touch button.

No, there is no edge or shape digitizing in either of those. There are all types of single point touches though. Digitizing would be a series of those with some moves in between each touch and recording the touch positions.
;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: learning to probe in Mach4 with LUA
« Reply #5 on: December 16, 2016, 09:54:56 PM »
Chaoticone,

So I am now running my machine nicely with Mach4 and happy with motors, referencing, limit switches with automatic softlimits and now am ready to concentrate on the probing programming.

I thought the strategy might be to take a probing routine like the Single Surface Measure Y button script and then collect the X and Y measurements on a single probe the move to the next point and run it again etc.
Seemed logical but when I look at the script it uses prb.SingleSurfY function which I cannot find by searching the mcProbing script in Notepad.  I was hoping to learn about how the probing was done by examining the Lua script.   I have been looking in the mcProbing
lua module but not getting very far.

Any suggestion for what to study?

Thanks
Keith