Kenneth Lerman wrote: > Here is my first guess at how I would do this: > > 1 -- First, I would "enhance" emc to support a new M code that took at > least four arguments and returned at least one variable. Lets say M999 > takes arguments N, X, Y, Z. N would be the name of an external program > to run (say N=123, then ExtFn123 would be run). The other variables > would be passed as arguments. Variable #999 (or whatever) would get the > return value. >
Is there a way of doing this without having to re-compile emc say by setting some values in an ini file or writing hal code? I havent looked at emc at all except to use it to run my steppers so this is all new to me. > 4 -- I would implement an external function (ExtFn3) that takes the > arguments X and Y and returned the Z value (in variable #999). This > function would use the file format described above. > I had a quick look at documentation for M100 - M199. Two parameters is all I require. I can write the code to read my profiles and output the depth value but can I return this value as a variable in emc? Again I dont know anything about hal. Ive quickly scanned the tutorial and saw that you could set parameter values. But thought that these hal parameters are not the same as the #5000 type variables I could use. Is this correct or am I missing something? Alan ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users