From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Double Soleniod Issues

Hello All,

I am having issues getting my double soleniod (SMC Type, 12v) to Run properly off my Soleniod Bumper. We are trying to control the forward and reverse direction using Solenoid output 1 & 2 from 1 button on our joystick. We are having absolutly no luck. I have attach my code.

We programmed it a different way and it seems to operate the solenoid, but i am confused why the attached code wont work.


Thanks

Download All
0 Kudos
Message 1 of 3
(3,980 Views)

Hi Jeannie,

This is a interesting one.

The problem is you are using the wrong ENUM to set the Solenoid.

If you Right click on the ENUM constant and select Visible Items>>Digital Display for both Forward and Reverse

FRC corersion dot 2.png

you will see Forward and Reverse represents a zero.

Next disconnect the wire from the Solenoid Set and go to the "Value" terminal right click and create constant.

FRC Coersion Dot 3.png

If you show its digital display you will see that the Forward selection has the number 2 associated with it and Reverse has a 3 and Off has a zero.

FRC Coersion Dot5.png

In order to get the Solenoid Set vi to work properly you have  to use the Solenoid Enum.

The number is the important factor not the name.

So you need a 2 for Forward and a 3 for Reverse but your code was sending a zero for both which is Off to the Solenoid Set vi

you need to remove the bad Enums and replace them with the ones from the Solenoid Set VI.

When the small red dots are gone you know you fixed the problem.

FRC Coersion Dot6.png

If you still have questions please let me know as I was in a hurry and might have left out some important details.

Mark

Message 2 of 3
(2,857 Views)

Thank you so much! we will give it a shot.

0 Kudos
Message 3 of 3
(2,857 Views)