Migrate from SX Open to the Management Platform

Scenario: Integrating OPC data points without the existing Gateway SX Open. The current OPC Excel worksheet is required to process.

 

Reference: For background information, see the reference section.

 

Workflow diagram:

 

 

Prerequisites:

  • The OPC DA Discovery and Scripts extension modules are installed and assigned to the project.
  • The following applies to all steps performed in Desigo CC:
  • System Manager is in Engineering mode.
  • The System Browser is in Management View.

To speed configuration, make sure the Desigo CC Transaction Mode is set to Simple or the Automatic Switch of Transaction Mode is set to True.
The automatic switch setting is recommended. Without it, to re-enable the logs, you need to set the Transaction Mode to Logging at the end of the configuration procedure.

 

Steps:

1 - Create Conversion File
  1. In Excel, open the SX Open configuration file for the current project.
  1. In Excel, open file OPC_ ConfigurationData_Ver1_1.csv in folder [Installation Drive]:\[Installation Folder]\GMSMainProject\Profiles\OPCDataTemplate.
  1. Convert the information as per the following table:
    a. Proceed in the table line-by-line from top to bottom.
    b. First, perform the steps in the column From SX Open file.
    c. Perform the steps for the same line in the column To OPC file.
    d. Select the Configuration tab if no tab is indicated in the column From SX Open file.

Defining General Information

From SX Open file

To OPC file

Comments

  1. Delete supervisor (orange) lines 6 to 14.
  2. Delete the SERVER_STATE State lines.
  3. Delete each of the array lines 2 through x. Only an individual entry may exist on array data points.

 

Only Individual arrays are supported in Desigo CC.

Existing alarms in tab BSTR_Hash are not supported.

Desigo CC kann zusammengehörige OPC Datenpunktinformation (z.B: Wert, Limite Hoch) auf einen einzelnen BACnet Datenpunkt abbilden.

  1. Select the OPC Server tab.
  2. Highlight cell 7B [OPC Server Name].
  3. Right-click and select Copy.
  1. Select section [SERVERS].
  2. Select column C [Prog ID].
  3. Right-click and select Paste.
  4. In column A [Name], enter a description (spaces not permitted).
  5. In the B [Description] column, enter a description, for example:

In the event a value is entered in the SX Open file, in column C [Computer Name], it must be prefixed by a forward slash (/) in the Prog ID, for example:
Computer_Name/OPC_Server_Name

  1. Select the BACnet Device tab.
  2. Delete supervisor information (orange) lines 6 to x.
  3. Highlight as of line 8, column D [Description].
  4. Right-click and select Copy.
  1. Select section [GROUPS].
  2. Select column B [Name].
  3. Right-click and select Paste.
  4. In the column C [Description], enter a description for each entry.
  5. In column A [Parent Server Name], enter the same description as section [SERVERS], column A [Name].

The information in column B [Name] must match section [ITEMS], column A [Parent Group Name].

Creating Data Points

From SX Open file

To OPC file

Comments

  1. Select column L (Keyname).
  2. Highlight all data points.
  3. Right-click and select Copy.
  1. Select section [ITEMS].
  2. Select column B [Name].
  3. Right-click and select Paste.
  4. Replace all special characters not supported in Desigo CC with an underscore ( _).

Example
Building1'CabinetQ1'MtrEg1'CurrPh1
Building1_CabinetQ1_MtrEg1_State

Data points with a high or low limit must be unique. Supplement the information with a suffix _PrVal, _LoLim, and _HiLim to ensure uniqueness.

  1. Select column N (Description).
  2. Highlight all data points.
  3. Right-click and select Copy.
  1. Select section [ITEMS].
  2. Select column C (Description).
  3. Right-click and select Paste.
  4. Replace all special characters not supported in Desigo CC with an space.

Example
Building1'CabinetQ1'MtrEg1'CurrPh1
Building1 CabinetQ1 MtrEg1 State

 

  1. Select column A [Item Name].
  2. Highlight all data points.
  3. Right-click and select Copy.
  1. Select section [ITEMS].
  2. Select column D [Item Name].
  3. Right-click and select Paste.

 

No steps.

  1. Select section [GROUPS].
  2. Select column B [Name].
  3. Highlight the entry and copy the information to the section [ITEMS], column A [Parent Group Name].

Enter the same description on all data points for the same device.

Configuring data points

From SX Open file

To OPC file

Comments

  1. Information from columns J (BACnet Object Type)+ P (Destination).
  1. Select section [ITEMS].
  2. Select column F [Direction].
  3. Enter information (I, O or IO) for each data point.

Define the input and output:

BACnet = I

OPC = IO

Two way = IO

  1. Information from columns J (BACnet Object Type)+ C (OPC Data Type).
  1. Select section [ITEMS].
  2. Select column E [Data Type].
  3. Enter information for each data point.

Data type is based on the import rules for library Global_OPC_HQ_1.

  1. Select an analog data point.
  2. Information from column T (Min Present Value).
  1. Select section [ITEMS].
  2. Select column O [Min].
  3. Enter information for each analog data point.

 

  1. Select an analog data point.
  2. Information from column U (Max Present Value).
  1. Select section [ITEMS].
  2. Select column P [Max].
  3. Enter information for each analog data point.

 

  1. Select an analog data point.
  2. Information from column X (Resolution).
  1. Select section [ITEMS].
  2. Select column U [Resolution].
  3. Enter information for each analog data point, for example: 0.1.

 

Defining Units and Texts

From SX Open file

To OPC file

Comments

  1. Select an analog data point.
  2. Information from column S (BACnet Unit).
  1. Select section [ITEMS].
  2. Select column V [Eng Unit].
  3. Enter information for each analog data point, for example: 48.

You must enter a number as the unit, for example: 48 = kW.

  1. Select a binary data point.
  2. Information from columns AA (Polarity) + AB (Active Text) + AC (Inactive Text).
  1. Select section [ITEMS].
  2. Select column W [State Text].
  3. Enter the Path, for example: Heating$Cooling.

Enter only states that are not standard OPC texts. A separator must be added between the states.

  1. Select a multistate data point.
  2. Information from columns AG (No. Of States) + AH (State Text Ref).
  1. Select section [STATE_TEXTS].
  2. Select column A [Table Name].
  3. Enter the text group, for example, TxG_SXText10001.
    Number, index and texts are defined in the State tab.
  4. Select column B [Index].
  5. Enter the index number.
  6. Select column C [Text].
  7. Enter the associated index text.

Example Configuration tab:

Example State tab:

Example result:

The text groups must be manually created in the system.

Defining Alarm Response

From SX Open file

To OPC file

Comments

  1. Column AQ = 0.
  2. Information from column AK (High Limit).
    AK = 100
  3. Information from column AL (LowLimit).
    AL = -100
  1. Select section [ITEMS]
  2. Select column Z [Alarm Value].
  3. Enter information for the data point.
    Z = 100$-100

Multiple alarms must be separated by $.

Example:
For column X, the results in the following,
HighPriorityAlarm$HighPriorityAlarm

  1. Column AQ = 0.
  2. Multistate information from column AM (Alarm Value(s)).
    AM = 2,3,4
  3. Information from column An (Fault Value)).
    AM = 5,6
  1. Select section [ITEMS].
  2. Select column Z [Alarm Value].
  3. Enter information for the data point.
    Z = 2$3$4$5$6

Example:
For column X, the result would be
MediumPriorityAlarm_NoAckNoReset$MediumPriorityAlarm_NoAckNoReset$MediumPriorityAlarm_NoAckNoReset$Fault_NoAckNoReset$Fault_NoAckNoReset

  1. Column AQ = 0.
  2. Information from column AO (Notification Class).
    AO = 31
  1. Select section [ITEMS].
  2. Select column X [Alarm Class].
  3. Enter information for the data point.
    X = HighPriorityAlarm$LowPriorityAlarm

The number of entries in the Alarm class (Syntax, see Notification Class) must match the number of entries in the column Alarm Value.

Alarm types:
Simple = Alarm_NoAckNoReset
Basic = Alarm_NoReset
Alarm = Alarm

  1. No steps.
  1. Select section [ITEMS].
  2. Select column Y [Alarm Type] for example: GE$LE

The number of entries in the Alarm class and Normal Text) must match the number of entries in the column Alarm Value. Alarm type operators
GE = Value greater than
LE = Value less than
EQ = Value equal to

  1. Column AQ = 0.
  2. Information from column AP (Message Text), for example: No communication is available.
  1. Select section [ITEMS].
  2. Select column AA [Event Text], for example: No communication is available.
  3. Select column AB [Normal Text], for example: Communication is available.

The number of entries in the Alarm class and Normal Text) must match the number of entries in the column Alarm Value.

NOTE: SX Open could only support one text.

Creating Data Point Hierarchy

From SX Open file

To OPC file

Comments

  1. Select column L (Keyname).
  2. Highlight all data points.
  3. Right-click and select Copy.
  1. Select section [ITEMS].
  2. Select column AE [Logical Hierarchy].
  3. Right-click and select Paste.
  4. Select column AF [User Hierarchy].
  5. Right-click and select Paste.
  6. Replace all ' (apostrophes) with _ (underscore).

Example
Building1'CabinetQ1'MtrEg1'CurrPh1
Building1_CabinetQ1_MtrEg1_State

Hierarchies are only possible is the information in column L is structured hierarchically.

2 – OPC Integration

Create an OPC Driver

  1. Select one of the following options, based on where you intend to add the OPC driver:
  • Project > Management Station > Servers > Main Server > Drivers
  • Project > Management Station > FEPs > [FEP station] > Drivers
  • The Object Configurator is displayed.
  1. Click New object and select OPC Client Driver.
  1. In the New object dialog box, enter the description.
  1. Click OK.
  • The OPC driver object is displayed in System Browser.

Start an OPC Driver

  1. Select the created driver.
  1. Click the Extended Operation tab.
  1. Click, next to the property Manager status, the option Start.
  • The status changes to Start successful.

Create OPC Network

  1. Select Project > Field Networks
  1. Click New object and select OPC network.
  1. In the New object dialog box, enter the name and description.
    NOTE: The description must be unique.
  1. Click OK.
  • The new field network is available in the System Browser.
  1. Click the OPC tab and open the Network Settings expander.
  1. Select the OPC driver in the Selected Driver drop-down list.
  1. Click Save .

Create the Logical View

  • The Logical View has not yet been created.
  • System Manager is in Engineering mode.
  1. In System Browser, select Management View.
  1. Select Project > System Settings > Views.
  1. Select the Views tab.
  1. Enter the data in the following fields:
    a. Display name: Logical view
    b. Display description: Logical view
    c. Base object name: Logical
    d. Base object description: Logical
    e. Type: Select logical
    f. Select distribution: Select check box
    g. Supplemental information: (Optional) Enter descriptive text
  1. Click Save .

Import the Project Data Files

  • One or more valid database files are available locally or by browsing for the reachable network file.
  1. Select Project > Management station > Servers > Main Server > Drivers.
  1. In the Extended Operation tab, select the Transaction Mode property.
    a. In the drop-down list, select Simple.
    b. Click Apply.
    NOTE: The Simple option reduces import time, since not all import transactions are written to the project log database. Following engineering, the project must be reset to Logging.
  1. Select Project > Subsystem Networks > [Network name] and click the Import tab.
  • The Import page displays.
  1. Open the Hierarchies Mapping expander.
  1. In System Browser, select logical view.
  1. Drag the top node Logical to the Hierarchies expander, to the Logical line in the column Import hierarchy under this node.
  1. Click Open at the top of the page to go to the database files.
  1. In the File type drop-down list, select the data type *.csv.
  1. Select the desired import files. [*].csv.
  1. Click Open.
  • The preprocessor analyzes the selected file. Click Log Analysis for additional information in the event of a problem.
  1. In the Source column, select .
    NOTE: If Delete unselected items from the views is selected, all automation stations and the linked objects are deleted that are not in the selected import file. The main nodes must be manually deleted in the Logical View and User View.
  1. Click Import.
  • The import procedure starts with the first file in the Items to Import list. The State can be: Completed, Failed, In progress (%), Partially completed [numbers of failed instances].
  • A message is displayed at the end of the import process that summarizes the results in a detailed log. Click Import log.
    NOTE: The import is not executed if the number of data points exceeds system limits. Check the Number of data points entered in project size.
  1. Select Project > Management station > Servers > Main Server > Drivers.
  1. In the Extended Operation tab, select the Transaction Mode property.
    a. In the drop-down list, select Logging.
    b. Click Apply.

NOTE:
You must reimport if you change the driver configuration after an import.

3 – BACnet Integration

Read the information in Desigo PX and Desigo TRA for BACnet integration.

4 – Create Virtual Data Points

Virtual data points must be created, for example, when an average is calculated from two OPC data points. The virtual can be added, for example, for display to the graphic.

  1. In System Browser, select Application View.
  1. Select Applications > Logics > Virtual Objects.
  1. Select the Object Configurator tab.
  1. Click New Object and select the corresponding data type.
  1. In the New Object dialog box, enter the name and description.
  1. Click OK.
  1. Click Save .
5 – Create Scripts

For general information on how to create a script, see Step-by-step > Configuring a Project > Configuration Workflows & Procedures > Configuring Scripts.

Copy an Example from the Library

  1. Select Project > System Settings > Libraries > L1-Headquarters > BA > Software > Desigo Gateway Functionality Scripts > Scripts.
  1. Select the Script Editor tab.
  • The example scripts SXOpenMainScript, SXOpenFunction, SXOpenParser are displayed.
  1. Select the SXOpenMainScript.
  1. Open the Viewer expander.
  1. Select the Script Editor tab.
  1. Press CTRL+A to highlight all the content and CTRL+C to copy it.

Create and Save a Script

  • A new folder is created to save the SX Open Script.
  1. In System Browser, select Application View.
  1. Select Applications > Logics > Scripts.
  1. Select the Script Editor tab.
  1. Open the Editor expander.
  1. Delete the default entries.
  1. Press CTRL+V to paste content.
  1. Click Save As .
  1. In the Save object as dialog box, enter the name and description.
  1. Click OK.

When Does the Script Path Need to be Changed

The script path must be changed if the Scripts SXOpenFunction and SXOpenParser are modified for a project. The variable ConsoleOutput=true displays the results in the Console expander.

Script Path

Apply SXAdd Function with COV

The examples in the library were created for the communications from OPC to BACnet. The value (3) in Present_Value must be changed for communications from BACnet to OPC.

SXAdd Function with COV
  • The script is opened in System Manager in the Editor expander.
  1. In System Browser, select Logical View.
  1. In the Editor expander, select the predefined function SXAvg and copy the template to the script.

Data Points Configuration

  1. Enter a unique subscription number (1) as a description.
  1. Drag the OPC data point from System Manager to the first subscription (2).
  1. (Optional) Another property can be defined instead of the default property Value (3).
  1. Enter the function using the corresponding description number (4). This number must be unique throughout the script. The Script editor does not check the numbers for uniqueness.
  1. Do not change the entry false (5).
  1. Drag the BACnet data point from System Manager to the first subscription (6).
    NOTE: A virtual data point can be assigned instead of a BACnet data point.
  1. Enter the calculation function (7) SXAdd.
  1. Enter an offset (8) to the data point value.

Edit Additional Data Points

  1. Create another SXAdd subscription or select a new script function.
  1. Repeat the steps as described in Data Points Configuration.
  1. Deleted unneeded functions from the script.

Apply SXAvg Function with COV

The description is based on three OPC data points.

SXAvg Function with COV
  • The preconditions are described in SXAdd.
  1. In the Editor expander, select the predefined function SXAvg and copy the template to the script.
  1. Enter a unique subscription number (1) as a description.
  1. Enter a unique function number (2).
  1. Drag the OPC data point from System Manager to the first subscription (3).
  1. (Optional) Another property can be defined instead of the default property Value (4).
  1. Enter the function using the corresponding description number (5). This number must be unique throughout the script. The Script editor does not check the numbers for uniqueness.
  1. Do not change the entry false (6).
  1. In variable 1, enter the parameter (7) for the subscription data point (3).
  1. Drag the OPC data point from System Manager to the second variable (8).
  1. Drag the OPC data point from System Manager to the third variable (9).
  1. Drag the BACnet data point from System Manager to the first subscription (10).
    NOTE: A virtual data point can be assigned instead of a BACnet data point.
  1. Enter the calculation function (11) SXAvg.
  1. Enter the number (12) of data point values for calculation.
  1. The number of assigned data point variables (13) must match the numbers of variables (12). The remaining variable must be set to 0.

NOTE:
The average is only calculated if the value of the first subscription changes. Use the polling function to perform continuous averaging.

Apply the SXBetween Function with Polling

The examples in the library were created for communications from OPC to BACnet. The value (4) in Present_Value must be changed for communications from BACnet to OPC.

OPC Polling SXBetween
  • The preconditions are described in SXAdd.
  1. In the Editor expander, select the predefined function SXBetween and copy the template to the script.
  1. Enter a unique function name (1) as a description. The function name must be unique throughout the script.
  1. Enter the polling rate (2) in milliseconds. All data points assigned to this function are polled at the same polling rate.
  1. Drag the OPC data point from System Manager to the first read line (3).
  1. (Optional) Another property can be defined instead of the default property Value (4).
  1. Drag the BACnet data point from System Manager to the first read line (5).
  1. Enter the calculation function (6) SXBetween.
  1. Enter the minimum and maximum limit value (7) of the data point value for calculation.
  1. Create additional data points (lines 2 to 4) in this function or create a new function with a different polling rate.

Start and Test the Script

  1. Click Start .
  1. Open the Console expander.
  1. Check the outputted values.
6 – Create System Functions

The OPC import data does not automatically generate system functions (schedulers, or trends). They must be manually created after a data import, based on the most current project SX Open configuration file, if:

  • Entries are available in the Schedules tab;
  • Entries are available in the Trend tab;
  • Entries are available in the Configuration tab (the BACnet alarm info column). They must be checked.

Create Management Station Event for OPC Devices

  • You imported a CSV file.
  1. Select Project > Subsystem networks > [OPC network].
  1. Select the data point to configure the management station event.
  • The alarm details are displayed in the Alarm configuration expander in the Configurator tab.

Additional information on creating events is available in Step-by-step > Configuring a Project > Configuration Workflows & Procedures > Configuring Objects:

  • Creating a Discrete Alarm
  • Creating a Continuous Alarm
  • Creating a BitString Alarm

Create a Scheduler Program

Scenario: You want to create a weekly schedule for an OPC object. The times used in the example must be synchronized against the actual project times.

  • You imported a CSV file.
  • The number of schedules to be created is based on existing schedule available in the Excel worksheet in the Schedules tab.
  1. In System Browser, select Application View.
  1. Select Applications > Schedules.
  • The Schedules tab displays.

Create a New Schedule

  1. Click New .
  1. Click New Management Station Schedule.
  1. In the Schedules section, click the Linked Objects tab.
  1. In System Browser, select the Manual navigation check box.
  1. Select Logical View.
  1. Select Logical View > [Network Name] > [Plant Name] > [Data Point].
  1. Drag the data point to the Linked Objects section.
  1. Click the Schedule entries tab and in the Expander under Output values, set the operating mode values for Inactive and Active as follows:
    Active=On and Inactive=Off.
  • You can now configure the weekly schedule by setting the daily times for each day of the week for Inactive and Active. Each weekday is initially set in full to inactive (Off).

Create Schedule Entries

  1. In the weekly view to the right, click the column Monday in the Schedule entries tag. The entire is initially set to Inactive.
  1. Right-click in the Monday column and select Add Weekly Entry. Drag the edge of the entry to set the start time to 8 am and the end time to 5 pm.
  1. In the Schedule entries tab, select, next to the start time (8:00:00), the change to Active and, next to the end time (17:00:00), the change to Inactive. The timespan from 8 am to 5 pm is now set to Active.
  1. Repeat steps 2-3 for the remaining days of the week: Tuesday, Wednesday, Thursday, and Friday.
  • The schedule is now repeated each week. The timespans that you set, for example, for Thursday, is in other words, repeated each Thursday.

Save Schedule

  1. Click Save .
  • The Save Object As dialog box displays.
  1. In the Name field, enter the text Plant on weekdays from 8-17.
  1. Click OK.
  • The new schedule object is available in the System Browser under Management Station Schedules. The operating mode Occupancy Status is automatically set for each day of the week based on settings for Active/Inactive.

Create Online Trend

Scenario: You want to create an online trend for an OPC object.

  • You imported a CSV file.
  • The number of online trend objects for creation is defined in the Excel worksheet in the Trend tab.
  1. In System Browser, select logical view.
  1. Select Logical View > [Network Name] > [Plant Name] > [Data Point].
  1. In the Related Items, the corresponding related objects are displayed under Trend.
  1. Click New Trend.
  • The information on the trend is displayed in the secondary pane.
  1. Drag the selected data point to the trend application.
  1. Change the Trend View properties.
  1. Change the series properties.
  1. Click Save As .
  • A Save Object As dialog box appears.
  1. Select the desired folder to save the Trend View.
  1. Type a name and description for the new Trend View.
  1. Click OK.
  • An online trendlog object is created for each data point in Application View > Trends > Online Log Objects.

Additional information on creating trends is available in Working with Trends.