From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement file scanning

Solved!
Go to solution

Hi,

I have large measurement files (measurement of 2- 3kHz, for 20-40 minutes, for 50 channels in total).

 

My goal is to scan the measurement file, find a specific value (for example: 5) in one of the channels (it is always the same channel), and delete all the data which appear before this value, in the specific channel.

 

During the scanning i'm only looking for the first specific value which appears in the channel.

 

How would you recommend to do so?

 

Thanks,

Reut

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

Hey,

 

What have you tried ? Maybe having your VI and the measurement file (or at least an example of it) would help to give you the right advices 🙂

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 2 of 5
(2,390 Views)

Hi,

Thanks for your response. 

 

My measurement file is simple, and looks like this:

Time           Channel 0           Channel 1          Channel 2 ....................

0            |       2                  |       2                |        0

0.001     |      2.1                |       3                |        0

0.002     |       3                  |       2                |        5

 

My goal is to scan column "Channel 2" and look for the first '5' value.

 

My program is not prepared, i'm also very new to LAB VIEW.

I would appreciate to hear any advice (for direction only).

(I though of using arrays and comparison functions for this purpose until now).

if it is relevant - Right now I use lvm files (text). But I trying to move to using csv excel files.

 

Thanks, 

Reut

0 Kudos
Message 3 of 5
(2,347 Views)
Solution
Accepted by topic author Gutenberg

Hi,

 

Here are some references and directions for you to learn 🙂

 

LabVIEW Basics : http://www.ni.com/getting-started/labview-basics/

 

How to read a CSV : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LdGSAU

Note that after reading the CSV file you will obtain à 2D array of text, integers, etc. according to what you select. So you will need array functions to manage the data and operation you want to use.

 

Array functions : http://zone.ni.com/reference/en-XX/help/371361P-01/glang/array_functions/

With your 2D data read form the file and considering your objective, I would do something like this :

  1. Index the 2D array to get the right column (/!\ column indexes start with 0)
  2. Once you have your column (which is a 1D array), search the value you want in it. If it exists, it shall return the first index where it was found in the array.
  3. Use that index to get an array subset of your column, hence removing the unwanted values.

 

Let's try that, show us your test VI so that we can help you further if needed and do not hesitate to ask questions 🙂

 

 

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 4 of 5
(2,340 Views)

Thanks a lot!

I'll update.

Again thanks for giving a direction!

0 Kudos
Message 5 of 5
(2,327 Views)