01.07.2013 Views

Programming manual M238 | 3 MB - BERGER - POSITEC

Programming manual M238 | 3 MB - BERGER - POSITEC

Programming manual M238 | 3 MB - BERGER - POSITEC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Task Types<br />

Introduction<br />

Cyclic Task<br />

Tasks<br />

The following section describes the various task types available for your program,<br />

along with a description of the task type characteristics.<br />

A Cyclic task is assigned a fixed cycle time using the Interval setting in the Type<br />

section of Configuration sub-tab for that task. Each Cyclic task type executes as<br />

follows:<br />

1. Read Inputs: The physical input states are written to the %I input memory<br />

variables and other system operations are executed.<br />

2. Task Processing: The user code (POU, etc.) defined in the task is processed.<br />

The %Q output memory variables are updated according to your application<br />

program instructions but not yet written to the physical outputs during this<br />

operation.<br />

3. Write Outputs: The %Q output memory variables are modified with any output<br />

forcing that has been defined; however, the writing of the physical outputs<br />

depends upon the type of output and instructions used.<br />

For more information on defining the Bus cycle task, refer to the CoDeSys part<br />

of the SoMachine online help and Modicon <strong>M238</strong> Logic Controller Settings<br />

(see page 69).<br />

For more information on I/O behavior, refer to Controller States Detailed<br />

Description (see page 49).<br />

NOTE: Expansion I/Os are always physically updated by the MAST task.<br />

4. Remaining Interval time: The controller OS carries out system processing and<br />

any other lower priority tasks.<br />

NOTE: If you define too short a period for a cyclic task, it will repeat immediately<br />

after the write of the outputs and without executing other lower priority tasks or any<br />

system processing. This will affect the execution of all tasks and cause the controller<br />

to exceed the system watchdog limits, generating a system watchdog exception.<br />

NOTE: You can get and set the interval of a Cyclic Task by application using the<br />

GetCurrentTaskCycle and SetCurrentTaskCycle function.<br />

EIO0000000384 04/2012 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!