Recipes from PLC S7-1200

suppaman

Member
Join Date
Mar 2009
Location
Italy
Posts
18
Hello everyone.
Here's my issue: I have to do a recipe management from the cpu and not from hmi.

The plc is a Siemens S7-1200, with a 1214C cpu.

There's an input singnal (8bit combination from the field) that tell to the plc the idcode of the recipes that the machine wants to be loaded. So the selection and the loading of the recipes it's done automatically, that's why I was thinking to manage the recipes inside the cpu.

The recipes is structured as below:
1. RecipeName - string
2. ID_Code - int
3. Value1 - int
4. Value2 - int

With the AWL and pointer of the S7-300 cpu this quite simple. But withouth pointer it's not really easy.

First i was thinking to use the function PEEK for the indirect addressing, but then realized that cant do the job for string datatype.

Then i found the Read/WriteField function. Even if i've to structure the recipes in a different way (with arrays) it seems a good solution.
But it's possible to implement those function with the SLC code? Because i can see the functions in the LAD editor, but not in the SCL. What i'm doing wrong ?

Any suggestion ?
Do you have any other idea to implement this kind of thing ?

Thanks to all.
 
Create a udt of the recipe structure
Create an array [0..255] of recipe udt's
Use index[0] as the working recipe
The recipe selector will be the index in the array
Do a simple move to copy index[0] from the required index ie MOVE(Recipe[index], recipe[0]). This is simple indexing in ladder providing the plc has fw >= 2.2
 
Haven't used it myself yet but a reply to another recipe question mentioned.

READ_DBL, WRIT_DBL (Read from or write to a DB in load memory)

In Extended Instructions, section 8.8.1 in the Siemens Manual that I am using.
 
Thanks MkeDawkins!

I've already done the array of udt, but I didn know that with the function "MOVE" you can also move entire structure. And unlike step7 classic you can indexing the array with normale variable (Recipe[Indexvar]) without using pointers, that's really great.

After i'll try out some scl code to do some loop, for example to delete the recipe[5] and "re-compat" the array, and stuff like that.

For BryanG: i dont really need to load the recipes into load memory..

By the way thanks for the moment
 

Similar Topics

Hi all... Is there in any way to control FT view ME HMI Recipe from PLC. Like download or change recipe through PLC command.
Replies
0
Views
682
Is there a way to download all recipes from the PLC using RSLogix or HMI to a single text or excel file for easy editing and later easy uploading...
Replies
2
Views
1,799
I am programming an HE-XE102NR with CScape 9.6. I have imported my recipes via the recipes editor. The one thing i can't seem to figure out is how...
Replies
3
Views
1,636
I was recently reading a thread here that talked about Ignition and PLC recipes. The thread dealt with the mechanics of getting the data from...
Replies
3
Views
5,916
I'm just curious what people are using to download recipe /formula data to Allen-Bradley PLC's. We use Control Logix and PLC-5's with Wonderware...
Replies
3
Views
1,892
Back
Top Bottom