Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

real time waveform axis

Hi-

I am new to measurement studio and I am trying to configure software in visual c# to acquire and display an analogue signal acquired through the DAQ in my machine.  I am correctly getting/displaying data, however I am at a loss for how to 'tweak' the visualization.  First, the x axis is not displaying long enough extents.  If i change the waveformgraph extents using the GUI inside of Visual Studio before running the software, it automatically reverts back to the number of samples while acquiring.  Secondly, if I change the number of samples to longer, the graph axis displays a longer sampling period, but it doesn't update at the same framerate so it looks choppy.  E.g. I want to display 5 seconds of data but I want it to scroll and update at 10 hz.   Finally, I would like some information to read on how to look at the actual data and control other components.  E.g. I want to determine if the current voltage is below/above a certain threshold and if so change the color of the graph and an LED indicator.  Thanks in advance for any help/reading material you can provide-

 

0 Kudos
Message 1 of 2
(3,618 Views)

Hi,

 

The problem may be that autoscale is still turned on your axis so even though you have set your own values on the UI it is being overwritten.  In the graph options you should be able to find the autoscale option and disable it.  This can be done using the graph properties >> behavior >> mode and setting to fixed.

 

When you set the number of samples this is the number of samples the buffer will fill before plotting to the graph, therefore it is impossible to plot at a rate faster than is being aquired.  I suggest having a read through the following links which should enforce your understanding of the DAQmx drivers and assist your programming.

 

http://zone.ni.com/devzone/cda/tut/p/id/5434 - Getting started with NI DAQmx

 

http://zone.ni.com/devzone/cda/tut/p/id/5409 - Using DAQmx in text based programming enviroments.

 

http://zone.ni.com/devzone/cda/tut/p/id/2835 - Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

 

Although much of this information centers around LabVIEW the drivers function in the same way, you will simply need to look at the function reference in the help files for the correct way to implement each function in C#.

 

Regards,

 

Thomas Clark

 

Applications Engineer
National Instruments UK & Ireland
Message 2 of 2
(3,577 Views)