Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How does DAQ Assistant (C#) connect data to the waveformGraph1 object?

In using DAQ Assistant (http://zone.ni.com/devzone/cda/tut/p/id/4652) to display analog data, I would like each separate data line to display in a different color in the automatically generated waveformGraph1 object. I am completely unclear on how the NI device data is connected to the waveformGraph1 object. It does not seem to be done via C# code that I can find. Is XML being used? Anyway, how can the various analog input data series be colored differently? Thanks, Val Veirs Prof. of Physics Colorado College
0 Kudos
Message 1 of 3
(3,565 Views)
Hi Val,

The DAQmx User Control is the form that contains the code for binding the NI device data to the WaveformGraph.  If you used the same names as the developer's zone article, then it will be in your project with the filename DAQmxUserControl2.cs. Open this file and you will be able to add plot schemes (colors, line style, etc.) for plotting on the waveformgraph via the designer (Right-click and select Edit Plots) or you can View Code for this form and programmatically change settings.  Let me know if this helps.

Have a great day,

Ecleamus Ricks, Jr.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,557 Views)
Hi Ecleamus,
Thanks for the suggestions.  With a little puttering around I learned that via the right-click on the [Design] view of the waveformGraph object that I can select Edit Plots and then click on Add which creates another waveformPlot object within the collection assigned to this waveformGraph.  Changing this waveFormPlot's color, for example, affects the second of my several parallel data channels.

Thanks again.

Val

p.s.  I added these few details to speed up someone else's efforts.
0 Kudos
Message 3 of 3
(3,522 Views)