OpcUaTimestampCurrent Property

General info

Label

Current Time

Description

The current time (UTC) as known by the server

Data type

DateTime

Type

Regular

Code

759

Symbolic name

MODEL_PROP_OPCUATIMESTAMPCURRENT

Lua access code

inmation.model.properties.OpcUaTimestampCurrent

Available since

1.8.1.1450

Parent properties

OpcUaServerStatus

Attributes

Name Tooltip
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs
PROP_VOLATILE The property exists during runtime of the service only and is not saved to the image
PROP_DETECTABLE Property is detectable by system-driven server endpoint investigation

Examples

Read from or write to the OpcUaTimestampCurrent property.

  • Lua

  • C#

-- Read from the OpcUaTimestampCurrent
inmation.getvalue("<OBJECT FULL PATH>.UaConnection.OpcUaServerInformation.OpcUaServerStatus.OpcUaTimestampCurrent")

-- Write to the OpcUaTimestampCurrent
inmation.setvalue("<OBJECT FULL PATH>.UaConnection.OpcUaServerInformation.OpcUaServerStatus.OpcUaTimestampCurrent", inmation.currenttime())
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "so", Password = "inmation" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the OpcUaTimestampCurrent
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.UaConnection.OpcUaServerInformation.OpcUaServerStatus.OpcUaTimestampCurrent"));
// Write to the OpcUaTimestampCurrent
Result result = sli.WriteValue(sc, new WriteItem(DateTime.Now, "<OBJECT FULL PATH>.UaConnection.OpcUaServerInformation.OpcUaServerStatus.OpcUaTimestampCurrent"));