|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Writing to Files
Ive been looking at all the stuff of EEPROM, and i dont think its gonna suit for what i want to do (not to mention we cant seem to get it to work). The other programmer on my team suggested writing to a file, say .txt, so that we could atleast copy and paste all our info. Is this any faster than EEPROM, and can it handle writing twice during each user_routine loop? Also can/ how do we do this with this compiler? If we cant, any other (simpler) suggestions? Thanks
|
|
#2
|
||||
|
||||
|
Re: Writing to Files
Quote:
Perhaps you could explain what it is you are trying to do. Last edited by Rickertsen2 : 29-01-2004 at 23:27. |
|
#3
|
||||
|
||||
|
Re: Writing to Files
Good idea, but if I'm not mistaken you'll have some trouble writing to a file from the C code in the robot. This is because the robot controller (microprocessor) doesn't even have a file system - "files" can't even exist within this processor. EEPROM is your best bet if you want to store something to memory and have it persist through a power cycle/reset. There are a few good threads on here about writing and reading with the EEPROM, and I'm sure a lot of people will answer any EEPROM-related questions you have. And on that note, here's a question for you guys: how do I insert a link to another thread into my post????
|
|
#4
|
|||
|
|||
|
Re: Writing to Files
What i was trying to do was write to a file on the PC, while the robot is tethered (instead of printf to a screen, output to a file). I understand that there is no place for it on the RC, except EEPROM and whatnot. We've just had problems with EEPROM, with trying to retrieve data, and we're not quite sure how to shift hex storage locations and all the other stuff that comes with using EEPROMs. Any more help would be appreciated, thanks again.
|
|
#5
|
||||
|
||||
|
Re: Writing to Files
your best bet would be to find a dashboard program with logging/save capabilities - there are no functions to write to files, only whatever functionality the dashboard/output window provides.
|
|
#6
|
||||
|
||||
|
Re: Writing to Files
Quote:
Ok wait... besides using hyperterminal, you might want to look into a program called "Stamp Plot pro" It allows you to set up a GUI with all sorts of nifty graphs, text boxes etc to display seria lport input. It can save to files. Last edited by Rickertsen2 : 29-01-2004 at 23:53. |
|
#7
|
||||
|
||||
|
Re: Writing to Files
Quote:
|
|
#8
|
|||||
|
|||||
|
Re: Writing to Files
Quote:
|
|
#9
|
||||
|
||||
|
Re: Writing to Files
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: Writing to Files
I would, but I don't have anything with me. I will, however, try to write a program to do exlusively that.
[edit] UPDATE: I wrote v.1 already. See attachment. If you need DLL's, pm me. (the install is at least 2 mB) [/edit] Last edited by Astronouth7303 : 30-01-2004 at 22:32. |
|
#11
|
|||
|
|||
|
Re: Writing to Files
There is a program available at members.cox.net/seanwitte that works sort of like a bi-directional dashboard. You can send 8 bytes, 6 16-bit signed integers, and 16 binary values back to the PC. The PC sends 8 bytes and 8 digital values to the RC. It will capture, plot, and save up to 10 of the IO values at once. This will not work if you have any printfs in your code.
Install the EDUController application (windows only). Grab pc_interface.h and pc_interface.c from the MPLAB project on the web site above and add them to your project. Heres how you would use it: 1) Add #include "pc_interface.h" to the top of user_routines.c 2) Call function "InitializePCInterface()" at the end of User_Initialization(). 3) Call function "SendReceivePCData()" from Process_Data_From_Master_uP, right before the call to Putdata(). Now, whenever you set the values of the aliases in pc_interface.h those values will be sent to the EDUController application. To verify, try adding the line "sensor1 = 116;" to Default_Routine(). Make sure the RC is running and start the EDUController program. Select the correct COM port, and click Open. You should see the value for Analog Input 1 change to 116. The rest of the controls are pretty self explanatory. The connection is closed automatically when you stop a capture. |
|
#12
|
||||
|
||||
|
Re: Writing to Files
Quote:
|
|
#13
|
||||
|
||||
|
Re: Writing to Files
Quote:
|
|
#14
|
||||
|
||||
|
Re: Writing to Files
Quote:
http://www.chiefdelphi.com/forums/misc.php?do=bbcode Also, any URL that you put in your post is automatically made into a link, as long as it begins in http:// or www. - this can be turned off by unchecking the "Automatically parse links in test" box below the reply form. |
|
#15
|
||||
|
||||
|
Re: Writing to Files
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| **IMPORTANT FIRST EMAIL**/DXF files posted on FIRST website | miketwalker | FIRST E-Mail Blast Archive | 0 | 19-01-2004 19:53 |
| tga files for animation | LizJJury | General Forum | 1 | 15-02-2003 16:36 |
| VKOP igs files | JeffO | Inventor | 0 | 15-01-2003 20:37 |
| Multiple files usage | punarhero | Programming | 2 | 12-01-2003 11:45 |
| writing contest | Ken Leung | General Forum | 10 | 15-12-2002 16:15 |