> Date: Thu, 13 Sep 2012 10:46:28 +0300
> 



        
        
        
        What I do not understand, how to implement is:

>     Client wants to define some ranges of the lengths and they want
machine to count, 
>     how many parts fall in particular range and then
save these data to a file.


I apologize if I have misunderstood your problem, 
or if you have already incorporated these engineering techniques,
but here is my "change your environment" solution :
    1. Place the object to be detected into a "V block on the bed of the DRO 
machine,
                 to position the object in a standard and known location,

    2. Use a highly modified version of "smartprobe.ngc",
                from the Example folder of EMC2 /LinuxCNC, 
                to write a file of the points of the object,

    3. Scan the file, (using "AWK" or "SED"), 
                 to identify the beginning and the end of the object, 
                        (looking for the transitions from Height = Bed -> 
Height = Object, and reverse),
    4. Calculate the length from the identified end points, Bin the parts into 
the various lengths,
                and recalculate statistics on the various Bins.

Drawback: I use SED, I do not use AWK.  I find it awkward, compared to C.
                 You have to know the height differences you are searching for, 
before writing your scanning program.
                 I suspect "smartprobe.ngc" is dog slow, based on the number of 
points to scan.
                 Each new object must have the length program verified, and 
modified.  Maybe that is job security, these days.

Improvements: A mod version of "smartprobe.ngc" would need to know the location 
of the object.
                        Put the object and the V block on a 30 or 45 degree 
angle,
                        and you might only have to probe for one surface, 
(depending on your object), 
                               and with the X-Y-Z surfaces on this same angle, 
with support,
                               you might not have to math out any trig 
distances, again, object dependant).


Thank you for putting the problem up on the forum.  I had a long day.  J'aime 
mon solution.

James Isaac.
                                          
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to