|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||||
|
|||||
|
Re: solenoid and compressor code
Does this help: http://www.chiefdelphi.com/forums/sh...9&postcount=15 ?
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||||
|
|||||
|
Re: solenoid and compressor code
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.
Last edited by Mark McLeod : 25-02-2010 at 13:18. |
|
#7
|
|||
|
|||
|
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 |
|
#8
|
|||||
|
|||||
|
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:
|
|
#9
|
|||
|
|||
|
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 |
|
#10
|
|||
|
|||
|
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. |
|
#11
|
|||||
|
|||||
|
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... Last edited by Mark McLeod : 28-02-2010 at 19:13. |
|
#12
|
|||||
|
|||||
|
Re: solenoid and compressor code
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |