Go to Post Here on CD, we are all one big FIRST team, mentoring each other. - Joe G. [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
  #23   Spotlight this post!  
Unread 21-10-2010, 21:47
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,858
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: How do I use interrupts?

Adding to Ether's idea, you might encapsulate the Motor speed command in a subvi all by itself that everyone calls to set that motor speed. With an optional input for the emergency stop flag.

Then the interrupt handler calls it to set the emergency stop flag (& speed to zero), while the state machine calls it for normal operation. The subvi only allows one caller at a time, so you avoid the race condition of setting the speed in two different places near-simultaneously.
In the subvi if the emergency stop flag is set, only an explicit reset allows non-zero motor speeds.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupts, Interrupts, and more Interrupts! dcbrown Programming 14 06-03-2008 23:12
How many interrupts is too many interrupts? Madison Programming 14 08-02-2008 12:09
How to use motors xmarufx Motors 9 02-08-2005 00:22
How to use Generate_Pwms() ? steven Robotics Education and Curriculum 0 01-04-2005 11:43
How did you learn how to use Inventor? Greg McCoy Inventor 26 24-05-2003 01:55


All times are GMT -5. The time now is 13:51.

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