|
Re: sample code to move robot autonomously
Glad it helped you.
The easiest way to use this code in teleop also is to make it a subvi. To do this, select all the code for the state machine (while loop included). Then, go to the "Edit" menu and select "Make SubVI". LabVIEW with put the code in a new vi and automatically creat the inputs for you. Save this vi, then you can drop it in teleop to use it.
Note: for this to work, the state machine must stop the loop when it's done. If you want to run the state machine in autonomous more then once, you can make another state machine which calls the sub state machine.
|