|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
How to use eeprom in labview
I've been reading the forums, and from what I've read eeprom it is use to store data and play it back for the robot to use during autonomous. But what I don't understand is how to program that into labview. If anyone can help me, or if i have my info totally wrong please let me know.
|
|
#2
|
|||||
|
|||||
|
Re: How to use eeprom in labview
Quote:
Quote:
Hopefully, this answered what you were asking; your question was a little unclear (but I did my best). If it was, there's some information about getting started with file operations in LabVIEW on their Developer Zone. Anything else, feel free to ask me. |
|
#3
|
|||
|
|||
|
Re: How to use eeprom in labview
Thank you for the amazing advice, but what do i put for the file path?
|
|
#4
|
|||||
|
|||||
|
Re: How to use eeprom in labview
Quote:
I also made a quick VI demonstrating the different ways to read/write from files. Note that isn't not intended to be functional, just to show how the different VIs interact with one another. LabVIEW can be like that new fancy gadget: really complicated at first sight, but once you get to know its nuances, it's a dream come true. If you need anything else, don't hesitate to ask. |
|
#5
|
|||
|
|||
|
Re: How to use eeprom in labview
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.
|
|
#6
|
|||||
|
|||||
|
Re: How to use eeprom in labview
Quote:
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. |
|
#7
|
|||
|
|||
|
Re: How to use eeprom in labview
Is it possible to just use a regular tick counter or do i have to use the robot time vi. Because isn't the whole point of putting time into the spread sheet so that the motors know how long to run on a specific speed in Autonomous? Also here is a picture of my periodic tasks.
Last edited by windtakers : 31-08-2011 at 22:29. |
|
#8
|
|||
|
|||
|
Re: How to use eeprom in labview
Inside the loop, the code compares the millisecond tick time to 1500. The millisecond tick is relative to when the robot booted, or when the app started, and keeps going up until it wraps. More than likely, the code should take the time when the button latched, subtract from the current time, and compare to 1500.
Also, personally, I'd take the time, X, and Y, and write them to a single file rather than having the data spread amongst two with duplicated times. This also extends if you add a manipulator or another degree of freedom to the robot or even sensor values that record the response of the robot. Greg McKaskle |
|
#9
|
|||
|
|||
|
Re: How to use eeprom in labview
The Thing I'm having trouble with is the tick counter. Because i only want the joysticks to be recorded for 15sec, but because the tick counter starts at the robot boot up and not when the case is true the tick counter is already over 15sec even before i get to actually wanting to record the joysticks.
|
|
#10
|
|||||
|
|||||
|
Re: How to use eeprom in labview
It goes something like this, although this example is for a different purpose you should be handling the time in a similar fashion:
![]() |
|
#11
|
|||
|
|||
|
Re: How to use eeprom in labview
this is awesome, and by the way i use your team website for labview help all the time. can't believe i didn't see this one. I think I have the timed task all done now. when I extract the data in autonomous that was saved into the spreadsheet i know that i need to tell the motors how long to run on a certain speed, but i don't know how to do that. Also this is a picture of my updated periodic tasks.
Last edited by windtakers : 01-09-2011 at 17:32. |
|
#12
|
|||||
|
|||||
|
Re: How to use eeprom in labview
To play it back you can run a While loop inside the Autonomous vi
Last edited by Mark McLeod : 02-09-2011 at 16:29. |
|
#13
|
|||
|
|||
|
Re: How to use eeprom in labview
Here is a picture of my autonomous. Can you tell me if it's programed right.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|