 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
maersk Member 3


Joined: 17 Aug 2014 Posts: 891
|
Posted: 31/05/2016 18:11 Post subject: Overlapping of tags with the keyword "AT" in the S |
|
|
How do you program the overlapping of tags with the keyword "AT" in the STEP 7 (TIA Portal)?
https://support.industry.siemens.com/cs/document/57132240/how-do-you-program-the-overlapping-of-tags-with-the-keyword-at-in-the-step-7- (tia-portal)
Using the keyword "AT" you can overlap a tag declared for the S7-1200/S7-1500 with a further declaration.
You need the following to overlap tags with the keyword "AT".
For S7-1200 at least STEP 7 (TIA Portal) V11.0+SP1+Update 2 (or higher) and firmware V2.0 (or higher).
For S7-1500 at least STEP 7 (TIA Portal) V12 (or higher).
1 Confecționate a function block.
Note
| Code: | "Optimized" block access is set by default for all newly created blocks of the S7-1200/S7-1500. S7-300/S7-400 blocks have "Standard" block access. If you use these blocks for the S7-1200/S7-1500, we recommend that you change block access to "Optimized" to ensure better performance. For this you open the Properties of the block and in the "Attributes" tab you enable the "Optimized block access" function.
|
2 Open the block and block interface.
3 In the declaration table you enter first the tag that you wish to overlap with a new data type. For example: Name: "statConveyor", Data type: "Word".
4 Select the option "Set in IDB" from the drop-down menu of the "Retain" column.
5 Mark the line with the tag to be overlapped and right-click.
6 In the pop-up menu that opens you select "Add Line". You must declare the overlapping tag in the line directly under the tag to be overlapped.
7 Enter the name of the tag in the added line, "statMotors", for example.
8 In the "Data type" column you enter first just the letter "A" and wait until the window opens with the data types you can select.
| Code: | Note
This option is only possible for the "Standard" block access for functions and temporary tags. For this you must go to the Properties of the block and in the "Attributes" tab you disable the "Optimized block access" function.
|
9 In the drop-down menu you select the keyword "AT" and then click in the "Name" column. In addition to the name of the tag ("statMotors", for example) the keyword with the tag to be overlapped is also displayed in the same field. In this example: AT "statConveyor".
10 Click again in the "Data type" field and enter the declaration for the array, "Array[0..15] of Bool", for example.
Now the overlapping of the tags is completely declared and you can enter your program in the editor.
Sample program
With some applications, it is necessary to group numeroase signals in one control word or extract separate signals from a control word.
FB "BoolToWordAT"
You can use the FB "BoolToWordAT" to group up to 16 bits in a word. The separate input tags of the Bool data type are assigned to the static "statMotors" array tag and overlapped with the keyword "AT" of the "statConveyor" tag. Then the content of the static "statConveyor" tag is transferred to the "conveyor" output tag.
FB "WordToBoolAT"
Using the FB "WordToBoolAT" you can extras up to 16 signals (tags of the "Bool" data type) from a tag of the "Word" data type. The content of the "conveyor" input tag is transferred to the static "statConveyor" tag and overlapped with the keyword "AT" of the declared "statMotors" tag. Then the separate bits of the "statMotors" array tag are assigned to the output tags of the Bool data type.
Copy the "57132240_KeywordAT_Lib_TIA_Portal.zip" file into a separate directory and then start the file with a double-click. The library now unpacks automatically with all the associated subdirectories. Then you can use STEP 7 (TIA Portal) to open and edit the library.
Drag-and-drop the blocks "BoolToWordAT", "BoolToWordAT_DB", "WordToBoolAT", "WordToBoolAT_DB", "DB" and "Main" to the block folder.
Drag the "Tags" into the "PLC tags" folder.
https://support.industry.siemens.com/cs/attachments/57132240/57132240_KeywordAT_Lib_TIA_Portal.zip |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|