Integrating Modbus Devices Using Custom Object Models
Scenario: You want to integrate modbus devices into the Management Platform using custom object models.
Reference: For background information, see the reference section.
Workflow diagram:
Prerequisites:
- You have the software distribution containing the Modbus TCP extension.
- You have installed the Modbus TCP and have added it to a management station project using the System Management Console (SMC).
- System Manager is in Engineering mode.
- System Browser is in Management View.
Steps:
1 – Create a Custom Object Model
To create a custom object model, do the following:
- Create a custom library by navigating to Project > System Settings > Libraries according to your customization levels.
- Import the object model by using a CSV file that contains the details of the object model to be imported.
- Set the managed type of the object model to ModbusPredefinedDevice.
- Configure import rules for the custom object model.
- The custom object model is created.
2 – Create and Configure a CSV File
- You have knowledge about the format and content of the CSV file.
- Navigate to [Installation Drive]:\[Installation Folder]\GMSMainProject\profiles\ModbusDataTemplate.
- The Modbus_template_4.0_SystemDefPointInstances.csv file is provided by default.
- Create a copy of this file at any location on your hard drive and thereafter modify the information present in the [CONNECTIONS] and [DEVICES], and [POINTS] sections as per the device configuration.
- Save the CSV file.
3 – Create and Start the Modbus TCP Driver
- Select Project > Management System > Servers > Main Server > Drivers.
- Object Configurator displays.
- Click New Object and select New MODBUS Driver.
- In the Create New Object dialog box, the Child type is pre-defined as GMS_Modbus_Driver, and the Name and Description are pre-defined as ModbusDriver _n and ModbusDriver n respectively, where 'n' represents the count of the number of drivers in the system.
- Click OK.
- The new modbus driver object displays in the System Browser below the Drivers node and is selected.
- Select the Modbus Driver, if not already selected.
- Select the Extended Operation tab and navigate to the Manager Status property.
- Click Start to start the driver. Enlarge the pane, if needed, to access the buttons that are located on the right side of the pane.
- The Manager Status property changes to Started indicating that the driver has started.
4 – Create the Modbus Network and associate it with the Modbus Driver
- Select Project > Field Networks.
- Object Configurator displays.
- Click New Object and select New Modbus Network.
- The Create New Object dialog box displays with Child type pre-defined to Modbus Network.
- Do the following:
a. Enter a name and description.
b. Click OK. The Modbus Network node appears in the System Browser.
- Select the Modbus Network and thereafter select the Modbus tab.
- Open the Network Settings expander.
- From the Monitored by driver drop-down list, select the modbus driver you want associated with the network.
- Click Save .
- The modbus driver is associated with the modbus network.
5 – Import Modbus Devices to the Management Station
- No background processes, such as project backup or BACnet discovery are in progress.
- [To add devices below a logical or user defined view] You have mapped the hierarchies of the logical or user defined view in the Hierarchies Mapping section.
- In System Browser, select Management View.
- Select Project > Field Networks > [Modbus Network].
- Select the Import tab.
- Click Browse.
- The File Open dialog box displays.
- Select the CSV file and click OK.
- The CSV file is pre-processed and validated. If the file is valid and has all the required parameters, the entries in the file are listed in the Source Items list. In case of any discrepancies, an error message displays in the Preimport File Log dialog box. You can access this dialog box by clicking the Analysis Log button.
- Select the items to import from the list of items displayed in the Source Items list. If the list of items is long, you can filter the items by using the Search field. Once you have your list of filtered items, you can remove the applied filter by deleting the text.
NOTE: If after selecting a file to import, you decide to change your selection, a message box displays and informs you that selecting another file will clear all items that are displayed in the Source Items list and confirms if you want to proceed. Click Yes if you want to continue. The Source Items list is cleared.
- Click No to abort the change of selection. The Source Items list is not cleared.
- Click to import.
- The selected items are transferred to the Items to Import list.
NOTE: To return the items from the Items to Import list to the Source Items list, click .
- (Optional) Select the Delete unselected items from the views option only if, during the import, you want to remove from the views any items that are not present in the file to import. For example, you can use this option when there is some pre-existing data in the system for that view, but you do not want to retain it.
- Click Import.
- A confirmation message displays asking if you want to import the selected items.
- Click Yes.
- The import procedure begins and a progress bar displays.
- When the import completes successfully, the Import dialog box displays a summary of the import information.
- Click OK.
- (Optional) Click the Import Log button to view a log of the import process.
- The Modbus devices are integrated with the management platform.
6 – Configure Workstation Alarms for Key Properties
- In System Browser, select Management View.
- Navigate to Project > Field Networks > [Modbus Network] > [Modbus Interface] > [Modbus Device].
- Select the point for which you want to configure the workstation alarms.
- The properties of the selected point display in the Properties expander.
- Select the property for which you want to configure the alarm configurations.
- The alarm details display in the Alarm Configuration expander in the Object Configurator tab.
- Configure the alarm properties for the selected property.