filmov
tv
How to... setup a cyclic interrupt OB (OB30) in TIA Portal

Показать описание
This HowTo video explains how to setup a cyclic interrupt OB (OB30) in TIA Portal. A cyclic interrupt OB will interrupt OB1. OB1 will continue from where it was interrupted once the cyclic interrupt is done with its task.
Two cyclic OBs (OB30 and OB31) will be added, both OBs will have a different cycle time.
A phase offset and priority are used to make sure the interrupt OB's are not executed at the same time.
TIA Portal is a programming environment from Siemens and specially developed for programming the S7-1200/1500 PLC and the new HMI panels.
In TIA Portal it is possible to program in different languages, such as Ladder diagram (LAD), function block diagram (FBD), Statement List (STL), Graph and Structured Control Language (SCL).
In a series of short tutorials, MA-IT MyAutomation would like to help you get familiar with TIA Portal.
----- Transcription ---------------------------------------------------
This video will explain how to setup a cyclic interrupt OB.
Add a new cyclic interrupt OB.
Set a cycle time for the OB.
In this example a 5ms cycle time is used.
OB30 will now interrupt OB1 every 5ms.
This OB will write a value to a variable inside a datablock every 5ms.
OB1 will continue from where it was interrupted, once OB30 is done.
Now lets add a second cyclic interrupt OB.
The cycle time for this OB is set to 10ms.
OB30 has a cycle time of 5ms and OB31 has a cycle time of 10ms.
This may cause a problem, because there is a cycle where both OBs are executed at the same time.
Open the properties of a cyclic interrupt OB.
Here a phase offset can be setup.
For this example a 1ms phase offset is chosen.
OB31 will now be executed on 11ms, 21ms, 31ms ect. Instead of 10ms, 20ms ect.
OB number and name can also be changed in the properties.
A priority can be set for each OB.
The priority of OB31 is set to 5.
The priority of OB30 is set to 7.
If somehow both OBs are executed at the same time.
OB30 will go first because it has a higher priority.
Two cyclic OBs (OB30 and OB31) will be added, both OBs will have a different cycle time.
A phase offset and priority are used to make sure the interrupt OB's are not executed at the same time.
TIA Portal is a programming environment from Siemens and specially developed for programming the S7-1200/1500 PLC and the new HMI panels.
In TIA Portal it is possible to program in different languages, such as Ladder diagram (LAD), function block diagram (FBD), Statement List (STL), Graph and Structured Control Language (SCL).
In a series of short tutorials, MA-IT MyAutomation would like to help you get familiar with TIA Portal.
----- Transcription ---------------------------------------------------
This video will explain how to setup a cyclic interrupt OB.
Add a new cyclic interrupt OB.
Set a cycle time for the OB.
In this example a 5ms cycle time is used.
OB30 will now interrupt OB1 every 5ms.
This OB will write a value to a variable inside a datablock every 5ms.
OB1 will continue from where it was interrupted, once OB30 is done.
Now lets add a second cyclic interrupt OB.
The cycle time for this OB is set to 10ms.
OB30 has a cycle time of 5ms and OB31 has a cycle time of 10ms.
This may cause a problem, because there is a cycle where both OBs are executed at the same time.
Open the properties of a cyclic interrupt OB.
Here a phase offset can be setup.
For this example a 1ms phase offset is chosen.
OB31 will now be executed on 11ms, 21ms, 31ms ect. Instead of 10ms, 20ms ect.
OB number and name can also be changed in the properties.
A priority can be set for each OB.
The priority of OB31 is set to 5.
The priority of OB30 is set to 7.
If somehow both OBs are executed at the same time.
OB30 will go first because it has a higher priority.