Vai al contenuto

Optimising cycle time

In the PLC program there are a few variables that allow the optimization of the PLC cycle time. The system variables GPV_TEREC_MICROSEC_XXX display the period of implementation of tasks PLC, system variables GPV_CYCDURMICROSEC_XXX display the duration of execution of the PLC tasks. can be used to check if execution of the PLC programme conforms to the configured run time.These variables can be used to check if the execution of the program for each PLC task are consistent with the configured period set.Values greater than the configured time period indicate that the PLC program execution takes longer than the one configured. In this case it’s necessary to increase the configured time.Values exceeding configured times do not necessarily involve a block of the PLC program, but can cause delays in managements; increasing the effective period of execution is logically resulting in slower control sequence response times. In advance you could have less CPU time to execute lower priority tasks, graphics pages etc.PLC tasks time period configuration must be performed in different ways depending on the tasks.FAST task is the highest priority task (HIGH) in the PLC system. Hosting the I/O update management, it’s best suited for code with requirements of high frequence execution and synchronized with I/O update. Its time period must be configured in GF Project VX following the path “Hardware”, “Options”.Click on “Expert mode”: Optimising cycle time-image_0Then find the “PLC options” section, and the “PLC period” parameter: Optimising cycle time-image_0NORMAL and SLOW tasks are executed cyclically on the FAST task period; they have MEDIUM and LOW priority in the PLC system. They are best suited for code without high synchronization needs about I/O update. Their time periods can be configured inside GF_Project VX Code clicking the mouse right button on the task icons in the 1131 project tree. Optimising cycle time-image_0Above an example for NORMAL configuration and below for SLOW. Optimising cycle time-image_0