论文部分内容阅读
使用微型机对生产过程进行实时控制时,A/D、D/A转换以及开关量输入、输出是必定要遇到的问题。因此,为了确保主机系统的稳定运行和模拟量、开关量的可靠传送,必须能有效地抑制受控现场所产生的各种干扰。强干扰之所以能导入主机,影响整个系统的可靠运行,主要是因为在主机系统与监测、监控对象之间存在着公共地线。本文着重论述在强干扰环境下进行实时控制时,去掉公共地线的重要性,提出一种通过采用两次“电-光-电”变换,将传送长线“隔”、“浮”在主机系统和监测、监控对象之间实现完全电隔离的设计思想,并且介绍按这种思想设计并适于Z-80微型机进行实时控制的实用遥测(A/D转换)系统(主要介绍它的系统配置、硬件结构及软件设计)。这种遥测系统,因其对传送长线进行了“隔”和“浮”的处理,因此具有便于匹配、抗干扰能力强以及传输长线费用低(可用普通导线代替价格昂贵的同轴电缆和扁平电缆)等特点。此外,对传送长线的这种处理同样适用于D/A转换以及开关量的输入和输出,因此会给微型机在工业生产、国防建设等方面的应用带来更大的方便。在软件设计方面,本文着重论述A/D转换设备做为一种资源,如何置于实时操作系统控制下的两种使用方式:巡回检测方式和中断处理方式。此外,还对如何使用软件方法滤除模拟量中的工频干扰成分,提高A/D转换精度的程序设计进行了介绍。
When using the microcomputer for real-time control of the production process, A / D, D / A conversion and digital input and output are problems that must be encountered. Therefore, in order to ensure the stable operation of the host system and analog, reliable delivery of the switch, must be able to effectively suppress the various types of interference generated by the controlled site. Strong interference can be imported into the host, affecting the reliable operation of the entire system, mainly because there is a common ground between the host system and monitoring and monitoring objects. This article focuses on the importance of removing public ground when real-time control is performed in a strong jamming environment and proposes a method that uses the two “electro-optic-electric” And monitoring, monitoring objects to achieve complete galvanic isolation between the design ideas, and introduced according to this idea and suitable for real-time control of the Z-80 microcomputer real telemetry (A / D conversion) system (mainly introduced its system configuration , Hardware structure and software design). This kind of telemetry system has the advantages of easy matching, strong anti-interference ability and low cost of long-distance transmission line because it can process “long” and “long” of the long-distance transmission lines (ordinary cables can be replaced by expensive coaxial cables and flat cables )Features. In addition, this processing of transmitting long lines also applies to the D / A conversion and the input and output of the switch, so it will bring greater convenience to the application of the micro-machine in industrial production and national defense construction. In software design, this article focuses on the A / D conversion device as a resource, how to place under the control of real-time operating system in two ways: circuit detection methods and interrupt handling. In addition, the program design of how to use the software method to filter out the common-frequency interference components in the analog and improve the A / D conversion accuracy is also introduced.