PLC梯形逻辑

时间:2009-11-16 03:28:00

标签: plc

我正在尝试使用PLC来监控赛道。我将使用3个光电传感器来显示哪辆车首先越过终点线。每个传感器都有OTL(锁存)指令。每条车道都有一盏灯,指示哪辆车位于首位。没有第一盏灯的汽车不会来。将有3名法官。在每场比赛结束时,一旦获胜者被记录,3名裁判将使用他们各自的开关将指示灯重置为关闭状态(未锁定状态)以准备下一场比赛。禁止任何由比赛裁判作弊的企图,判断开关被编程,以便所有3名裁判必须同意复位,并且只有在所有3辆车都通过终点线后才能进行复位。评委将使用One Shot Rising(OSR)指令进行编程。需要注意的是,我们正在使用SLC 500 PLC。我没有提到Iam使用罗克韦尔自动化软件RS Logics,所以请在梯形逻辑上使用Rockwell的说明。

1 个答案:

答案 0 :(得分:6)

这是相当直接的。我一般都在回答PLC没有定义。

// You need 3 of these sets, one for each Lane, prefixed 1, 2, 3, accordingly

|---|Photo1|----------------|-----------(OTL1)----|
|---|OTL1|-----|/ResetCmd|--|

|--|OTL1|---|/OTL2|---|/ OTL3|----------(Light1)--|


// We have two work booleans, used in relation with the reset logic.
//  All3In is an AND of all 3 OTLs indicating that all 3 cars have passed the finish line
//  SomeOTLON is an OR of the 3 OTLs indicating that one or more OTL latches hasn't been reset

|--|OTL1|---|OTL2|----|OTL3|----------------------(All3In)--|

|--|OTL1|----|---------------------------------(SomeOTLON)--|
|            |
|--|OTL2|----|
|            |
|--|OTL3|----|

// We need 3 latches like the following, one per judge
// Essentially the Latch comes on when all 3 cars are in and the judge presses his button
// The latch comes off after all 3 OTLs dropped
|--|Judge1|---|All3In|----------|-------------(Judge1Latch)--|
|                               |
|--|Judge1Latch|---|SomeOTLON|--|


// Finally the  Reset Command
|--|Judge1Latch|---|Judge2Latch|---|Judge3Latch|--|------(ResetCmd)--|
|                                                 |
|--|ResetCmd|------|SomeOTLON|--------------------|

Etvoilà。唯一可能的麻烦是,如果“JudgeN”开关不是One Shot Rising(但它们看起来像问题文本那样),法官可能会按下他/她的按钮并且仍然有ResetCmd锁定当所有3辆车到达时。

相关问题