回复:如何使用TODR指令

Amcorben

  • 帖子

    164
  • 精华

    1
  • 被关注

    0

论坛等级:游士

注册时间:2003-06-06

普通 普通 如何晋级?

发布于 2003-06-13 10:05:57

0楼

he Read Real-Time Clock (TODR) instruction reads the current time and date from the hardware clock and loads it in an 8-byte Time buffer starting at address T.The Set Real-Time Clock (TODW) instruction writes the current time and date to the hardware clock beginning at the 8-byte Time buffer address specified by T.TODR: Error Conditions that Set ENO = 0:
0006 Indirect address
000C Clock cartridge not present TODW: Error Conditions that Set ENO = 0:
0006 Indirect address
0007 TOD data error
000C Clock not present
You must code all date and time values in BCD format (for example, 16#02 for the year 2002). See the Table below.


Format of the 8-byte Time Buffer (T)

T T+1 T+2 T+3 T+4 T+5 T+6 T+7
Year Month Day Hours Minutes Seconds 0 Day ofWeek
00 to99 01 to 12 01 to 31 00 to 23 00 to 59 00 to 59 0 to 7*
* T+7 1=Sunday, 7=Saturday
0=Disable the day of week
The time-of-day clock initializes the following date and time after extended power outages or memory has been lost:

Date: 01-Jan-90
Time: 00:00:00
Day of Week: Sunday
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-200

共有33258条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

  • 分享

  • 只看
    楼主

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