Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. Create real time graphical line chart from data save in txt file format

Create real time graphical line chart from data save in txt file format

Scheduled Pinned Locked Moved Graphics
help
4 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yefeng_law
    wrote on last edited by
    #1

    hi all, I m a student, currently having problem on how i can start programming. my project require the use of an measurement device and it measurement are taken from the usb port and save in notepad .txt format, i am suppose to come out with an real time graphical display of the measurement, but i have no idea how i could start on it as i am new in programming. any help or suggest would be greater appreciated. Thanks

    T 1 Reply Last reply
    0
    • Y yefeng_law

      hi all, I m a student, currently having problem on how i can start programming. my project require the use of an measurement device and it measurement are taken from the usb port and save in notepad .txt format, i am suppose to come out with an real time graphical display of the measurement, but i have no idea how i could start on it as i am new in programming. any help or suggest would be greater appreciated. Thanks

      T Offline
      T Offline
      Tim Craig
      wrote on last edited by
      #2

      You say you're new to programming. How new? This isn't exactly a first project. What language do you plan to use? Unless you're actively monitoring the Notepad file as the data comes in, the data display wouldn't be considered "realtime". And if you're going to go to that much trouble, why not read the data from the instrument directly. If you need a text file, then write it from your program. Using Notepad this way is kind of hokey.

      If you don't have the data, you're just another asshole with an opinion.

      Y 1 Reply Last reply
      0
      • T Tim Craig

        You say you're new to programming. How new? This isn't exactly a first project. What language do you plan to use? Unless you're actively monitoring the Notepad file as the data comes in, the data display wouldn't be considered "realtime". And if you're going to go to that much trouble, why not read the data from the instrument directly. If you need a text file, then write it from your program. Using Notepad this way is kind of hokey.

        If you don't have the data, you're just another asshole with an opinion.

        Y Offline
        Y Offline
        yefeng_law
        wrote on last edited by
        #3

        hi, this is exactly my first program, i will be using C#. The device i am using is a usb connected PC digital TV receiver this receiver software actually have a function which measure the signal strength, BER and these data are save into an log file (thus it real time measurement data) once i start the device (start watch TV). I am suppose to use C# to get the real time measurement and convert it into graphic (line chart). I have try to get the data for the log file and display it in the textbox using the following code using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Testing_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { StreamReader objstream = new StreamReader("c:\\measurement.log"); textBox1.Text = objstream.ReadToEnd(); } but this is the error i got : the file been use by another program. I also try another method which is directly from the usb port which the device is connected to but i am unable to start working on it coding. i had been looking into example of usb_hib and ICSHARPUSBlib but i was unable to get anything out. Thus please help me, if i am in the right direction (get the data from usb directly?) or do you have any better item on how i should get this done, any code to refer to. thank so much

        T 1 Reply Last reply
        0
        • Y yefeng_law

          hi, this is exactly my first program, i will be using C#. The device i am using is a usb connected PC digital TV receiver this receiver software actually have a function which measure the signal strength, BER and these data are save into an log file (thus it real time measurement data) once i start the device (start watch TV). I am suppose to use C# to get the real time measurement and convert it into graphic (line chart). I have try to get the data for the log file and display it in the textbox using the following code using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Testing_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { StreamReader objstream = new StreamReader("c:\\measurement.log"); textBox1.Text = objstream.ReadToEnd(); } but this is the error i got : the file been use by another program. I also try another method which is directly from the usb port which the device is connected to but i am unable to start working on it coding. i had been looking into example of usb_hib and ICSHARPUSBlib but i was unable to get anything out. Thus please help me, if i am in the right direction (get the data from usb directly?) or do you have any better item on how i should get this done, any code to refer to. thank so much

          T Offline
          T Offline
          Tim Craig
          wrote on last edited by
          #4

          You have my sympathy. If this is your first program, I'd suggest your teacher is a sadist, or just grossly imcompetent.

          If you don't have the data, you're just another asshole with an opinion.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups