Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Window Motor Problem? (http://www.chiefdelphi.com/forums/showthread.php?t=113151)

nicholsjj 10-02-2013 02:51

Re: Window Motor Problem?
 
[quote=cdizzle;1230855]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?


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.

Kevin Sevcik 10-02-2013 09:31

Re: Window Motor Problem?
 
1 Attachment(s)
Quote:

Originally Posted by cdizzle (Post 1230855)
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 (Post 1230867)
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.

cdizzle 10-02-2013 19:50

Re: Window Motor Problem?
 
I got it working! Thanks for your help guys! I think something was overriding the reverse command, but I couldn't figure out what it was, so I just wired it to one SetMotorSpeed like you guys said to.

Kevin Sevcik 10-02-2013 20:26

Re: Window Motor Problem?
 
Quote:

Originally Posted by cdizzle (Post 1231197)
I got it working! Thanks for your help guys! I think something was overriding the reverse command, but I couldn't figure out what it was, so I just wired it to one SetMotorSpeed like you guys said to.

Just as long as you remember this and apply that design pattern to the rest of your systems so you don't have the same problem in the future.


All times are GMT -5. The time now is 02:17.

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