Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   TImed Sequence help (http://www.chiefdelphi.com/forums/showthread.php?t=125169)

katsauga 24-01-2014 15:47

TImed Sequence help
 
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

Re: TImed Sequence help
 
Quote:

Originally Posted by katsauga (Post 1331767)
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

Re: TImed Sequence help
 
I have not created a false statement yet. And no, it does not complete the timed sequence

notmattlythgoe 24-01-2014 15:55

Re: TImed Sequence help
 
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

Re: TImed Sequence help
 
It now completes the timed sequence, but, the timing is all off.

Alan Anderson 24-01-2014 16:08

Re: TImed Sequence help
 
Quote:

Originally Posted by katsauga (Post 1331767)
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

Re: TImed Sequence help
 
Is motor safety enabled for motor1?

katsauga 24-01-2014 16:09

Re: TImed Sequence help
 
So I should turn the MotorSafety off?

RufflesRidge 24-01-2014 16:09

Re: TImed Sequence help
 
Also make sure you're not trying to control Motor 1 in your Teleop code.

katsauga 24-01-2014 16:12

Re: TImed Sequence help
 
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

Re: TImed Sequence help
 
Quote:

Originally Posted by katsauga (Post 1331782)
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

Re: TImed Sequence help
 
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

Re: TImed Sequence help
 
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

Re: TImed Sequence help
 
Alright, Thank you for your help


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

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