Help with Labview Compressor

frcLabviewCompressorHelp
So I’m trying to set up the compressor and solenoids for the robot, but when I build the code, I get a notification that something in teleop.vi is not wired correctly. These two things are the only things I’ve added that could have caused the error, can anyone explain what I did wrong? Thanks!

There should be an arrow in the upper left hand corner of the teleop.vi window. If, as you say there is something that isn’t wired correctly, that arrow should appear broken. If you click the broken arrow, a window should pop up that describes the error. There should also be a button on said window that will actually take you to the spot in your code that is wired incorrectly.

Double-click on the error listed in the error window hamac described and it will highlight the section of code that has the error.

I fixed that just now, but when I enable the robot I get this error now:

ERROR -44087 NetComm_CAN_Receive.vi:5470004
Complete call chain:
NetComm_CAN_Receive.vi:5470004
WPI_CAN_PCMReceive.vi:5970001
WPI_CompressorGetEnableState.vi
Teleop.vi
Robot Main.viFRC: CANSessionMux was unable to find a message matching the arbitration ID specified.

Have you opened the solenoid in the Begin VI? A screenshot of Begin VI might help.

  1. How are you “building” the code? In LabVIEW for testing purposes, you can deploy code by pressing the run arrow on the Robot Main.vi front panel or block diagram (this allows you to probe inside the code). Later, once you confirm the code works, go to the project and right-click the item under build specifications and select “Build”. Then when you are connected to the robot, “Run as Startup”. Getting this wrong won’t cause the error you’re describing but it’s just an easier way to deploy for testing.
  2. If you just want to run the compressor the whole time the robot is enabled, you don’t need any of the Compressor VIs. The compressor will work just by you opening a Solenoid.
  3. This post explains how to program a Solenoid with a joystick by starting with the examples provided with the FRC LabVIEW installation, combining the examples and finally, incorporating the example code into the robot project. How to code the Logitech joystick button in Labview?


I did this from a couple of suggestions, but I get this error:

Warning 44003 FRC: No robot code is currently running. Driver Station
Warning 0 [phoenix] Initialization is complete.
ERROR -44046 Solenoid 0FRC: The solenoid resource has already been allocated. Release the solenoid resource before allocating it again. WPI_SolenoidOpenSingle.vi
ERROR -44087 NetComm_CAN_Receive.vi:5470004
Complete call chain:
NetComm_CAN_Receive.vi:5470004
WPI_CAN_PCMReceive.vi:5970001
WPI_CompressorGetEnableState.vi
Teleop.vi
Robot Main.viFRC: CANSessionMux was unable to find a message matching the arbitration ID specified.
Warning 0 [phoenix] Shutdown cleanly

Is this image of code inside TeleOp VI? Or are we looking at the VI that you are pressing the run arrow on and this is the only code in that VI?

Teleop.vi (28.5 KB)

i added this into my Telop Drive code

OK first make a VI in your project under the Target item and put the code from the above image in it. For the purposes of that test VI, replace the Joystick RefNum Registry Get VI with a Joystick Open VI and specify the USB port. Run that and let us know if it works.

when you say make a VI under the target item, what do you mean?

Then save it in the same folder as all the other VIs in the project. And it should automatically appear in the project under Target.

Ah, I see. After I do that, how would I access this in teleop? Or would I even need to access it in there?

You will need to move it into TeloOp but first make sure it works on its own just to keep things simple at the moment. In case you’re not able to test right now. I’ll start explaining how to integrate it into TeleOp now.

so for testing i just run it using the arrow in the top corner?

Exactly.

We’ll test it now


I hit the run arrow on the Pneumatics.VI and the driver station aid I don’t have any robot code, so I’m unsure how to test it with just that file.

A few posts ago your project says the target you are deploying to is for team number 4983 but here the driver station is set for team 3337 so do you have 2 roboRIOs connected or on the say network or something?