PLC-API fLogData : Array containing the values that are to be written into the log file. eMode : Input that specifies the block's operating mode [ } 16] . VAR_OUTPUT VAR_OUTPUT eState : E_CTRL_STATE; bFileOpen : BOOL bFileClosed : BOOL fBufferUsage : FLOAT (* Buffer fill level in percent [0 ... 100] *) nLoggedColumns : DINT; bBusy : BOOL eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR eState : State of the function block. bFileOpen : A TRUE at this output indicates that the file has successfully been opened. bFileClosed : A TRUE at this output indicates that the file has successfully been closed. fBufferUsage : Current fill level of the external buffer as a percentage. nLoggedColumns :
Number of columns written in the file. bBusy : A TRUE at this output indicates that logging a row is active. eErrorId : Supplies the error number [ } 16] when the bError output is set. bError : Becomes TRUE, as soon as an error occurs. VAR_IN_OUT VAR_IN_OUT stParams : ST_CTRL_LOG_MAT_FILE_PARAMS; END_VAR stParams : Parameter structure of the logging function block. This consists of the following elements: TYPE ST_CTRL_LOG_MAT_FILE_PARAMS: STRUCT tLogCycleTime : TIME := T#0ms; (* controller cycle time [TIME] *) tTaskCycleTime : TIME := T#0ms; (* task cycle time [TIME] *) sFileName : STRING; nNumberOfRows : INT(1..10); sMatrixName : STRING; arRowDescription :
ARRAY [1..10] OF STRING(25); bWriteTimeStamps : BOOL := TRUE; bWriteRowDescription : BOOL := TRUE; pLogBuffer_ADR : POINTER TO ST_CTRL_MULTIPLE_PWM_OUT_DATA; nLogBuffer_SIZEOF : UDINT; END_STRUCT END_TYPE tLogCycleTime : Cycle time with which entries are written into the log file. This must be greater than or equal to the TaskCycleTime. tTaskCycleTime : Cycle time with which the function block is called. If the function block is called in every cycle this corresponds to the task cycle time of the calling task. sFileName : Name and path of the log file, e.g.: d:\Logfile.mat. nNumberOfRows : Number of columns written into the file (maximum 10). sMatrixName : Name of the data array.
arRowDescription : Array of strings that contain the line headings. TS4100 117 Version: 1.1