发表于:2004/11/3 19:56:00
#10楼
Configuration elements in IEC 1131-3
An IEC 1131-3 conform PLC programming system reflects the hardware structure with the configuration elements. These configuration elements are basically configurations, resources and tasks.
Configurations in IEC 1131-3
A configuration can be compared to a programmable controller system, e.g. a rack. In a configuration one or several resources can be defined.
Resources in IEC 1131-3
A resource can be compared to a CPU which can be inserted in the rack. In a resource global variables can be declared, which are only valid within this resource. In a resource one or several tasks can be executed.
Tasks in IEC 1131-3
Tasks determine the time scheduling of the programs associated with them. This means that programs have to be associated to tasks. The settings of the task determine the time scheduling.
IEC 1131-3 describes different time scheduling models which results in three different task types:
Cyclic tasks are activated in a certain time interval and the program is executed periodically.
System tasks are called automatically by the PLC operating system if an error or a change of the operational state of the PLC occurs. They are also known as system programs or SPGs.
Event or interrupt tasks are activated if a certain event has happened.
Each task has a certain priority. In so called preemptive scheduling systems, an active task with low priority is interrupted immediately, when a task with higher priority becomes active due to a certain event. In systems with non-preemptive scheduling, task interruptions by tasks with higher priority are not possible.
The supported task types depend on the used PLC.
An IEC 1131-3 conform PLC programming system reflects the hardware structure with the configuration elements. These configuration elements are basically configurations, resources and tasks.
Configurations in IEC 1131-3
A configuration can be compared to a programmable controller system, e.g. a rack. In a configuration one or several resources can be defined.
Resources in IEC 1131-3
A resource can be compared to a CPU which can be inserted in the rack. In a resource global variables can be declared, which are only valid within this resource. In a resource one or several tasks can be executed.
Tasks in IEC 1131-3
Tasks determine the time scheduling of the programs associated with them. This means that programs have to be associated to tasks. The settings of the task determine the time scheduling.
IEC 1131-3 describes different time scheduling models which results in three different task types:
Cyclic tasks are activated in a certain time interval and the program is executed periodically.
System tasks are called automatically by the PLC operating system if an error or a change of the operational state of the PLC occurs. They are also known as system programs or SPGs.
Event or interrupt tasks are activated if a certain event has happened.
Each task has a certain priority. In so called preemptive scheduling systems, an active task with low priority is interrupted immediately, when a task with higher priority becomes active due to a certain event. In systems with non-preemptive scheduling, task interruptions by tasks with higher priority are not possible.
The supported task types depend on the used PLC.