01-23-2011 12:24 AM
when i use a case structure with a notor set output the assigned button won't actavate the motor. what am i dooing wrong?
01-23-2011 08:11 PM
When you say the assigned button won't activate the motor, does that mean you have Joystick button hooked up to the case structure? When you say activate the motor do you have values going into the motor? Is it in the "True" case? Could you post a JPG of a Vi? We need a little more info to figure this out.
Thanks
Joe V
FIRST Team 704 mentor
01-23-2011 11:52 PM
yes here is a portion of the code
01-24-2011 12:23 AM
Your screenshot uploaded too small to really see what you're doing, but here are a few general suggestions. First, use the LabVIEW debugging tools to see if you are properly checking the state of the joystick button. Probe the wire going to the case structure - click on the wire while the code is running, then press the button and look at the probe. Does it respond?
Second, be careful about putting on-off actions inside case structures. Let's say you have a case structure that turns on a motor in the true case, and nothing in the false case. You wire that to the joystick input. Now, when you press the button the motor turns on, but it never turns off when you release the button because you don't have anything inside the false case. If this is what you're doing, you should eliminate the case structure and connect the joystick output directly to the motor input.