|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Quote:
http://imageshack.us/photo/my-images...allholder.png/ |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
||||
|
||||
|
Re: Restricting Window Motors Number of Turn
Quote:
|
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
||||
|
||||
|
Re: Restricting Window Motors Number of Turn
Keeping track in code would be harder in my mind. And electrical has control over sensors on our team.
|
|
#6
|
|||
|
|||
|
We tried to figure out how to restrict window motors and we created a while loop in the timed.vi because using while loop in the teleop.vi is not recommended. Are we supposed to put the while loop in the timed vi or in which vi should we use the while loop??? Thanks in advance!!!
|
|
#7
|
||||
|
||||
|
Re: Restricting Window Motors Number of Turn
Quote:
Code:
while (1) {
if (!run_me) {sleep(20ms); continue;}
run_me= false;
doSomething;
sleep(3000ms);
doSomethingElse;
}
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. Last edited by Ether : 12-02-2012 at 15:07. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|