Show

Show 1:

Outputs a message via the ADS logging system. The message type (INFO, WARNING, ERROR) is determined by nLogType. The function block offers various versions with 0 to 5 additional parameters.

Show (without parameters)

Outputs a message without any additional parameters.

METHOD Show : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  bIgnoreBlock : BOOL := FALSE;
END_VAR

Name

Type

Description

nLogType

DWORD

Log type (ADSLOG_MSGTYPE_ERROR, ADSLOG_MSGTYPE_WARNING, etc.).

sLogCode

STRING

Optional log code for uniquely identifying the message.

sLogText

T_MaxString

Message text to be output.

bIgnoreBlock

BOOL

TRUE to ignore the suppression logic and always output the message.

Show1 (with 1 parameter)

Outputs a message with an additional parameter, tArg1.

METHOD Show1 : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  tArg1       : T_Arg;
  bIgnoreBlock : BOOL := FALSE;
END_VAR

Name

Type

Description

nLogType

DWORD

Log type (ADSLOG_MSGTYPE_ERROR, ADSLOG_MSGTYPE_WARNING, etc.).

sLogCode

STRING

Optional log code for uniquely identifying the message.

sLogText

T_MaxString

Message text with placeholders for parameters.

tArg1

T_Arg

The first parameter to be included in the message.

bIgnoreBlock

BOOL

TRUE to ignore the suppression logic and always output the message.

Show2 (with 2 parameters)

Outputs a message with two additional parameters.

METHOD Show2 : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  tArg1       : T_Arg;
  tArg2       : T_Arg;
  bIgnoreBlock : BOOL := FALSE;
END_VAR

Show3 (with 3 parameters)

Outputs a message with three additional parameters.

METHOD Show3 : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  tArg1       : T_Arg;
  tArg2       : T_Arg;
  tArg3       : T_Arg;
  bIgnoreBlock : BOOL := FALSE;
END_VAR

Show4 (with 4 parameters)

Outputs a message with four additional parameters.

METHOD Show4 : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  tArg1       : T_Arg;
  tArg2       : T_Arg;
  tArg3       : T_Arg;
  tArg4       : T_Arg;
  bIgnoreBlock : BOOL := FALSE;
END_VAR

Show5 (with 5 parameters)

Outputs a message with up to five additional parameters. This is the core implementation that is called by all other show methods.

METHOD Show5 : BOOL
VAR_INPUT
  nLogType    : DWORD := ADSLOG_MSGTYPE_ERROR;
  sLogCode    : STRING := '';
  sLogText    : T_MaxString;
  tArg1       : T_Arg;
  tArg2       : T_Arg;
  tArg3       : T_Arg;
  tArg4       : T_Arg;
  tArg5       : T_Arg;
  bIgnoreBlock : BOOL := FALSE;
END_VAR
Show 2:
  • All show variants are suppressed if the same log code is called in quick succession.
  • You can reset the suppression logic using Reset().
  • If bIgnoreBlock = TRUE, the block is ignored and the message is always output.
  • The various options allow for flexible configuration as needed.
  • Show5 is the core implementation and is called by all other Show methods.