使用PLC的自动化制造系统2.1.1 Ladder Logic

2.1.1 Ladder Logic
2.1.1梯形逻辑

 

    Ladder logic is the main programming method used for PLCs. As mentioned before, ladder logic has been developed to mimic relay logic. The decision to use the relay logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for engineers and tradespeople was greatly reduced.

    Modern control systems still include relays, but these are rarely used for logic. A relay is a simple device that uses a magnetic field to control a switch, as pictured in Figure 2.1. When a voltage is applied to the input coil, the resulting current creates a magnetic field. The magnetic field pulls a metal switch (or reed) towards it and the contacts touch, closing the switch. The contact that closes when the coil is energized is called normally open. The normally closed contacts touch when the input coil is not energized. Relays are normally drawn in schematic form using a circle to represent the input coil. The output contacts are shown with two parallel lines. Normally open contacts are shown as two lines, and will be open (non-conducting) when the input is not energized. Normally closed contacts are shown with two lines with a diagonal line through them. When the input coil is not energized the normally closed contacts will be closed (conducting).
     

      梯形逻辑是PLC使用的主要编程方法。如前所述之前,梯形逻辑的发展是模仿继电器逻辑的。决定使用的继电器逻辑图是一个战略之一。通过选择梯形逻为主要辑编程方法,为培训所需的工程师和技工的资 金大大减少。

      现代控制系统仍然包括继电器,但它们很少用在逻辑控制。继电器是一个简单的装置,它使用一个磁场来控制开关,如图图2.1 所示。当电压施加于输入线圈,产生的电流产生一个磁场。磁场拉动一个金属开关(或簧片),触电闭合,关闭开关。当线圈充电时触点闭合,称为常开触点。通闭触点当输入线圈不通电时闭合。在电路原理图中,继电器通常使用一个圆圈来表示输入线圈。输出触点以两条平行线表示。当输入线圈不通电时,常开触点显示为两条竖线,并会打开(不导电)。常闭触点显示为通过两条竖线的对角斜线。当输入线圈不通电通时,常闭触点将会闭合(导电)。

 

     

 

    Relays are used to let one power source close a switch for another (often high current) power source, while keeping them isolated. An example of a relay in a simple control application is shown in Figure 2.2. In this system the first relay on the left is used as normally closed, and will allow current to flow until a voltage is applied to the input A. The second relay is normally open and will not allow current to flow until a voltage is applied to the input B. If current is flowing through the first two relays then current will flow through the coil in the third relay, and close the switch for output C. This circuit would normally be drawn in the ladder logic form. This can be read logically as C will be on if A
is off and B is on.

      继电器用来让一个电源关闭另一个(通常高电流)电源,同时保持他们隔离。一个继电器控制程序简单的例子显示在图2.2。在这个系统中,左边第一个继电器使用常闭点,当电压加到输入点A时允许电流流过。第二个继电器是常开的,当电压加到输入B时,不允许电流流过。如果电流流过前两个继电器,那么电流将流过第三个继电器的线圈,并关闭输出C的开关。此电路通常被绘制成梯形逻辑形式。这可以被逻辑的解读为如果A off并且B on那么C on。

 

    The example in Figure 2.2 does not show the entire control system, but only the logic. When we consider a PLC there are inputs, outputs, and the logic. Figure 2.3 shows a more complete representation of the PLC. Here there are two inputs from push buttons. We can imagine the inputs as activating 24V DC relay coils in the PLC. This in turn drives an output relay that switches 115V AC, that will turn on a light. Note, in actual PLCs inputs are never relays, but outputs are often relays. The ladder logic in the PLC is actually a computer program that the user can enter and change. Notice that both of the input push buttons are normally open, but the ladder logic inside the PLC has one normally open contact, and one normally closed contact. Do not think that the ladder logic in the PLC needs to match the inputs or outputs. Many beginners will get caught trying to make the ladder logic match the input types.

      图2.2中的例子没有显示整个控制系统,只有逻辑。当我们考虑一个PLC应该有输入,输出和逻辑。图2.3显示了PLC更全面的表示。这里有两个输入形式的按钮。我们可以想像为输入是24V直流驱动PLC继电器线圈。这反过来驱动另一个输出继电器,开关115伏交流,这将打开一盏灯。请注意,在实际的PLC 系统中输入从来不用继电器,但输出常常是继电器。PLC梯形图逻辑其实是一种计算机程序,用户可以输入和变化。注意,两个输入的推按钮是常开,但在PLC梯形图逻辑有一个常开触点和一个常闭触点。不要认为在PLC梯形图逻辑需要匹配实际的输入或输出。许多初学者会试图使梯形图逻辑匹配实际的输入类型。

 

    Many relays also have multiple outputs (throws) and this allows an output relay to also be an input simultaneously. The circuit shown in Figure 2.4 is an example of this, it is called a seal in circuit. In this circuit the current can flow through either branch of the circuit, through the contacts labelled A or B. The input B will only be on when the output B
is on. If B is off, and A is energized, then B will turn on. If B turns on then the input B will turn on, and keep output B on even if input A goes off. After B is turned on the output B will not turn off.

      许多继电器也有多个输出(开关),这使一个输出继电器也可以同时输入。在图2.4所示的电路是一个例子,它是称为在保持电路。在此电路中的电流流过任一分支,通过标签为A的触点或B的触点。当输出端ON,输入端B将只能是ON。如果B是关闭的,而A通电,则B将打开。如果B打开,则输入B将打开,并且即使输入A关闭,输出B将保持ON。在ON后,输出B也不会关闭。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GSKTR 通讯程序使用说明 1. 安装:把GSKTR.EXE、GSKTR.TXT、QE.EXE 拷贝于同一目录下。 GSKTR.EXE 本通讯软件的主程序。 GSKTR.TXT 本通讯软件的使用说明 GSKTR.EXE的 F1 功能使用它。 QE.EXE 用户程序的编辑软件 GSKTR.EXE的 F5 功能调用它。 2. 执行 GSKTR.EXE 文件。 3. F1 Help 功能:本软件的使用说明,输入ALT_X 退出。 4. F2 Transmit1 功能(CNC软件版本 >=V 2.22): PC 机发送文件到 CNC Please input file name:请输入将要发送到 CNC 的文件的文件名, 文件名输入后,回车即可。 备注:在CNC软件版本 V2.22及其以后的版本时使用。 5. F4 Transmit2 功能(CNC软件版本 V 1.0 --- V2.21): PC 机发送文件到 CNC Please input file name:请输入将要发送到 CNC 的文件的文件名, 文件名输入后,回车即可。 备注:在CNC软件版本 V 1.0 --- V2.21时使用。: 6. F3 Reveive 功能: PC 机接收来自 CNC 的文件 Please input file name:请输入将要存盘的文件名(把 CNC 送来 的文件存入 PC 机磁盘), 文件名输入后,回车即可。 7. F5 Edit 功能: 本软件调用 QE.EXE 来进行用户程序的编辑。 进入 QE.EXE 程序时,首先输入被编辑的用户文件名,然后回车进 入编辑状态,编辑完成后输入“ALT_X”,且回答 “Y(保存)” 或“N(放弃保存)”,退出 QE.EXE 程序。 8. F9 Setup 功能: 1)设置 PC 机串行口0 或串行口1 (输入0 或 1)。 2)设置波特率 (输入 0 到 9 之一)。 3)PC 机与 GSK992A、GSK996T、GSK928TC 等 CNC 通讯时,波特率 应设置为9600(即输入 5)。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值