11-05-2009 12:54 PM
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
Solved! Go to Solution.
11-05-2009 04:00 PM - edited 11-05-2009 04:01 PM
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
11-05-2009 06:45 PM
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
11-06-2009 01:55 AM
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
11-06-2009 10:37 AM
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