FIRST Robotics Competition Discussions

Showing results for 
Search instead for 
Did you mean: when enabled resets all my referenced motors and solenoids

I’ve placed code in 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
0 Kudos
Message 2 of 4

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

Create a new project from the LabVIEW roboRIO template; open your solenoid in; add your loop in; 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.



0 Kudos
Message 4 of 4