摘要
为满足各种工业控制系统中常见的动态实时曲线绘制的需要,在.NET平台上以C#为开发语言,设计并实现了一个动态实时曲线类。对实时曲线绘制中绘图坐标的设置和显示、动态曲线的绘制和动态刷新等关键问题进行了分析。首先把坐标系统的绘制以及实时采集到的数据进行封装,并采用一个队列来存储已绘制曲线的历史数据,队列满后通过去掉队头数据,队尾追加新数据的方法更新数据,并重绘图形,实现曲线的实时动态更新。实验结果表明,该方法所设计的动态实时曲线类具有实时性好、通用性强、便于重用的特点,可以在各种工业控制系统中推广使用,提高开发效率。
In order to satisfy plotting dynamic realtime curve in the industrial control system, a class of dynamic realtime curve is de signed and implemented with C# language based on. NET platform. The key problems that include the coordinate setting up and display, dynamic curve plot and dynamic refreshing in the monitoring data's realtime plotting are analyzed. In this class a queue is created to save history plotted data. If the queue is full, the first data dequeue in the queue and the new data enqueue, then the data curve is redrawn with datas in the queue. The experiment result shows this the class has good characters of realtime, generality and reusability, can be applied into various industrial control system, improving the development efficiency.
出处
《计算机技术与发展》
2013年第3期179-182,共4页
Computer Technology and Development
基金
教育部直属高校特色项目(O2600005)
关键词
动态实时曲线
工业控制系统
NET
dynamic real-time curve
industrial control system
. NET