IApi.DebugMessage method
Sends the KINGSTAR log messages to KINGSTAR Analysis Console.
Namespace: IntervalZero.KINGSTAR.Base.ApiAssembly: IntervalZero.KINGSTAR.Base.Api (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0
Syntax
KsError DebugMessage(
int Category,
KsLogSeverity Severity,
string Message,
bool AppendValues,
long Value0 = 0,
long Value1 = 0,
double Value2 = 0,
double Value3 = 0
)
Function DebugMessage(
Category As Integer,
Severity As KsLogSeverity,
Message As String,
AppendValues As Boolean,
Optional Value0 As Long = 0,
Optional Value1 As Long = 0,
Optional Value2 As Double = 0,
Optional Value3 As Double = 0
) As KsError
Parameters
Category
Type: int
The ID of a log. It is user-defined. A string can be associated with each Category using the SetCategoryName method. The ID doesn't have to start from zero or in sequence.
Severity
Type: KsLogSeverity
The severity level of a log.
Message
Type: string
A message that describes the log data. The maximum length is 128 characters.
AppendValues
Type: bool
true: the values are added at the end of the Message. false: the values are not added at the end of the Message.
Value0
Type: long
The first value to be displayed in your log.
Value1
Type: long
The second value to be displayed in your log.
Value2
Type: double
The third value to be displayed in your log.
Value3
Type: double
The fourth value to be displayed in your log.
Return value
Type: KsError
A return code of a method.
Remarks
- Category and Severity can be used to filter the log you want to see. The filter is done in KINGSTAR Analysis Console.
- The Message string uses UTF-16 encoding.
- If AppendValues is enabled, the output is like this:
Message: value0, value1, value2, value3
.
Usable EtherCAT states
ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP
Examples
N/A
See also