DebugFmt (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


The DebugFmt is an "easier to use" version of DebugMsg. It is a combination of DebugMsg and strFormat, which will enable you to print debug messages in an easy and convenient way.

 

Please see DebugMsg for an explanation of the workings of the DebugFmt function.

 

Input:

message : STRING

Format/message string. Please refer to strFormat for an explanation of the format string.        

 

v1 : INT

Value for {1} in the format string.

 

v2 : INT

Value for {2} in the format string.

 

v3 : INT

Value for {3} in the format string.

 

v4 : DINT

Value for {4} in the format string.

 

Returns:

None

 

Declaration:

FUNCTION DebugFmt;
VAR_INPUT
  message : STRING;
  v1,v2,v3 : INT;
  v4       : DINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
VAR
  a : INT;
END_VAR;
 
BEGIN
  ...
  a:=4711;
  DebugFmt(message:="Variable a is \1", v1:=a);
  ...
END;
 
END_PROGRAM;