Ihavewriteaverylongprogramme, andtheprogrammecycletimeisbesetted10ms. IfinonecycletimehowdoIknowiftheprogrammehasbeendealedwith, andifinonecycletimetheplccan't computer all the instructions, what is result will be?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in CoDeSys there is a very simple method to measure execution durations.
FUNCTION TIME() returns the CPU time stamp. You can store it in a variable of TIME type, or as a DINT (TIME_TO_DINT converts to milliseconds). Later, after a second TIME() call, you can subtract the previous CPU time stamp.
This way you could find the execution duration of your program. Then set task cycle to an appropriate value.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[b]
Hi,
in CoDeSys there is a very simple method to measure execution durations.
FUNCTION TIME() returns the CPU time stamp. You can store it in a variable of TIME type, or as a DINT (TIME_TO_DINT converts to milliseconds). Later, after a second TIME() call, you can subtract the previous CPU time stamp.
This way you could find the execution duration of your program. Then set task cycle to an appropriate value.
Regards