Hi Ray,

sorry.. it was probably my bad that the docs turned out that unreadable :)

You can use M66 Px (where x is 0..3 with the current maximum defined in the 
source code and compiled into emc2)
P0 refers to motion.digital-in-00
..
P3 refers to motion.digital-in-03

E0 refers to motion.analog-in-00
..
E3 refers to motion.analog-in-03

so if you want to read the current value of an analog pin, you program "M66 
E2".
The further timeout and wait type are not applicable to analog pins. (if you 
need level triggering for analog values, I would suggest doing it in HAL and 
feeding the output to a bit type pin).

For digital pins you can further use M66 to wait for a special event 
happening to a pin (level-changes are what is most usefull), and it can even 
timeout (Q specifies the number of seconds to wait, e.g. Q1.5).

Hope this clarifies things a bit, let me know if it's still unclear.

Regards,
Alex


----- Original Message ----- 
From: "Ray Henry" <[EMAIL PROTECTED]>
To: <emc-developers@lists.sourceforge.net>
Sent: Wednesday, December 19, 2007 5:06 PM
Subject: [Emc-developers] m66


>
> Hi guys
>
> I'm a bit confused by the description of m66 in the user's manual.  I'm
> trying to think that the answers should be intuitively obvious but I
> can't for the life of me figure them out this morning.
>
> Let me mix questions regarding my confusion into the relevant portion of
> the current description in the user doc.
>
>     15.11        M66: Digital Input Control
>
>     To control a digital input bit, program M66 P- E- L- Q- , where the
>     P-word and the E-word ranges from 0 to an implementation-defined
>     maximum.
>
> What is, and how can a user use "implementation-defined maximum"
>
>     Only one of the P or E words must be present. It is an error
>     if they are both missing.
>         • The P-word specifies the digital input number.
>         • The E-word specifies the analog input number.
>         • The L-word specifies the wait type:
>
> How does the user specify a value for one of these? M66 P=1 or P1
> or ....
>
> What does the P or E value make reference to?
> A parport pin, a HAL pin, a ....
>
> In the case of the analog value, how is that formatted.  Integer or
> decimal or ....
>
> The rest of the description has been snipped.
>
> Now if I start skulking around in a running HAL I see
>
>     5  float IN              0  motion.analog-in-00
>     5  float IN              0  motion.analog-in-01
>     5  float IN              0  motion.analog-in-02
>     5  float IN              0  motion.analog-in-03
>     5  bit   IN          FALSE  motion.digital-in-00
>     5  bit   IN          FALSE  motion.digital-in-01
>     5  bit   IN          FALSE  motion.digital-in-02
>     5  bit   IN          FALSE  motion.digital-in-03
>
> Based on that I'd be inclined to guess;
>
>    that we have a hard coded "implementation-defined maximum" of four.
>    that P could have permissible values from 0-3
>    that a g66 P0 might look at motion.digital-in-00
>
> Now I'm really lost about what E1234.5678 might refer to and do.
>
> If I can get my head round the M66 concept I'd be happy to try and edit
> the relevant lyx file.  I must warn that I am not comfortable with this
> style of cryptic "man page" writing.
>
> Help
>
> Rayh
>
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
> 


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to