4. Configuration
218
bStart := FALSE;
// Actions executed during the counting
IF (TP_NR.Q = TRUE) THEN
// Executes while the counter is activated
ELSE
// Executes when the counter is deactivated
END_IF
User Log
Feature that allows the user to create own records and write to log files on the memory card present
in the CPU. The files are generated in a specific directory of the memory card in the CSV format,
allowing viewing in text editors and spreadsheets. The separator was the semicolon character. For
more information about the use of the memory card, see chapter Configuration Memory Card.
There are two functions available, one for log information and another to remove all records. The
following is a description of the types of data used by the functions:
The user is free to use the best indication
according to log message severity.
Log message with 150-character max.
The operation was performed successfully.
The operation was not performed successfully.
The reason for the failure can be checked in
the system logs – see chapter Maintenance -
System Log.
Messages are being added beyond the
processing capacity.
At the time, there were no resources to perform
the operation.
USER_LOG_FILE_SYSTEM_ERROR
There was an error while accessing the
memory card or there is no available space.
Error information can be verified in the logs of
system – see chapter Maintenance - System
Log.
There is a memory card present in the CPU.
USER_LOG_MEMORY_CARD_FULL
There is no free space available on the
memory card.
The resource is busy executing the last
operation, for example, deleting all log files.
Table 4-157. Data Type for User Log
The following are described the two functions available in the Lib Logs library on MasterTool IEC
XE 1.40. To perform the procedure of inserting a library, see the MasterTool IEC Programming
Manual – MP399609, chapter Libraries.
ATTENTION:
The User Logs are available only until version 1.3.0.20 of Nexto Series CPUs. In the same way to
use this feature is necessary version 1.40 or higher of MasterTool IEC XE.
UserLogAdd
This function is used to add a new user log message, adding in a new line to the log file on the
memory card. The message must have a maximum length of 150 characters, and the event type of the
message. Application variables can be registered using conversion to string and concatenation with
the main message. The date and time information in UTC (timestamp) is automatically added in the