5/12/2014 3:26 PM | |
Joined: 1/28/2009 Last visit: 10/26/2024 Posts: 6852 Rating: (1365)
|
Hello, For measuring duration of pulse, I suggest using SFC64.It is a system function and it is running independent of program execution by OS of CPU.Check the following sample with an important notice on boundary condition limit of TIME data type.
Question about a programmDependency of all your program is minimal due to using a system function, but you still should enable and disable the measurement in user program.If this option is really important, try to use interrupt OBs to start and stop timing.I hope this helps, Hamid Hosseini |
Last edited by: hdhosseini at: 5/12/2014 3:27 PM |
|
This contribution was helpful to1 thankful Users |
5/12/2014 3:36 PM | |
Joined: 11/26/2011 Last visit: 6/29/2023 Posts: 508 Rating: (23) |
Hi, I Hope the following example helps you and meets your criteria. |
This contribution was helpful to1 thankful Users |
5/14/2014 6:22 AM | |
Joined: 4/11/2011 Last visit: 10/7/2024 Posts: 132 Rating: (7) |
My mistake. I pointed to text in Madhavas linkedwebsite. There is: "The system time is a "time counter" counting cyclically from 0 to a maximum of 2147483647 ms (more then 24H). In case of an overflow the system time is counted again starting with 0. (this means that all my functions have a problem if the PLC is running longer then 1 day!!") |
I'm just a human. Mistakes are allowed. |
|
This contribution was helpful to1 thankful Users |
Follow us on