SLMP API Reference

SLMP (also known as Mitsubishi, CC-Link, and MELSEC) is an open, Ethernet-based communication protocol developed by Mitsubishi Electric for exchanging data with programmable logic controllers (PLCs) and other industrial devices on a CC-Link or CC-Link IE network.

 

Request examples

Maximal

{
   "action":"createInput",
   "params":{
      "inputName":"slmpInput1",
      "serviceName":"slmp",
      "tableName":"slmpTable1",
      "dataCollectionIntervalMilliseconds":1000,
      "dataCollectionBufferCount":5,
      "dataPersistenceStrategy":"onSchedule",
      "settings":{
         "slmpProtocol":"tcp",       
         "slmpIpAddress":"192.112.100.22",
         "slmpPort": 2000, 
         "slmpNetworkNumber":0,
         "slmpDataCode":"binary",
         "slmpStationNumber":255,
         "slmpModuleNumber":1023,
         "slmpMonitoringTimerMilliseconds":1000,
         "propertyMapList":[
            {
               "slmpHeadDeviceNumber":200, 
               "slmpDeviceCode": "D", 
               "slmpNumberOfPoints": 1,
               "slmpDataType": "short"
            },
            {
               "slmpHeadDeviceNumber":210, 
               "slmpDeviceCode": "SD", 
               "slmpNumberOfPoints": 1,
               "slmpDataType": "short"
            }
         ]
      }
   },
   "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Minimal

{
   "action":"createInput",
   "params":{
      "inputName":"slmpInput1",
      "serviceName":"slmp",
      "tableName":"slmpTable1",
      "settings":{
         "slmpProtocol":"tcp",       
         "slmpIpAddress":"192.112.100.22",
         "slmpPort": 2000, 
         "propertyMapList":[
            {
               "slmpHeadDeviceNumber":200, 
               "slmpDeviceCode": "D"
            },
            {
               "slmpHeadDeviceNumber":210, 
               "slmpDeviceCode": "SD"
            }
         ]
      }
   },
   "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

 

 

Properties

Request properties ("params")

Property Description Default Type Limits (inclusive)

serviceName

The "serviceName" property specifies which type of input to create. Required - No default value string "slmp"

settings

The "settings" property specifies properties needed to configure the data source of the input. Optional with default of [] array of objects zero or more objects

settings

.slmpProtocol

The "slmpProtocol" property specifies the protocol used to connect to the SLMP (CC-Link) manager station. Required - No default value string "tcp"
"udp"

settings

.slmpIpAddress

The "slmpIpAddress" property specifies the IP/hostname of the SLMP (CC-Link) manager station. Required - No default value string A valid IP address 

settings

.slmpPort

The "slmpPort" property specifies the IP Port for the  SLMP (CC-Link) manager station. Required - No default value int16 0 to 65535

settings

.slmpNetworkNumber

The "slmpNetworkNumber" property specifies the request destination network number (0 = Local). Optional with default of 0 int16 0 to 65535

settings 

.slmpDataCode

The "slmpDataCode" property specifies the way data is communicated: in ASCII code or binary code. Optional with default of "binary" string

"binary"

"ascii"

settings 

.slmpStationNumber

The "slmpStationNumber" property specifies the device's station number. Common values include 0 to 120 for field network adapters, 125 for Control Stations, 126 for Master Stations, and 255 for direct connection to a local station. Optional with default of 255 int16 0 to 65535

settings 

.slmpModuleNumber

The "slmpModuleNumber" property specifies the module number of the access destination . When the send destination of the request message is a multi-drop connecting station that is connected to the request destination station, set the I/O number (upper 3-digits) of the serial communication module which is performing the multi-drop connection. For the main CPU, the value is 1023. Optional with default of 1023 int16 0 to 65535

settings

.slmpMonitoringTimerMilliseconds

The "slmpMonitoringTimerMilliseconds" property specifies the timeout in milliseconds while reading data from the PLC.
Set zero to wait forever.
Optional with default of 2000 int32 Any non-negative value

settings

.propertyMapList

The "propertyMapList" property specifies properties that represent the data being requested. Optional with default of [] array of objects One or more objects

settings

propertyMapList

.slmpDeviceCode

The "slmpDeviceCode" property specifies the memory of the device. For example, to read D200, specify deviceCode = "D". See "slmpDevice" Codes. Required - No default value case-sensitive string

Example Codes: "D"

"M"

"SD"

"SM"

"W"

"R"

"X"

"Y"

"W"

"ZR"

settings

propertyMapList

.slmpHeadDeviceNumber

The "slmpHeadDeviceNumber" property specifies the offset/index within the memory area specified by "slmpDeviceCode". For example, to read D200, specify "slmpHeadDeviceNumber": 200. Required - No default value int32 0 to 2147483647

settings

propertyMapList

.slmpNumberOfPoints

The "slmpNumberOfPoints" property specifies the number of consecutive words to read in 2-byte Little-Endian format. Optional with default of 1 int16 1 to 4

settings

propertyMapList

.slmpDataType

The "slmpDataType" property specifies the data type of the data retrieved by the connector. Optional with default of "short" string "bool"
"byte"
"ubyte"
"short"
"ushort"
"long"
"ulong"
"longlong"
"ulonglong"
"float"
"double"
"string"

settings

propertyMapList

.slmpDataLength

If "slmpDataType" is "string", the "slmpDataLength" property specifies the number of characters.

If "slmpDataType" is not "string", this property is ignored.

Required if "dataType" is "string" integer 1 to 32

settings

propertyMapList

.propertyPath

The "propertyPath" property is a DEPRECATED property that specified the JSON path in the JSON document where the connector put the data it collected. It is mutually exclusive with the "tagName" and "tagId" properties. Required - No default value string JSON path