Go to Post (i would watch out for those jag's if i were you) - Scott Bahl [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 13-02-2011, 23:09
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Code Check

This is my fourth day in Labview (our Java coder decided to quit the team) so I'm just checking to see if my code looks good.

To explain a little about the bot, it runs 4 CIMs on drive, tank style with Jaguars. The bicep is controlled by two window motors that work in unison on jaguars, and the forearm is controlled by the fisher-price (so its scaled) on a vector. The minibot is deployed by the cylinder, so I'd actually like to make it so the compressor turns off for good once it comes up to pressure and I don't know how to do that. We have red and blue rope-light connected to their respective relays that turn red or blue depending upon our assignment. Do I need to turn the lights on both in autonomous and teleop?

Do we need to put our fans on a relay? The safety inspectors jumped down our throats last year when we tried to explain that we didn't need a relay on the fans, and we showed him the rules, but he didn't believe us, so we threw them on a relay.

I'm also concerned about the safety VIs, I don't know how to use them, or even if I need to use them. I'm also clueless when in comes to the error-in and error-out functions.
Attached Files
File Type: vi Begin.vi (38.9 KB, 15 views)
File Type: vi Disabled.vi (19.1 KB, 4 views)
File Type: vi Periodic Tasks.vi (17.0 KB, 5 views)
File Type: vi Teleop.vi (28.0 KB, 13 views)
File Type: vi Finish.vi (23.1 KB, 3 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2011, 23:43
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Code Check

I don't have labview at home, so i cant help you specifically, but the compressor part is pretty easy. All you need is to open a compressor in the begin vi, with the pressure switch pwm port and the relay for the spike as its inputs, start the compressor, and then give it a reference name (and finish it in finish.vi).

No code in teleop needed. The compressor will automatically start pumping when autonomous starts, and when it hits about 120 psi, it will stop. You can also preload air into your tanks before matches so the compressor won't have to run during autonomous.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2011, 23:55
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Re: Code Check

Quote:
Originally Posted by umangv620 View Post
I don't have labview at home, so i cant help you specifically, but the compressor part is pretty easy. All you need is to open a compressor in the begin vi, with the pressure switch pwm port and the relay for the spike as its inputs, start the compressor, and then give it a reference name (and finish it in finish.vi).
Thanks! Will this make it so it doesn't turn on once it goes below 95 PSI? i.e., just fill once (to save battery?)

Quote:
Originally Posted by umangv620 View Post
No code in teleop needed. The compressor will automatically start pumping when autonomous starts, and when it hits about 120 psi, it will stop. You can also preload air into your tanks before matches so the compressor won't have to run during autonomous.
I understood that you can put air in the tanks beforehand, but I thought it had to come from the same compressor, or at least the same type.
__________________
Not very outgoing or authoritative in real life, but on the internet I could be a moderator.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 02:27
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Code Check

Quote:
Originally Posted by thE_iyE View Post
Thanks! Will this make it so it doesn't turn on once it goes below 95 PSI? i.e., just fill once (to save battery?)



I understood that you can put air in the tanks beforehand, but I thought it had to come from the same compressor, or at least the same type.
The compressor Start command makes the compressor turn on when it's at about 115 PSI and off when it's about 120 PSI (not sure about the actual numbers, sorry). You can also control the relay the compressor is on directly, using the relay commands (they're in the output pallet), I'm not sure how you access the PSI gauge, sorry.

On the other hand, your battery will last. Last year, our team had a hanger driven by two CIMs and the battery held up (for about one match .) We had a compressor also. There's no real reason to have it not just stay full.

Also, the rules say that you can have energy in the form of compressed air on the robot. They say nothing about how that compressed air got there. It would be easiest, though, to just turn on the robot in the pits and have it charge up. Then replace the battery if you really need to.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2011, 08:38
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
Re: Code Check

Quote:
Originally Posted by WizenedEE View Post
The compressor Start command makes the compressor turn on when it's at about 115 PSI and off when it's about 120 PSI (not sure about the actual numbers, sorry). You can also control the relay the compressor is on directly, using the relay commands (they're in the output pallet), I'm not sure how you access the PSI gauge, sorry.
To my knowledge the pressure switch returns a DIO boolen value. I have been told by our team's pneumatics crew that a pressure switch that told told you more would be really expensive and because of some pneumatics rules would be useless anyway.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2011, 09:32
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Re: Code Check

Quote:
Originally Posted by WizenedEE View Post
Also, the rules say that you can have energy in the form of compressed air on the robot. They say nothing about how that compressed air got there. It would be easiest, though, to just turn on the robot in the pits and have it charge up. Then replace the battery if you really need to.
Don't the safety inspectors check to see if the air compressor given with the kit is 'safe' if you have any pneumatics on there?

Quote:
Originally Posted by MaxMax161 View Post
To my knowledge the pressure switch returns a DIO boolen value. I have been told by our team's pneumatics crew that a pressure switch that told told you more would be really expensive and because of some pneumatics rules would be useless anyway.
Most definitely. The switch is 100% digital. Being the coder, communications analyst, mechanic, electrician, and pneumatics guru of the team (did I get all positions that don't require talking to other people? ), I know that the switch returns a digital value, and there would really be no purpose in having an analog switch. It wouldn't be too pricey, just pointless.


Back to the ultimate question though, does my code look good?

I also noticed a Sync Group lead on the Set Output VI. Will this allow me to have those motors work in unison? If so, how do I use it?

Also, finally, Error In and Error Out. What do these do for me and do I need them? I understand they can help control which code starts first, but I thought the DevRefs would take care of that.
__________________
Not very outgoing or authoritative in real life, but on the internet I could be a moderator.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-02-2011, 23:48
thE_iyE's Avatar
thE_iyE thE_iyE is offline
Registered User
FRC #3225 (Wolverine Robotics)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2010
Location: UT
Posts: 7
thE_iyE is an unknown quantity at this point
Re: Code Check

bump
__________________
Not very outgoing or authoritative in real life, but on the internet I could be a moderator.
Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2011, 12:37
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,557
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Code Check

Quote:
Originally Posted by thE_iyE View Post
I also noticed a Sync Group lead on the Set Output VI. Will this allow me to have those motors work in unison? If so, how do I use it?
The Sync Group is only used for CAN control. It's not used for PWM control. With PWM, the motors are all updated at the same time.
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 08:12.

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