Skip to main content

i4connected Knowledge Base

The MSCONS Adapter

Abstract

The MSCons adapter is a specialized Adapter that can load measurements from XML files located on disk storage or FTP/HTTP storage.

The MSCons adapter is a specialized Adapter that can load measurements from XML files located on disk storage or FTP/HTTP storage. Each file contains values for a single signal.

This article describes the required XML structure of the MSCONS Adapter configuration file. The MSCONS Adapters can be configured by accessing the Devices tile from the Administrative area of i4connected.

mscons_device.jpg

The MSCONS Device

Further on, in the Add Device panel, the MSCONS Adapter-specific settings can be accessed by clicking the MSCONS adapter name field. A new panel will be opened, allowing the user to either select an existing adapter or create a new one. The simple filtering mechanism allows the user to easily pinpoint the desired MSCons Adapter.

Note

Only users with the Manage adapters permission enabled can add and edit Adapters.

mscons_source_panel.jpg

Select the MSCONS Source panel

By clicking the Add button, the Add MSCons source panel will be opened. In this view, the following MSCONS source settings will be organized:

the_add_mscons_source_panel.jpg

The Add MSCons source panel

  • Name - The name of the MSCONS source settings, that will be displayed in the configured device, under the MSCONS adapter name field.

  • Description - the user-friendly description of the MSCons Adapter.

  • Address - The location of the directory where the MSCONS data is collected. The directory can be accessed using one of the following methods:

    • FTP: ftp://MyFTPServer/MyFolder/MyData/

    • HTTP: http://MyServer/MyFolder/MyData/

    • Local (complete): c:\MyFolder\MyData\

    • Local (relative): \\MyFolder\MyData\

  • Poll interval (ms) - The interval of time, defined in milliseconds, for scanning the folder for MSCONS data.

  • User name - If required, only when using FTP or Local address. The user name is required to access the directory.

  • Password - If required, only when using FTP or Local address. The password is required to access the directory.

  • Use file name pattern for sorting - Enables the usage of the file date/time pattern for sorting.

  • File date/time pattern - Represents the date/time format of the date or/and time from the name of the MSCONS file. If specified, the parser will try to recognize the pattern in the name of the MSCONS file. Examples: yyyyMMdd, yyMMddHHmmss, yy-MM-dd-HH-mm-ss.

  • Select owner - the name of the Adapter owner.

    select_owner.jpg

    Adapter owner selector

    By clicking on the owner selector, the Select Users panel is opened allowing the user to choose the Adapter's owner.

    select_users_panel.jpg

    Select Users panel

    Important

    When adding a new Adapter the creator user is by default set as Adapter's owner. However, the owner can be changed after the Adapter was saved, by all users having at least the Manage adapters permission enabled.

  • Time zone - The time zone used by the new MSCONS Adapter. By default, the Time Zone defined for the currently logged-in user is set.

  • Trace Level - The level of logging used by the new MSCONS Adapter. Trace levels determine which events the trace provider generates. The Trace level value can be Trace, Debug, Info, Warn, Error, Fatal, or Off.

  • Enabled - If the setting is turned on, the Adapter is enabled and functional.

Tip

For more details about the MSCons Signal settings please also visit the dedicated article here.

Configuring the MSCONS files

The MSCONS Adapter configuration file allows the user to set up the MSCONS Adapter in order to retrieve and parse the data from MSCONS files. The configuration must follow a simple but logical structure, detailed below.

XML configuration example structure OLD

<msconsFolder address="ftp://someserver/Data" password="pswd" userName="user" pollInterval="900000" fileTimePattern="_yyyyMMdd_">
  <msconsMeasurementParser device="Device01" locationId="DE1000601234500000000000000025901" />
  <msconsMeasurementParser device="Device02" locationId="DE1000601234500000000000000025902" />
</msconsFolder>

XML configuration example structure NEW

//<msconsFolder address="ftp://someserver/Data/" password="pswd" pollInterval="1800000" userName="user">
//  <msconsMeasurementParser delimiter="39" device="Device01" signalName="Signal 01" locationId="CH1078601234500000000000000000014" />
//</msconsFolder>
The <msconsFolder> element

The root element <msconsFolder> is used to define the directory where the data is located. The <msconsFolder> element is unique per configuration XML.

Example

<msconsFolder
	address="ftp://myserver/myfiles" 
	userName="root" 
	password="12345" 
	pollInterval="600000"
	fileTimePattern="_yyyyMMdd_">
	
</msconsFolder>
The <msconsMeasurementParser> element

The <msconsMeasurementParser> element defines how the MSCONS data will be parsed. This element is highly configurable using its attributes and must be configured based on the structure of the MSCONS data.

Example

<msconsFolder
	address="ftp://myserver/myfiles" 
	userName="root" 
	password="12345" 
	pollInterval="600000"
	fileTimePattern="_yyyyMMdd_">
	
	<msconsMeasurementParser
		device="Device01"	
		locationId="DE1000601234500000000000000025901" />
	
</msconsFolder>