HistoryControllerMode Property

General info

Label

Processing Mode

Description

The processing mode of the history controller object.

Data type

UInt32

Default value

1 (syslib.model.codes.HistoryControllerMode.HCM_CONFIGURATION)

Type

CodingGroup

Code

4153

Symbolic name

MODEL_PROP_HISTORYCONTROLLERMODE

Lua access code

syslib.model.properties.HistoryControllerMode

Available since

1.40

Parent classes

HistoryController

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.

Codings

Coding group: HistoryControllerMode

Name Code Label Tooltip

HCM_CONFIGURATION

1

Configuration

In this mode no attempt is made to fetch data and no objects are created.

HCM_OPERATION

2

Operation

In this mode the object is operational.

Examples

Read from or write to the HistoryControllerMode property.

  • Lua

  • C#

-- Read from the HistoryControllerMode
syslib.getvalue("<OBJECT FULL PATH>.HistoryControllerMode")

-- Write to the HistoryControllerMode
syslib.setvalue("<OBJECT FULL PATH>.HistoryControllerMode",
    syslib.model.codes.HistoryControllerMode.HCM_CONFIGURATION)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the HistoryControllerMode
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.HistoryControllerMode"));
// Write to the HistoryControllerMode
Result result = sli.WriteValue(sc, new WriteItem(HistoryControllerMode.HCM_CONFIGURATION, "<OBJECT FULL PATH>.HistoryControllerMode"));

A switch-like function of the codings.

function get_coding_name(code)
    local _hcm = syslib.model.codes.HistoryControllerMode
    if _hcm.HCM_CONFIGURATION==code then return 'HCM_CONFIGURATION'
    elseif _hcm.HCM_OPERATION==code then return 'HCM_OPERATION'
    end
end
return get_coding_name(syslib.model.codes.HistoryControllerMode.HCM_CONFIGURATION)