The basic result of our problem is that introducing the new compressor control loop vi to the begin.vi code prevents anything from running (mostly just the joystick controls, at this point in our code), but the compressor will only run if the control loop is introduced.
Begin.vi:
teleop.vi:
The error message we’re currently receiving:
This current error message isn’t what I was originally intending to post about, so I get the feeling that this one is just due to some silly oversight. The main error we were trying to deal with (which I couldn’t get a screenshot of because we started getting this new error) should be this one (but I can’t be 100% sure that it was this exactly):
ERROR <Code< -44061 occurred at “Robot Drive [see our teleop code]” in the VI path: Robot Main.vi FRC: The loop that contains RobotDrive is not running fast enough. This error can occur if the loop contains too much code, or if one or more other loops are starving the RobotDrive loop.
I’ve seen this error code talked about in my google searches, but not in relation to the compressor control loop. We’re brand new to labview would be greatly appreciated.
The compressor control loop should not be called in Begin. It should be called in periodic tasks, where it won’t block anything. There is already an example of it in periodic tasks.
To give a little more detail and explain why Joe is correct, the Compressor Control Loop vi never terminates. Putting it in Begin means that the Begin vi never terminates. Robot Main waits for Begin to be done before starting up pretty much everything else.
Did you ever get your compressor working? We can’t even get the Spike Relay example to work not to mention compressor (which uses a Spike relay). Same errors.
Where is this example? We had some issues with our compressor and were wondering if the compressor control loop is needed, because right now we don’t have it anywhere.
We ran the the “Solenoid with Compressor Example.vi” and when we would enable the robot the compressor would turn on for less then half a second and then shut off. We could disable and the same behavior would repeat when we enabled. We verified that our all of our components where hooked up properly (we checked the spike, digital I/O port, compressor, etc). We got the following error message:
ERROR <Code> -44040 occurred at WPI_RelayCache.vi>>WPI_RelaySet.vi>>WPI_CompressorControlLoop.vi>>Solenoid With Compressor Example.vi
<time>00:02:03 01/01/1970 FRC: The relay index is invalid.
We used Digital Module 1, Relay 2, DIO 2. The example shows the correct wiring on the front panel and we followed it exactly. In past years we have an no problems with the compressor, so this was particularly confusing.
So do we just need to add the new Compressor Control Loop vi?
Ok I have read and read, here, NI site, labview help, everyone seems to know about the compressor s/w change. I have read the labview what’s new for 2012 and they reference the compressor and camera changes, and say see examples and periodic tasks, that thank you now we see.
but since we can’t make the solenoid with compressor example work, the compressor comes on for what seems like 1 execution cycle and stops, we are thinking there is still something here we don’t understand.
is there some place that is compressor s/w change is full documented?
also i am assuming that when you enable the diagram for compressor_control, you still need a while loop for your compressor enable vi. is that still the way to code periodic tasks?
No compressor Enable is required.
No loops or addition code necessary.
If your code looks like below, then you might have an electrical issue stopping your compressor so abruptly.
I’m curious to know how many teams have been able to get the compressor to work with the given code. I’ve been helping two teams, neither of which have gotten their compressor to work with the given control loop.
We ended up making our own compressor control loop, which works every time.
I can share it, but I want to get some feedback on the given code first.
Our problem has been registry get errors, or something like that. We use the same inputs and outputs in our own code and get zero errors, plus the compressor works every time.
That looks correct, and it’s worked for me when I’ve used it.
Your Driver Station reports the cRIO image version to be v43?
No conflicts for DIO 1 or Relay 1?
Team 1410 apparently fixed their “relay index is invalid” problem by using a good 37-pin cable between the cRIO digital module and the Digital Sidecar. I don’t know why that would make a difference, unless the faulty cable was somehow keeping the module from working.
It was the newest version, not sure which. It was last weekend when we messed with it. I setup the cRIO for them using the latest software though.
We did have one of the bad cables, and the electrical guy tried to fix it, but ended up breaking one of the clips that holds the connector together. We’re using one of the old ones from last year now, so no worries there.
Anyway, we’re using this code right now, which works perfectly.
Begin.vi
Periodic Task.vi
Finish.vi
I’m assuming this is legal for use in competition as long as we can demonstrate that the compressor shuts off at ~120PSI, and we have the pressure relief valve installed. I’m not going to lie. I skimmed the rules when they first came out. Being a college mentor is hard. I dedicate what time I have to help out the teams I mentor. I don’t remember any of the rules saying you have to use their compressor code, but I’m not 100% sure.
Team 3711 has just run into the same message . Our code looks exactly like that shown above for all three vi’s. And we’re getting the invalid relay index message (and “invalid” indications in the control loop vi front panel)
Modules are set to the default of 1. Both the pressure switch and spike PWM are in the number 1 slots. We’ve replaced PWM cable and spikes. The spike gets a continuous orange(ish) light and receives no signal.
If someone does have a workaround we’d love to see it since we’re testing pneumatics on the robot using a manual switch at the moment.
Thanks very much.
Use your code that works.
There’s nothing sacred about the custom vi. It’s just easier to work with common code if we’re helping someone.
It adds some extra complexity in it’s design to handle multiple compressors, but serves as an interesting example of doing that.
It’s time for a little library decomposition to see where the sensitivities may lie.
Is a puzzlement. Can you post your code so we can go through it in detail, looking for anything that isn’t quite right?
Both the pressure switch and spike PWM are in the number 1 slots.
I think you’re talking about the 3-pin connections on the Digital Sidecar, but in case you’re talking about the cRIO module, that needs to be in the number 2 slot.
Thanks again for your help on this. Yep, the slots referred to were in the sidecar. We have now created a new compressor while loop in the periodic tasks VI per the code given earlier in this thread and everything is working fine. All wiring (PWM and pressure switch) remains the same so it was certainly (if there is such a thing) an issue with code in the compressor loop VI.
Incidentally, I won’t add our original non-working code here since it was an exact dupe of the suggested code from this thread.
Of course it’s crunch time and there are more probs, but this will be interesting to think more about in a couple of weeks!
Thanks.