We've updated our file storage system, so some links may no longer work. If you need a file, just email us at support@secomea.com—we’re happy to help!

Siemens S7-1500 OPC UA collector example

Prev Next

The purpose of this article is to show the DCM config file specific for the Siemens OPC UA server, as Siemens require the SamplePoints naming string to contain "" around the name (which requires escaped characters).

Please note the specific NodeIdString value.

"NodeIdString": "\"DB_MRUSim\".\"Out\"",

The UAexpert tool showed the desired string as "DB_MRUSim"."Out" which in the DCM config file must then be "\"DB_MRUSim\".\"Out\"" where the internal " are escaped.

{
  "ConfigDescription": "Test configuration for collecting from Siemens PLC",
  "ConfigName": "Test",
  "CheckpointInterval": 600,
  "Collectors": [
    {
      "CollectorDescription": "Testing with Siemens PLC w/OPC-UA Server",
      "CollectorName": "Test2OPCUA",
      "ConnectRetryMax": 240,
      "ConnectRetryMin": 10,
      "OPCUAAccess": {
        "OPCUASecurityPolicy": "none",
        "OPCUATimeStampPolicy": "dcm",
        "OPCUAUserTokenType": "anonynmous"
      },
      "Protocol": "OPC-UA/TCP",
      "SamplePoints": [
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_MRUSim\".\"Out\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "double",
          "SampleDescription": "AHC curve",
          "SampleName": "AHC",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"Door_Switch_1\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "bool",
          "SampleDescription": "input",
          "SampleName": "Door_Switch_1",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_Common\".\"LiveBit\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "bool",
          "SampleDescription": "Live bit",
          "SampleName": "LiveBit",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_Common\".\"iMode\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "int16",
          "SampleDescription": "iMode",
          "SampleName": "iMode",
          "SamplesSaved": 10
        }
      ]
    }
  ],
  "DataServers": [
    {
      "ConnectRetryMax": 60,
      "ConnectRetryMin": 2,
      "DatasrvName": "DCC",
      "DatasrvProtocol": "SCI/SPD",
      "IOPin": true,
      "SCISPDParams": {
        "DevCertName": "DCC Certificate",
        "DevPkeyName": "DCC Private Key",
        "PushInterval": 1,
        "RootCAName": "DCC CA Certificate",
        "SCIServerAddr": "dcm-dcc.secomea.com",
        "SPDPort": 443,
        "Security": "TLS1.2"
      }
    }
  ]
}


And the collector part alone:

{
      "CollectorDescription": "Testing with Siemens PLC w/OPC-UA Server",
      "CollectorName": "Test2OPCUA",
      "ConnectRetryMax": 240,
      "ConnectRetryMin": 10,
      "OPCUAAccess": {
        "OPCUASecurityPolicy": "none",
        "OPCUATimeStampPolicy": "dcm",
        "OPCUAUserTokenType": "anonynmous"
      },
      "Protocol": "OPC-UA/TCP",
      "SamplePoints": [
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_MRUSim\".\"Out\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "double",
          "SampleDescription": "AHC curve",
          "SampleName": "AHC",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"Door_Switch_1\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "bool",
          "SampleDescription": "input",
          "SampleName": "Door_Switch_1",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_Common\".\"LiveBit\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "bool",
          "SampleDescription": "Live bit",
          "SampleName": "LiveBit",
          "SamplesSaved": 10
        },
        {
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 3,
            "NodeIdString": "\"DB_Common\".\"iMode\"",
            "NodeIdType": "string",
            "OPCUASampleInterval": 1
          },
          "SampleDataType": "int16",
          "SampleDescription": "iMode",
          "SampleName": "iMode",
          "SamplesSaved": 10
        }
      ]
    }