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
