LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding data logging to an existing vi

Hi all

 

I currently have a vi which is being used as a front end control panel for a pxi chassis. The pxi is taking inputs from a number of sources including FPGA voltage and current transducers, and mostly over Ethernet from Beckhoff modules monitoring RTD and thermocouple temperature sensors. The input data is scaled/averaged/modified as appropriate and then is displayed on the front panel.

 

A new requirement has emerged to log all of the data displayed on the front panel. In total there are 270 individual parameters to measure including numeric and boolean data, and the logging rate is 500kHz. The desired output is a spreadsheet of some king with each of the 270 parameters as column headings and time running downwards. I have experimented with using the 'write to spreadsheet' blocks, but there is also a requirement that the data to be logged will be selectable through the front panel and I could not see a means of implementing this functionality.

 

I have done some research looking at using DAQmx etc to log the data, but the problem I have encountered there is that I do not want to log straight from the device channels, but from the interpretted data that is displayed on the front panel. Excuse my vagueness here, my labview knowledge is not the best and this is a project I have inhereted from someone else!

 

I was hoping there would be a vi of sorts where I could simply wire in a number, boolean, string etc and it would simply log it at a chosen rate but I was being overly hopeful!

 

any help would be appreciated

 

 

 

0 Kudos
Message 1 of 5
(2,565 Views)

The Array To Spreadsheet String will be your friend here.  Get all of your data into an array, use the Array to Spreadsheet String and write that string to your file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,559 Views)

@crossrulz wrote:

The Array To Spreadsheet String will be your friend here.  Get all of your data into an array, use the Array to Spreadsheet String and write that string to your file.


i hope the 'Spreadsheet String' is not your only BFF...you will have to convert data to string, build an array, how about something simple like?

Example_VI_BD.png

 

0 Kudos
Message 3 of 5
(2,546 Views)

Hi

 

Thank you both for your help. I shall have an experiment and see how i get on!

 

Many thanks

0 Kudos
Message 4 of 5
(2,509 Views)

At 500kHz and 270 parameters, your data rate is in the hundreds of megabytes per second.  I would strongly recommend you use a binary format instead of text.  TDMS works well.  Even at that, you may not be able to store data fast enough without a RAID array (although a modern SSD on a SATA 3 interface may be able to do it).  You may also want to read this paper on dealing with large data sets.  It has some dated content, but the most of the info is good.

 

Let us know if you run into issues.

Message 5 of 5
(2,490 Views)