none
Real Time data plotting RRS feed

  • Question

  • Hi,

     I'm working on a console application and I need to plot my data in a real time. Anyone have any idea from what to start?

    I get every second temperature value and I display it in the console, instead I want to do a real time graph.

    Many thanks.

    • Moved by Stanly Fan Wednesday, September 12, 2018 2:07 AM
    Tuesday, September 11, 2018 12:49 PM

Answers

  • Hi i.Haaa,

    If you want to display a real time graph, try to use Winform chart control instead of console application.

    Here is a simple in the link below about how to create a chart using chart control.

    http://csharpexamples.com/c-chart-control-example/

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by i.Haaa Thursday, September 20, 2018 8:14 AM
    Thursday, September 20, 2018 2:26 AM
    Moderator

All replies

  • Hi i.Haaa,

    According to your description, I have some questions to confirm with you.

    1. what is the way to display in the console? Like Console.writeline() to show the text line by line?

    2. How do you pass the data? How do you get the data to pass?

    3. Does the data update by the same interval time?

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 12, 2018 8:03 AM
    Moderator
  • Hi Wendy,

    Thank you for your reply.

    1. Yes I'm using Console.WriteLine() to display data

    2. Actually I get data from Serial Port by sending AT commands. For some data I get from the serial port I do some calculation ex: I get from the serial port NR05674 so I took 05674(resistance value) and I convert it to temperature value. Then I want to plot it

    3. Yes data update every 1s

    Thanks in advance,

    i.Haaa

    Wednesday, September 12, 2018 9:28 AM
  • Hi i.Haaa,

    Thank you for feedback.

    >>2. Actually I get data from Serial Port by sending AT commands. For some data I get from the serial port I do some calculation ex: I get from the serial port NR05674 so I took 05674(resistance value) and I convert it to temperature value. Then I want to plot it

    If you just want to display the data in the Console, you could download the source file from the links below for reference to get the data from serial port.

    https://www.codeproject.com/Tips/361285/Serial-Port-Communication

    https://www.codeproject.com/Articles/75770/Basic-serial-port-listening-application

    >>3. Yes data update every 1s

    You could use Timer to run the method which you used to get the data from serial port every 1s.

    https://docs.microsoft.com/en-us/dotnet/api/system.timers.timer?view=netframework-4.7.2

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 13, 2018 7:27 AM
    Moderator
  • I already display it in the console what I want is a real time graph with theses values. I don't know how to do it
    Thursday, September 13, 2018 11:29 AM
  • I think you need to move your application from console based to Windows based if you want to plot data real-time.

    Andy

    Friday, September 14, 2018 2:01 PM
  • Thank you, I'll try to do it.

    i.Haaa

    Monday, September 17, 2018 9:00 AM
  • Hi i.Haaa,

    If you want to display a real time graph, try to use Winform chart control instead of console application.

    Here is a simple in the link below about how to create a chart using chart control.

    http://csharpexamples.com/c-chart-control-example/

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by i.Haaa Thursday, September 20, 2018 8:14 AM
    Thursday, September 20, 2018 2:26 AM
    Moderator