LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition and Analysis

Project Overview: I am pretty new to Labview and I have been given an assignment on an existing .vi to add analysis of the live data that is generated during a 30 minute process. We are monitoring 9 factors (time, pressure,...) and the 30 minute process/data is divided into 9  states based on time. Out of 9 states, two (Valmat Cycle, H20 Pressure cycle)  are important and out of 9 factors, four (coarse pressure gauge, fine pressure gauge, Valmat flowrate and H2O flowrate)  are important.

Task: So, I need to be able to select data (during live reading) for each factor at each stage and calculate mean & deviation. If something is off, I need to report it as a warning.

 

P.S: All the data generated is saved into a log file (csv). My explanation might not be clear so I am attaching the data file and an image which shows where the live data generated can be accessed.

Download All
0 Kudos
Message 1 of 6
(2,545 Views)

And what exactly can we help you with? There's no question. "Help me do my task" is implied, but please be specific on what you tried and where you are stuck.

 

If you ask general questions, you'll get general answers. Like:

Use a producer\consumer.

Do some courses.

Etc.

0 Kudos
Message 2 of 6
(2,482 Views)

The first thing I need to be able to do:

Segregate the data into two parts based on the state factor (Valmat Cycle, H20 Pressure Cycle). How can I do that?

What I have tried:

- Read in data from a .csv
- I made a for loop to iterate through the elements
- Made a case structure inside the loop where I would check whether the state is Valmat Cycle, H20 Pressure Cycle or neither

- Now I am stuck, where should I store the selective data?
   1. Outside the for loop, in an array or just plot the data?

My attempt: For each case I though the data would be segregated in the case structure and I could just plot the data on a graph. So I drew the wire out of the case structure, then out of the for loop and into a Waveform graph. Error - Tunnel: Missing assignment to tunnel. Screenshots of a similar example attached)

   2. Inside the for loop, possibly a global array variable? (But I don't know how to go about this approach)

 

Thank you for responding,

Kaivan

Download All
0 Kudos
Message 3 of 6
(2,441 Views)

Hi Kaivan,

 

when you want to build/manipulate an array in a loop you should store this array in a shift register.

 

This is pretty basic LabVIEW stuff: you surely know about those free beginner courses offered by NI?

 

(With recent versions of LabVIEW you could use conditional output tunnels…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,438 Views)

@GerdW

Thank you, that was really helpful in understanding the basics. I have made quite some progress but I am stuck here.
I was able to segregate and get the subset of data i.e column 3 which has the state of the readings. Now, I want to be able to count how many number of times a particular state ("Valmat Cycle", "H20 Pressure Cycle") occurs in the data and store it in a variable. How can I do that?

 

Possible approach: Loop through the subset data and increment the variable each time that state occurs? (Not certain how to do this and it is the last thing I need to do)

 

Thanks,

Kaivan

0 Kudos
Message 5 of 6
(2,406 Views)

Nvm, I figured it out using a shift register. 

0 Kudos
Message 6 of 6
(2,393 Views)