LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store data into a file from a host VI developed for Compact RIO

Hey,

1) On the flash memory of your RT controller you will find the operating system and all the drivers you will need. If you want to delete the flash you have to format it via MAX, but then you have to setup your cRIO again

2) If you format the flash everything gets deleted. If you then setup your cRIO and target your programm code there will be nothing else in the flash memory!

3) On your cRIO device you have dip-switch where you can choose wheter to start the application or not (called NO APP).

4) If you want to stop also the FPGA vi when you stop the userinterface you have to use e.g. a variable to stop the FPGA loop. Attached you will find an example.

 

Christian

 

0 Kudos
Message 11 of 17
(5,809 Views)

@vishnu123 wrote:
5.Suppose next time when i connect to ftp://xx.xx.xx.xx i dont want to keep earlier files there how to delete them?Because my doubt is if i am using the file name which is same as the prevoius one there is aproblem of appending the new data to the old file.?



You can either delete them through the ftp connection, or you can write your RT application so that before it writes to a file it deletes it in case it already exists. Not sure if the File primitives that you are using let you choose whether you append to a file or overwrite file contents.

J. Mota
0 Kudos
Message 12 of 17
(5,806 Views)
Ups, I've forgot a point!  Thanks J, this is teamwork at NI, right? Smiley Wink
0 Kudos
Message 13 of 17
(5,803 Views)
Hi,
Thanks for the information.By the way one more doubt is that can inetract with the analog i/o modules without using(invoving) the FPGA, if so, how to do it.Because then there is no need to build FPGA VI but(again i think), as I/O modules are fixed to chasis without involving FPGA data acquisition is not possible am i right?.Where can i get the documentation for all these information like issues with CompactRIO RT controller and etc..and also hardware  documentation for   my comapctRIO 9004 and chasis 9104.One more thing is when you write the data in a file in a VI which is running on the RT comapactrio controller, are you able to successfully get the data into file( i mean you might have done before there)
if so, why in my case iam not able to get so ?
Regards,
Vishnu.
0 Kudos
Message 14 of 17
(5,772 Views)

Christian,

From the number of time this thread was read, it would appear that it is not as simple as I would imagine.  Like Vishnu, I am trying to collect data from a CRio to a file for further analysis.

What is working: A FPGA vi collects data at high rate: 8 Synchronous samples, at 400 micro seconds, a Mix of software generated values and measured values monitoring the behaviour of our system..  They are sent to the RT CRio via a Fifo where a VI is collecting 4 seconds worth of data by assembling the arrays together as they are received from the FPGA.  The data is displayed on a graph.

What is not working:  We would like to be able to save the data either continuously or by snapshot.  When using the WriteTo text file subVi in the CRio I get an error on open.  I also tried the write to Spreadsheet to no avail.

What is confusing to me is where is the subVI trying to write.  The sub VI isa running on the CRio while the intended target is the hard drive on the Host computer.  Is this possible?   In the case where the CRio is on a network how can the CRio know which host to write to. Is this suppose to work?  IF yes, what would generate the Open Error?.  Obviously this is a very large amount of data and I am also worried about the system capabilites.

If this not the way I am suppose to use-it, what would be the optimum?  We have tried to send the data via Global Variable from Crio to the host where a VI is trying to catch the Data.  But I do not seem to be able to make-it work.  

 

Thanks
0 Kudos
Message 15 of 17
(3,866 Views)

Hey,

If you want to store the acquired data on your Host PC you will need to build a communication between RT target and Host, e.g. using TCP/IP, UDP, STM, shared variables, ...

In your case I would suggest to use STM Simple TCP Messaging Protocol (http://zone.ni.com/devzone/cda/epd/p/id/2739) to transfer the data to your Host PC and then save it there using e.g. TDM storage VIs. At your RT VI just keep in mind whats the timecritical part and place it in a own loop (TCL Time Critical Loop), from which you transfer the data using RT FIFOs to another loop (NPL Normal Priority Loop) doing the communication to the host via STM.

Attached you will find an example of communication between FPGA, RTController and HostPC (Data Storage on Host not included!). To run it you will need to install the STM library.

Hope this helps!

Christian

0 Kudos
Message 16 of 17
(3,828 Views)

Hello ..to all..

 

I m using cRIO 9074 for aquiring data from 24 pt 100, 6 flow sensor, I am trying to write data through writedata to spreadsheet.vi and TDM but nothing is worked..:(

 

i tryied almost all possible way ...

 

is there any suggestion ..how can i write data for further analysis..

 

Regards

Tejas

0 Kudos
Message 17 of 17
(1,050 Views)