Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor data using cRIO-9023 & NI-9148 and save data to a new Excel file on PC upon Trigger

Solved!
Go to solution

Hi,

 

I am new to using cRIO and was trying to write a simple LabVIEW code that monitors (plots on a waveform chart) analog data and saves the data in an excel file on PC upon trigger until stopped. It also needs to save the data to a new Excel file (next available filename) every time trigger is enabled.

 

I am using cRIO-9023 and NI-9148. All slots are full with NI-9213 (x15) and NI-9215 (x1). NI-9215 is located on slot 8 on NI-9148. In total I have 228 thermocouple inputs and 2 analog inputs for RPM and Torque. RPM and Torque are both in voltage where 1 volt = 1000RPM. The conversion factor is same for torque.

 

I am trying to do this in RT. I am trying to use while loop to read data from the modules at 10Hz sampling frequency, put all the data in array(s), use waveform charts (convert arrays to clusters and then feed into waveform charts) to plot the data, and use "Write to Measurement File" to write the data to Excel file on PC by using a conditional loop.

 

However, I am not getting anything. Once I run my code, basically nothing happens. It neither writes the data to an excel file upon trigger nor displays anything on waveform charts. I am sure there are probably quite a few rookie mistakes in there but I am not sure how to proceed forward from here.

 

Any help would be really appreciated!

0 Kudos
Message 1 of 3
(1,723 Views)
Solution
Accepted by topic author osamafarqaleet

You cannot directly save the data set into Excel on cRIO. VxWorks is running on cRIO-9023, it cannot handle Excel file format.

Where file path are you selecting? To be honest, your application is not running on Windows, on VxWorks.

 

  1. If you would like to save the data into Excel, you must transfer the data to Windows and then save it.
    Lossless Communication with Network Streams: Components, Architecture, and Performance
  2. If you would like to save the data into CSV and then transfer the file to Windows, follow the instructions below.
    Working with File Paths on Real-Time Targets
    Using WebDAV to Transfer Files to Real-Time Target
Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 2 of 3
(1,683 Views)

Thank you for the quick link. I figured out that I was running the VI in my PC which was also giving me bunch of errors. Moving the VI to cRIO and establishing a connection over ethernet for data transfer took care of the problem.

0 Kudos
Message 3 of 3
(1,602 Views)