|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||||
|
||||||
|
Re: solenoid with compressor vi
One thing I noticed is that you're opening and closing your robot drive in teleop, plus you still have references to the default robot drive in telop. You probably have conflicts in PWM assignments doing that. You also shouldn't be opening and closing hardware like that, as telop is called 50 times per second. You should open it and save the device reference in begin. In teleop you should get the device reference and do something with it. It should be closed in finish.
|
|
#32
|
|||
|
|||
|
Re: solenoid with compressor vi
Quote:
Quote:
I guess we are just having errors somewhere when everything is being referenced. maybe some other code is screwing around the data for the references because when we use joystick references instead of just opening joysticks on a USB port, tank drive screws up(I am sure i wrote this before, but ill do it once again. When i say tank drive screws up, i mean that in light bulb mode, the joysticks are giving the correct values[joystick 1 turns left motor, joystick 2 turns right motor]. When we run the code on the robot, Joystick 1 controls both motors and joystick 2 looses control of motor 2(it regains control for half a second randomly) It would be really helpful if you could post or PM me some sample code(we dont have any examples installed in labview for some reason) that we could work off of. Last edited by umangv620 : 14-02-2010 at 00:28. |
|
#33
|
|||||
|
|||||
|
Re: solenoid with compressor vi
I can see it at home.
Your Begin.vi code looks good. The only danger is we can't see if you are opening multiple things like "USB 1" and "Drive Motors". P.S. One mistake is you open two different devices on Relay 1. Your basic Teleop.vi code looks okay too, except for what Joe commented on. The Compressor code in Robot Main.vi doesn't actually do anything. It can be removed and you wouldn't notice any difference in operation. I'd refrain from adding anything at all to Robot Main on general principle. I'm with Joe on the duplicate drive code. Without seeing the full Begin.vi it looks like you probably have a conflict where sometimes your code wins control and sometimes the default drive code you left in the False case in the top part wins control. If you're not using the default targeting code I'd recommend you just delete it from Teleop. In Begin clean up opening the drive motors twice and any multiple Opens on joysticks you might have. I'll see if I can post a cleaned up version of your code later after lunch and a trip to Lowe's for bumper plywood and aluminum tubing. Last edited by Mark McLeod : 14-02-2010 at 16:10. |
|
#34
|
||||
|
||||
|
Re: solenoid with compressor vi
we were having this same problem of the compressor turning on and then immediately off as soon as the robot was enabled. now the compressor does not turn on at all. after reading several other posts i noticed that our relay leds on our digital side car are not lighting up and the led on our spike stays orange, it has never changed colors, i've tried fliping the pwm cable around but that seems to not have made any difference. we are using the example vi from labview to try to run this compressor and cylinder. does any one have any suggestions on how to get the relay to start working?
|
|
#35
|
|||||
|
|||||
|
Re: solenoid with compressor vi
I copied your code into a new copy of the default robot project.
Robot Main.vi is left in it's original untouched state. All Opens are done in Begin.vi All Closes are in Finish.vi All uses are in Teleop.vi I got rid of the duplicate drive motors and fixed the duplicate relays. Last edited by Mark McLeod : 14-02-2010 at 18:06. Reason: Fixed the multiple PWM - thanks Alan |
|
#36
|
|||||
|
|||||
|
Re: solenoid with compressor vi
I see PWM2 being used for both the right drive motor and the camera base servo. That'll have to be fixed before Mark's code will do what is intended.
|
|
#37
|
|||
|
|||
|
Re: solenoid with compressor vi
Ok, we now have Tank Drive running in Teleop(The problem was that we didn't realize that there was Arcade drive code in the Teleop.vi which was screwing around with our tank drive. I fixed it, so its working now.
Now back to the thread. I have very minimal solenoid code in LabView atm. I have a Solenoid Get Ref outside the Robot Main loop, and a Front Panel Boolean switch wired to the Solenoid Set inside the Teleop loop in Robot Main. When we run the code(when i click on the boolean switch to go from false to true), the solenoids doesn't fire the piston-type-firing-thing(no clue what its called). We know the solenoid works mechanically because we can press the button to release the air into the piston thing, and it fires. my begin vi looks very similar to mark's code. We have the solenoid we are testing in slot 1 on module 8, so wiring is not the problem. |
|
#38
|
|||||
|
|||||
|
Re: solenoid with compressor vi
Quote:
I strongly advise you to leave Robot Main the way it started. Don't change it from its default. When you want to add code, do it in the Begin, Teleop, and Finish vi's, and maybe in the Periodic Tasks. Your solenoid code should be right next to your drive code in Teleop. |
|
#39
|
|||
|
|||
|
Re: solenoid with compressor vi
Hello All,
We've been having some problems with the compressor vi's. We've followed the solenoid with compressor example and are trying to do pretty much the same thing. We are putting the Compressor Open.vi in BEGIN and assigning a refnum to it. Then in Teleop.vi we do refnum get and inside the execute loop we have the refnum get wired to compressor start and compressor enable. We've changed around where we put the start and enable vi's- whether to go inside the loop or if they only need to be called once. When we look into the block diagrams of the open vi, it seems that this is where all the inputs get read, logic is processed, and outputs set. The other compressor vi's seem only to do monitoring and fifo stuff which we don't mess with. In the example, the compressor Open.vi is not in the loop and the only vi's in the loop seem to change the monitoring feedbacks. Where should I put the compressor Open.vi? Where are the other vi's supposed to go? DO WE NEED the other vi's? The programming manual says 'After you open a reference to a compressor, you can use the start and stop vi's...' but the block diagrams for the start and enable vi's don't have anything to do with reading DIO get or relay SET. In the Dashboard I can see the IO channel change state when I short together wires (for a long time) simulating the contact closure/opening of the pressure switch. Just outputs never get set - the relay LEDs on the sidecar don't light, spike relay doesn't change colors, and in hilight execution it doesn't show the action taking place within the compressor open.vi We ran the simple relay example successfully and our solenoids are working elsewhere in the program. any help is greatly appreciated!! Team 1268 WHS Purgolders |
|
#40
|
|||||
|
|||||
|
Re: solenoid with compressor vi
The examples have a lot of things we don't need.
As you noticed, the Enabled vi just tells us if the compressor is running or not. The necessary compressor vi's are just the Open and Start in Begin.vi. They only need to be called that one time, not repeatedly. It's also good technique to close the compressor in Finish.vi, but it's not absolutely necessary in this case. Last edited by Mark McLeod : 21-02-2010 at 00:08. |
|
#41
|
||||
|
||||
|
Re: solenoid with compressor vi
Hello, I have a similar problem. I have the same goal that involves turning the compressor on when below 120 psi and turning it off when it reaches it. The code seems to be exactly the same as the images posted. Problem is that the compressor stays on forever. What am I missing that turns the compressor off? I have attached screenshots of my code to a zip file.
|
|
#42
|
||||||
|
||||||
|
Re: solenoid with compressor vi
Is your pressure switch working and connected to DIO 14? On the dashboard, do you see DIO 14 change when the pressure reaches 120?
|
|
#43
|
||||
|
||||
|
Re: solenoid with compressor vi
Quote:
Thanks |
![]() |
| 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 |