printf
Function - Display a trace output.
Inputs
Input |
Data type |
Description |
FMT |
STRING |
Trace message. |
ARG1..ARG4 |
DINT |
Numerical arguments to be included in the trace. |
Outputs
Output |
Data type |
Description |
Q |
BOOL |
Return check. |
Remarks
This function works as the famous "printf" function of the "C" language, with up to 4 integer arguments. You can use the following pragmas in the FMT trace message to represent the arguments according to their left to the right order:
%ld signed value in decimal
%lu unsigned value in decimal
%lx value in hexadecimal
The trace message is displayed in the LOG window with Runtime Service messages. Trace is supported by the simulator.
|
Your target platform may not support trace functions. Please refer to OEM instructions for further details on available features. |
|
(* i1, i2, i3, i4 are declared as DINT *)
Output message: i1=1; i2=2; i3=3; i4=4; |
printf |
IEC 61131-3 Automation platform > Programming - Reference guide > Advanced operations > printf |
Created with the Personal Edition of HelpNDoc: Effortlessly Create Encrypted, Password-Protected PDFs