On 20 October 2014 15:22, Chris Radek <ch...@timeguy.com> wrote:

> I do not understand why motion.motion-type does not work for this.
> This is exactly the information it gives you.

It looks like it does.

Aram, all you need to do is compare the output of motion.motion-type
to something and send the output to a pin.

My impression is that you wanted a GPIO pin to go true for feed moves
and false for rapids?

I think the most flexible way to do this is with a mux, then you can
readily choose which motion types output what values.
because you want to work with bits, and need numerical selector, this
looks like a job for mux_generic.
One wrinkle is that the output of motion.motion-type is signed-int and
the selector of mux_generic is unsigned, so there needs to be a
conversion.

loadrt mux_generic config=bb7
loadrt conv_s32_u32
...
addf conv_s32_u32.0 servo-thead
addf mux_gen.00 servo-thread
...
net mode-signed motion.motion-type => conv_s32_u32.0.in
net mode-unsigned conv_s32_u32.out => mux_gen.00.sel-int
net mode-out mux_gen.00.out => parport.0.pin-99-out #Clearly there is
no such pin
setp mux_gen.00.in-bit-00 0  #mode 0, not used
setp mux_gen.00.in-bit-01 0  # Rapid feed
setp mux_gen.00.in-bit-02 1  # Straight feed
setp mux_gen.00.in-bit-03 1  # Arc feed
setp mux_gen.00.in-bit-04 0  # Toolchange
setp mux_gen.00.in-bit-05 0  # Probing
setp mux_gen.00.in-bit-06 0  # index rotary

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to