On 6 June 2010 10:36, Viesturs Lācis <[email protected]> wrote:
> Just to make sure that we understand each other correctly - I do not > mean usual override that I control a button, which overrides current > state of M3/M5 or M8/M9 commands. > I would like to make it like a two-level controls - water jet valve > gets open only when BOTH of the buttons turn it on - I control one, > M3/M5 controls another. Water valve or abrasive valve gets closed as > soon as ANY of those buttons are engaged - either I press "my" button, > or EMC receives M5 or M9 command. Yes, that was what I was meaning. If you don't link iocontrol.coolant-flood in the main HAL file then the button won't appear. However the pin still responds to the M8 / M9 commands. If you create a pyvcp panel with a button called "abrasive" and an LED called "abrasive-is-on" for example, you can then in your postgui hal file add the following lines. loadrt and2 count=2 addf and2.0 servo-thread addf and2.1 servo-thread net ab-command iocontrol.coolant-flood => and2.0.in0 net ab-interlock pyvcp.abrasive => and2.0.in1 net ab-led and2.0.out => pyvcp.abrasive-is-on parport.0.pin-09-out Should do what you want for one pin. You need to copy the setup and use the and2.1 function for the other. http://www.linuxcnc.org/docview/html//man/man9/and2.9.html Incidentally, your previous query about joint-mode and axis-mode looks to be solvable using the halui.mode.joint, halui.mode.manual etc pins -- atp ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
