How to plot Y array with constant X increment
Posted: Thu Dec 27, 2007 1:11 pm
I want to use DPLOT Jr to plot the values of an analog-to-digital converter (ADC).
The plot should display three curves as the the converter provides three analog channels.
The Y axis relate to the sample values of the converter. The x axis relates to the samples numbers (1, 2, 3, 4...).
A LabWindows program controls the ADC and reads blocks of 10000 samples. This blocks will be "send" to DPLOT as soon as they been read from the ADC.
For example: samples to read = 50000, block size = 10000, channels = 3
The LabWindows program reads the first block of 10000 samples of channel 1. Sends the data to DPLOT and read the next block of channel 1. The will be repeat 5 times for channel 1. Dlot should append the data always to the same curve as any data belongs to channel 1. X axis will be numberd from 1 to 50000.
Afterwards channel 2 will be read and send to DPLOT (in blocks of 10000 samples). Channel 2 should be the second curve in the same plot.
Afterwards channel 3 will be plotted the same way as channel 1 and 2.
To reduce memory requirements I don't want to create a x array holding values 1,2,3,4...
Is it possible to send Y data to DPLOT and the x axis increments automatically?
How to add data to a specific curve?+
Thanks for your help!!!!
The plot should display three curves as the the converter provides three analog channels.
The Y axis relate to the sample values of the converter. The x axis relates to the samples numbers (1, 2, 3, 4...).
A LabWindows program controls the ADC and reads blocks of 10000 samples. This blocks will be "send" to DPLOT as soon as they been read from the ADC.
For example: samples to read = 50000, block size = 10000, channels = 3
The LabWindows program reads the first block of 10000 samples of channel 1. Sends the data to DPLOT and read the next block of channel 1. The will be repeat 5 times for channel 1. Dlot should append the data always to the same curve as any data belongs to channel 1. X axis will be numberd from 1 to 50000.
Afterwards channel 2 will be read and send to DPLOT (in blocks of 10000 samples). Channel 2 should be the second curve in the same plot.
Afterwards channel 3 will be plotted the same way as channel 1 and 2.
To reduce memory requirements I don't want to create a x array holding values 1,2,3,4...
Is it possible to send Y data to DPLOT and the x axis increments automatically?
How to add data to a specific curve?+
Thanks for your help!!!!