使用PLC的自动化制造系统——2.2案例研究

来源:互联网 发布:深入linux内核架构mobi 编辑:程序博客网 时间:2024/04/30 03:26

2.2 A CASE STUDY
2.2案例研究

 

    Problem: Try to develop (without looking at the solution) a relay based controller that will allow three switches in a room to control a single light.

      问题:尝试开发一个(不看的解决方案)继电器为基础的控制器,允许在一个房间用三个开关控制一个灯泡。

 

    Solution: There are two possible approaches to this problem. The first assumes that any one of the switches on will turn on the light, but all three switches must be off for the light to be off.

      解决方案:这个问题有两种的可能办法。第一个假设,任何其中一个开关打开将会点亮灯泡,但所有三个开关关闭才能关闭灯泡。

 

    The second solution assumes that each switch can turn the light on or off, regardless of the states of the other switches. This method is more complex and involves thinking through all of the possible combinations of switch positions. You might recognize this problem as an exclusive or problem.

      第二个解决方案假定每个开关可以打开或关闭灯泡,不管其他开关的状态。这种方法比较复杂,需要考虑所有开关位置可能的组合。你可能会承认这个问题是高级的或是个难题。