From: Eric H. J. <ejo...@ca...> - 2008-02-20 17:01:54
|
Hi all, One thing I have never liked is having to edit the configuration any time I wanted to do an I/O checkout or certain maintenance and testing functions. I was thinking of adding an HOA (Hand Off Auto) component which could be used for this purpose. Typically an HOA 3 position switch looks something like this (pardon the poor character graphic): HAND OFF AUTO | | ________ | _________ o | o ____|____ _______o o________ The closest I have come up with has far as an implementation as a HAL component is either of the following configurations: 1>-------------------- Pins: mode bit // Low = Auto, High = Manual in0 bit // Auto mode input in1 bit // Value for out when mode = manual out bit // Output representing value based on mode 2>------------------- Pins: in bit // Auto mode input out bit // Output representing value based on mode Parameter mode s32 // 0 = Auto, 1 = Off, 2 = Hand An analog equivalent to an HOA switch could be implemented for the first option by making in0, in1 and out floats, while in the second option in and out would become floats. Any thoughts on which would be the better implementation, or even a better way of achieving the same thing? Regards, Eric |