24.01.2015 Views

PLC Programming

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Task Configuration...<br />

may be extended by customer specific events. Possible events are for instance: Stop, Start, Online<br />

Change.<br />

The assignment of system events to POUs is also done in the Task configuration editor. Use the<br />

dialog 'Events', which will be opened as soon as the entry " System-events" is selected in the task<br />

configuration tree:<br />

Table for Assigning POUs to System Events<br />

Each event is represented in a line: Name and Description are displayed as defined in the target file,<br />

in the column called POU you can enter the name of the project POU which should be called and<br />

processed as soon as the event occurs.<br />

For this use the input assistant () or enter manually the name of an already existing POU (e.g.<br />

"<strong>PLC</strong>_PRG" or "PRG.ACT1"), or insert a name for a not yet existing POU. In order to get this POU<br />

created in the project, press button Create POU. Hereupon the POU will be inserted in the Object<br />

Organizer. The input and output parameters which are required by the event will automatically be<br />

defined in the declaration part of the POU. Below the assignment table the currently selected event is<br />

displayed in a picture, showing the required parameters.<br />

If you actually want the POU to be called by the event, activate the entry in the assignment table ( ).<br />

Activating/deactivating is done by a mouseclick on the control box.<br />

Which task is being processed<br />

For the execution, the following rules apply:<br />

• That task is executed, whose condition has been met; i.e., if its specified time has expired, or after<br />

its condition (event) variable exhibits a rising edge.<br />

• If several tasks have a valid requirement, then the task with the highest priority will be executed.<br />

• If several tasks have valid conditions and equivalent priorities, then the task that has had the<br />

longest waiting time will be executed first.<br />

• The processing of the program calls will be done according to their order (top down) in the task<br />

editor.<br />

Taskconfiguration in Online Mode<br />

In online mode the status and number of passed through cycles of each task will be displayed in the<br />

configuration tree. The time flow is monitored in a diagram. Precondition: the libraries SysTaskInfo.lib<br />

and SysTime.lib must be included in the project to provide functions for the internal evaluation of the<br />

6-38 CoDeSys V2.3

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

Saved successfully!

Ooh no, something went wrong!