This is determined by the way of drawing function execute in LabWindows/CVI. When a waveform drawing function is called, LabWindows/CVI will create a copy of the data. Each time you add a curve to a waveform, LabWindows/CVI redraws all the curves in the waveform. As the number of curves displayed in the waveform graph increases, the program runs slower and slower.
In order to improve the efficiency of the program.
- Double-click the graph control in the .uir file to open the control editor
- Remove the checkmarks in front of the Smooth Update and Copy Original Plot Data selection boxes.
- Changing the Data Mode from Retain to Discard will also improve performance.
But you may not see the curve you previously painted on the waveform (drag the user interface to the display region outside when running, and can't see the curve after drag back).
The quickest way to draw graphics is to use the Canvas control instead of the graph control. The canvas control is an area where you can draw arbitrary graphics and can be used to display lines, points, text, waveforms, and bitmap files. When using the canvas control, LabWindows/CVI saves the graphic to a bitmap outside the interface, allowing the user to add the waveform directly. However, the canvas control does not distinguish between the different graphics parts displayed on it. So if you want to use a cursor or access a single curve, the waveform diagram may provide a better solution.