1 / 9

XXXXX

XXXXX. XXXXX. 智力抢答竞赛控制案例. 一、智力抢答竞赛案例描述. 8 人参加智力抢答竞赛,需要用 8 个抢答按钮( X0 ~ X7 )和 8 个指示灯( Y0 ~ Y7 ) , 当主持人报完题目,按下开始抢答按钮 X10 后,抢答者开始按按钮,先按按钮者的灯亮,同时蜂鸣器 Y17 响,后按按钮者的灯不亮,用一个数码管显示抢答者的台位号码。智力抢答竞赛如下图所示:. 二、控制方案设计. 1 、 IO 分配表. 2 、电气原理图. 三、智力抢答竞赛控制程序. 四、智力抢答竞赛案例分析.

lamont
Download Presentation

XXXXX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XXXXX XXXXX 智力抢答竞赛控制案例

  2. 一、智力抢答竞赛案例描述 8人参加智力抢答竞赛,需要用8个抢答按钮(X0~X7)和8个指示灯(Y0~Y7),当主持人报完题目,按下开始抢答按钮X10后,抢答者开始按按钮,先按按钮者的灯亮,同时蜂鸣器Y17响,后按按钮者的灯不亮,用一个数码管显示抢答者的台位号码。智力抢答竞赛如下图所示:

  3. 二、控制方案设计 1、IO分配表

  4. 2、电气原理图

  5. 三、智力抢答竞赛控制程序

  6. 四、智力抢答竞赛案例分析 在主持人按钮X10未按下时不执行指令,抢答者按抢答按钮K2X0(X7~X0)无效。当主持人按下按钮X10时,由于抢答按钮均未按下,所以K2Y0=0,由MOV指令将K2X0的值0传送到K2Y0中,由CMP指令比较K2Y0和K0,由于K2Y0=K0,比较结果是M1=1。

  7. 当按钮X10复位断开时,由M1接点接通MOV和 CMP指令。当有人按下抢答按钮时,若按钮X2先 按下,则K2X0=00000100,经MOV指令传送,K2Y0=00000100,即Y2=1,对应的指示HL2灯亮,经CMP指令比较,K2Y0=4>0,比较结果是M0=1,M1=0,MOV和CMP指令被断开,这样,后按下的按钮无效。M0接点闭合,Y17 得电,蜂鸣器响。

  8. 执行ENC0指令使K2Y0=00000100,即“Y2=1”编码成数值2存放到数据寄存器D0中,再经SEGD指令进行七段译码送到输出继电器Y10~Y17,到七段数码管显示数值2。 注意:SEGD指令再经行七段译码时之需要7个输出继电器Y10~Y16就够了,而将Y10~Y17中的Y17置零,为了充分利输出继电器,可将Y17放在SEGD指令后面编程

More Related