02-07-2020 06:53 PM
queremos para mas exactitud que todo los mecanismos de lanzador funcionen en una secuencia con tiempos por ejemplo Banda 2 que funcione 1 seg y se apague atrás después se encienda el lanzador pasan dos y se encienda banda 2 y 1 después de 5 seg que se apague todo eso con un solo motor que le piquemos y haga todo eso y tener un botón de pagado de emergencia aparte
este es mi codigo que funciona indivudal del teleop
02-09-2020 10:13 AM
Hello. I translated this into English using a web page. Here was the result.
"we want for more accuracy that all the launcher mechanisms work in a sequence with times for example Band 2 that works 1 sec and goes off back after the launcher goes on two passes and band 2 and 1 turns on after 5 sec that everything goes off that with a single engine that we sting and do all that and have a separate emergency paid button.
This is my code that works individually from the teleop."
If I understand correctly, it sounds like you want to create a generalized set of timing routines: GET_TIME (Get current time.), START_TIMER (Calculate the end time for a particular delay time.), IS_TIMER_DONE (Check to see if the current time is greater than or equal to the end time.)
Then you can use these in a "state machine" to sequence your actions.
This code could be executed inside Teleop or inside of a loop in Periodic Tasks.
A reference "A Secret book of FRC LabVIEW" may help you. Sorry, it's in English...