我們的品牌

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

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

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
How to access the 'DDT Type' IO variable in a Unity application using referenced variables.
Issue
How to access the 'DDT Type' IO variable in a Unity application using referenced variables.

Product Line
EcoStruxure Control Expert (formerly known as Unity Pro)

Environment
Unity Pro v8.1

Resolution
Referenced variable allows the user to access the IO 'DDT Type' variables (%I, %Q and %IW) and use them directly in the Unity application without having to convert each input and output point on a module to either a %MW or %M variables. The following is a procedure on how to create the referenced variable.
  • Open the Data Editor.
  • Click on the DDT Types tab.
  • Enter a reference name (i.e., MyMotor) -Assign it to the type <Struct>.
ghjkl
  • Add the name for new variable type (i.e., Feedback, Start, Stop, Status). The new variable is referred to as a referenced variable.
  • Click on the selction box next to the Type textbox to open the Variable Type Selection window.
  • Click on the REF_TO checkbox to select it.
  • Select the appropriate Type.
  • Click on OK.
  • Repeat the last five (5) steps for any other new variable type.
ghjk
  • Select the 'R/W Rights.of Referenced Variable' checkbox as needed for the module IO type.
  • Click on the Variable tab.
ghjkl
  • Add the located variable name (i.e., MyMotor).
  • Select the new 'DDT Type' that you created earlier.
  • If you click on the + next to the variable name, it will show the reference variables that was created earlier.
fghjk
  • Open the Project Settings and select the 'Force reference initialization' checkbox.
  • Click on Apply.
  • Click on OK.
tyuio


If you try to build the application, it will fail.
dfghj


To correct the problem you need to add a value to the referenced variable. This is what the 'Forced reference initialization' is looking for.
  • Double click on Value textbox.
  • Click on the button next to the textbox.
dfghjk
  • Drill down to the value for the I/O module channel.
  • Click on the Value item to highlight it.
  • Click on OK.
  • Repeat the last 4 steps for all the other referenced variables.
  • Save the changes.
frgthyjk
  • Build the application.
rtyuio
  • To access the referenced variable in either logic or the animation table,
  • Browse for the referenced variable name
  • Click on the item to highlight it.
rtyuio
  • Add a ^ after the referenced variable name.
hjkl;

施耐德電機Taiwan

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