[英]Real Time Data Plotting With Qt, QWT and C++
I'm compelety new to Qt,QWT and have a basic knowledge in C++. 我是Qt,QWT的新手,并且具备C ++的基础知识。
According to the project that i got, i have to acquire some data given by the sensors on a caravan, like solar panel voltage and current, the temperature,humidity and so on. 根据我得到的项目,我必须获取大篷车上传感器给出的一些数据,如太阳能电池板的电压和电流,温度,湿度等。 All these datas are acquired by some sensors and collected by a NI 6229 DAQ Device. 所有这些数据都由一些传感器采集并由NI 6229 DAQ设备采集。
Until now, i just gave the sidelights. 直到现在,我只是给了侧灯。 Now i'm coming to the real problem. 现在我要解决真正的问题。
I want to acquire the datas that came from the DAQ device and show,plot,record and log in a program. 我想获取来自DAQ设备的数据并显示,绘制,记录和登录程序。
I've decided to use C++, Qt and QWT. 我决定使用C ++,Qt和QWT。 And the NIDAQMX API for acquiring the data from the DAQ device of course. 当然,NIDAQMX API用于从DAQ设备获取数据。
I've already designed a GUI partly, but the point where i stuck is the real working part of my code. 我已经部分设计了一个GUI,但我卡住的地方是我的代码的真正工作部分。
I don't know how to implement all these stuff with taking the performance criterias into account and i really need a guide. 我不知道如何考虑性能标准来实现所有这些东西,我真的需要一个指南。
How should i handle data acquisition ? 我该如何处理数据采集?
How should i plot the datas that i acquire ? 我应该如何绘制我获得的数据?
Are these need to be seperated by different threads or some another structure ? 这些是否需要由不同的线程或其他结构分开?
Does collecting almost 10 or 12 channels data and plotting it in real time cause reasonable performance problems ? 收集几乎10或12个通道数据并实时绘制数据会导致合理的性能问题吗? If so, how can i handle it ? 如果是这样,我该如何处理?
Thanks in advance. 提前致谢。
If you write a simple program to work with NI 6229, you need to set the priority of operations: plotting or recording data. 如果编写一个简单的程序来使用NI 6229,则需要设置操作的优先级:绘制或记录数据。
In most cases, data storage is the most important operation. 在大多数情况下,数据存储是最重要的操作。
In my practice, I used the following algorithm: 在我的实践中,我使用了以下算法:
It's solution for simple program only and not for realtime OS. 它只是简单程序的解决方案,而不是实时操作系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.