FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Relay Set, aquire cache doesn't connect relay direction

In Relay Set, when the relay cache VI is called, the relay direction is not wired. The default in the relay cache is both directions. If a relay is opened in either forward or reverse mode, then only one direction is allocated, and the relay cache sets allocated false because it's checking that both directions are allocated. This then causes the relay set to fail.

0 Kudos
Message 1 of 6
(5,276 Views)

Howdy! I just gave this a shot with the Relay Example.vi and a Spike. I agree that the Cache VI direction is not wired, but a Spike will still work. I then wired up the direction inside the Cache VI and Forward and Reserve Modes work too. Are you working with the Relay example and using a Spike?

Joshua B.

NI FIRST Support

Joshua B.
National Instruments
0 Kudos
Message 2 of 6
(3,166 Views)

I was working with another team who found this. I haven't tried it on our robot. However, it looks to me like the relay should work in both directions mode, but not in forward or reverse only mode (as set in the relay open, not the relay direction input to the set vi).

I think to see this in the relay example, you would set the RelayDirection value to "forward only" before you start the example. Once the example is running I don't think the relay will work based on my analysis of the code.

0 Kudos
Message 3 of 6
(3,166 Views)

Hi sciencewhiz,

This is what I changed to get the example to work in all modes. I wired the Relay Direction into the Cache VI as shown below in the Relay Set.vi. Indeed, the Relay Open VI calls the Cache VI, but then so does the Relay Set VI.

relayset.JPG

Joshua B.
NI FIRST Support

Joshua B.
National Instruments
0 Kudos
Message 4 of 6
(3,166 Views)

Sorry, I misunderstood your first post. I think we're in agreement.

WIll the library be updated in the next release?

0 Kudos
Message 5 of 6
(3,166 Views)

This will be corrected in the next update, however, unless something pretty terrible comes up, it is unlikely that there will be another LabVIEW update this year.  The fix appears to be simple enough.

-Joe

0 Kudos
Message 6 of 6
(3,166 Views)