LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not Save data to USB stick with CRIO(9014), when system run alone

Hi All

 

I met a very strange problem. I am trying to save data to usb memory of CRIO 9014, and I can successfully to do it when I run the program in Labview project (with ethernet communication).

 

But it does not work, when I tried to run the CRIO by itself. (without computer)

 

Does anybody know what's happen with it?

 

Thanks

 

Best regards

 

 

 

0 Kudos
Message 1 of 11
(4,513 Views)

Sorry, I made mistake,and already found out the problem. actually, i can save data to usb, when system stand alone.

 

But the new issue is that the data can just not be saved to USB, when I plugged out and plugged in again. it seems the system does not recognized the usb during the program running.

 

Anybody has hints?

 

Thanks.

0 Kudos
Message 2 of 11
(4,506 Views)

You say you found the problem. What was the problem? Because it happen the same thing to me. I can save in to usb stick when I run the system from labview, but not when the system run alone. I have a CompactRIO 9012

0 Kudos
Message 3 of 11
(4,375 Views)

Hello jeedee,

 

Oftentimes USB flash stick manufacturers implement proprietary drivers, which has in the past made integration to the Real Time OS running on a cRIO more difficult. Since the host VI has windows it can pull more drivers from the web and from the OS specifications it’s less of an issue from accessing a USB on the development system host VI. On the RT side, the USB stick must be FAT formatted to be able to read/write as expected.

 

Best,

Blayne Kettlewell

0 Kudos
Message 4 of 11
(4,365 Views)

Ok I solved the problem. I write this reply for those who have the same problem.

 

When I posted my first reply, I was able to read a file and to create folder. But I was not able to create a file. I don't know if it's the VI "open/create/replace file" or "Write to text file" or these 2 VI together, but with these VI I was not able to store the data measured. I noted that when I verify the error code after creating the file, I have the error #10. Maybe it's because of this I'm not able to create the files. After trying several possibilities with these VIs, combined with "Check if file or folder exist.vi", I saw that the only thing that work perfectly is "Write to spreadsheet file".

 

But is anyone know why I had this problem with the VIs "Open/Create/Replace File" and "Write to text file"?

0 Kudos
Message 5 of 11
(4,352 Views)

Hello jeedee,

 

Both the "Write to text file" and "Write to spreadsheet file" functions should work on your cRIO 9014. A good basic example to test writing to file is the Read and Write to Text File on Compact RIO or Single Board RIO

 

If using the "write to spreadsheet file" VI does not suit your application, it would be useful for you to post screenshots of your LabVIEW code and the error code you are receiving.

 

Regards,

 

Andrew Brown

Software Engineer
National Instruments
0 Kudos
Message 6 of 11
(4,343 Views)

I had a problem with the flash drive and for some reason I formatted and reinstalled softwares on the cRIO-9012. And now I have the same problem. I'm able to write a file to the flash drive when running from labview, but when it's stand alone, all it's able to do is to create the folder I want but not the file. Is there a way to debug a stand alone application? Or an idea of what to do.

 

0 Kudos
Message 7 of 11
(4,272 Views)

There is the VI I use to create the logging file on the memory stick.

0 Kudos
Message 8 of 11
(4,266 Views)

Hello,

 

Below is information on how to build a debuggable stand-alone executable.


Debugging a Stand-Alone Real-Time Application (RT Module)

https://www.ni.com/docs/en-US/bundle/labview-real-time-module/page/debugging-a-stand-alone-real-time...

 

National Instruments
Applications Engineer
0 Kudos
Message 9 of 11
(4,246 Views)

Hello,

I am actually having a very similar problem. In the beginning I had data being written on my usb and everything was fine the data was written on the tdms. Now it randomly writes data but when I open the file this time its empty it just creates an empty tdms and I don't know what is wrong. I am using a cRio-9014 and a NI 9237 module for the strain data. My code is attached if someone can help I would be grateful. Thanks. 

0 Kudos
Message 10 of 11
(3,745 Views)