Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Filou on March 13, 2018, 02:52:58 AM

Title: getting NUMBERS to file not only DRO on screen
Post by: Filou on March 13, 2018, 02:52:58 AM
In the process of up-grading an old measurement system which has 3 axis and relies on out-of-date controls SW.

Is there a way to have Mach3 or Mach4 WRITE the numbers corresponding to every target position reached and assessed by encoders to a file ?
Browsed a little in the SDK forum without success (or not enough patience).

any hint is welcome. regards, Philippe
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: joeaverage on March 13, 2018, 03:46:27 AM
Hi,
yes there is a way, I've done it with Mach4 but feel pretty sure that mach3 has the same capacity. It called a Probe File.

Each time a G31 event is recorded the data is added as a new line in a file. I think  M40 opens the file while M41 closes it.

Craig
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: Filou on March 13, 2018, 05:14:10 AM
Thank you, I will have a look at it. Enjoy your day, Philippe
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: TPS on March 13, 2018, 05:56:09 AM
in Mach3 you can wite every avaliable Information into a file by VBscript.

Example:

   'open the file for output data
   FNum = FreeFile ' Determine next file number.
   FName = "C:\Mach3\GCode\myfile.nc"
   Open FName For Append As FNum ' Open file.
   Print #FNum, cStr(GetDro(0)) & "," & CStr(GetDro(1)) & "," & CStr(GetDro(2)) 
   Close ' Close all files.

this can be trigged  by many different way, button on Screen, Mcall in GCode or via digital Input.

i have no experiance in M4, but i think there are simular possibilitiys.
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: RICH on March 13, 2018, 07:12:52 AM
As TPS replied you can get  the locations the DRO represents , but, depending on what what was used to locate the locations you will need to manipulate the data.

One may not use Mach as a measurement system often but surely is handy to have for
the times you need it. May want to consider what I did for both the mill and the lathe.

Create a wizard or add a screen page for measuring. It should be generic so that you can use any probe/tip/pointing device/ camera etc for doing it manualy or automaticaly. That allows the range from quick and dirty to precise measurements with the ability to modify prior to saving it based on the device used.Output of measurement should provide choice of data format. Take it up another level and have the ability to create a DXF file or actualy draw the points or create lines and arc's in CAD from them.

RICH
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: Filou on March 13, 2018, 08:32:52 AM
Thank you TPS and RICH,

I agree, it may sound a bit crazy to use Mach 3 or 4 or equivalent to "measure". The idea pops up in the context of an upgrade of a 30 years+ old machine that runs on hard to maintain controls SW.  The machine is intended to measure and not to machine anything. It has 4 axis, and does not need to run fast. Since Mach3 / 4 / equivalent provide all the tools needed to move axis around using a widespread language, why not use this tool box. All we need is a clean way to record the positions of the axis + a few other values that are acquired synchronously with separate electronics equipment.  Trigger signals should be available.

I'm investigating this before engaging into a a more involved "from scratch" approach.

regards, Philippe
Title: Re: getting NUMBERS to file not only DRO on screen
Post by: RICH on March 14, 2018, 06:46:32 AM
Note that measurements with any CNC machine will only be as accurate as that "machines system".
The probed objects surface finish, shop conditions etc  also come into play.
One needs to test for repeatability, accuracy and consider all the conditions associated with measuring something.
Just because the software can give you a location to a very small number does not necessarily mean that the number is really indicative of the true value.

Have fun,

RICH

Title: Re: getting NUMBERS to file not only DRO on screen
Post by: Filou on March 14, 2018, 05:29:22 PM
Good evening Rich,

You are absolutely right !  I'm well aware of the fact that using a CNC-like rig to perform measurements is more than a weird approach !

My background is "measurement", rather than "machining".  I have some feeling for the need to add , as a minimum, all the error contributions in quadrature to have a coarse idea of the total error budget. The "old" system can reproduce its position within a volume of 50 x 50 x 50 micrometers ^3.  This number is validated with an optical laser tracker survey instrument. The absolute position (in the 2 m x 3 m x 0.8 m volume)  is in the 80-100 microns range, owing to the fact that the laser tracker error contribution is around 25 microns.  The whole rig must move. We should blow dust off, and try to up-grade what can be. New encoders, perhaps new servos using a safer "inhibit" functions, and get rid of a "silly" controls SW. We have, in theory, internal resources to re-write all the SW, but since CNC controls technology is around and provides some sort of "standard" to move 4-5 axis around in space, why not use it. This is an attempt to think out of the box, not sure we will implement all these concepts, but at least we should envisage all the possibilities.

Regards, Philippe