文件名称:STIME
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.46kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Siemens PLC功能 ,使用SCL语言编写,与pascal结构类似,完成了个从0-2^31-1的时间计数-this FB is only necessary for siemens sps
the siemens sps timer counts from 0 to 2^31-1 and starts at 0 sfter overrun.
this means that the bit 31 (the highest bit ) will never be used and therefore
a problem arises when t2- t1 is checked.
t2- t1 is always valid also in an timer overrun situation where the time t1 is very high and t2 is very low.
the result of the subtraction t2- t1 however is still valid.
this calculation does not work for soiemens because the highest bit is not used.
this module stores the highest bit, changes the highest bit at every overrun occurence and stuffs ther highest bit in the output.
the output is then used by t_plc_us and t_plc_ms.
the correction needs and fb and not a function because the value of the highest bit has to be stored.
do never use this function block in a codesys environment. the timer in codesys is correct and runs from 0 to 2^32-1
the siemens sps timer counts from 0 to 2^31-1 and starts at 0 sfter overrun.
this means that the bit 31 (the highest bit ) will never be used and therefore
a problem arises when t2- t1 is checked.
t2- t1 is always valid also in an timer overrun situation where the time t1 is very high and t2 is very low.
the result of the subtraction t2- t1 however is still valid.
this calculation does not work for soiemens because the highest bit is not used.
this module stores the highest bit, changes the highest bit at every overrun occurence and stuffs ther highest bit in the output.
the output is then used by t_plc_us and t_plc_ms.
the correction needs and fb and not a function because the value of the highest bit has to be stored.
do never use this function block in a codesys environment. the timer in codesys is correct and runs from 0 to 2^32-1
(系统自动生成,下载前可以参看下载内容)
下载文件列表
STIME.SCL
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.