{}

Our Brands

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

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
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;

Schneider Electric Ireland

Explore more
Range:
Articles that might be helpful Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: