Data management

How can I create machine data?

At the start time of a project, an initial set of machine data must be created so that the parameters determined during commissioning can be persistently stored.

Data management 1:

Error messages in the EventLogger

All runtime objects attached to the FB_BaseRuntime will inevitably trigger an error message under the following conditions:

  • All Init() methods have been successfully executed
  • No machine data file exists yet
  • FB_BaseRuntime.DisableMdInit is not set
For the sequence of steps described below, the use of the FB_BaseRuntime is assumed.
1. Start the PLC runtime.
2. Call the FB_BaseRuntime.MdSaveAll() method once.
3. Wait for the saving process to be completed.
Depending on the amount of data to be saved, the processing time may vary. In PLC online mode the variable bMdSaveAll can be monitored to check the completion of the saving process.
You have successfully generated a first set of machine data.

How can I specify when a recipe can be loaded?

Since in certain operating scenarios (e.g. in automatic mode) no recipes are to be loaded into the PLC, the release of the recipe management must be given by the PLC.

The recipe release requires an initialization after machine start. For this purpose, the property FB_PlcStateToHmi.PlcInitialized must be set.
1. Write the Boolean condition on the following property: FB_PlcStateToHmi.ProductChangeEnable.
If the Boolean condition is true, recipes can be loaded into the PLC.