I remember reading on here last year about someone that had successfully implemented the Play/Record Macro into LabView, but I never seemed to be able to get the code or what it looked like. Does anyone have this or have access to this? It would be greatly appreciated.
I successfully implemented it on 423 in 2015, but I don’t have access to that code anymore. I think I remember hearing at least one other team post on here that they implemented it too, so hopefully they can send you their code.
Basically, I did it by splitting Teleop.vi into two sub-VIs. The first VI (CPInputs.vi) just got all of the inputs from the CP and bundled them together. Then the second VI (StateOutputs.vi) took that bundle as an input, did all of the processing on those inputs, and sent the output values to the motors. For autonomous, I had a loop that “simulated” Teleop, sending fake CP command bundles to StateOutputs.vi from a pre-programmed array every 20ms (normal DS update rate). I made a LV dashboard with recording buttons that would pull the CP inputs into an array in real time, so drivers could record the auton routines while practicing and all programming needed to do was copy the array into the code.
The program worked well for fairly simple maneuvers on a flat field. As you might expect, it was less than repeatable when we tried to go over the scoring platform (but no less repeatable than a normal non-closed-loop auton).
Thank you! I’m going to try writing something similar to your input and output .vi’s and see where I can get from there.
Another option may be this, depending on what hardware you’re running. This would be a slightly more advanced method than what was suggested above, but would also produce a more repeatable result.
My team implemented a Record able Autonomous a few years ago, I can look on my teams laptop and try to find you the VI’s. I’ll also try to compile a way to set it up because it’s a little complex.
The way it works is you record the outputs of the joysticks to a CFG file on the RoboRIO, then have an exact copy of your Teleop and Periodic tasks in Autonomous Independent to “Replay” it to.
You guys are the best, I love the CD community. SO helpful
I have a .zip folder with all the VIs in it but I don’t know how to send it or use github XD help plz
AHA I FIGURED GITHUG OUT
Included are the VIs, a CFG file (I think it has some random autos on it, delete them they’re probably mess something up) and a Guide to set it up.
Anyone using this or any troubles using it?