https://lh5.googleusercontent.com/yLku5zLxe_cvGgjQHDecQ2R6ATAWJtUePUO6QZBb7BxXtB6D5qXMe_tr6qnRxnCGnA=w1254-h520 I am testing a timed sequence for our ball launcher, but it appears my code isn’t working. Every time we press the button, motor clicks on for just a split second, then turns back off. Could someone review my code and tell me where I messed up?
What does the false part of the statement look like? If you hold the button down does the timed sequence complete?
I have not created a false statement yet. And no, it does not complete the timed sequence
I haven’t done any labview programming for a few years, but why not just take the output directly from the button into the case block?
It now completes the timed sequence, but, the timing is all off.
How is Motor1 being created? If it has the motor safety enabled, it will act as you describe because you’re only setting it once. The motor safety will shut off a motor if it doesn’t get an explicit command at least every 100 milliseconds.
Are you seeing any errors reported in the Driver Station diagnostics window?
Is motor safety enabled for motor1?
So I should turn the MotorSafety off?
Also make sure you’re not trying to control Motor 1 in your Teleop code.
It was the Motor safety, thanks! I did’t realize that is what it did! Thank you for your help!
No, you should answer the question first. Show us the part of Begin.vi where you open Motor1. Then we can ask more questions to lead you to the most appropriate solution.
And RufflesRidge has a good point. Do you control Motor1 anywhere else in your program?
I have already removed it from the teleop.vi , before this. I suspected that might have been an issue. It is working now though. So you would like me to post a screen shot?
If it’s working, you probably don’t need help getting it working.
Unless you have more questions about something, there’s no need to post your code now.
Alright, Thank you for your help