LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read specification cluster from LVM file

Solved!
Go to solution

Does anyone have a clever solution to programmatically read limit specification masks (for waveform limit tests) from an LVM file?

 

I used the "Mask and Limit Testing" Express VI to create the masks, which I saved as LVM using the save-data feature.

 

I don't want to use the Express VI to do the actual test because the testing is in a subVI that's called within a loop; each iteration of the loop needs to send different masks to the Limit Test.vi that's in my subVI.

 

Thanks,

-a

0 Kudos
Message 1 of 5
(2,977 Views)
Solution
Accepted by Andy Peters

Hi Andy,

 

 The LVM is a text file so you can read that in using read file function.

After that I search the string to find where the data starts using Match Pattern

You then process the remainder of the file string and then use Speadsheet String to Array with a tab as its delimiter. 

There are tabs at the start of each line and extra line-feed at the end so I used array subset to avoid those areas. This might not work each time but you can fix that when you run into a problem.

 

 

 

cheers

 

David

Message Edited by David Crawford on 11-05-2009 10:01 PM
0 Kudos
Message 2 of 5
(2,960 Views)

Hi, David,

 

Yeah, that works!

 

Perchance, do you know the difference between the Create Continuous Mask variant of the Limit Specification.vi and Create Segmented Mask variant? The help entry is remarkably unhelpful -- the descriptions of the two are identical! Specifically, it describes the Specification Cluster input as being the same for both, but that's not true -- the segmented version accepts an array of clusters of arrays, wherease the continuous version accepts simply a cluster of arrays. Other than that difference, there's no description of how to actually use either. Yeeesh.

 

Thanks,

-a

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

Hi Andy,

 

The polymorphic instance Create Continuous Mask.vi has only one line segment. So thats a cluster of x-array and y-array that you use to limit check all yourwaveform data.

The polymorphic instance Create Segmented Mask.vi has one of more line segment. So thats an array of cluster of x-array and y-array which can be used to only limit check parts of your waveform and ignore the other segments.

 

NI Example Finder has a couple of examples that include the Limit Specification.vi you should take a look at those.

 

cheers

 

David

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

David Crawford wrote:

Hi Andy,

 

The polymorphic instance Create Continuous Mask.vi has only one line segment. So thats a cluster of x-array and y-array that you use to limit check all yourwaveform data.

The polymorphic instance Create Segmented Mask.vi has one of more line segment. So thats an array of cluster of x-array and y-array which can be used to only limit check parts of your waveform and ignore the other segments.


How does one file an Enhancement Request (bug report)? The documentation for this VI is wrong -- it gives the same arguments for both flavors. And it doesn't explain the difference between the two at all.

 

In any event, the continuous flavor is what I need. Thanks!

 

-a

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