![]() |
Saving Text to a File on cRIO
Does anyone know how to do it? The labview sample isn't working for me, and mine doesn't work either, Google just turns up getting started with labview pdfs from FRIST that don't explain this. Here is what I have right now.
![]() "test" and "text" are both files I created on the cRIO. The "text" one is the example with a constant file path instead of the default variable one. The "test" version was the one I made. They both have the extension .txt and I've tried with and without the extension in the file path. Thanks in advance, Steven |
Re: Saving Text to a File on cRIO
I use c:\test.txt for the path.
|
Re: Saving Text to a File on cRIO
I put a copy of each at C:\ on my computer, it didn't write to it. Our cRIO's directory is just / so "text.txt" would be /text.txt not C:\text.txt, at least I think so :confused:
|
Re: Saving Text to a File on cRIO
1 Attachment(s)
Here's an example of creating/opening/saving a file on the PC side.
I want to double check the cRIO version, because I haven't done it in awhile. The file path is the only tricky part. Try out Joe's suggestion. |
Re: Saving Text to a File on cRIO
Quote:
|
Re: Saving Text to a File on cRIO
Joe is right and if you want to get the file from the cRIO you will have to use FTP to get it from the cRIO to your computer.
Another option is to send the data with the dash board data and capture it there. Omar |
Re: Saving Text to a File on cRIO
Ok I checked the cRIO again and pointing labview to C:\ did work. Thanks guys! I got the spreadsheet writer working, but only a one column deal, does anyone know how to get it into two columns?
|
Re: Saving Text to a File on cRIO
Quote:
|
Re: Saving Text to a File on cRIO
I can get what I'm writing into Excel just fine, but I can only write one variable to the file. For example one potentiometer is at 70 the other at 450, I can only write the 70 or the 450 not both with a comma or some such thing in between. Currently I get it to write one number per line for example:
70 71 72 70 65 68 So that is keeping track of one potentiometer. I want both in one like this: 70,450 71,451 72,452 70,450 65,445 68,468 That would be potentiometer1,potentiometer2. Hope that helps, here is what I have right now. ![]() |
Re: Saving Text to a File on cRIO
Quote:
Does LabVIEW have a function analogous to printf? If so use that to write both variables in one operation to one line in the file. or... Does the LabVIEW file output function you are using have an option to allow you to suppress the newline? If so, write the first variable without the newline, write the comma without the newline, and finally write the second variable with the newline. |
Re: Saving Text to a File on cRIO
I got it working, hers a picture of how. Thanks for the help guys.
![]() |
Re: Saving Text to a File on cRIO
Quote:
|
| All times are GMT -5. The time now is 10:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi