文件名称:STIME
介绍说明--下载内容均来自于网络,请自行研究使用
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