![]() |
How to do file i/o in labview
OK, the team and I struggled with this one today.
We want to write out a log file to trace some values as they change. We open the file at the beginning of the program and close it at the end (same place motors are opened and closed). Inside of a loop, we write to a text file passing in a string of characters. The file name is c:\trace.txt, the open, writes and close work with no errors. But I cannot find the file that should be created. I even ran Filemon on the laptop to see if I could see an I/O to a file.... no luck. There's gotta be a way to write to a file in labview, any idea what I am missing? Many thanks in advance. |
Re: How to do file i/o in labview
LV experts, feel free to correct me if I am mistaken...
Your file is most likely on the cRIO and not on your laptop. You can use the ftp command on the command line or you can use a web browser and point it at url ftp://10.xx.yy.2 and browse for the file on the cRIO. Regards, Mike |
Re: How to do file i/o in labview
Sweet, thanks Mike.
Your post inspired me to take a look at the NI site and found this gem: http://decibel.ni.com/content/message/3137#3137 Says you can use MAX to FTP to the cRIO. ChiefDelphi and Mike Betts ROCK! |
Re: How to do file i/o in labview
Quote:
|
Re: How to do file i/o in labview
LV has a built-in path type that abstracts /, \, and : for you. So wherever you look at it, it will look native, but at runtime it will be native there too.
I mention this because sometimes old habits are hard to break, and people then start to build their own path/string stuff. It is better to use the built-in path datatype and functions. Use the same path as the ftp location. |
| All times are GMT -5. The time now is 10:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi