Skip to main content

PLCSim Driver

Driver to communicate with Siemens PLCSim using S7Onlinx.dll. Compatible with PLCSim Tia Portal. Pending testing it against older PLCSim.

Parameters​

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

ParameterDefault ValueDescription
ip192.168.0.1IP address of the controller.
rack0Rack number of the CPU.
slot1Slot number of the CPU.
modeS7commPLCSim version to be used: 'S7comm' for S7-1200 or 'S7commPlus' for S7-1500.

Setup data​

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

{
"parameters": {
"ip": "192.168.0.1",
"rack": 0,
"slot": 1,
"mode": "S7commPlus"
},
"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

PLCsim driver 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, "mode": "S7comm" }

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