Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fast (http://www.chiefdelphi.com/forums/showthread.php?t=100400)

Devyn S 16-01-2012 18:37

Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fast
 
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.

Joe Ross 16-01-2012 19:09

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.

Alan Anderson 17-01-2012 10:45

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.

xisybyl 11-02-2012 01:40

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.

BitTwiddler 11-02-2012 18:59

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
Quote:

Originally Posted by Alan Anderson (Post 1107640)
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.

Sure enuff, Alan's correct as we spent most of today finding this little tidbit of information.

rachelholladay 11-02-2012 20:55

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
Quote:

Originally Posted by Joe Ross (Post 1107166)
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.

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_Compressor ControlLoop.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?

Mark McLeod 11-02-2012 21:43

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
1 Attachment(s)
Quote:

Originally Posted by rachelholladay (Post 1124631)
Where is this example?

It's the grayed out (Disabled) code in Periodic Tasks.vi

"The name" will have to be changed to whatever you're calling your compressor and it needs enabling.

rachelholladay 11-02-2012 21:46

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
So all we have to do is enable that within periodic tasks and specify the name?

We are still wondering why the "Solenoid with Compressor Example.vi" didn't work. The behavior is described in my previous post.

Wendy Holladay 12-02-2012 12:26

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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?

Mark McLeod 12-02-2012 12:35

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.



RyanN 12-02-2012 13:23

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.

RyanN 12-02-2012 15:39

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
3 Attachment(s)
I believe this is how it should be setup, right?

Begin.vi
Attachment 11869

Periodic Tasks.vi
Attachment 11870

Finish.vi
Attachment 11871

This code should work assuming you're using DIO1 for the pressure switch and Relay 1 for the Compressor's Spike relay. Is this correct?

Mark McLeod 12-02-2012 15:59

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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?

Alan Anderson 12-02-2012 16:37

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
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.

RyanN 12-02-2012 16:45

Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa
 
3 Attachment(s)
Quote:

Originally Posted by Mark McLeod (Post 1125084)
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?

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.

Quote:

Originally Posted by Alan Anderson (Post 1125097)
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.

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
Attachment 11872

Periodic Task.vi
Attachment 11873

Finish.vi
Attachment 11874

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.


All times are GMT -5. The time now is 11:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi