我們的品牌

Impact-Company-Logo-English Black-01-177x54

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
How to create a new recipe from standard switch or XBT GK function key

Goals and Symptoms

In Vijeo-Designer, the recommended solution to create new recipes during Runtime is to use the toolchest object CreateNew. However, this object cannot be associated to XBT GK function keys. Hereafter is explained how to create new recipes in standard switches or in XBT GK function keys without using the toolchest object CreateNew.

Causes and Fixes


Principle: inside a recipe group, a new recipe is created when a Save operation is performed while the Recipe Number variable is set to an unexisting value. For example: consider a recipe group with 3 recipes: recipe 1, recipe 2 and recipe 3: if the Recipe Number is set to 4 and a Save operation is performed, then a new recipe is created. This principle can be used to create new recipes from a switch or an XBT GK function key.

In attachment you can find a simple demo project where the method described above is used in the F1 function key of an XBT GK and in a switch.

Project configuration:
1/ Create a recipe group containing for example 3 recipes of 3 ingredients.
2/ Create an integer internal variable NumberOfRecipes_Group1: it will be used to know how many recipes already exist in recipe group
3/ Set the initial value of NumberOfRecipes_Group1 to the initial number of recipes in Recip Group = 3

Goal:
When F1 key or switch is pressed, the number of recipes inside the recipe group is incremented, in order to set the number of recipes inside the group to an unexisting value. Then a Save operation is performed.

Sequence used in F1 key and in switch:
1/ Set Recipe group number:
Set 1 to _RecipeControlDefault.RecipeGroupNumber
2/ Increment the counter of recipes inside this group:
Add 1 to NumberOfRecipes_Group1
3/ Set Recipe number with the incremented value:
Set NumberOfRecipes_Group1 to _RecipeControlDefault.RecipeNumber
4/ Save recipe:
Set 8 to _RecipeControlDefault.Operation

Note:
In this project, the number of recipes inside the Recipe Group is simply incremented. This makes the process work But when user deletes a recipe, the index of this recipe is never reassigned. As an evolution, it is possible to have a more precise control of the variable NumberOfRecipes_Group1, allowing to reassign any available Recipe index.

Attachments

(Removed File URL: 201626_E50A/Demo_Customized_CreateNew.zip)(Removed Image URL: /PubResEXPORT.nsf/2b87ee90be777fc085257c28006ee4ef/422889e5658b6d1ac12576e300421fb7/fl_block_5/0.578?OpenElement&FieldElemFormat=gif)


Legacy KB System (APS) Data: RESL201626 V1.0, Originally authored by ArGr on 03/11/2010, Last Edited by ArGr on 03/11/2010
Related ranges: Magelis XBT GT, Magelis XBT GK, Vijeo Designer

施耐德電機Taiwan

附件
Demo_Customized_CreateNew.zip [39.54 KB]
探索更多
系列:
探索更多
系列:

需要協助?

  • 產品選型工具

    快速輕鬆地為您的應用找到合適的產品和附件。

  • 取得報價

    立即線上提交您的銷售需求,專業團隊將主動聯繫您。

  • 購買地點

    輕鬆在您所在地區找到最近的施耐德電機經銷商。

  • 支援中心

    在同一位置找到滿足您所有需求的支援資源。

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings