Delta ISPSoft — 5.6.3 Task Management

ISPSoft User Manual Time when the START button is pressed Time for which the PLC has run Time having elapsed since the START button was pressed Examples in this section include timed interrupt in an AH5x0 series timed interrupt and the two control instructions concerning TKON and TKOFF. The following chart briefly describes the 5 POUs of a program. *. For more information on AH5xo series interrupt indicator and related API instructions, please refer to AH500 operation manual and AH500 programming manual.  Creating New project First, create an AHCPU530-EN series project. 5-50 POU name Function INT Timer _ The value in the 32-bit register (D1, D0) increases by one every 25 milliseconds.

(The POU is assigned to Timed Interruption (0).) Initialize Reset the flags M0 and M1, transfer the value 0 to the 32-bit registers (D1, D0), (D3, D2), (D5, D4), and (D7, D6), and enable the interrupt. During the first scan cycle, Cyclic (0) to which the POUs are assigned is enabled, and Cyclic (1) to which Initialize is assigned is disabled. As a result, Initialize is only executed during the first cycle. Control When X0.0 is turned form OFF to ON, the operation flag M0 is set to ON, and the value in (D1, D0) is transferred to (D3, D2). When X0.1 is turned from OFF to ON, or when an overflow occurs, the operation flag M0 is reset.

Time CHK _ Users can calculate the time which has elapsed since the START button was pressed by subtracting the value in (D3, D2) from the value in (D1, D0). The value gotten is stored in (D5, D4). If the value gotten is less than 0, the overflow flag M1 is set to ON. Signal If the time which has elapsed is more than 30 seconds (25 ms x1200), or the overflow flag M1 is ON, the alarm Y0.0 will be set to ON.