Go to Post Each poster can bring respect to the topic, whether agreeing with it or not. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 11 votes, 4.64 average. Display Modes
  #1   Spotlight this post!  
Unread 16-01-2012, 18:37
Devyn S Devyn S is offline
Registered User
FRC #1661 (Griffitrons)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Sherman Oaks, CA
Posts: 1
Devyn S is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2012, 19:09
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2012, 10:45
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2012, 01:40
xisybyl xisybyl is offline
Registered User
FRC #3648
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Denver
Posts: 34
xisybyl is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2012, 18:59
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa

Quote:
Originally Posted by Alan Anderson View Post
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2012, 20:55
rachelholladay's Avatar
rachelholladay rachelholladay is offline
Registered User
FRC #1912 (Team Combustion)
 
Join Date: Dec 2010
Rookie Year: 2006
Location: Slidell, Louisiana, USA
Posts: 540
rachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond repute
Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa

Quote:
Originally Posted by Joe Ross View Post
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?
__________________
Carnegie Mellon School of Computer Science Class of 2017
2012 Dean's List Winner, 2011 NWCIT Award of Aspirations in Computing National Winner

2014 - : FIRST Team 3504 Girls of Steel (Mentor)
2014 Engineering Inspiration

2006 - 2013: FIRST Team 1912 Combustion (Webmaster / Controls Capt / Beta Test Lead / Drive Capt / JrFLL Coach)
2013 Woodie Flowers Finalist for Wendy Holladay. 2010 - 2013 Regional Chairman's Award at the Bayou Regional. 2011 - 2012 Best Website at the Bayou Regional. 2010 - 2013 Beta Test Team for Hardware and LabVIEW. 2012 JrFLL State Expo Coordinator.

Last edited by rachelholladay : 11-02-2012 at 21:03. Reason: more details added.
Reply With Quote
  #7   Spotlight this post!  
Unread 11-02-2012, 21:43
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa

Quote:
Originally Posted by rachelholladay View Post
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.
Attached Thumbnails
Click image for larger version

Name:	CompressorLoop.jpg
Views:	264
Size:	92.1 KB
ID:	11862  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2012, 21:46
rachelholladay's Avatar
rachelholladay rachelholladay is offline
Registered User
FRC #1912 (Team Combustion)
 
Join Date: Dec 2010
Rookie Year: 2006
Location: Slidell, Louisiana, USA
Posts: 540
rachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond repute
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.
__________________
Carnegie Mellon School of Computer Science Class of 2017
2012 Dean's List Winner, 2011 NWCIT Award of Aspirations in Computing National Winner

2014 - : FIRST Team 3504 Girls of Steel (Mentor)
2014 Engineering Inspiration

2006 - 2013: FIRST Team 1912 Combustion (Webmaster / Controls Capt / Beta Test Lead / Drive Capt / JrFLL Coach)
2013 Woodie Flowers Finalist for Wendy Holladay. 2010 - 2013 Regional Chairman's Award at the Bayou Regional. 2011 - 2012 Best Website at the Bayou Regional. 2010 - 2013 Beta Test Team for Hardware and LabVIEW. 2012 JrFLL State Expo Coordinator.
Reply With Quote
  #9   Spotlight this post!  
Unread 12-02-2012, 12:26
Wendy Holladay's Avatar
Wendy Holladay Wendy Holladay is offline
Registered User
FRC #1912 (Team Combustion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Slidell, la
Posts: 183
Wendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond reputeWendy Holladay has a reputation beyond repute
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?
__________________
http://www.team1912.com

2013, 2012, 2011, 2010 Regional Chairman's Award, Bayou Regional
2013 Woodie Flower's Award, Bayou Regional
2012 Dean's List Winner (Rachel Holladay)
2015, 2014, 2013, 2012, 2011, 2010 Beta Test Labview/Hardware
2012, 2011 Best Website, Bayou Regional
2011, 2009, 2006 Gracious Professionalism
2007 Bayou Regional Winner
Reply With Quote
  #10   Spotlight this post!  
Unread 12-02-2012, 12:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.


__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #11   Spotlight this post!  
Unread 12-02-2012, 13:23
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
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.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #12   Spotlight this post!  
Unread 12-02-2012, 15:39
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa

I believe this is how it should be setup, right?

Begin.vi
Click image for larger version

Name:	Begin.vi.png
Views:	241
Size:	4.7 KB
ID:	11869

Periodic Tasks.vi
Click image for larger version

Name:	Periodic Tasks.vi.png
Views:	176
Size:	1.5 KB
ID:	11870

Finish.vi
Click image for larger version

Name:	Finish.vi.png
Views:	163
Size:	2.3 KB
ID:	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?
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 12-02-2012 at 15:42.
Reply With Quote
  #13   Spotlight this post!  
Unread 12-02-2012, 15:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #14   Spotlight this post!  
Unread 12-02-2012, 16:37
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #15   Spotlight this post!  
Unread 12-02-2012, 16:45
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Compressor Control Loop: Relay Index is Invalid; also, Robot Drive not Running fa

Quote:
Originally Posted by Mark McLeod View Post
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 View Post
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
Click image for larger version

Name:	New Begin.vi.png
Views:	291
Size:	7.1 KB
ID:	11872

Periodic Task.vi
Click image for larger version

Name:	New Periodic Tasks.vi.png
Views:	286
Size:	8.7 KB
ID:	11873

Finish.vi
Click image for larger version

Name:	New Finish.vi.png
Views:	208
Size:	3.1 KB
ID:	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.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 12-02-2012 at 16:55.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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