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:
- ip: IP address of the PLC. Default = '192.168.0.1'
- rack: Rack number of the CPU. Default = 0
- slot: Slot number of the CPU. Default = 2
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 adress 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