FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make solenoids move 1000 milliseconds after buttons is pressed.

I've been trying to search the web for code that demonstrates timing solenoids and i have not been able to find one. if anyone could send me an example that would help a lot!

0 Kudos
Message 1 of 6
(3,186 Views)

If you're using the Command Control Template, use a delay (in a sequence structure, or state machine, etc. couple options), if using the basic template it might look something like this (I'll use the Memory Library from https://www.frclabviewtutorials.com/tutorials/memory-library/, but you can also achieve each of the pieces using feedback nodes like on Team358's site).

 

 

 

 

0 Kudos
Message 2 of 6
(3,167 Views)

oops, forgot to subtract from current time to convert to elapsed time:delayExample.png

 

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

To give you a usable solution can you clarify a few things.

 

Is the process Press-Release-Wait-Activate Solenoid OR

Is the process Press-Hold for Wait Time-Activate Solenoid OR
Something else.

 

Is the Solenoid a type single or a double coil?

 

How do you shut the solenoid off or move it to the original position?

 

Champion CLA

Making senseless computers do
intelligent real world things
is NOT easy. SO MAKE IT FUN!
0 Kudos
Message 4 of 6
(3,134 Views)

the process is press-release-wait. the solenoid is a double solenoid. and once the button is false the solenoid is off.

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

So are you looking for the button press to hold the solenoid on for 1 sec then turn off?

Tim
GHSP
0 Kudos
Message 6 of 6
(3,093 Views)