Go to Post We built an ineffective machine, all by ourselves! Yay for us! - Alan Anderson [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 24-02-2010, 16:03
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
solenoid and compressor code

I have checked out the example in labview of solenoid and compressor vi. It is doing what I want and i have been able to deploy it by itself. I was wondering if anyone could give me some hints on how to incorporate that within the default arcade program i am running.

thanks Much
Reply With Quote
  #2   Spotlight this post!  
Unread 24-02-2010, 16:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: solenoid and compressor code

Does this help: http://www.chiefdelphi.com/forums/sh...9&postcount=15 ?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 24-02-2010, 21:00
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: solenoid and compressor code

so do i just need to set up the begin vi file like you show in the screen shot
and it should work?
I also have the solenoid set up with control on the joystick trigger in teleop and autonomus.

the solenoid and compressor is quite a bit different than your screen shot,
does that matter?
thanks much John
Reply With Quote
  #4   Spotlight this post!  
Unread 25-02-2010, 10:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: solenoid and compressor code

In Autonomous you don't want to use a joystick trigger. There are no joysticks in Autonomous. The Drivers stand back from the controls about 4 feet. You'll want to trigger the solenoid (Create -> Constant) at a certain time or if you have a sensor that detects when a ball is in range of your kicker.

The compressor should be just as it's shown in the Begin.vi I posted.
If yours is significantly different you should post a photo or tell us what differs.

The solenoid action can be quite a bit different. There are lots and lots of ways to handle that.

Quote:
Originally Posted by johncap100 View Post
I also have the solenoid set up with control on the joystick trigger in teleop and autonomus.

the solenoid and compressor is quite a bit different than your screen shot,
does that matter?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 25-02-2010, 13:09
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: solenoid and compressor code

thanks for the info, yes i don't have the solenoid actuated with the trigger in autonomous, only in teleop.

so i only need to place the compressor in the begin vi, not in the teleop portion of the robot main vi?

thanks john
Reply With Quote
  #6   Spotlight this post!  
Unread 25-02-2010, 13:14
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: solenoid and compressor code

Quote:
Originally Posted by johncap100 View Post
so i only need to place the compressor in the begin vi, not in the teleop portion of the robot main vi?
Yes, the compressor Start in Begin.vi actually spins off a background task that keeps monitoring the pressure switch and turning the compressor on & off as necessary, either in Autonomous or Teleop. Whenever the robot is disabled it won't be allowed to run the compressor, but it'll be trying it's best.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 25-02-2010 at 13:18.
Reply With Quote
  #7   Spotlight this post!  
Unread 25-02-2010, 16:35
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: solenoid and compressor code

ok so I set up the compressor like you had it in your begin vi. I deployed it but two things occurred, the compressor started when i enabled the teleop on the drivers station, but it did not shut off in response to the nason switch.
also i noticed that the arcade driver did not work, is that what will happen until the nason switch shuts off the compressor?, I am guessing that the arcade did not work because the compressor did not shut off?

In your begin vi where is the compressor supposed to react to the pressure switch. I put the pwm from the pressure switch into the slot 1 on the side car as instructed in the example of solenoid and compressor.

so what should i do next ?
thanks john
thanks John
Reply With Quote
  #8   Spotlight this post!  
Unread 25-02-2010, 22:29
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: solenoid and compressor code

Arcade has nothing to do with the compressor. That's going to be something else.

What's the highest pressure the gauge reads?
It should turn off when the pressure reaches 120psi.

The pressure switch tells the code when to turn the compressor on and when to turn it off. You can verify correct compressor operation by:
  • Disconnecting one of the wires from the pressure switch - the compressor should turn off.
  • Touch the loose wire directly to the other wire that's still connected and the compressor should come on.
In Begin.vi you specified where the pressure switch is plugged in as well as where the compressor Relay is plugged in. Verify that both are in the right spots. If you used the default values those will be:
  • Pressure Switch = Digital IO #1
  • Compressor Spike = Relay #1
The Start does the actual constant checking of the pressure switch. You can double click on that icon to drill down and see how it works.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #9   Spotlight this post!  
Unread 26-02-2010, 13:31
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: solenoid and compressor code

ok i got everything working, i simply used your begin vi and got rid of any references to the compressor in the teleop, thne in the finish, i put the close reference, works good now
thanks john
Reply With Quote
  #10   Spotlight this post!  
Unread 28-02-2010, 17:48
jman1783 jman1783 is offline
Registered User
FRC #2900 (Mighty Penguins)
Team Role: Engineer
 
Join Date: Dec 2009
Rookie Year: 1999
Location: Arlington, VA
Posts: 14
jman1783 is an unknown quantity at this point
Re: solenoid and compressor code

Do we have to put the code in the begin and finish VIs? We have our compressor code working with the code in the teleop VI (not using autonomous mode), but we can't get our solenoid code working.

I'm not quite sure where to open the compressor, solenoid, and joystick VIs.
__________________
"Just remember - whether you think you can or you think you can't, you're right." -Stewart Gilligan Griffin
Reply With Quote
  #11   Spotlight this post!  
Unread 28-02-2010, 18:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: solenoid and compressor code

All Opens belong in Begin.vi

They definitely do NOT belong in teleop.vi -- or else you get 50 Opens per second resulting in 6,750+ Opens for each device, and heaven help you if you didn't Close them too...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-02-2010 at 19:13.
Reply With Quote
  #12   Spotlight this post!  
Unread 28-02-2010, 21:34
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,112
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 and compressor code

Quote:
Originally Posted by Mark McLeod View Post
All Opens belong in Begin.vi

They definitely do NOT belong in teleop.vi -- or else you get 50 Opens per second resulting in 6,750+ Opens for each device, and heaven help you if you didn't Close them too...
They could go in the Init case of Teleop, but it really does make sense to put them all in Begin. That way they'll be available to the entire program, including Periodic Tasks and Autonomous.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
solenoid with compressor vi ElanaC NI LabVIEW 42 29-12-2010 13:38
Solenoid Wiring and Compressor Help BurtGummer Electrical 16 17-02-2010 14:25
How to program solenoid and compressor? Jason F Java 8 08-02-2010 15:15
Question about Solenoid and default code waialua359 Control System 4 21-01-2006 18:21
Default code and the Compressor Matthew_H Programming 16 07-02-2005 07:19


All times are GMT -5. The time now is 04:47.

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