Home > Back-end >  Thread usage is a must
Thread usage is a must

Time:10-05

200 KHZ sampling frequency, which is a data 5 microseconds, acquisition is completed by the hypogyny machine timing, but via a serial port is passed to the PC, PC or data need real-time display dynamic curve, then the PC should be 5 microseconds to draw a dot, such circumstance is it must use multithreaded programming, one thread communication and store data, a thread drawing, the mouse is the response of the main thread interface, my idea right?
Or PC can also use the timer, regularly collecting data and drawing, no thread, feasible?

CodePudding user response:

Come with receive data in the serial port communication thread, just call the function
Play in receiving data statements add picture below point program

CodePudding user response:

Use multithreading, especially the interface, don't look down upon it, for such a small time interval you it is very time consuming

You should use a separate thread is receiving data, then don't write the screen, but in the memory, then the picture with a separate thread to the screen, it can use the timer, such as 200 milliseconds to draw a can

CodePudding user response:

Real-time picture screen don't understand it really a millisecond, but want to consider the time delay of the eye and the brain, the eyes of the response time of 0.1 seconds, and the judgment of the brain completely enough time 0.2 seconds

CodePudding user response:

Screen refresh the whole, at the same when depicting a points and 100 points is the same, so you draw 40 points to 0.2 seconds

CodePudding user response:

If you don't need, you can also block way,

CodePudding user response:

Screen is 60 hz refresh rate, more than this is useless.
You 200 times a second picture, screens also update only 60 times.
  • Related