LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I adapt example code for cRIO/RT/FPGA for new hardware?

Hi All,

 

I need some guidance adapting the example "Developing High-Speed Continuous Buffered Data Acquisition Applications with CompactRIO" for my hardware: cRIO-9114 and one C series 9220 AI module. 

 

First off, what's a high level overview of what I will need to do? For example, I'm expecting something like this:

  1. Download example, open project file 
    (i.e. "Buffered DAQ (FPGA).lvproj")
  2. Add new hardware to project
    (i.e. right click Project:... > New > Targets and Devices... > [follow prompt to add device]. 
    Note: This assumes RT and FPGA modules are installed and the device is showing up in MAX)
  3. Move VIs to new device/targets
    3a. copy/paste FPGA VIs to new FPGA targe (for me = "FPGA Target 2 (RIO0, cRIO-9114)")
    3b. Copy/Paste Host VIs to new Chassis
  4. Create new FIFO 
    (or move, as with VIs?)
  5. Update VIs to reference the new hardware
    5a. Replace or update Analog Inputs, i.e. the FPGA I/O Nodes  
    (delet old analog input drag and drop "Mod1/AI0" from Project Explorer under the new FPGA Target. fix wiring)
    5b. Replace or update FIFO Method nodes
    (Note: Looking at a new project for the first time, it's tricky to tell how many VIs are used, what changes need to be made to each, and where they need to be saved in the project. I think this where I'm stuck right now. FYI)

At this point, I should be able to run the example, correct?. So far, the example has not been changed in any way other than updating the inputs to expect different hardware...

 

Next, I would need to edit the VIs for my application.

Specifically, for my application, I need to:

1) Increase the inputs to eight (instead of four, as in the example);

2) Adjust coeficients (i.e. calibration, scaling);

3) Adjust data logging parameters (i.e. filenames, sampling rate, FIFO parameters, anything else?)

 

I think I can the VI re-programing IF I had the example already working with my hardware.

 

So again, I'm interested in a procdure I can follow when adapting example labview code for new hardware to be sure that I make all the necessary changes.

 

About my application: I'm setting up this cRIO system  to monitor performance of a solar array. I am measuring voltage and current at four locations each, so I have 8 total +/- 5V analog inputs to my 9220 module (I'm using Verivolt brand voltage and current transducers to generate the input signals). I only need to save maybe one reading per minute. To clean noise in the signals, I need to sample maybe 100 readings per minute, and then average these before further processing. Then I will compute power (P=I*V) and efficiency (E=P_in/P_out), and save everything to a data file (.tdms).

 

Note: I worked through the tutorial "Getting Started with CompactRIO - Logging Data to Disk". My example procedure is based off of the steps I took to get this tutorial working with my hardware. I'm still sifting through other posts too.

 

Many Thanks!

0 Kudos
Message 1 of 2
(2,148 Views)

Yes, your process as described seems appropriate. Have you tried this on an example? Have you run into any issues?

 

Regards,

 

Brandon V.

Applications Engineer

National Instruments 

0 Kudos
Message 2 of 2
(2,062 Views)