Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Relay Set toggling between Indexes? (http://www.chiefdelphi.com/forums/showthread.php?t=124811)

Invictus3593 17-01-2014 21:19

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 :mad:....

Joe Ross 17-01-2014 23:37

Re: Relay Set toggling between Indexes?
 
Quote:

Originally Posted by Invictus3593 (Post 1328689)
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?

Greg McKaskle 18-01-2014 05:33

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

Invictus3593 18-01-2014 08:58

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.

Alan Anderson 18-01-2014 20:53

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.


All times are GMT -5. The time now is 09:46.

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