View Full Version : TImed Sequence help
katsauga
24-01-2014, 15:47
https://lh5.googleusercontent.com/yLku5zLxe_cvGgjQHDecQ2R6ATAWJtUePUO6QZBb7BxXtB6D5q XMe_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?
notmattlythgoe
24-01-2014, 15:52
https://lh5.googleusercontent.com/yLku5zLxe_cvGgjQHDecQ2R6ATAWJtUePUO6QZBb7BxXtB6D5q XMe_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?
katsauga
24-01-2014, 15:53
I have not created a false statement yet. And no, it does not complete the timed sequence
notmattlythgoe
24-01-2014, 15:55
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?
katsauga
24-01-2014, 16:03
It now completes the timed sequence, but, the timing is all off.
Alan Anderson
24-01-2014, 16:08
Every time we press the button, motor clicks on for just a split second, then turns back 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?
Joe Ross
24-01-2014, 16:09
Is motor safety enabled for motor1?
katsauga
24-01-2014, 16:09
So I should turn the MotorSafety off?
RufflesRidge
24-01-2014, 16:09
Also make sure you're not trying to control Motor 1 in your Teleop code.
katsauga
24-01-2014, 16:12
It was the Motor safety, thanks! I did't realize that is what it did! Thank you for your help!
Alan Anderson
24-01-2014, 16:13
So I should turn the MotorSafety off?
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?
katsauga
24-01-2014, 16:19
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?
Alan Anderson
25-01-2014, 23:23
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.
katsauga
26-01-2014, 13:42
Alright, Thank you for your help
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.