10-19-2017 03:20 PM
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.
10-20-2017 06:34 AM - edited 10-20-2017 06:35 AM
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.
10-23-2017 09:45 AM
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
10-23-2017 09:48 AM
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…)
10-24-2017 02:08 PM
@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
10-24-2017 03:50 PM
Nvm, I figured it out using a shift register.