在200中的sm0.1,在300中如何替代,有什么用

最佳答案

SMB0  System Status Bits
  Special Memory Byte 0 (SM0.0 - SM0.7) provides eight bits that are updated by the S7-200 CPU at the end of each scan cycle. Your program can read the status of these bits and then make decisions based on a bit抯 value.  
  S7-200               SM 
  Symbol Name          Addr.  User programs read SMB0 status data
  Always_On               SM0.0                   This bit is always ON.
  First_Scan_On         SM0.1 This bit is ON for the first scan cycle only. One use is to call an initialization subroutine.
  Retentive_Lost         SM0.2 This bit is turned ON for one scan cycle if retentive data was lost. This bit can be used as either an error memory bit or as a mechanism to invoke a special startup sequence.
  RUN_Power_Up        SM0.3 This bit is turned ON for one scan cycle when RUN mode is entered from a power-up condition. This bit can be used to provide machine warm-up time before starting an operation.
  Clock_60s             SM0.4 This bit provides a clock pulse that is OFF for 30 seconds and ON for 30 seconds, for a cycle time of 1-minute. It provides an easy-to-use delay or a 1-minute clock pulse.
  Clock_1s              SM0.5 This bit provides a clock pulse that is OFF for 0.5 seconds and then ON for 0.5 seconds for a cycle time of 1 second. It provides an easy-to-use delay or a 1-second clock pulse.
  Clock_Scan            SM0.6 This bit is a scan cycle clock that is ON for one scan and then OFF for the next scan. This bit can be used as a scan counter input.
  Mode_Switch          SM0.7 This bit indicates the current position of the Mode switch (OFF=TERM position and ON=RUN position). You can use this bit to enable Freeport mode only when the switch is in the RUN position. Normal communication with the PC/programming device can be re-enabled by switching to the TERM position.

  在S7-200中系统状态位SMB0所对应的每一位都有特定的含意,SM 0.1是一个只在启动时初次扫描常闭点,状态为1,在S7-300或400中可以在OB00、OB101及OB102中分别写二条指令来用你指定的状态位替代,如果你仍希望用 M 0.1则可以写为:
  OB100 (Warm restart)
  Network 1
  AN  M0.1
  =  M0.1

 OB101 (Hot restart)
  Network 1

  AN  M0.1
  =  M0.1

 OB102 (Cold restart)
  Network 1

  AN  M0.1
  =  M0.1

  这样 M0.1 在CPU启动时(启动有三种模式,冷/暖/热分别调用不同的OB)自动将M0.1在第一个程序循环周期内置为状态1。

 

提问者对于答案的评价:
谢谢

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc318696.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2020年11月1日 下午4:50
下一篇 2020年11月1日 下午4:50

相关推荐

  • PROFINET通讯

    目前做一个项目,用的是315-2PN/DP,与WINCC6.2通讯。发现一个问题,PLC中通过一个光电进行加1计数,在WINCC中,通过该光电变化时触发VB脚本,当检测该光电信号为…

    自动化系统综合 2020年10月31日
  • DB块修改

    在PCS7中,修改DB块结构。如增加或减少块中的数据。再选择部分下载方式将修改下载到PLC中,此操作是否会引起CPU的停机? 最佳答案 如果你下载了相应的OB就不会致使CPU停机的…

    自动化系统综合 2020年10月31日
  • 管道压力与温度的关系、管道压力与流量的关系

    管道压力与温度的关系、管道压力与流量的关系 最佳答案 这和你管道的材质,管道里面的流体都有关系的。如果你使用孔板测量流量的话,孔板制造厂家会给你一个设计说明书。一般气体的压力和温度…

    自动化系统综合 2020年10月31日
  • 急~!S7 200与第三方设备通讯

    现场不让拉电话线,怎么样通过手机短信方式,接受到PLC的信息,还能够通过短信控制PLC运行与停止,只使用第三方设备,不用EM 241模块,没做过,也没听说过,求高手指点。…

    自动化系统综合 2017年11月6日
  • 请问step7里,S120站点如何把PZD变成user-defined啊

    公司做的step7组态里,S120的telegram selection里是user-defined,但是点开只有None和telegram。请问如何把PZD变成user…

    自动化系统综合 2017年6月11日
  • 通讯是否有问题

    我现在有个400的站带了个变频器,在PC上控制,用WINCC界面,现在速度设定200M/MIN但是提升到100时就不升了,其他正常,把400站里的程序重新下载一次,就恢复正常,过上…

    自动化系统综合 2020年11月1日
  • Smart 700IE和S7-1200通讯

    我想用Smart 700IE和S7-1200做一套系统,屏的软件是WinCC_flexible_2008_SP4,屏里面做通讯连接时找不到PLC的通讯程序,请问怎么处理?…

    自动化系统综合 2017年8月15日
  • 配料

    各位前辈:       我现在有一条产线,自动配料系统,从加料,放料,称重,传送,搅拌,到包装,共20种料需要…

    自动化系统综合 2018年12月2日
  • 关于西门子变频器的调速问题?

    向高手请教一下:一台西门子MM440变频器,功率5.5KW,控制垂直升降的,为什么在下降时,感觉电机不受控,突然一下子就降到底了,这是什么原因啊,变频器的减速时间设定是1秒….…

    自动化系统综合 2017年12月2日
  • Y轴电机更换后无法回原点

    昨天我们的Y轴电机绝缘低无法使用。更换同一型号的伺服电机,开机后Y轴移动只有+ -7mm左右就报警,是软限位报警。是810D系统。请各位大侠帮忙,更换电机应该做什么。急。…

    自动化系统综合 2018年12月5日