View Single Post
  #8   Spotlight this post!  
Unread 10-02-2013, 09:31
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,713
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Window Motor Problem?

Quote:
Originally Posted by cdizzle View Post
Wait, so if I set my motor speed to 0 when false in the case block for button 3, will it affect the motor when the button 4 case block is true?
Quote:
Originally Posted by nicholsjj View Post
No it should just affect the output from case three. My next question is are you sending both button outputs into the same motor set output vi. This might be where Kevin's statement about overriding can occur if you use two different vi's.
If you have two completely separate case blocks for button 3 and 4, then yes, the false case in the button 3 block will affect button 4 even if button 4 is true. See my attached snippet. The top two show the cases in the case blocks. The bottom shows what will run when button 3 is false and button 4 is true. Both of those case blocks will run, which means you're trying to set the motor speed to 0 and set the motor speed to 0.9 at the same time. The results of trying to set the motor to two different speeds simultaneously are not particularly predictable.

Cecil's suggestion of putting the motor set block outside of the cases is also a good one. Then you know that you only have one motor set and it's only going to run once. Then you just have to figure out how to send it the appropriate value. It makes it pretty obvious if your value selection method isn't valid because you'll end up trying to wire two thing to the same input, which labview will complain about.
Attached Thumbnails
Click image for larger version

Name:	Bad Motor Snippet.png
Views:	12
Size:	30.3 KB
ID:	13914  
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 10-02-2013 at 09:48.
Reply With Quote