-------------------------------------------- CONPROSYS Script sample programs No. 002 -------------------------------------------- Process name: Self-holding circuit (Buzzer circuit) Date of creation: February 16, 2016 Processing content: One contact input is used as abnormal signal input. Once the input state sets to ON, the buzzer output keeps being ON. Another input is connected to "buzzer off" push button. When the button is pushed, the buzzer output is turned to OFF. [Signals] DI0 - Abnormal Signal DI1 - Buzzer Off Button DO0 - Buzzer Output [Operation] 1. Abnormal signal ON state turns buzzer output to ON. 2. Buzzer off button input ON state turns buzzer output to OFF. 3. If the abnormal signal is OFF, the buzzer output is OFF. [Description] The sample program has a main task (TASK9) and a subroutine (SUB9). To use this sample program, restores this sample program to the M2M controller and names the task number and the subroutine number. If the subroutine is renamed to a number that is not SUB9, change the calling number to the new one. Set the state of DI0 to LTAG90, set the state of DI1 to LTAG91, then call subroutine SUB9. In the subroutine, LTAG98 is used to save the input state of "buzzer off" button. The subroutine performs the buzzer circuit processing and returns the result to LTAG99. Set LTAG99 state to DO0.