LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data from Host VI

I have looked at a post under "cRio write to measurement file" and I believe I am having the same problem. I am using a 9233 module with the cRIO and am trying to save the data into a file. I can get output on the graph but the file isn't showing up in the folder. I have put a shared folder on the desktop and am saving the write to measurement file to \\computer name\shared folder name\test.lvm. This still is not saving the file. What do I need to do?
 
Thanks,
Jimmy P
0 Kudos
Message 1 of 8
(5,484 Views)

Hi Jimmy P,

 

Thank you for contacting National Instruments.  From the information you have provided here, it looks like you are successful in getting the information back to the host PC, but are running into problems when writing this to file.  What medium are you using to transfer the information?  What method are you using to write to file?  Are you pulling the information from the same wire that is feeding your graph?

 

There are some resources that might be helpful when writing to file.  I have found a KnowledgeBase article that is searchable from ni.com/support that should be helpful in breaking down a simple way to do this.  You may need to create the file ahead of time and just reference the location you want the information to be added.

 

I hope this helps!  Let me know if there is anything else I can help with or clarify.  Have a great day!

 

Jason W.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(5,458 Views)
Jason,

It ended up being that I had the host VI under the cRIO folder in the Project Explorer. Once I put it under My Computer, I was able to save the data. However, the laptop needs to be connnected in order to this. For what I am using the cRIO for is for onboard data aquisition and I want data to be collected when I power up the cRIO. I think this means I want to save the FPGA to the flash memory. After a test run, I would like to transfer any needed files to the laptop from the cRIO memory. From what I have read it looks like this is possible, but I don't know how to set this system up as far as what VI I need where in the Project Explorer and on the hardware. Would you be able to help?

Thanks,
Jimmy
0 Kudos
Message 3 of 8
(5,444 Views)
Hi Jimmy,
From my understanding of your post, I think what you are trying to do is to load the FPGA VI to your FPGA when the cRIO chassis starts up, and then transfer the data from your FPGA to your cRIO host, and store the data on the flash memory of the cRIO host.
To gather data from FPGA to cRIO, you can use either DMA or interrupts (reading values from a control, for example).
To record data on a cRIO controller once you've gathered the data through FPGA, you can use the VIs under File IO and write to a specific file on your cRIO memory.
Now once you have that file on your cRIO controller, there are a couple of things that you can do to transfer it from your cRIO to your computer once the cRIO is connected through the network.  You can use a ftp client on your PC to ftp into your cRIO and copy the file over.  You can also write a VI that copies file through FTP from your cRIO.
Those are probably your best bet for transfering file from the cRIO to your PC.
Hope this helps!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support

Message 4 of 8
(5,337 Views)
Thanks for the response, but I am still unsure of how to do this. I have two VIs. Both are under the cRIO target on the Project Explorer. I have a FPGA VI and Host VI to convert the data to engineering units of Volts. I am able to access this saved data from the ftp tranfer files on MAX, but I need to actually click the run button on the Host VI to start the data collection. We will put the cRIO in a car without the laptop. We want to power up the cRIO and then have the FPGA program to run as well as the VI that converts the data to volts and then save this data. But I don't know if I can put the Host VI on the target and how to start the data collection. Do you have any specific documents that help me understand how to do this? Thanks  a lot.

Jimmy P.
0 Kudos
Message 5 of 8
(5,032 Views)
Hi Jimmy P,
 
It sounds like you just need to configure the cRIO to download and run the FPGA VI automatically and have the RT Host VI run when the cRIO is powered on. The best resource describing how to do this is the LabVIEW Help. In the LabVIEW Help under the Contents tab, select:
  • FPGA Module->FPGA Module How-To->Downloading an FPGA VI to the Flash Memory of an FPGA Target
  • FPGA Module->FPGA Module How-To->Configuring FPGA VIs to Run Automatically
  • Real-Time Module->Real-Time Module How-To->Deploying Deterministic Applications->Building a Stand-Alone Real-Time Application
  • Real-Time Module->Real-Time Module How-To->Deploying Deterministic Applications->Running a Stand-Alone Real-Time Application

Hope this helps!



Message Edited by lion-o on 12-03-2007 06:34 PM
0 Kudos
Message 6 of 8
(4,995 Views)

Mike L,

Thanks for the tips in LabVIEW help. I have found the first three, but do not see the running a stand alone application. It seems to me like I may have everything I need deployed but I don't know how to run the system. This is how I do it now: unplug the ethernet cable, power down and then power up the cRio, shake the accelerometer, plug the ethernet cable back in and then look in MAX under file trasnfer to see if the file was saved. However, I am not able to view this file so I think the file is not being saved. Any ideas what I'm doing wrong?

 

Thanks,

Jimmy

0 Kudos
Message 7 of 8
(4,962 Views)

Hi Jimmy P,

If you're in the project environment, you can right click the build specification and select "Set as Startup". Here is the link to the Help document.

0 Kudos
Message 8 of 8
(4,931 Views)