FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Test.vi when enabled resets all my referenced motors and solenoids

I’ve placed code in Test.vi but whatever I place in there and try to control stutters.
The biggest example is my solenoid. After a few seconds of having test enabled the solenoid clicks as it goes on and off.

Also both motors stutter as they seem to get set to my Winch Power value but then get set to zero then back to being fed back a value.

Not sure what is happening.

The "Winch 1" and "Winch 2" are Talon SRX and operate normally in Teleop.

The Solenoid is a single solenoid.

All are opened in Begin and I have disabled the Safety on all of them (thinking that might be the issue).

They are not referenced at all in Periodic Tasks.

 

Thing is I took out all of my motor and solenoid control from periodic tasks earlier this season as I saw this same behavior happening in PT.

0 Kudos
Message 1 of 4
(3,756 Views)

Have you tried interactive execution (click the run arrow in the Robot Main.vi) and using the LabVIEW debugging tools to see what values you are sending to the outputs in that VI?

0 Kudos
Message 2 of 4
(3,736 Views)

I can try that but the focus here is on the solenoid. All that should be happening is that an "ON" signal should be being sent to the solenoid constantly. There are not variables involved or other logic.

Yet the behavior of the robot is that the solenoid clicks as it is cycling on and off rapidly.

The only other code that should be executing while Test is enabled is Periodic Tasks and no solenoids are even references in my Periodic Tasks so I cant think of any other code that would be fighting Test Enabled code.

0 Kudos
Message 3 of 4
(3,734 Views)

Create a new project from the LabVIEW roboRIO template; open your solenoid in Begin.vi; add your loop in Test.vi; put the Solenoid "On" in said loop. Run the code. Do you still see the same behavior?

 

If yes, my next step would be to try with the example that ships with LabVIEW in Help > Find Examples..

If no, I suspect there is another place in your code where the solenoid is being called.

 

Regards,

0 Kudos
Message 4 of 4
(3,730 Views)