How to add a Structure to your device
To create and configure a Structure you need a Mitsubishi Electric FA device either already saved or being edited. In the Workbench, expand your project in the Project Explorer, and then expand the Data Connectivity node. Expand the Mitsubishi Electric FA node and either select a device or add a new one (e.g. MELSEC). Then you should select the second tab, Device Structures, to edit it.
Available Structures
-
Click here to add new item - Click to add a new device structure.
If a device structure is referred by one or more tags, the structure is displayed with “(In Use)” and cannot be edited or deleted.
Structure Settings
-
Name - Enter a name of the device structure in the text entry field.
-
Description - Enter a description for device structure in the text entry field.
Structure Types
-
Field Name - Enter a description for device structure in the text entry field.
-
MELFA Device Parameter – Use the drop-down list to select the target from which to read the parameters.
This item is displayed only when setting Device Structures for MELFA devices.
-
Data Type3 - Use the drop-down list to select the tag's data type. Options include:
BOOL1, WORD, DWORD, INT, UINT, DINT, UDINT, LINT, ULINT, REAL, LREAL, STRING, WSTRING, STRUCTURE2
1 The BOOL can be used by specifying the bit position (e.g., EG0.1)
2 The name of a device structure is displayed in the parentheses.
3 All available the data types support the array type.
-
Array Settings - Click the "Edit setting" icon to display the Array Configuration window. If the tag is an array type, the cell displays the shape of it (e.g., (0..2) for a single-dimensional array with 3 elements). If the tag is not an array type, the cell displays “Disabled”.
Please refer to Array Configuration Details for details.
-
String Length - If the tag is a STRING or WSTRING type, the sell displays the length of the string (default: 32). The length of the string can be changed between 1 and 255. If the tag is not a string type, the cell is blank.
-
Move element up - Move the selected element one up. This cannot be used if the element is already on the top of the list.
-
Move element down - Move the selected element one down. This cannot be used if the element is already at the bottom of the list.
-
Description - Enter a description for the item type.
To Add a Device Structure
-
Click the Device Structures tab to show the window for structure settings.
-
Click “Click here to add new item” to add a new device structure. You can incorporate the created structure as an element into another structure, allowing you to create complex configurations as shown below.
-
Provide a valid name to the added device structure
-
Click Apply to save the change.
To Add Members to a Device Structure
-
Select a device structure to add a new member.
-
Provide a valid name and select a data type for the member.
-
Click the Edit setting icon that appears after selecting the Array Settings cell to enable an array if needed.
(Please refer Array Configuration Details for the details of array settings)
-
Click Apply to save the change.
If a structure is In Use by one or more tags, it cannot be edited and deleted.