RecipeManCommands.ReadAndSaveRecipeAs (METH) ¶ METHOD ReadAndSaveRecipeAs : DWORD Reads the current PLC values into the recipe and afterwards stores the recipe into the specified recipe file The content of an existing file will be overridden. Attention: The behaviour from this method has changed in the following way. If both parameters “RecipeDefinitionName” and “RecipeName” are set ( stringlength > 0) the behaviour is not changed. In this case a read to a specific recipe does also an automatically save to the recipe when the option “Save recipes changes to recipe files automatically” is set in the RecipeManager configuration “General”. If the RecipeName is not set ( stringlength = 0) the behaviour has changed. In this case an automatically save to the recipe is not executed and the new recipe values are only stored into the given file name. InOut: Scope Name Type Comment Return ReadAndSaveRecipeAs DWORD Possible last error values: ERR_RECIPE_DEFINITION_NOT_FOUND ERR_RECIPE_NOT_FOUND ERR_RECIPE_SAVE_ERR ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition. RecipeName STRING Name of the recipe. FileName STRING(255) Name of the file
RecipeManCommands.ReadRecipe (METH) ¶ METHOD ReadRecipe : DWORD Reads the current PLC values into the recipe InOut: Scope Name Type Comment Return ReadRecipe DWORD Possible last error values: ERR_RECIPE_DEFINITION_NOT_FOUND ERR_RECIPE_NOT_FOUND ERR_NO_RECIPE_MANAGER_SET ERR_OK DataServer Errors from 16#2000 to 16#20FF, DataSourceDriver Errors from 16#2100 to 16#21FF DataServer and DataSourceDriver errors can occur if a DataServer and DataSource is configured beneth your current application (CODESYS HMI) and the command is called from the visualization. See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition RecipeName STRING Name of the recipe
RecipeManCommands.RegisterDatasourceRecipeDefinition (METH) ¶ METHOD RegisterDatasourceRecipeDefinition : DWORD Helper method that can be used to preregister variable lists for a recipe definition within devices connected via datasources. The intention of this function is to speedup reading/writing of recipes at the cost of an initial registration process after each connection setup of the affected datasources. If a recipe is read or written several times then this initial effort is necessary only once and each read or write operation is executed faster. Important This functionality does not automatically update the created variable list in case of online changes (eg. affecting the recipe definition). Therefore if online changes modify a recipe definition or locations of variables within a recipe definition, the according list has to be setup again! This can be done by searching and deleting it using the methodes of |IDatasources.IDatasourcesMgr2| Important This function might block until it is possible to access the datasources. Note If there is no performance flaw when reading/writing recipe definitions over datasources then it’s not necessary to call this method. Note The error code |CmpErrors.Errors.ERR_NOT_SUPPORTED| signals that one of the affected datasources does not support this feature and so it cannot be used at all. The error code |IDatasources.Errors.ERR_DS_READONLY_ITEM| signals that at least one of the variables of the recipe definition is reaonly and therefore the feature of preregistering according variable lists is not supported. InOut: Scope Name Type Comment Return RegisterDatasourceRecipeDefinition DWORD An error code representing the result of this operation. See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition. Input datasourcesMgr IDatasources.IDatasourcesMgr The global instance of the datasources manager. Typically pass g_Datasources
RecipeManCommands.ReloadRecipes (METH) ¶ METHOD ReloadRecipes : DWORD Reloads the list of recipes from the file system All standard recipe files with the standard recipe file name <recipe>.<recipedefinition>.<recipeextension> are considered. InOut: Scope Name Type Comment Return ReloadRecipes DWORD Possible last error values: ERR_RECIPE_DEFINITION_NOT_FOUND ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition.
RecipeManCommands.ResetLastError (METH) ¶ METHOD ResetLastError : DWORD Resets the last error InOut: Scope Name Type Comment Return ResetLastError DWORD Possible last error values: ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors.
RecipeManCommands.ResetLastInfo (METH) ¶ METHOD ResetLastInfo : DWORD Resets the last information InOut: Scope Name Type Comment Return ResetLastInfo DWORD Possible last error values: ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors.
RecipeManCommands.SaveRecipe (METH) ¶ METHOD SaveRecipe : DWORD Stores the recipe into the standard recipe file The content of an existing file will be overridden. The standard recipe file name is <recipe>.<recipedefinition>.<recipeextension> . InOut: Scope Name Type Comment Return SaveRecipe DWORD Possible last error values: ERR_RECIPE_DEFINITION_NOT_FOUND ERR_RECIPE_NOT_FOUND ERR_RECIPE_SAVE_ERR ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition RecipeName STRING Name of the recipe
RecipeManCommands.SetRecipeValues (METH) ¶ METHOD SetRecipeValues : DWORD Sets the recipe values of the corresponding recipe Example: We have 50 recipe values. We want to create a table which sets 10 recipe values at the same time. We define a string array strArr: ARRAY[0..9] OF STRING; Corresponding to the iStartIndex we can set the recipe values from a specific area. StartIndex := 0; The values 0..9 are set. iStartIndex := 20; The values 20..29 are set. In this example: iSize := 10; InOut: Scope Name Type Comment Return SetRecipeValues DWORD Possible last error values: ERR_RECIPE_DEFINITION_NOT_FOUND ERR_RECIPE_NOT_FOUND ERR_NO_RECIPE_MANAGER_SET ERR_OK See ReturnValues (GVL) for a description of all possible errors. Inout Const RecipeDefinitionName STRING Name of the recipe definition RecipeName STRING Name of the recipe Input pStrings POINTER TO ARRAY [0..0] OF STRING The strings with the recipe values iSize INT Size of the string array. iStartIndex INT Start index. Can be used for a scrolling function (see example)
RecipeManCommands.SetStoragePath (METH) ¶ METHOD SetStoragePath : BOOL Sets the storage path of the recipe management dynamically It overrides the storage path which is normally configured in the recipe manager configuration. InOut: Scope Name Type Comment Return SetStoragePath BOOL TRUE, if the storage path was set successfully. Possible error reasons are: ERR_NO_RECIPE_MANAGER_SET The recipe management contains no recipe definition See ReturnValues (GVL) for a description of all possible errors. Input stPath STRING(512) The storage path i.e. c:/recipes/
ProfinetSubmodule (FB) ¶ FUNCTION_BLOCK ProfinetSubmodule An instance of this function block represents a Profinet submodule. In initial state, the ProfinetSubmodule is not attached (plugged) to the device, it has to be assigned first (ConfigureDevice() or ReconfigureModules() method). InOut: Scope Name Type Initial Comment Output xPlugged BOOL ProfinetSubmodule is attached (plugged) to the ProfinetDeviceInstance. ID UDINT CommFB.Constants.INVALID_ID The ID of the submodule. The ID is valid for a plugged submodule only. SubmoduleConfig SubmoduleConfiguration The current Config (Real IdentData + IOs) xControllerAccess BOOL The submodule is owned by an IO controller. AR_ID DWORD CommFB.Constants.INVALID_ID ID of owner’s AR. xData BOOL Data exchange of owner’S AR active (IO-Provider / -Consumer State specifies if data is valid). xStateInformation BOOL Field SubmoduleStatus indicates some diagostic information. SubmoduleState ProfinetCommon.SubmoduleStatus Submodule status with detailed information on diagnosis entries or configuration missmatch (with controller AR). Methods: GetData SetData UpdateConfiguration Structure: GetData (Method) SetData (Method) UpdateConfiguration (Method)