I had to write a component recently had incorporated "edge functions" - I just looked at the code for the edge function and incorporated that concept into my custom component.
Basically the edge function remembers the last state and when the state changes, ( the current state is not the same as the remembered state) that is the edge detection. I used that idea to implement an up/down component so I could bump a value up and down between two limit values via two push buttons on a custom Glade screen. I can post the component code if you would like to see it. It is very simple. I looked at the tri-state comp functions and although I understand what a tri state is, I didn't see it as really being very useful. I think it might be a lot simpler to incorporate that kind of logic into a custom component instead of messing about with pin assignments on that level. Dave On 4/27/2012 12:35 PM, Viesturs Lācis wrote: > 2012. gada 27. aprīlis 18:45 andy pugh<bodge...@gmail.com> rakstīja: > >> You probably needed a oneshot linked to the output of your and5. >> > Hmm, and then next time oneshot would output a signal would be, when > and5 output had rising edge, respectively, at least one joint was > unhomed and rehomed. > This one really _should_ work! > Uhhh, all the great things are so simple... > The user still would have a chance manually switch to joint mode, if > that is really needed. Excellent, this one would help on "forgot to > switch to world mode after homing" problem, which I myself have > encountered more than once. > > >> (actually, if you are creating an and5 then you could code that so >> that it only outputs the signal for a brief period after all inputs >> are true and then enters a non-writing state. oneshot drives the >> outputs every cycle, which might not be what is wanted) >> >> > In theory yes, in practice - ummm... It is not that hard to open > and2.comp file, add 3 lines for input pins and add those 3 pins on the > line that defines condition of the output. But that "non-writing > state" is something I am not sure I have ever seen, not to speak of > actually coding that by myself. I could copy part of oneshot code to > make limited duration of the output pulse, but I have no idea, how to > tell it - do it only once... > > Viesturs > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers