5. CONFIGURATION
The viewing of the log files can be performed through worksheets or conventional text editors. The concatenated informa-
tion, for improved visualization, may use semicolons between the strings of the message to separate them. One must be careful
in formatting cells with floating point values.
Utilization example in ST language:
PROGRAM UserPrg
VAR
eLogError : USER_LOG_ERROR_CODES;
sMessage :USER_LOG_MESSAGE;
END_VAR
IF (m_rTemperature > MAX_TEMPERATURE_ACCEPT) THEN
sMessage := 'Temperature higher than expected: ';
sMessage := concat(sMessage, REAL_TO_STRING(m_rTemperature));
sMessage := concat(sMessage, 'º');
eLogError := UserLogAdd(USER_LOG_EVENT_WARN, sMessage);
//eLogError variable gets possible function errors.
END_IF
Log file content example: (UserLog-201308271506245738.csv)
Model; NX3030
Serial number; 445627
Firmware version; 1.4.0.4
27/08/2013 15:06:24.5738; WARN; Overtemperature: 25º
27/08/2013 16:37:45.3476; WARN; Overtemperature: 25º
28/08/2013 09:10:55.4201; WARN; Overtemperature: 26º
5.12.6.2. UserLogDeleteAll
The UserLogDeleteAll function performs the deletion of log files present in the directory created specifically for the CPU
in which is inserted the memory card, i.e. are only deleted the logs contained in the directory named with the CPU firmware
version that exists within the directory with the CPU serial version. The log files deleted are only files that exist at the time of
memory card mounting and the generated by the UserLogAdd function. Logs of other CPUs and files added manually by the
user during execution are not deleted. The figure below represents the function UserLogDeleteAll.
Figure 160: UserLogDeleteAll Function
Utilization example in ST language:
PROGRAM UserPrg
VAR
eLogError : USER_LOG_ERROR_CODES;
END_VAR
262