EthernetIP Generic Device
This driver can be used for emulating generic EthernetIP devices. For example to let Simumatik act as a remote IO device.
Parameters
Aside from the common parameters described in the communication_driver docs, this driver includes:
- ip: IP Address used by the device. Default = '127.0.0.1' (string)
- read_size: Size in bytes of the data sent from the PLC to the Device. Default = 1 (int)
- write_size: Size in bytes of the data sent from the Device to the PLC. Default = 1 (int)
Setup data
The setup data will give values to the parameters required and will specify the I/O variables info.
{
"parameters": {
"ip": "127.0.0.1",
"read_size": 3,
"write_size": 3,
},
"variables": {
"IW0": {
"datatype": "word",
"size": 1,
"operation": "write"
},
"QW0": {
"datatype": "word",
"size": 1,
"operation": "read"
},
"IB2": {
"datatype": "byte",
"size": 1,
"operation": "write"
},
"QB2": {
"datatype": "byte",
"size": 1,
"operation": "read"
}
}
}
Note
Addressing of variables is with regards to the EthernetIP Generic Device Slave, not the master. If emulating a remote IO it is the address within that device, not the IO address of the PLC Controller acting as a master. For example, if the PLC program expects the remote IO device to write data to IB623 due to its hardware configuration, the driver needs to write to IB0.
Emulating multiple generic devices
Since each device in an Ethernet IP network has its own IP address, to be able to emulate multiple generic devices the computer that runs the gateway needs to have multiple IP addresses configured in the network adapter. In Windows this is done by adding "aliases" to the network adapter's IPv4 advanced settings.
In the Network & Internet settings, select "Change adapter options".
Right-click on the network adapter that is connected to the EthernetIP master and select Properties.
Select "Internet Protocol Version 4 (TCP/IPv4)" and press Properties.
Select "Advanced...".
Select "Add...".
Type the desired IP address and Subnet mask for the emulated generic device.