View Full Version : Compressor
I am attempting to get a compressor with 2 solenoids working but it would appear I have no idea how to get it to work with labview programming at all after trying for 4 days now. Is there a tutorial on getting it to work someone can link me to or give here?
Thanks.
Alan Anderson
02-02-2012, 20:40
Is there a tutorial on getting it to work someone can link me to or give here?
When you launch LabVIEW, the first screen you see has a "Support" tab on the left side. One of the most helpful options on the Support screen is "Find FRC Examples..."
Everything you will want to look at is in the "FRC Robotics" folder. What you need right now is under Pneumatics. Look at the descriptions of the examples and determine which one best fits what you're trying to do.
Also, remember to remove the Diagram Disable Structure in Periodic Tasks.vi to allow the compressor to start. Just remove the structure - not the code inside it.
Thanks.
I know what I am looking for now, I just cannot find it. Where are the DIO and Relay channels in labview (for putting on block diagram)
I have spent loads of time trying to find it but have failed epicly...(classmate for the win :( )
Mark McLeod
05-02-2012, 23:59
DIO:
WPI Robotics Library -> IO -> Digital Input (etc)
Relay:
WPI Robotics Library -> Actuators -> Relay
Here's a menu tree (http://team358.org/files/programming/ControlSystem2009-/LabVIEW/LabVIEW-MenuTree2011.jpg) from last year (It's missing a few 2012 additions).
It might help finding some buried things.
Alan Anderson
06-02-2012, 00:07
I know what I am looking for now, I just cannot find it. Where are the DIO and Relay channels in labview (for putting on block diagram)
Are you trying to tell the Compressor Open function which channels to use? Just right-click on the terminal you want to wire to and choose "Create -> Constant" from the pop-up menu. LabVIEW will place the appropriate enumerated constant for the terminal you choose.
http://i41.tinypic.com/2duwapv.png
http://i42.tinypic.com/15myzyo.png
Those are images from my periodic tasks and begin vi.
I am not getting the compressor to work. Am I doing something wrong, or is it the wiring? I hit enable on the periodic tasks loop for the compressor and then added the code.
Mark McLeod
06-02-2012, 19:04
The code looks normal.
Do you have anything else defined as DIO 1 or Relay 1?
If the code is working correctly you should be able to produce a green LED by Relay 1 on the Sidecar when you short across the pressure sensor leads (or connect Signal to Ground on DIO1).
I am not with the robot anymore, but when I hit run in Robot Main.vi I get two error messages. Both are about being unable to locate a certain vi...I cannot remember the exact thing though....it had to do with jaguar for one and compressor for the other.
I have nothing set to DIO 1 or Relay 1 other than the compressor.
Does it matter that the Start is after the Set Refnum? I haven't played around with the compressor code at all this year, so I wouldn't know..
Also, make sure your pressure switch is wired correctly. One side needs to be hooked to ground, and the other side to the signal wire.
I don't think that would matter, but I could try changing it tomorrow.
Thanks.
Error 7 occurred at Call Library Function Node in NetComm_UsageReport_report.vi:1->WPI_MotorControlOpen Jaguar.vi->WPI_RobotDriveOpen2MotorWithJaguar.vi->Begin.vi->Robot Main.vi
Error 7 occurred at Call Library Function Node in NetComm_GetModulePresence.vi->WPI_DigitalModuleDIOCache.vi->WPI_DigitalModuleDIOAllocator.vi->WPI_DigitalInputOpen.vi->WPI_CompressorOpen.vi:1->Begin.vi->Robot Main.vi
That is the error I am getting.
Mark McLeod
07-02-2012, 18:33
That looks like an interrupted, incomplete, or partially corrupted LabVIEW installation.
Error 7 means the library files it lists are missing.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.