KsLogChannel

Configures the log channel settings.

Name Type Meaning
Source KsLogSource Records the data from a single axis, input, output and UserVariable.

SourceHandle

HANDLE

This can be used for UserVariable. You can pass the UserVariable to KsLogChannel.SourceHandle.

For example:

logChannel.SourceHandle = Temperature.Id

NOTE:  This is only supported for KINGSTAR 4.4 and later versions.

Index INT

The index of an axis, input or output.

When Source is logUser, Index is the adding order of UserVariable. For example:

  • AddVariable(&Temperature);
  • AddVariable(&Voltage);
  • AddVariable(&Warning);

Index 0: Temperature

Index 1: Voltage

Index 2: Warning

NOTE:  For UserVariable, this is only supported for KINGSTAR 4.3 and earlier versions.

Variable KsLogVariable Selects the variable you want to record if the log source is an axis. When Source is logUser, Variable is not used.
Offset INT

Sets the offset if the log source is:

  • An axis, and the log variable is logDigitalInputs or logDigitalOutputs. The unit of offset is bit.
  • An input or output of a module. The unit of the offset depends on the data types.

- logBool. The unit of offset is bit.

- Other data types except logBool. The unit of offset is byte.

DataType KsLogDataType Selects the data type if the log source is an input or output of a module and UserVariable.