Alex Joni wrote:

I think what Bruce is looking for isn't necessarily reading inputs which
are available through HAL, but things like:
Is the computer still doing non EMC tasks which could influence EMC?
Did the user confirm some dialog?
And other things that are not available through HAL.
I know my examples are somewhat lame, but I think you know what I am
thinking of. Giving back values from user defined M-codes would help on
other occasions, too.
Perhaps it would be possible to "grab" two (or more) named or numbered
parameteres which are set by the M-code scripts/programs via printing to
  STDOUT, something like
#5050: 1
#5051: 2.5
Or something like that.

Oh, and I would find it great if I could pass at least three parameters
to an M1xx script (i.e. a set of x-y-z-coordinates - other might like to
pass up to 9 paramters: all axes' positions, current or calculated from
some input).

cu,
Sven

> You can use M66 as described here: 
> http://www.linuxcnc.org/docview/2.2/html/gcode_main.html#sec:M66:
> 
> In TRUNK (latest CVS) analog inputs also work, in the 2.2.x version only 
> digital inputs.
> 
> (maybe this counts as a bugfix, as the code doesn't match the docs.. if 
> jeff's ok with this, I could backport it to 2.2.x)
> 
> Regards,
> Alex
> 
> ----- Original Message ----- 
> From: "Bruce Madigan" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, November 16, 2007 10:01 PM
> Subject: [Emc-developers] return values from user-defined M codes
> 
> 
>> Is there a mechanism to obtain return values from user defined M codes?
>> For example, if M101 could obtain information about something that is
>> not easily incorporated into the EMC system, but is readily obtained via
>> something like a shell script, the execution of the ngc program could be
>> controlled easily
>>
>> .
>> .
>> .
>> #10=1.0          (#10 phase of the moon)
>> #11=234          (#11 day of year)
>> #12=0.0          (#12 present safe to move value)
>> #13=123          (#13 safe to move threshold)
>> .
>> .
>> .
>> O1001 while [#12 LT #13] (while not safe to move)
>> #12=M101 P#10 Q#11
>> O1001 endwhile
>> .
>> .
>> .
>>
>> Thanks,
>>
>> Bruce Madigan
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Emc-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>>
>>
>> -- 
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.5.503 / Virus Database: 269.15.33/1133 - Release Date: 
>> 11/15/2007 8:57 PM
>>
>>
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to