PlcENIPPort Property
General info
Label |
Port |
Description |
The remote port for the EtherNet/IP connection. |
Data type |
UInt16 |
Default value |
44818 |
Type |
Regular |
Code |
6467 |
Symbolic name |
MODEL_PROP_PLCENIPPORT |
Lua access code |
syslib.model.properties.PlcENIPPort |
Available since |
1.52 |
- Parent properties
Attributes
| Name | Tooltip |
|---|---|
| PROP_CONFIGURABLE | The property is configurable and can be changed with DataStudio and the various inmation APIs. |
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_HAS_DEFAULT | The property has a default value as standard. |
Examples
Read from or write to the PlcENIPPort property.
-- Read from the PlcENIPPort
syslib.getvalue("<OBJECT FULL PATH>.PlcABLogix5000Device.PlcABLogix5000ENIPParam.PlcENIPPort")
-- Write to the PlcENIPPort
syslib.setvalue("<OBJECT FULL PATH>.PlcABLogix5000Device.PlcABLogix5000ENIPParam.PlcENIPPort", 44818)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the PlcENIPPort
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.PlcABLogix5000Device.PlcABLogix5000ENIPParam.PlcENIPPort"));
// Write to the PlcENIPPort
Result result = sli.WriteValue(sc, new WriteItem(44818, "<OBJECT FULL PATH>.PlcABLogix5000Device.PlcABLogix5000ENIPParam.PlcENIPPort"));