Virtual Objects Overview
You can manually create virtual objects using Object Configurator, or configure virtual objects in bulk through the import of a configuration file. For instructions, see Configuring Virtual Objects.
Object Configurator rights define the access permission to create and delete objects in a Desigo CC system. For more details about access permission for objects, see Object Configurator in Application Rights.
Virtual objects are made up of a property and a command:
- Value: property in which the concerned information is stored. See the following table for details about data types that can be stored based on the object model.
- Write: command available for the Value property that allows other scripts or other Desigo CC functions to write the concerned value.
- WriteInternal: command available for the Value property that allows other scripts or other Desigo CC functions to write the concerned value. The execution of this command is not recorded in the History Database.
Virtual Object | Data Type | Simple Data Type |
Virtual Analog | GmsReal | Yes |
Virtual Binary | GmsBool | Yes |
Virtual BitString | GmsBitString | Yes |
Virtual BitString 64 | GmsBitString64 | Yes |
Virtual Combination | - | No |
Virtual DateTime | PvssTime | Yes |
Virtual Duration | GmsDuration | Yes |
Virtual Folder | - | No |
Virtual Integer | GmsInt | Yes |
Virtual Integer 64 | GmsInt64 | Yes |
Virtual Multistate | GmsEnum | Yes |
Virtual String | PvssString | Yes |
Virtual Unsigned | GmsUint | Yes |
Virtual Unsigned 64 | GmsUint64 | Yes |
Note that:
- For many of these objects, you can customize the display of
Value
, in the Details expander of the Object Configurator. For example, it is possible to specify the unit of a Virtual Analog by changing the value attributes at the point level. - The parameter for Virtual Binary can be one of the following:
0/1
,"True"
/"False"
(strings) ortrue
/false
(keywords). - For Virtual BitString and BitString 64, when storing the values, it is necessary to pass the decimal value that corresponds with the bitmask. Consequently, the result of the read operation is the decimal value, possibly to convert again into string or bit for later use.
- The Virtual Combination is a combination of simple data types.
- For the Virtual Multistate, when storing the values, it is necessary to pass the numeric value that corresponds with a specific textgroup item, previously configured.
For an example of use, see Write, Read, and Print to Console Virtual Datapoints.
When the execution of a script starts, the script will check whether all the necessary virtual objects (global variables) exist; if not:
- In Engineering mode, the technician is informed by an error of type Warning in the Script Editor (Error List expander). If any required virtual object is missing, then it can be created in the scripts library (see Create the Missing Objects Required by a Library Script).
- In Operating mode, the operator is not informed, and the script is executed anyway but it may not work properly.
To prevent Desigo CC failure, be careful not to store too much data (at megabyte level) in an individual virtual object.
Virtual Objects in Distributed Systems
In distributed systems, a script of a certain system can store information in a virtual object that belongs to another system.