Go to Post The obvious solution is to only allow the real world to have negative jade induction coefficients. - EricVanWyk [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2009, 00:10
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,747
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2009, 08:25
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
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
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2009, 09:50
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,747
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
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!
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2009, 13:46
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: How to do file i/o in labview

Quote:
Originally Posted by rsisk View Post
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.
Also note that teams wishing to use a log file will have to change the filename to one compatible with the cRIO, namely a UNIX-style, /path/to/file type path.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2009, 14:26
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use the data obtain in one C file to another C file? tommy_chai Programming 8 11-01-2008 02:17
File Open Problems in LabVIEW pyroslev LabView and Data Acquisition 3 20-01-2007 15:52
Labview Demo File for 2006 Camera? JABianchi General Forum 2 15-09-2006 18:23
How to open a step file.... Allison K Inventor 2 08-09-2006 17:47
How do we convert a modified user routines file into a valid .HEX file HuskieRobotics Programming 13 28-02-2004 12:12


All times are GMT -5. The time now is 04:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi