D
D
DrOptik2021-08-14 13:18:45
C++ / C#
DrOptik, 2021-08-14 13:18:45

How much data can be placed in Chart WinForms?

Good afternoon, the
measuring device transmits the measured values ​​on command via RS232. Implemented in C# WinForms. In the text box, all these values ​​are shown, one after the other
. Dots (Chart).
I wondered how many points can be placed in this chart or how long it takes to read and display instrument readings in the Chart ...?

Through the Timer, I sent a command to the device with an interval of 100ms. Approximately 4000 points were displayed in the chart and then everything hung.
Maybe the Buffer is full or the data reception is limited in the chart ..?
How to make it so that the measurements would be shown indefinitely? Or at least 100 hours? :)
For example: On the X-axis is the time and on the Y-axis is the result of the measurement.

private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            dataIn = serialPort1.ReadExisting();
            this.Invoke(new EventHandler(ShowData));
        }


private void ShowData(object sender, EventArgs e)
        {
            int dataLength = dataIn.Length;
            lblDataInLength.Text = string.Format("{0:00}", dataLength);
            if (chBoxAlwaysUpdate.Checked)
            {
                textBoxDataIn.Text = dataIn;
            }
            else if (chBoxAddOldData.Checked)
            {                
                textBoxDataIn.Text += dataIn;
            }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question