Using Event task with PLC Twido

Using Event task with PLC Twido
Description:

- Description and example how to use Event task subroutine in PLC Twido with example of event task triggered by an input with description of the syntax.

Hardware
Twido PLC SV:3.2
Software
MS Windows XP SP1
TwidoSoft V3.2

1) Introduction:


- An event task is part of program which is executed with higher priority then the main program and it is executed only when a conditon is met. It guarantees a rapid response time.
- The event could be triggered by software or hardware condition (VFC counting, physical inputs, periodic event).
- The events are queued till they are executed, higher priority could be set.

2) Example of configuring an event caused by input interruption (rising edge).
a) In menu Hardware/Input configuration set up which input, which edge should be detected and number of subroutine to be executed. In this example it will be %I0.2, event caused by rising edge, low priority and event subroutine number 0.

Note: Only inputs %I0.2-%I0.5 could be event source.
 

b) The program to be executed when a rising edge is detected on input %I0.2 must be called as case subroutine SR 0. To call a subroutine the main program must be finished by a rung with END statement. The subroutine must be finished by RET statement then.



c) The event subroutine must have rung header stated as subroutine with the right number (please see below). To get Rung header menu double click on the rung header when editing the rung.



d) the syntax result should be as below:



All information provided in this document is correct to the best knowledge of the author. This approach was designed and tested in laboratory conditions. The environment influences behaviour of electronic devices and therefore the user takes full responsibility for applying presented solutions.