Team 1736 Autoflex v1.0 + Help understanding code

I have been working on an autoflex code of my own for awhile now and I have been trying to get rid of the need for an XML file so I could save on file size. The option that came to mind was the labview measurement file, but I have no idea how I would get all my data written to it. I started looking around to see if there were other examples of an autoflex code and I found one from Team 857 (Attached as “LabVIEW”). I do not understand how their code works and constantly get errors no matter what I try to do to it. If someone could explain how Team 857’s code works or how I could use a labview measurement file (or other small file) to save my data it would be greatly appreciated. I am doing this because I would like to be able to quickly start playback (It takes awhile to load once the file becomes larger).

To use my autoflex code (“Autoflex Team1736”) all you need to do is change the directory ("C:\Users\Siggy2xc\Desktop\lvSaves") in the long flat sequence at the bottom of “XML” to whatever directory you would like to save your recording to ("c:
i-rt" if you are running from the cRIO) then run “”

To add more inputs right-click the “Input” local variable’s border in “Read” and choose open type def. ctrl+drag your controls from “Read” into the type def. box and save. Then wire those controls to the bundle function.

In the 2nd sequence in the recording case structure there is “Duplicate Joystick” which is not currently wired to anything because it was making the code ignore recording samples if they were duplicates and thus skipping them on playback. I haven’t looked into this much but I can probably figure it out on my own.

(Also please report any bugs in my code!!!)

  1. Playback does not show it has stopped after it is finished (41 KB)
    Autoflex Team1736 (81 KB) (41 KB)
    Autoflex Team1736 (81 KB)

There are many file formats to choose from. The LV binary file is a good compromise of small, fast, and easy. If you build a control that contains your data, you connect that to a file read and write binary, and it will work. If you build the wire on the diagram, you can click and have LV build the control or constant for you.

The biggest down-side to the binary file is the ability to migrate it if you add or remove fields. For editing, you can load and display in an array control and write back the values. It is pretty easy to make a reasonable editor to show the values and to allow for edits.

Greg McKaskle

Just modified the code to write to a binary file instead. I also fixed a bug I noticed that gave you an error when you saved the autoflex file since the text file had not yet been created.