View Single Post
  #6   Spotlight this post!  
Unread 30-08-2011, 15:28
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: How to use eeprom in labview

Quote:
Originally Posted by windtakers View Post
I have another question. if i want to record the joystick movements,X and Y, how would i get that data into the write text file, or is it better to use a spreadsheet. If so how would i get the data into the spread sheet. also i'm planning on having the data be written in the periodic tasks.
In this case, I (personally) would use the Write to Spreadsheet File VI, if only because this type of data can be put into an array nicely and it's less work on the coding end (However, you can use any of the other methods and still have it work, but this would be the best/simplest).

To do that, start by putting a Joystick Get inside a loop in Periodic Tasks and unbundle the "axes" output. Then, use a Build Array (in the array palate) to make an array of the X and Y axes. You will also want to have some kind of time identifier in the array as well. Off the top of my head, the best way to do this would be to use FPGA Time VI (found in WPI Robotics Library -> Utilities). Then, you can wire this array to the 1D array input on the Write to Spreadsheet File VI (make sure it's set to append the file, not to replace it; it's a boolean input). Also, make sure there's some sort of timing on your while loop, as to not waste resources by writing files as fast as possible (maybe every 250 ms would be a good time).

Although it would probably be easier for me to just give you a VI for this, I'm not going to. One of the funny things about programming is that you actually learn best by writing things yourself. So, try to write this on your own, and if you need help, I'll help you through it.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote