07-20-2005 10:28 AM
07-21-2005 12:46 PM
Hi StevieB,
I've found this knowledge base article which describes how to extract a channel of data from an array - thought it may be useful
http://digital.ni.com/public.nsf/websearch/6362FC1543AEDF4186256DD500647B68?OpenDocument
Also you should be able to find a full list of functionailty for the ArrayOperations in the documentation which Measurement Studio Installs, just by searching for ArrayOperations.
Is there anything in particular that you needed help with?
Hannah
NIUK & Ireland
07-21-2005 01:48 PM
Hannah,
I was intrigued by your reply to stevieB. I have also been battling converting a VB6 app to Meas Studio 7 in vb.net for over 2 months now and still have not figured out the following:
1. how can I perform a "search" on the Meas Studio Help? As far as I can tell there is no facility to do this and its like looking for a needle in a haystack to find anything in the NI-supplied Help documentation.
2. I have the same problem as stevieB regarding finding the equivalent of the VB6 CWArray functions. I found an example somewhere that references a CWInstrumentControllib class, but I do not have this class in my installation and have no idea how to get it in there. I have found ArrayOperations under the Analysis.Math namespace, but the capabilities are limited and do not include many Meas Studio 6 conveniences like AddArray, MulArray, IndexArray etc.
Any help you can provide would be greatly appreciated,
J R
07-21-2005 05:47 PM
07-21-2005 09:13 PM
07-22-2005 03:31 AM
Thank you all for replies.
I'm trying to end up with the following Structure Spectra(Channel,FreqRange).ydata whereby Channel can be upto 64,FreqRange upto 3 i.e. 10kHz, 1kHz and 200Hz ranges, ydata being the spectra for each channel and frequency range.The functions that I use frequently therefore are as follows: -
' read 64 Autopower Spectra data into array for one frequency range.
ydata=Eng.ydata(0) this fills ydata with (blocksize/2,number of channels) - Eng.ydata(0) is filled with format (Blocksize,Channels)
ydata=CWArray.SubsetArray(ydata,Array(Array(0,.Blocksize/2.56),Array(0,Number of Channels)))
This returns the Spectrum data to the correct number of spectral lines.
form a channel count loop
I then use dblMag=CWArray.IndexArray(ydata,Array(null,iCount)) to Obtain A single Channel then use CWDSP.SpectrumUnitConversion for Converting the spectrum to dB.
I then use CWArray.CopyArray to copy the data out into the structure
Spectra(iCount,IFreqrange).ydata=CWArray.CopyArray(dblMag)
In an updategraph routine I use CWArray.CopyArray to strip out a single spectrum for a given freq range for plotting.
These routines are used for displaying Spectra from the device in realtime.
In .net this functionality is missing and some of them replaced, for me it would be better if they were still contained in ArrayOperations.
As regards help, ArrauOperation is buried in the Math operations whereas in VB6 they were all under CWArray. Hopefully these routines will be included within Version 8 when it arrives. By the way I haven't written a useful application in .Net thus far I'm testing things in 2005 Express.
07-22-2005 06:03 PM