回复:PLC判断距某年某月某日天数

zhangli0

西门子1847工业学习平台

  • 帖子

    17421
  • 精华

    65
  • 被关注

    919

论坛等级:至圣

注册时间:2003-06-06

钻石 钻石 如何晋级?

发布于 2012-09-07 12:31:08

10楼

The following table shows the contents of the bytes that contain the date and time information for the example Thursday, December 25, 1993, at 8:12 and 34,567 seconds in the morning.



Byte
Contents
Example

0
Year
B#16#93

1
Month
B#16#12

2
Day
B#16#25

3
Hour
B#16#08

4
Minute
B#16#12

5
Second
B#16#34

6
Two most significant digits of MSEC
B#16#56

7
(4MSB)
Two least significant digits of MSEC


B#16#7

7
(4LSB)
Day of week
1 = Sunday
2 = Monday
...
7 = Saturday
B#16#_5

按照这个说明你只要建立一个8字节date类型的数据然后直接给每一个字节赋值。
活到老,学到老!为了生活学习吧!
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-300/400

共有54778条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

  • 分享

  • 只看
    楼主

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