马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
<p><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">辅助继电器 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">元件用作用户程序执行过程中的中间变量,如同实际电控系统中的辅助继电器,用于状态信息的传递, </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">也可将多个 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">变量组成为字变量使用,</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">变量与外部端口没有直接的联系,但可通过程序语句将 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">X </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">复制到 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">,或 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">将 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">复制到 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">Y </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">的方式与外界发 生联系,一个 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">变量可无限次使用。 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">辅助继电器 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">以 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M0</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">,</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M1</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">,……</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)"> M8511 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">等符号标识,其序号是以 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">10 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">进制方式编号。</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M8000 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">以上的变量为系统专 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">用变量,用于 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">PLC </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">用户程序与系统状态的交互;部分 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">变量还具有掉电保存特性。 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">特殊辅助继电器 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">SM </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">为系统专用变量,以 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">SM0</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">,</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">SM1</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">,……</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)"> SM1023 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">等符号标识,其序号是以 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">10 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">进制方式编号, </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">用于 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">PLC </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">用户程序与系统状态的交互。 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">一般用 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">保持用 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">保持用 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">特殊用 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">特殊用 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">M0 ~ M499 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">500 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">点</span><span style=";font-size:7px;font-family:Arial;color:rgb(35,31,32)"> [1] </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">M500 ~ M1023 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">524 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">点</span><span style=";font-size:7px;font-family:Arial;color:rgb(35,31,32)"> [2] </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">M1024 ~ M7679 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">6656 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">点</span><span style=";font-size:7px;font-family:Arial;color:rgb(35,31,32)"> [3] </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">M8000 ~ M8511 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">512 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">点 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">SM0 ~ SM1023 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">1024 </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">点 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">• </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">[1] </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">非停电保持区域。使用参数设定,可变更成停电保持区域。 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">• </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">[2] </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">停电保持区域。使用参数设定,可变更成非停电保持区域。 </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">• </span><span style=";font-size:12px;font-family:Arial;color:rgb(35,31,32)">[3] </span><span style=";font-size:12px;font-family:宋体;color:rgb(35,31,32)">停电保持区域,不能通过参数来改变。 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">可编程控制器内的一般用辅助继电器、停电保持用辅助继电器的区域分配,可通过参数设定来进行调整。 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">可编程控制器内有大量的特殊辅助继电器,这些特殊辅助继电器各有其特定的功能,具体请参见</span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">第</span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)"> 674 </span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">页上 </span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">的“附录 </span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)">A </span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">特殊软元件 </span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)">SM</span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">、</span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)">SD</span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">、</span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)">D8000</span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">、</span><span style=";font-size:12px;font-family:Arial;color:rgb(0,0,255)">M8000 </span><span style=";font-size:12px;font-family:宋体;color:rgb(0,0,255)">分配说明”</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">。注意,用户不可使用尚未定义的特殊辅助继电器。 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">使用技巧:可以将连续的 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">变量按字节或字来进行访问,例如: </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">其中 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">K4M100 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">表示将 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M100</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">、</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M101</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">、</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M102</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">……</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M115 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">共 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">16 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">个单元,组成一个字的单元进行读操作(</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M100 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">作为字的 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">bit0</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">……</span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">M115 </span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">作为字的 </span><span style=";font-size:13px;font-family:Arial;color:rgb(35,31,32)">bit15</span><span style=";font-size:13px;font-family:宋体;color:rgb(35,31,32)">),这样可提高编程效率</span></p> |