|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
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. Last edited by Mark McLeod : 07-02-2010 at 10:17. |
|
#17
|
||||
|
||||
|
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 |
|
#18
|
||||
|
||||
|
Re: solenoid with compressor vi
Quote:
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 |
|
#19
|
||||
|
||||
|
Re: solenoid with compressor vi
Thanks, I think.
Programming is hard! ![]() |
|
#20
|
|||
|
|||
|
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 |
|
#21
|
||||
|
||||
|
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. |
|
#22
|
||||
|
||||
|
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 ![]() |
|
#23
|
|||
|
|||
|
Re: solenoid with compressor vi
Quote:
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? |
|
#24
|
|||||
|
|||||
|
Re: solenoid with compressor vi
Quote:
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. |
|
#25
|
|||
|
|||
|
Re: solenoid with compressor vi
Quote:
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. Last edited by umangv620 : 13-02-2010 at 13:16. |
|
#26
|
|||||
|
|||||
|
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. |
|
#27
|
|||
|
|||
|
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: ![]() Last edited by umangv620 : 13-02-2010 at 14:25. |
|
#28
|
|||||
|
|||||
|
Re: solenoid with compressor vi
Quote:
Make sure they're jpegs. |
|
#29
|
|||
|
|||
|
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. |
|
#30
|
|||||
|
|||||
|
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... Last edited by Mark McLeod : 13-02-2010 at 18:45. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |