Go to Post It's not about the equipment, it's about the program. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-03-2011, 21:18
siggy2xc siggy2xc is offline
Registered User
AKA: Tyler Siegrist
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: peoria
Posts: 70
siggy2xc is an unknown quantity at this point
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 v05.zip"). 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 v1.0.zip") all you need to do is change the directory ("C:\Users\Siggy2xc\Desktop\lvSaves\") in the long flat sequence at the bottom of "XML Autoflex.vi" to whatever directory you would like to save your recording to ("c:\ni-rt\" if you are running from the cRIO) then run "Tester.vi"

To add more inputs right-click the "Input" local variable's border in "Read Inputs.vi" and choose open type def. ctrl+drag your controls from "Read Inputs.vi" 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 Event.vi" 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
Attached Files
File Type: zip LabVIEW_v05.zip (41.0 KB, 6 views)
File Type: zip Autoflex Team1736 v1.0.zip (81.0 KB, 11 views)

Last edited by siggy2xc : 16-03-2011 at 21:22.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-03-2011, 21:57
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Team 1736 Autoflex v1.0 + Help understanding code

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
Reply With Quote
  #3   Spotlight this post!  
Unread 16-03-2011, 22:31
siggy2xc siggy2xc is offline
Registered User
AKA: Tyler Siegrist
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: peoria
Posts: 70
siggy2xc is an unknown quantity at this point
Re: Team 1736 Autoflex v1.0 + Help understanding code

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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi