On Tuesday 31 October 2017 21:20:22 Chris Albertson wrote: > Can you convert the gear position to a number, either 1.0 or 0.0 > Thats easy enough.
> Now you one need one PID, no MUX. Multiple each parameter but ehvalue > of the switch or not-switch > > P = Int(SW)*Plow + int(not(SW))*Phigh But this is code that would need to be halcompiled. It doesn't look like anything hal is known to be able to do. However, a sum2 has a scale pin per input pin, so one can do math with it, and that thought has also crossed my mind. The are numerous ways to skin this cat, all of which are fatal to the cat. :) I'm in favor of whatever works. :) > In the above one of the two terms is zero. Which one that is bends on > the value of SW. Thanks Chris. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
