Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Display interleaved data on Waveform graph

I'm wondering if it is possible to display portions of interleaved data on a waveform graph control, and if so how? What I want to do is display data acquired from a single DAQmx task with multiple analog input channels.

Also, where is the help reference for this control and the other measurement studio controls. I can't seem to find them anywhere.

Thanks,

John Voltz
0 Kudos
Message 1 of 5
(4,209 Views)
John,
I went back and looked at your previous posts in the VB6 forum to make sure I understood your configuration. My understanding is that you are:
1) Calling the DaqMx C API through platform invoke methods in VB.NET 2005
2) Using Measurement Studio 7.1 for Visual Studio 2003 user interface components in VB.NET 2005.

Is that correct?

To answer your questions:
Help: There should be a link from the start menu under "All Programs >> National Instruments >> Measurement Studio 7.1 for VS.NET 2003 >> Measurement Studio Documentation". We did have a Driver CD installer bug at one point where that link was not installed. If you don't see that link, you should look in C:\program files\National Instruments\MeasurementStudioVS2003\Help. This is where all of our Measurement Studio help is installed. HxS files are Help 2.0 files, used primarily for Visual Studio documentation, but if you have VS 2005 installed, you should be able to view them. Our help files are meant to be integrated into the Visual Studio 2003 help, but they will not show up in the VS.NET 2005 IDE.

Interleaved data: The graph control doesn't intrinically support graphing interleaved data from a 1D array. However, there are several options to do what you're looking for. I don't exactly which function you're calling in the DAQ C API to read data back. However, all of the "daqMxRead" functions should take a parameter called FillMode. A value of 0 means that the data is organized by channel (non-interleaved). A value of 1 means that the data is interleaved. So, you can:
1) Read that data back non-interleaved, and do the array offset math to plot the portions of the channels you want to.
2) Change the signature of the DllImport for the read method you're using to take a 2D array instead of a 1D array. Allocate a 2D array of dimensions (ChannelCount, SampleCount). Pass this 2D array to the Read function and read the data back non-interleaved. You can now use PlotMultiple on the graph to plot all of the data, or loop through the arrays and plot a subrange of each channel.
3) Like 2, but allocate the array with dimensions (SampleCount, ChannelCount), acquire the data interleaved, and in the PlotMultiple method, use the overload that allows you to specify the DataOrientation. Set the parameter to DataOrientation.DataInColumns. Note that there is significant performance overhead associated with plotting data with the DataInColumns orientation.

I recommend going with option 2 - I believe this is the most straightforward way to "display portions of interleaved data on a waveform graph control".

I note that a large portion of the difficulty you've been having up to this point stems from your use of VS.NET 2005. I'm not sure what you meant by "Availability" in an earlier post, but I'll mention that the .NET Framework v 1.1 SDK is available as a free download from msdn.microsoft.com. Using the 1.1 Framework would allow you to use our DaqMx .NET API in your project, along with avoiding incompatibilities between our UI components and the 2.0 Framework that VS.NET 2005 uses. You can also get a free IDE for use with the 1.1 Framework from www.sharpdevelop.com, if you don't want to give up the RAD capabilities of Visual Studio.
0 Kudos
Message 2 of 5
(4,192 Views)
Hi Glenn,

Thanks for the response. I decided to use the group by channel method and do the offset views, it works great. I failed to mention that I am viewing each channel in seperate plot controls, so this makes it easy. For any other crazy VS 2005 users out there, the only way I have found to view the Measurement Studio help files is to use the following link URL to access the NI namespace help:

ms-help://NI.MeasurementStudio/Main/static/MStudio_Start.html

The help filters do not show up in the list, so you have to rely on the embedded links to get around. I tried to use VS Help Integrator to load the files but I'm not experienced enough in that area to get it going.

Thanks,

John Voltz
0 Kudos
Message 3 of 5
(4,181 Views)
You can also use the standalone Help2 viewer at http://helpware.net/downloads/#h2viewer to open the .HxS help files directly.

- Elton
0 Kudos
Message 4 of 5
(4,177 Views)
Elton,

Great tip on the Help 2 viewer, works great. Thanks!

John Voltz
0 Kudos
Message 5 of 5
(4,154 Views)