登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 外文翻译 > 电子信息类 > 通信工程 > 正文

可编程逻辑控制器外文翻译资料

 2022-12-06 03:12  

The Programmable Logic Controller

2.5 System Block Diagram

A Programmable Controller is a specialized computer.Since it is a computer, it has all the basic component parts that any other computer has; a Central Processing Unit,Memory, Input Interfacing and Output Interfacing.A typical programmable controller block diagram is shown in Figure 2.5.

Figure 2.5 Programmable Controller Block Diagram

The Central Processing Unit (CPU) is the control portion of the PLC. It interprets the program commands retrieved from memory and acts on those commands.In present day PLCs this unit is a microprocessor based system.The CPU is housed in the processor module of modularized systems.

Memory in the system is generally of two types; ROM and RAM.The ROM memory contains the program information that allows the CPU to interpret and act on the Ladder Logic program stored in the RAM memory.RAM memory is generally kept alive with an on-board battery so that ladder programming is not lost when the system power is removed.This battery can be a standard dry cell or rechargeable nickel-cadmium type. Newer PLC units are now available with Electrically Erasable Programmable Read Only Memory (EEPROM) which does not require a battery.Memory is also housed in the processor module in modular systems.

Input units can be any of several different types depending on input signals expected as described above.The input section can accept discrete or analog signals of various voltage and current levels.Present day controllers offer discrete signal inputs of both AC and DC voltages from TTL to 250 VDC and from 5 to 250 VAC.Analog input units can accept input levels such as plusmn;10 VDC, plusmn;5 VDC and 4-20 ma. current loop values.Discrete input units present each input to the CPU as a single 1 or 0 while analog input units contain analog to digital conversion circuitry and present the input voltage to the CPU as binary number normalized to the maximum count available from the unit.The number of bits representing the input voltage or current depends upon the resolution of the unit.This number generally contains a defined number of magnitude bits and a sign bit.Register input units present the word input to the CPU as it is received (Binary or BCD).

Output units operate much the same as the input units with the exception that the unit is either sinking (supplying a ground) or sourcing (providing a voltage) discrete voltages or sourcing analog voltage or current.These output signals are presented as directed by the CPU. The output circuit of discrete units can be transistors for TTL and higher DC voltage or Triacs for AC voltage outputs. For higher current applications and situations where a physical contact closure is required, mechanical relay contacts are available. These higher currents, however, are generally limited to about 2-3 amperes.The analog output units have internal circuitry which performs the digital to analog conversion and generates the variable voltage or current output.

2.6 Update - Solve the Ladder - Update

When power is applied to a programmable logic controller, the PLCrsquo;s operation consists of two steps: (1) update inputs and outputs and (2) solve the ladder.This may seem like a very simplistic approach to something that has to be more complicated but there truly are only these two steps.If these two steps are thoroughly understood, writing and modifying programs and getting the most from the device is much easier to accomplish.With this understanding, the things that can be undertaken are then up to the imagination of the programmer.

You will notice that the “update - solve the ladder” sequence begins after startup.The actual startup sequence includes some operations transparent to the user or programmer that occur before actual PLC operation on the user program begins.During this startup there may be extensive diagnostic checks performed by the processor on things like memory, I/O devices, communication with other devices (if present) and program integrity.In sophisticated modular systems, the processor is able to identify the various module types, their location in the system and address.This type of system analysis and testing generally occurs during startup before actual program execution.

2.7 Update

The first thing the PLC does when it begins to function is update I/O.This means that all discrete input states are recorded from the input unit and all discrete states to be output are transferred to the output unit.Register data generally has specific addresses associated with it for both input and output data referred to as input and output registers.These registers are available to the input and output modules requiring them and are updated with the discrete data.Since this is input/output updating, it is referred to as I/O Update.The updating of discrete input and output information is accomplished with the use of input and output image registers set aside in the PLC memory.Each discrete input point has associated with it one bit of an input image register.Likewise, each discrete output point has one bit of an output image register associated with it.When I/O updating occurs, each input point that is ON at that time will cause a 1 to be set at the bit address associated with that particular input.If the input is off, a 0 will be set into the bit address.Memory in todays PLCs is generally configured in 16 bit words.This means that one word of memory can store the states of 16 discrete input points. Therefore, there may be a number of words of memory set aside as the input and output image registers.At I/O update, the status of the input image register is set according to the state of all discrete inputs and the status of the output image register is transferred to the output unit. This transfer of information typically only occurs at I/O update.It may be forced to occur at other times in PLCs which have an

剩余内容已隐藏,支付完成后下载完整资料


可编程逻辑控制器

2.5系统框图

中央处理单元(CPU)是PLC的控制部分。它解释来自存储器的程序指令并且按这些指令执行操作。现在PLC的中央处理单元是一个基于微处理器的系统,被置于模块化系统的处理器模块中。

系统存储器大致分为两类:只读存储器和随机存储器。只读存储器包含程序信息,通过这些程序信息,CPU可以解释和执行存储在随机存储器中的梯形图程序。随机存储器一般都有板上电源维持,这样系统掉电时,梯形图程序不会丢失。这种电源可以是标准的干电池或可充电的镍-镉电池。新型的PLC存储单元使用电可擦除可编程只读存储器(EEPROM),这就不需要专门的电源维持。内存也设在模块化系统中的处理器模块内。

输入单元有若干不同类型,所用类型根据前述输入信号需求选择输入部件可以接收多种不同电压和电流等级的离散信号或模拟信号。现有的控制器提供交流和直流离散电压信号输入,直流电压范围从TTL电平到250V,交流电压范围从5V到250V。模拟输入单元可以接收的输入范围如plusmn;10伏直流电,plusmn;5伏直流电和4-20毫安电流环。离散输入单元把每个输入信号以单一的1或0输入到CPU,然而模拟输入单元要包含模拟信号向数字信号转换的电路,并且以二进制码输入到CPU,且此二进制码规格化到该单元所能提供的最大精度。输入电压或电流所用数的位数依该单元处理能力而定,而且这些数通常包含了特定的数值位和符号位。输入寄存单元把接收到的字输入(二进制或BCD码)送到CUP。

输出单元的运作和输入单元大致相同,不同之处就是该单元可作为离散电压信号的拉电流端(提供一个公共地)或者灌电流端(提供一个固定电压)或者作为模拟电压或电流的拉电流端。输出单元的输出信号由CPU控制发出。离散信号输出单元的电路可以是晶体管,输出TTL电平和更高的直流电压,或者是双向器件,适用于交流电压输出。对于需要更高电流的应用场合,电气上的触点闭合必不可少,这样可用机械式继电接触装置。然而,这些较高的电流一般限于2~3安培。模拟输出单元内部有数模转换电路,能产生可变的电压或电流输出。

2.6刷新-处理梯形图-刷新

可编程逻辑控制器上电后,其运作包含两个阶段:(1)刷新输入和输出(2)解读梯形图。这对复杂问题来说似乎是一个非常简单的解决方法,事实上就只有这两步。如果能彻底理解这两个步骤,就很容易完成编写和修改程序并充分利用此器件了。基于这一理解,接下来的工作就有赖于程序员的思维了。

你将会注意到,“刷新-解读梯形图”流程在启动后就开始。事实上,启动流程还包括一些对用户或程序员透明的操作,这些操作在PLC运行用户程序前就开始运行。在启动期间,处理器可能会进行大范围的故障诊断,诊断的项目诸如存储器、输入输出设备、与其它设备(如果有)的交互状态和程序的完整性等。在先进的模块化系统中,处理器能够识别的各种模块的类型,及它们在系统中的位置和地址。这类系统分析和测试操作一般发生在真正执行程序之前的启动过程中。

2.7刷新

PLC开始运作时的首要操作就是刷新I/O。这就意味着通过输入单元,所有的离散输入状态被记录,而且所有将要输出的离散状态被转移到输出单元。通常有一些特定地址来寄存数据,这些地址与输入和输出数据相关,称为输入和输出寄存器这些寄存器与输入和输出模块相连并且通过离散数据来更新。由于这是输入/输出的更新,因而它被称为I/O刷新。离散输入和输出信息的刷新是利用PLC存储器中开辟的输入和输出映像寄存器来完成的。对于每一个离散输入点,在输入映像寄存器中都有一位与之相联。同样,对于每一个离散输出点,在输出映像寄存器中都有一位与之相联。当I/O刷新时,如果输入点输入的是“开”信号,那么与之相联的位地址内容被置“1”。如果输入点输入的是“关”信号,那么相应的位地址内容被置“0”。现在,PLC存储器字长大都是16位。这意味着,内存的一个字可存储16个离散输入点的状态信息。因而,内存中可能会有一定数量的字被预留,作为输入和输出映像寄存器。在I/O刷新时,输入映像寄存器的状态根据所有离散输入的状态信息变化,输出映像寄存器的状态被送至输出单元。这种状态信息的转变通常只发生在的I/O刷新阶段。但是,在PLC工作的其它时段,当有I/O立即刷新命令时,状态信息的转变也可以被强制进行。作为一种特殊情况,这条命令将会迫使PLC在其它任何时候刷新I/O。

对于初次输出刷新,需要注意的主要一项是输出的初始状态。这是因为,如果初始状态为“开启”,输出点可能的输出就有可能产生安全隐患,特别是在重型机械装置的控制系统中,机械装置可能会对操作员造成人生伤害。在一些系统中,为确保系统安全,所有的输出可能都需初始化为“关闭”状态。然而,也有一些系统的输出需要以特殊方式初始化──一些开启,一些关闭。这可以采取预先设定的方式或要求输出保持掉电前一瞬间的状态来实现。最近一些系统提供这两个设置选项而且甚至提供两者的组合。这是工程师和程序员首要关注的问题,并且开发系统时,应对此详细说明,以确保操作和维护设备人员的安全。有关系统和程序开发的安全问题将在后续章节讨论。

2.8梯形图程序处理

输入输出刷新完成后,PLC开始执行编入的指令。这些指令通常称点放在页面左侧,线圈放在页面右侧。这是基于继电器的控制系统的延续。以前,这类图作为系统的电气原理图。一个示例梯形图如图2.6所示。

图2.6中使用的符号在这里可能不好理解,这样一个简要解释是必要的。梯形图右侧标有CR1,CR2,CR3和CR4的圆形符号是继电器的软线圈。在梯形图左侧,看起来像电容器而且一些还加有斜线的符号是与线圈相关的接点。那些与电容器相似并且没有斜线通过的符号为常开接点,就类似于关闭的开关。当开关开时,接点就闭合。那些与电容器相似并且有斜线通过的符号为常闭接点。一个常闭接点就相当于一个一直打开的开关,如果开关开动接点就关闭。

在图2.6中可以看到接点和线圈的位置如图上所述。同样,如果你注意到活梯的横档,就会明白为什么称之为梯形图。事实上,图中每一个完整的横线条都指代一个有逻辑意义的梯级。梯形图的阐述也将会在后面讨论,在这也需要进行一些必要的解释。每个横档左边的接点可被视作开关,右边的线圈可被视作灯。如果对应的开关打开或关闭,右边的灯就会亮。PLC按从左至右、从上至下的顺序执行此程序。它首先检查开关(接点)配置,然后判定是否有电流通过灯(线圈)。判定的依据来源于输入输出映像寄存器中的数据。如果有电流通过,灯(线圈)

将会得电。反之,灯(线圈)将会失电。这也将会记录到输出映像寄存器。一旦PLC对横档左侧元件检查完毕,它就会跳过检查,直到再次处理时又开始检查。而且一旦灯(线圈)得电或失电,此状态将一直保持,直到下次PLC处理此横档为止。处理完一个阶梯后,PLC用同样的方式处理下个阶梯,如此反复进行直到整个梯形图被执行和处理完毕。在此,一个不同于一般电气运作的原则就是横档中电流的流向。在梯形逻辑中,电流流向只能是从左至右,从上至下,绝不能从右至左。

作为一个例子,在图2.7所示的梯形图中,如果下列任何一个条件满足线圈CR1将会得电:

1.CR7关,CR6开

2.CR7关,CR2开,CR5开

3.CR7关,CR2开,CR3开

4.CR1开,CR4开,CR3开

5.CR1开,CR4开,CR5开

你将会注意到,对于以上列表中每种情况,电路中电流流向都是从左至右,从上至下。在如下所列情况中CR1将不会得电:

CR1开,CR4开,CR2开,CR6开,CR5关,CR3关,CR7开

这是因为电流将不得不从右至左流经CR2接点。即使我们用真正继电器来搭建,电流可以有这种流向,但在梯形逻辑中这是不允许的。应当记住,我们是在软件环境下工作而不是硬件环境。

如前所述,输入输出刷新完毕后,PLC转向梯形逻辑中的第一个阶梯,处理输入输出处理梯形图接点元件,判定线圈将得电或失电,然后使线圈得电或失电。完成此操作后,PLC转向下个阶梯,重复前面步骤,这样持续到所有阶梯被处理完毕。当处理所有阶梯的过程完毕,并且梯形图中所有的线圈都已根据处理的每个阶梯设定,那么PLC就进入到其下一个阶段──I/O刷新。

I/O刷新阶段,所有输出线圈的状态从输出映像寄存器转移到到输出单元,同时所有输入状态被转移到输入映像寄存器。注意,在处理梯形图期间,输入的任何变化将被忽略,因为它们只有在I/O刷新阶段才被记录。在处理每一阶梯时,每个线圈的状态将被记录至输出映像寄存器。然而,这些状态直到I/O刷新阶段才被转移至输出单元。

这种I/O刷新、处理梯形图再到I/O刷新的过程称为扫描,其描述如图2.8。前一次I/O刷新和下次刷新之间的时段称为一次扫描。PLC从前一次I/O刷新到下次刷新所用的时间称为扫描时间。扫描时间通常以毫秒为单位来衡量,而且扫描时间与CPU的运行速度和所要处理的梯形图的长度有关。PLC扫描存储器的速度称为扫描速度。扫描速度单位通常为毫秒/K程序正在使用的内存。例如,如果某一PLC扫描速度为8毫秒/K,程序占用6K的内存,那么PLC将会用48毫秒完成一次程序扫描。

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[28755],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图