<< Click to Display Table of Contents >> Navigation: Modbus Universal MasterOPC Server > MasterOPC Universal Modbus Server > The Design-Time Mode > Operations in the Object Tree > Setting Extra Properties |
Extra properties allow you to create own settings for a device or a sub-device, and then use them in scripts - for instance, in own protocols.
The Additional properties command is available in the context menu of a device or a sub-device. Upon this command, the respective editor is opened:
The left part contains a property tree (the root group is a device or a sub-device), and the right part contains a description and a dialog to set values of the property highlighted in the tree.
The editor tools are:
Add – add a property to the tree; upon this command, the dialog to configure a property is opened:
Delete – delete the highlighted property
Edit – edit the highlighted property in the configuration dialog
Multiply - multiply the property selected.
Save and Exit – save changes and exit the editor
Exit without Saving – do not save changes and exit the editor
In addition to the property configuration editor, additional properties are displayed (and their values can be changed) in the Additional properties section of the respective dialog of parameters (see The Dialog of Device Parameters and The Dialog of Sub-Device Parameters).
The window to select a property type.
The window allows you to create a new property. You need to specify its Name (it will be used when addressing the property from a script) and Description (it will be displayed in device/sub-device properties). Being added, a property has to be configured in the edit window (it is required to set an initial value, boundaries, etc.)
There are the following property types:
False/True - a logical property. Only an initial value is specified for a property of that type.
Integer - a property to set an integer parameter (for instance, a device address, number of records read out for 1 cycle, etc.) A maximal value, a minimal value and an initial value are specified for a property of that type.
Float - a property to set a float parameter (coefficients, shifts, etc.) A maximal value, a minimal value and an initial value are specified for a property of that type.
String - a property to set a string parameter (for instance, a device name). Only an initial value is specified for a property of that type.
Password - a property to set a password. An entered value is masked by asterisks; a password must be entered twice (for confirmation). Only an initial value is specified for a property of that type.
Hide/show properties - this property controls access to other properties. You need to set an initial value (if it is false then additional settings are hidden; otherwise, are displayed), and Number of hidden properties.
Number of hidden properties - properties that are placed below the current property in the property tree. Assume that two properties are added below the Hidden property, and a number of hidden properties is 1.
In this case, only Property1 is hidden.
Note. To move a property up/down, use the key combinations Ctrl + ↑ / ↓.
To transfer values of additional properties to a script, the functions server.ReadDeviceExtProperty and server.ReadSubDeviceExtProperty can be used.