Skip to main content

S7 Protocol Driver

This driver allows the communication between Simumatik and Siemens S7 protocol compatible PLCs.

Parameters

Aside from the common parameters described in the communication_driver docs, this driver includes:

ParameterDefault ValueDescription
ip192.168.0.1IP address of the PLC.
rack0Rack number of the CPU.
slot2Slot number of the CPU.

Setup data

The setup data will give values to the parameters required and will specify the I/O variables info.

{
"parameters": {
"ip": "192.168.1.23",
"rack": 0,
"slot": 2
},
"variables": {
"IB0": {
"datatype": "byte",
"size": 1,
"operation": "write"
},
"QB0": {
"datatype": "byte",
"size": 1,
"operation": "read"
},
"IW0": {
"datatype": "word",
"size": 1,
"operation": "write"
},
"QW0": {
"datatype": "word",
"size": 1,
"operation": "read"
}
}
}
note

S7 Protocol uses the variable address as variable name.

note

The setup_params in the generic PLC components for S7_protocol will need the following format:

{ "ip": "192.168.0.1", "rack": 0, "slot": 1 }

Rack and slot

Select according to PLC type:

  • S7-300: Rack 0, slot 2
  • S7-400: Rack 0, slot 2 or from HWConfig
  • S7-1200/S71500: Rack 0, slot 1