Go to Post But before we jump to conclusions, I'll wait for kickoff and the manual. ;) - BrendanB [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
  #16   Spotlight this post!  
Unread 07-02-2010, 10:09
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,906
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 with compressor vi

The pressure switch is built in to the Compressor vi.
On the Compressor Open, one of the inputs is a constant that specifies the DIO of the pressure switch.

In Begin.vi you should both Open & Start the compressor.

Here's an example.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 07-02-2010 at 10:17.
Reply With Quote
  #17   Spotlight this post!  
Unread 09-02-2010, 16:14
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Question Re: solenoid with compressor vi

Just a question pertaining to loops, which may have something to do with soleoids: wouldn't putting loops with "waituntil millisecond" control into the TELEOP subvi cause everything above it run slow, because it is already stuck inside a while loop on the Robot Main? A NI rep told me that loops run only as quickly as the slowest object inside them, wheter waiting for an answer or a timer.

Any facts here, with a diagram?

Thanks

Last edited by kws4000 : 09-02-2010 at 16:23. Reason: grammer
Reply With Quote
  #18   Spotlight this post!  
Unread 09-02-2010, 16:28
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: solenoid with compressor vi

Quote:
Originally Posted by kws4000 View Post
Just a question pertaining to loops, which may have something to do with soleoids: wouldn't putting loops with "waituntil millisecond" control into the TELEOP subvi cause everything above it run slow, because it is already stuck inside a while loop on the Robot Main? A NI rep told me that loops run only as quickly as the slowest object inside them, wheter waiting for an answer or a timer.

Any facts here, with a diagram?

Thanks
Yes, however, I'm not sure your question belongs in this thread ...

Putting a WAIT for anything more than 20msec will cause your Teleop watchdog to starve ... there's a relatively new thread in here that shows a way to put a 1-second wait into a state machine so you don't have to stall your Teleop. It involves the use of shift registers to employ some loop-to-loop memory so you can pick a time to exit without specifically "waiting" for that time to elapse. Here's a link ... there's a diagram in the last post ...

http://www.chiefdelphi.com/forums/sh...ad.php?t=82255
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #19   Spotlight this post!  
Unread 09-02-2010, 17:20
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: solenoid with compressor vi

Thanks, I think.

Programming is hard!
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #20   Spotlight this post!  
Unread 09-02-2010, 17:20
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: solenoid with compressor vi

The NI Rep is correct. Stated differently, a loop in any of the languages in FRC will not begin again until everything in it has completed. In LV, some things in the loop are sequenced, and others can run in parallel, so the loop waits for the last element to finish.

If you want to run something inside teleop loop, such as was done in the other thread that counted for one second, use either a shift register or a feedback node to remember when the valve was opened, compare for each teleop and close when time and other conditions are right. If you want more precise timing, you can move it to a purely timed loop that isn't synched to the DS.

Greg McKaskle
Reply With Quote
  #21   Spotlight this post!  
Unread 09-02-2010, 17:55
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Question Re: solenoid with compressor vi

go to LabView Question http://www.chiefdelphi.com/forums/sh...ad.php?t=82255 , post #8. find image of where I am at in solenoid programming, teleop subvi
solenoids are looped together to act at the same time(both side of 2 end 24v Festo) and then return

Last edited by kws4000 : 09-02-2010 at 18:17.
Reply With Quote
  #22   Spotlight this post!  
Unread 10-02-2010, 15:13
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: solenoid with compressor vi

Hey,
Go to "LabVIEW Question", they answered me just fine.

Programming has so many ways of doing the same thing
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #23   Spotlight this post!  
Unread 12-02-2010, 21:09
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: solenoid with compressor vi

Quote:
Originally Posted by Mark McLeod View Post
The pressure switch is built in to the Compressor vi.
On the Compressor Open, one of the inputs is a constant that specifies the DIO of the pressure switch.

In Begin.vi you should both Open & Start the compressor.

Here's an example.
I got the air compressor working(compressor opens and starts in begin.vi), but it doesnt stop after reaching 120 psi.
In my code, i have the compressor get enabled state, in which i have a case structure connected to the the "enabled state" of the vi. If it is true, i turn the spike off, and if it is false, i turn the spike on.
Since when its true, the pressure switch should be closed, meaning that there is enough air in the pressure tank and that i need to stop air from going in, right?

However when deploying, the compressor does not stop. Am i doing something wrong?
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #24   Spotlight this post!  
Unread 13-02-2010, 09:06
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,906
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 with compressor vi

Quote:
Originally Posted by umangv620 View Post
In my code, i have the compressor get enabled state, in which i have a case structure connected to the the "enabled state" of the vi. If it is true, i turn the spike off, and if it is false, i turn the spike on.
Since when its true, the pressure switch should be closed, meaning that there is enough air in the pressure tank and that i need to stop air from going in, right?

However when deploying, the compressor does not stop. Am i doing something wrong?
You shouldn't be doing any of that. It interferes with the Compressor task.
The Compressor Start is running in the background watching the pressure switch and turning the Spike on & off.

You shouldn't have any code that tpuches the Relay or the DIO that the Compressor is now using.

Remove all that from Enabled State on.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #25   Spotlight this post!  
Unread 13-02-2010, 12:18
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: solenoid with compressor vi

Quote:
Originally Posted by Mark McLeod View Post
You shouldn't be doing any of that. It interferes with the Compressor task.
The Compressor Start is running in the background watching the pressure switch and turning the Spike on & off.

You shouldn't have any code that tpuches the Relay or the DIO that the Compressor is now using.

Remove all that from Enabled State on.
Ok, I removed that code. The only Air Compressor code I have opens it and starts it in the begin.vi and closes it in the finish.vi.
However, the pressure switch does not turn the spike on and off. The LED status was green for the duration of the air pumping.

On a sidenote, teleop keeps switching from teleop enabled to disabled. I have no clue what is causing this, and i wonder if it is affecting my deployment.

Edit: So we have confirmed that the Pressure Switch is working, but the spike is not turning off since the led next to relay 1 is green the entire time. Is this a programming error or what? Screenshots would help alot.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award

Last edited by umangv620 : 13-02-2010 at 13:16.
Reply With Quote
  #26   Spotlight this post!  
Unread 13-02-2010, 14:00
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,906
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 with compressor vi

The problem can be with the Pressure Switch or the code.
One test is to unplug the pressure switch while the compressor is running. If the Relay light goes out, then you have a bad pressure switch. If the Relay keeps going green, then I'd suspect a code problem.
Since the Spike is doing what the Digital Sidecar Relay LEDs are doing, then the wiring for that is working fine.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #27   Spotlight this post!  
Unread 13-02-2010, 14:22
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: solenoid with compressor vi

We unplugged the pressure switch while the compressor was running and the LED remained green, so it was a code problem?
I attached my Begin.vi, Robot Main.vi and Teleop.vi. Is the code wrong? The Spike, Compressor, and the Pressure Switch is apparently connected correctly.

Edit: Will upload code asap.... the Screenshots are too big for this forum.
Begin+Robot Main:
Teleop:
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award

Last edited by umangv620 : 13-02-2010 at 14:25.
Reply With Quote
  #28   Spotlight this post!  
Unread 13-02-2010, 17:31
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,906
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 with compressor vi

Quote:
Originally Posted by umangv620 View Post
Edit: Will upload code asap.... the Screenshots are too big for this forum.
If you .zip them the forum accepts larger size .zip files.
Make sure they're jpegs.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #29   Spotlight this post!  
Unread 13-02-2010, 18:09
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: solenoid with compressor vi

Well, what is wrong with our code? Do you need to see anything else?
Problem: Joysticks dont work(will explain this later) and Air Compressor does not shut off(Spike doesnt turn off) after the pressure switch opens(its normally closed, and it does open after it reaches about 120 psi)

For Joysticks:
Joystick 1 sends a signal to the both jaguars and they go in opposite directions(1 Jaguar is green, the other is blinking red).
Joystick 2 randomly sends a signal to the jaguar on the right(usually orange, randomly goes blinking red or blinking green).

With the lightbulb on, We have confirmed that pushing joystick 1 forward and not pushing joystick 2 gives the value of -1 and 0 respectively. It works vice versa also. So there is a screw-up somewhere in tank drive where the signals get mixed together or something.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #30   Spotlight this post!  
Unread 13-02-2010, 18:20
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,906
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 with compressor vi

I'd need to see your code to help much, but I don't see anything.
Are you using imageshack or something like that?
Those sites get block by our school and there's not even an indication that there is a picture in any of your posts.

Someone else will have to help with this problem...

P.S. When I get home I'll be able to see what you posted. That is if they ever let me out of this shop...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 13-02-2010 at 18:45.
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 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
1482 Help with Compressor Rinaldi 427 General Forum 7 31-01-2007 07:46
Help With Compressor Code fred Programming 6 21-01-2005 17:40
Problem with compressor Nick R. Pneumatics 3 21-02-2003 10:51


All times are GMT -5. The time now is 11:01.

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