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.

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 :frowning: )

DIO:
WPI Robotics Library -> IO -> Digital Input (etc)

Relay:
WPI Robotics Library -> Actuators -> Relay

Here’s a menu tree from last year (It’s missing a few 2012 additions).
It might help finding some buried things.

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.

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.

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.

That looks like an interrupted, incomplete, or partially corrupted LabVIEW installation.

Error 7 means the library files it lists are missing.