Go to Post 71, sponsored by Beatty, was breaking the box apart--not just thinking outside it. - Kevin Ray [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2011, 14:08
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: Event listening for a counter.

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.
Reply With Quote
  #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
  #3   Spotlight this post!  
Unread 14-02-2011, 14:21
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Event listening for a counter.

The LabVIEW interrupt vi palette is at:
WPI Robotics Library -> Utilities -> Interrupts
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 21:35
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: Event listening for a counter.

I managed to use the Interrupt vis, but came across a problem.
My algorithm is consisted of two digital inputs, each performs half of the process. Firstly I used an interrupt to have immediate responses to the first digial input. it worked great. but when I added a second interrupt for the second digital input, not only that the new interrupt didn't work, it stopped the old one from working.

Any ideas what could cause this? Is there an interrupt-limit I'm not aware of?
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2011, 18:56
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.

There is a limit of 8 interrupt inputs.

Perhaps you are putting the wait for both of your inputs in the same loop. If you do that you are waiting for both inputs, not one or the other.

-Joe
Reply With Quote
Reply


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 09:23.

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