![]() |
Restricting Window Motors Number of Turn
Hi everybody,
We wonder if we can restrict our window motors number of turn in our code. Regardless how long we push the button we want the window motor to stop at some point. Is it possible to do it in our code? Thanks in advance... |
Re: Restricting Window Motors Number of Turn
You'll need some form of sensor for feedback to the controller. Options include: digital encoder, potentiometer, limit switch, magnetic sensor...
|
Re: Restricting Window Motors Number of Turn
That sensor David mentioned will tell your code exactly where the motor shaft is, and thus how many times the motor has turned. It is not terribly difficult. Your choice of sensor depends on how many turns you need to count and what your budget is.
Note that trying to do it by "dead reckoning" - that is, by guessing the motor's position according to time that it has been supplied power - will be disappointing. |
Re: Restricting Window Motors Number of Turn
Quote:
|
Re: Restricting Window Motors Number of Turn
Quote:
http://imageshack.us/photo/my-images...allholder.png/ |
Re: Restricting Window Motors Number of Turn
Quote:
Limit switches are your best bet. There are some Honeywell ones in the kit to use. One that triggers when the damper touches the holder and one that triggers when the damper is fully open. |
Re: Restricting Window Motors Number of Turn
Quote:
|
Re: Restricting Window Motors Number of Turn
Quote:
|
Re: Restricting Window Motors Number of Turn
Thank you David, Max, Don and Ether. We will try to do it without sensors because mechanics in our team are lazy.
|
Re: Restricting Window Motors Number of Turn
Quote:
|
Re: Restricting Window Motors Number of Turn
Quote:
|
Re: Restricting Window Motors Number of Turn
Quote:
Code:
while (1) {The "doSomething" would be to turn your motor on. The "sleep(3000ms)" would be how long you want to leave the motor running. The "doSomethingElse" would be to turn the motor off. The "sleep(20ms)" is there to limit how fast the code polls "run_me" while waiting for it to become true. Without the sleep, this loop would always want a slice of CPU time. That would waste resources. Make the 20ms as long as tolerable and only as short as necessary. Perhaps a knowledgeable LabVIEW person could post a code snippet. |
| All times are GMT -5. The time now is 11:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi