Go to Post As a real pig farmer*, I definitely endorse team 1902. - Andy Baker [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2014, 21:19
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Relay Set toggling between Indexes?

During testing we noticed we are getting error "-44040: invalid relay index"

Upon further investigation, we noticed that inside our compressor control loop (in periodic tasks) the WPI_RelaySet.vi is somehow toggling between relay 1, 2, and 3 by itself and also switching between forward, reverse and off relay modes.

I probed the inputs to this subvi inside the compressor control vi, everything is perfect. RelaySet should be getting Relay 1 as the index and forward as the relay mode, but probing inside RelaySet, even the controls are toggling uncontrollably.

We do use two other relays (solenoids) but they're on totally different controls. I checked and we don't have the same relay set anywhere else in the project.

Anyone know what's going on? This is causing us headaches and lots of frustration ....
__________________
Per Audacia Ad Astra
Reply With Quote
  #2   Spotlight this post!  
Unread 17-01-2014, 23:37
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,557
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: Relay Set toggling between Indexes?

Quote:
Originally Posted by Invictus3593 View Post
Upon further investigation, we noticed that inside our compressor control loop (in periodic tasks) the WPI_RelaySet.vi is somehow toggling between relay 1, 2, and 3 by itself and also switching between forward, reverse and off relay modes.

I probed the inputs to this subvi inside the compressor control vi, everything is perfect. RelaySet should be getting Relay 1 as the index and forward as the relay mode, but probing inside RelaySet, even the controls are toggling uncontrollably.
This is expected. The same WPI_RelaySet gets called for all relays, so you're seeing the data from all calls, not just from where you went into it.

Are you actually having a problem, or just trying to find out why that error message is printing?
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2014, 05:33
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Relay Set toggling between Indexes?

The error string should contain an ASCII call stack. It list the lowest node or VI->calling VI->calling VI->etc.

If there are multiple calls to the same node or subVI, on that diagram, then you have to debug which one, but often it is unique.

Does this help determine which refnum wasn't opened properly, or which didn't stay opened?

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2014, 08:58
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Relay Set toggling between Indexes?

Quote:
Are you actually having a problem, or just trying to find out why that error message is printing?
This is a big problem because it's only that specific RelaySet that throws errors and it makes Teleop run and abort at the same rate of change of the index. During teleop, it also makes the relay light on the sidecar toggle between red and green very quickly and following no pattern. We only have one compressor also. The other RelaySets for the solenoids work fine.

Because Teleop runs/stops at the same rate as the change in relay index in this compressorloop, I'm led to believe this Relay vi is the problem.

Quote:
The error string should contain an ASCII call stack. It list the lowest node or VI->calling VI->calling VI->etc.
The call stack leads like this: ...Periodic Tasks.vi>CompressorControlLoop.vi>WPI_RelaySet.vi> RelayCache.vi
The error meassage reads: "The relay index is invalid"

The sporadic toggling of which relay index is the correct one begins in Relay set, starting with the controls; i mean sporadic in the most literal sense.
__________________
Per Audacia Ad Astra

Last edited by Invictus3593 : 18-01-2014 at 09:04.
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2014, 20:53
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,112
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: Relay Set toggling between Indexes?

Please show us the code where you're opening the compressor in Begin, and where you're calling its control loop in Periodic Tasks.

You can select the relevant section of the Begin.vi, then choose "Create VI Snippet from Selection" from the Edit menu. It'll create a .png file with the name and location you select, which you can then attach here. We'll be able to see the picture easily, and it will be live LabVIEW code that we can run if we want to check something for more detail.
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 08:19.

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