Go to Post The competition is different - everybody really "wins" by all of the great things teams think of to do for other teams and the community. - Chris Fultz [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 27-01-2011, 16:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Saving Text to a File on cRIO

Quote:
Originally Posted by AB Steven View Post
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?
Write a CSV text file. Excel can open that directly if you associate the file extension.


Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2011, 17:44
AB Steven AB Steven is offline
Registered User
FRC #0245
 
Join Date: Jan 2011
Location: Michigan
Posts: 15
AB Steven is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2011, 18:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Saving Text to a File on cRIO

Quote:
Originally Posted by AB Steven View Post
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.
I'm not a LabVIEW guru so I can only speculate:

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.


Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2011, 18:27
AB Steven AB Steven is offline
Registered User
FRC #0245
 
Join Date: Jan 2011
Location: Michigan
Posts: 15
AB Steven is an unknown quantity at this point
Re: Saving Text to a File on cRIO

I got it working, hers a picture of how. Thanks for the help guys.
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2011, 21:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Saving Text to a File on cRIO

Quote:
Originally Posted by Ether View Post
Does LabVIEW have a function analogous to printf?
Indeed it does. It's the Format Into String function.
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


All times are GMT -5. The time now is 21:14.

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