LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving files to cFP controller

Hi all,
 
I am using LabView 7.1 with RT on a compact field point 2015 controller. I am having a bit problem in saving my data into a file, hope someone can help me with this.
 
I have this program that has a while loop and automatically saves all my temperature and pressure data into a file (with a specific namee, stored as a global variable). When I run this program on my PC, it saves all my data correctly on my PC under the default data directory.
However, when I embedded my program onto my controller and run it that way. It succeed in generating the correct name and save my files into the ..\NI-RT\LABVIEW DATA\ directory of my controller. But, when I opened up the file, it seems that it is only capable of saving the header information and then just one cycle of data. What could be the problem? How come I never have the program when the program is run on a PC but won't be able to save the data when is running on a controller? Thank you for any information and suggestions in advance.
 
 
tak
0 Kudos
Message 1 of 5
(3,225 Views)

Hello Tak,

I haven't ever seen a case where a datafile will somehow work when it is run on the development system but will only give a single data point when the VI is embedded.  So my first guess would be that the loop may not be executing multiple times.  I am not sure what the stop conditions are in your while loop, but it sounds like one of those conditions is somehow being met during the first loop iteration (or possibly even before the loop executes since a while loop must execute one time).  I think the easiest way to check this would be to try and run the VI with highlight execution turned on, and veryify if multiple loop iterations are in fact occurring.  If not, we can try and figure out why the stop condition is only being triggered when the VI is run embedded.

Hopefully this gets us started!

John

0 Kudos
Message 2 of 5
(3,202 Views)

Hi Jhottenroth,

Before, I was wondering if there is some functions that may not be supported when I embedded that causes that. As you said it should not happen, I will double check my program, make sure there is not my stupid mistake that causes that. Thanks for your suggestions.

tak

0 Kudos
Message 3 of 5
(3,191 Views)
Hey Tak,
I personally haven't seen any functions that haven't worked when running embedded.  If you find that your code is correct and shouldn't be stopping early, you could definitely try a generic VI like the Write to Spreadsheet.vi.
 
John
0 Kudos
Message 4 of 5
(3,180 Views)
Hi John,
 
I am indeed using the "Write to Spreadsheet.vi" to save my data to the text file. I did more tests and found that the data was indeed saved at the end of my experiment for some reasons. So, it wasn't as I thought before that it started at the beginning and then stop.
 
My intention was to have this data saving loop to run parallel with my experiment program. So, I have to loop into this further why they are not running in parallel when I embed the program.
 
tak
0 Kudos
Message 5 of 5
(3,172 Views)