Go to Post I believe that those who have a clear understanding of their capabilities, both physical and financial, and design and build within those capabilities are the teams that succeed. - Daniel_LaFleur [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 12-02-2011, 01:18
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Event listening for a counter.

Quote:
Originally Posted by Itamar View Post
more efficient?
I don't believe explaining the algorithm is neccessery right now. Basically, I would like to stop a motor from running the moment a microswitch is clicked.
This is normally a very easy task to accomplish, but my code has many other VIs to run and take care of, so I wanted to try using events of interrupts.
So this is not really about efficiency, it's more about how much time it takes for the motor to stop, and I believe that by using an event the response would be immediate.
With parallel loops, it doesn't have to run all the code before going onto the next loop, which would provide fast stopping for the motor. Just put the speeds of the motors in a global variable and ship it over to periodic tasks. You can also read the sensor in periodic tasks.

And yes, if your switch is normally closed, wiring it straight up to the jaguars is much easier (and safer!) assuming you don't ever want to go past the limit switch (it is limiting...)
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi