老外写的TON 定时器看不明白。这是根据什么原理工作的,有人知道吗?

已锁定

cxaction

  • 帖子

    208
  • 精华

    1
  • 被关注

    7

论坛等级:侠士

注册时间:2011-07-16

普通 普通 如何晋级?

老外写的TON 定时器看不明白。这是根据什么原理工作的,有人知道吗?

1338

6

2013-01-03 13:17:02

A #IN_START // If the Command Bit is OFF, force the
JC TIMI // time accumulator to the Preset value
CLR // and exit with boolean status = OFF.
SAVE
L #IN_PRESET
T #IN_OUT_ACCUM
BEU
TIMI: L #IN_OUT_ACCUM // Decrease the time accumulator by the
L "TIM_FY_OB1_RTC_ms" // milliseconds since last OB1 call
-I
T #IN_OUT_ACCUM // If the accumulated count is <=0,
L 0 // then the boolean status is set ON
<=I // and the accumulator is forced to
= L 0.0 // ZERO to prevent further negative
JCN OUTP // accumulation that could result in
T #IN_OUT_ACCUM // rollover of the 16-bit accumulator
OUTP: A L 0.0 // and consequent wrong timer output.
SAVE
老外写的TON 定时器看不明白。这是根据什么原理工作的,有人知道吗? 已锁定
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-300/400

共有54617条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。