Guys, I got it functioning perfectly, exactly like I would want. 1) If the manual coolant switch is selected, coolant is on whenever spindle is on. 2) If the manual coolant switch is not switched, EMC (G code, F, GUI button) can turn coolant on and off as it wishes.
What I would really like however, is to be able to refer to things by name and not by and2.1.out. Can I do that? # This "and" says: if FLOOD ON switch is on FLOOD and spindle is on... addf and2.1 servo-thread net ManualFloodIn1 and2.1.in0 <= ppmc.0.din.06.in # FLOOD ON manual switch net ManualFloodIn2 and2.1.in1 <= motion.spindle-on # this or says: if FLOOD ON && spindle ON... addf or2.0 servo-thread net AllFloodIn1 or2.0.in0 <= and2.1.out net AllFloodIn2 or2.0.in1 <= iocontrol.0.coolant-flood net AllFloodEnabled ppmc.0.dout.03.out <= or2.0.out # Turn on coolant # Explanation: turn flood on if either EMC requests it (GUI button, or G code), # or if the MIST/FLOOD switch is on FLOOD and spindle is running. On Fri, Jul 30, 2010 at 10:03 AM, Chris Radek <[email protected]> wrote: > On Fri, Jul 30, 2010 at 09:47:43AM -0500, Igor Chudov wrote: >> Great. Would anyone suggest how to do it with HALUI? Just trying to >> get started with Halui. >> >> Here are the requirements again: >> >> Here are my requirements: >> >> 1) If flood is set to ON on the maintained switch, then maintain flood >> coolant whenever spindle runs. >> 2) If flood is set to OFF, then just do as G code says or according to >> a GUI input. >> >> thanks > > I don't think you need halui for this. You have HAL pins for > spindle on, and emc requesting coolant. You will also have an input > pin of some kind that represents the state of your switch. > > So the logic you need in HAL is > > emc coolant request OR (spindle on AND switch on) -> coolant pump > > There are lots of ways to do this in HAL. You could use or2 and > and2 components, or the logic component, or classic ladder. > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://p.sf.net/sfu/dev2dev-palm > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
