![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2012
Location: Australia
Posts: 3,653
|
TIA Portal Indirect Addressing/Recipe Management
Hi all,
I have been asked to implement a simple recipe function on a system running an S7-1200 on TIA Portal. In Allen-Bradley land, my method would be: 1. Create a UDT with elements for all recipe parameters 2. Create an array of this UDT called Recipe_Database with enough array members to store all my recipes 3. Create a single instance of this UDT called Current_Recipe 4. Use a list selector on the HMI to select a value from 0...n, where the selected value represents the desired Recipe_Database array element (so, if I want to load Recipe_Database[3], the user would use the list selector to select the recipe description that returns a value of 3) 5. Use indirect addressing to copy Recipe_Database[Selected_Recipe] to Current_Recipe 6. Drink beer and celebrate In Siemens-land, though, there a few things I'm not sure of. 1. What would be the best way to structure my data? Should I create a user-defined data type (Struct, I think???) with all my recipe parameters, then create a DB with as many of these Struct's as required? Or can I create a "template" DB that contains my recipe structure, and then create as many instance DB's referencing that template DB as I need to store all my recipes, plus one for my current recipe? Or something else? 2. Is indirect addressing possible in a Siemens PLC, and does it work the same way? Are there any tricks I need to be aware of with indirect addressing in TIA portal? Any tips and ideas greatly appreciated - I'm stil learning to think like a German ![]() |
![]() |
![]() |
#2 |
Member
![]() ![]() Join Date: Mar 2010
Location: casablanca
Posts: 624
|
Have a look at these links
https://support.industry.siemens.com...dti=0&lc=en-WW https://support.industry.siemens.com...dti=0&lc=en-CN Last edited by tarik1978; April 4th, 2018 at 02:51 AM. |
![]() |
![]() |
#3 |
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2012
Location: Australia
Posts: 3,653
|
I hadn't thought of using the HMI recipe management option. Can anyone comment on it's usability? The PanelView Plus recipe management solution is pretty ordinary and I've always steered well clear.
My HMI here is a KTP600 Basic (full part number 6AV6647-0AD11-3AX0) - does anyone know if this particular HMI has any recipe management functions? |
![]() |
![]() |
#4 |
Lifetime Supporting Member
![]() ![]() Join Date: Jul 2016
Location: Manchester
Posts: 411
|
I've built recipe systems using the same method you describe in the OP.
I've tried the HMI recipe manager, it's ok. A little basic. Indirect addressing works in Siemens. One thing I haven't tried is multi point indexing like I have in Rockwell. E.g Example_Tag[X,Y] |
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 1,860
|
I have used the HMI recipe management. It stores all recipes on the HMI itself. I've found it very straight forward to use. You can even upload values from the PLC and store in a new recipe data record if, for example, the values were entered in several I/O fields.
The severe drawback in the Basic panels is that you cannot store the recipes onto a memory card or USB stick. The only way to do a backup of recipes is to manually use the backup/restore method in ProSave or WinCC. KTP600 Basic Recipe management: ● Number of recipes: 5 ● Data records per recipe: 20 ● Entries per data record: 20 ● Size of internal recipe memory: 40 kbyte ● Recipe memory expandable: No
__________________
Automation Programmer PLC / HMI / SCADA / SQL New Systems, Modifications System Upgrades & Conversions Siemens EPROM & EEPROM Service ------------------------ Visit: contrologica.com Email: info@contrologica.com |
![]() |
![]() |
#6 |
Member
![]() ![]() Join Date: Sep 2017
Location: Denmark
Posts: 146
|
I have made almost exactly what you describe in TIA14 for S7-1500 with Comfort panels. Depending on your controller and number of recipes, you can store your recipes directly in the retain memory. My system had 1000 recipes with arrays of a hundred LREALS and Strings, so retain memory was right out. I had to use the memorycard with an Array Datablock (DBL) stored on it, and then use read/write functions to load the wanted recipe with indirect addressing. Slow as hell.
You create a PLC Data Type (UDT) and then an array of that datatype. You can use the same DB for e.g. "StoredRecipes" (Data type: Array[0..100] OF typeRecipe) and a single "ActualRecipe" (Data type: typeRecipe) If you need to edit your recipes, you just edit the PLC Datatype "typeRecipe" and all references are updated. I'm sure the HMI recipe manager is great if you are mixing juice or paint. But who does that?
__________________
All things Siemens and Beckhoff. Please let it be Beckhoff. |
![]() |
![]() |
#7 |
Member
![]() ![]() Join Date: May 2012
Location: NC
Posts: 190
|
I use the recipe functions in Comfort/WinCC when possible for simple setups.
I've only done one complicated recipe setup in a 1200 and it sucked. I had to store the recipes in the load memory and load/store them there. READ_DBL & WRIT_DBL were the functions I had to use to do it. Inside the DB you set up for storage, go to properties and you have to CHECK the Only store in load memory box. This will allow you to use a much larger DB than you can fit in the Work memory. Last edited by travispedley; April 4th, 2018 at 07:04 AM. Reason: totally hit enter before i was done, added screenshots |
![]() |
![]() |
#8 |
Member
![]() ![]() Join Date: Jan 2006
Location: Finland
Posts: 1,855
|
On plc you can have multiple DB-blocks with same variables on same order. (only DB name and number changes)
I think that with SFC20 you can copy full DB from one to another. So if you make indirectly copy syntax to SFC20, it should be possible to copy variables between DB blocks. On HMI then is only needed recipe number field and execute buttons. |
![]() |
![]() |
#9 |
Member
![]() ![]() Join Date: Aug 2007
Location: South Sweden
Posts: 377
|
I use the TP700 recipe handling stored on sd card and a S7 1200. What complicates my system little over the limit is that we don't edit recipes (only) in the view but instead have parameter screens throughout the hmi. We also have some access level depending parameters...
So TP700 recipes works well for what's intended, but keeping it all in plc gives more control. And makes it easier to change hmi. A notification of when a recipe parameter change is pending is tricky either way.
__________________
Jon B, industrial programmer mostly. |
![]() |
![]() |
#10 |
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2012
Location: Australia
Posts: 3,653
|
Thanks for all the tips. It looks like the HMI recipe option is out, because I'll need more than 5 recipes. But it sounds like the UDT and indirect addressing method is possible, so I guess I'll head down that path.
Can anyone help me out with a screenshot or article showing indirect addressing in TIA Portal? Most of the examples I've found online are in STL, and I'm kind of stuck with ladder by customer requirement. |
![]() |
![]() |
#11 |
Member
![]() ![]() Join Date: Mar 2010
Location: casablanca
Posts: 624
|
This thread should help you
http://www.plctalk.net/qanda/showthread.php?t=104280 See also this link https://support.industry.siemens.com...=0&pageSize=10 Last edited by tarik1978; April 5th, 2018 at 03:42 AM. |
![]() |
![]() |
#12 |
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2013
Location: MI
Posts: 2,900
|
ASF,
You can pretty much follow the same steps as you laid out for AB-land, except that the Data type instance will probably be in a DB. In Portal (for recentish 1200s and 1500s), Indirect addressing is as easy as #Arrayname[#indextag], for Ladder, FBD, and SCL. For multiple dimensions, it would be [#index1,#index2,etc]. Two things to watch out for: 1) When you go to add the index inside the brackets, the only thing the dropdown will give you is the different defined indexes in the array (0-100, etc). It will NOT help you browse all the tags, like usual. I generally have to type out the desired tag somewhere else, validate it, and then copy/paste it in. 2) There are a few posts above with different solutions, but you'll need to make sure you consider retentivity. In the logix world, all tags are retentive. If you're thinking like a german, then you only want some memory to be retained, and the rest to be set back to a defined initial value after power up or a download that changes a DB. A) the simplest solution is to mark your recipes as retentive, but if there is much size to your recipe system, then it probably won't fit. B) Another option is to write the recipes to load memory via the Read/write_DBL instructions. This sets the start values of the DBs to the current values. However, if you need to change the DB later, the values may not get uploaded into your project. C) A third option is to use some included instructions to write the recipes to the memory card as a CSV file, with the recipe instructions. This makes it easy to import recipes as well, and the CSV files are accessible over the web interface. Regardless how you do it, be careful if you make any changes to the recipe data structure after you've filled in the records. It can be very easy for the live data to vanish in a puff of logic. |
![]() |
![]() |
#13 |
Member
![]() ![]() Join Date: Jan 2006
Location: Finland
Posts: 1,855
|
2. If you write values to DB-block, they are all retentive by default, but download of DB will set them back to init values.
(with siemens you need offline -> online copy, and you have backup of parameters also on offline project) This is case if you haven't selected optimatez block access. With optimatez access you can select if seperate symbols are retentive or not. Merker words (MW, MD, MF) are only retentive, if you config them from hardware to retentives. |
![]() |
![]() |
#14 | |
Lifetime Supporting Member
|
Quote:
Not sure how the M area works in the newer processors either. In the 300's I remember the HW config had an area where a default 16 bytes or so were defined as retentive. |
|
![]() |
![]() |
#15 | ||||
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2012
Location: Australia
Posts: 3,653
|
Quote:
Quote:
Quote:
Quote:
Thanks a heap for the very thorough advice! |
||||
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
run Step 7 without TIA Portal | dmned64 | LIVE PLC Questions And Answers | 4 | June 7th, 2017 07:39 AM |
Siemens SIMATIC WinCC TIA Portal v14 - Is Indirect tagging Possible? | DenZ_P | LIVE PLC Questions And Answers | 2 | January 24th, 2017 07:51 AM |
Indirect addressing in TIA Portal (1500) | DairyBoy | LIVE PLC Questions And Answers | 8 | July 18th, 2016 01:04 PM |
TIA Portal V13 S71500 indirect addressing | JOLTRON | LIVE PLC Questions And Answers | 0 | March 26th, 2015 01:32 PM |
Siemens OP77B Trouble in TIA Portal | Tim James | LIVE PLC Questions And Answers | 4 | December 24th, 2012 04:27 PM |