Go to Post As long as they're not destroying each other, LET THE TEAMS PLAY! - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-02-2012, 19:24
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: Solenoid not working in autonomous

here is the code. I couldn't see anything wrong with it; i hope someone can help me
Attached Files
File Type: vi Autonomous Independent.vi (53.2 KB, 39 views)
File Type: vi Begin.vi (63.4 KB, 6 views)
File Type: vi Periodic Tasks.vi (68.4 KB, 10 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 29-02-2012, 20:00
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Solenoid not working in autonomous

So which specific solenoid isn't working the way you want it to? What do you expect it to do, and what does it do instead?

You didn't show us Teleop, which you said does work. Seeing it might give us a clue as to the problem.


[edit]The Periodic Tasks vi runs constantly, even during autonomous. It looks like the Loader solenoid is going to be set Forward every ten milliseconds, regardless of what Autonomous Independent wants it to be doing.[/edit]

Last edited by Alan Anderson : 29-02-2012 at 20:13. Reason: noticed something about the code
Reply With Quote
  #3   Spotlight this post!  
Unread 29-02-2012, 20:10
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: Solenoid not working in autonomous

when i said teleop, i meant teleoperated mode (i put it under periodic tasks). It is the first solenoid under autonomous (the solenoid named "Loader") I think you can figure out what i want it to do by the code, but it isn't doing anything.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-03-2012, 15:45
mtnteam mtnteam is offline
3747 - Programmer
AKA: Steven
FRC #3747 (ChaoTech)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Minnesota
Posts: 30
mtnteam is an unknown quantity at this point
Re: Solenoid not working in autonomous

i think you can refer your problem to the problem i had

http://www.chiefdelphi.com/forums/sh...d.php?t=104048
Reply With Quote
  #5   Spotlight this post!  
Unread 01-03-2012, 21:10
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Solenoid not working in autonomous

This is happening because you are giving the solenoid a command. 100 times a second you tell it to be Forward inside Periodic. in Autonomous you tell it to go to Reverse, but then less than 1/100 of a second after that you tell it again in Periodic to go Forward, so it never had a chance to move.

You have to realize that Periodic Tasks runs all the time, even during Autonomous. Use Teleop.vi for your teleop needs, not Periodic.


A common way to update motors/actuators is to write to a global variable inside teleop or autonomous, and then read from that global variable in Periodic and update the motor accordingly.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-03-2012, 07:55
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: Solenoid not working in autonomous

ok i got it now. i didn't realize that before, so i had a local variable controlling the same solenoid, which defaults in reversing the pistons, so that would make it not work.

One more question, if you copy the time cluster from the front panel of teleop and paste it into teleop and use that to find the elapsed teleop time, would that work or is Elapsed Times.vi only writing to the one in teleop?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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