View Single Post
  #2   Spotlight this post!  
Unread 14-02-2011, 14:15
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Event listening for a counter.

Quote:
Originally Posted by Itamar View Post
After reading your post I tried using parallel loops and it works better, but I still can't shake the feeling it would work much better if I used events.
Interrupts and events are used all the time. are you telling me it is impossible to perform in LabVIEW? Doesn't make much sense.
Using the Jaguar's limit switch inputs is the fastest available way to stop a motor and it takes no resources on the cRIO.

If for some reason you are opposed to that solution, you can use the interrupt palette in LabVIEW to connect an interrupt directly to the digital input that your switch is connected to. You then put a separate parallel loop waiting for the interrupt to occur. Then do what you need to when it stops waiting.

There is an example for how to use interrupts in LabVIEW. Look at that first.

-Joe
Reply With Quote