|
Re: How to program a limit switch?
First off, I don't really see how you could ever get a value of less than 0 when you modify the throttle input like that. If I'm understanding correctly, the code you wrote would scale the throttle value from 0 to 1.
Regardless, though, I would use another Select to choose your output rather than a case structure. I've attached a screenshot explaining (very roughly) how I would structure this.
|