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.
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.