You are on page 1of 21

LogAnalyzer

Summary
Introduction ....................................................................................................................................................... 2

Settings page ..................................................................................................................................................... 2

Statistics page .................................................................................................................................................... 6

Report page ....................................................................................................................................................... 9

EtherCAT Net Display................................................................................................................................... 11

Hardware page ................................................................................................................................................ 15

Hardware display from xml file page (HWLoaded) ......................................................................................... 18

Axes configuration parameters page (DataTable) ........................................................................................... 18

Automatic Elaboration and On Machine Elaboration ..................................................................................... 19

Interpretation of automatic elaboration results ............................................................................................. 20

Interpretation of log analysis results ............................................................................................................... 20

Options through configuration file .................................................................................................................. 20

LogAnalyzer launch options............................................................................................................................. 20

Machine validation .......................................................................................................................................... 21

1
Introduction
LogAnalyzer is a tool for WRT log files information processing.

It is used to elaborate information from WRT log files; it can analyze events directly on the PC where WRT is
installed or on a remote PC. It shows synthetically main events that have been recorded in Stdout.log file
during machine activity and displays the hardware equipment detected by WRT.

Settings page
Settings page (Figure 1) allows to:

1. Use controls for log files elaboration directly on the machine (in this case, log files folders are in
default paths): the user can select analysis time range of interest among current day, last week,
last month or the whole life of the machine (default is last month of the machine activity)); press
“ANALYZE” button to elaborate log files; the following three files will be generated in
\logfile\Diagnostica:
o diagnosi_<initial date>_<final date>.txt: with information from StdOut.log files.
o HWInfo.xml: with information about net topology and machine hardware equipment
(available for WRT version >= 10.4.0)
o HWMerge.xml: with information about the differences between reference and detected
machine hardware equipment (if available, in \logfile\equipment)
Press “Save Info…” button to create a .zip archive file containing all necessary information (logfile
and zarchive folders) to perform log file analysis with current settings and the results of the
elaboration, if already performed.
2. Limit log files analysis starting from one of the available validation points or from the latest
detected validation point (see chapter Machine validation) to ignore working sessions which ended
before the selected validation point.
3. Activate predefined WRT errors search (selectable in Event Categories); these errors will be
searched in addition to the always searched events: EtherCAT events, ENET errors, CANOpen
errors, Halt events and other blocking WRT errors. If at least one of these categories is checked for
the analysis, WRT Error statistics feature will be available (see TODO:).
4. Search occurrences of a custom string in log files; the string can be specified in the appropriate text
box. Custom string occurrences will be evaluated as case sensitive and as simple substrings;
otherwise, it is possible to use regular expressions (C# style) checking “Regular Expression”. In
Report page you can highlight the sessions with one or more occurrences of the specified pattern.
This first group of controls is designed to get a machine history analysis using the PC of the machine itself,
with minimal custom settings. “Advanced settings” option enables further settings, which permit to refine
log analysis. These settings are used for analysis of log files in a PC different from the one of the machine;
this remote analysis can be done if logfile and zarchive folder of the machine are available (or, better, the
archive .zip file obtained through “Save Info…” button).
Force old log format flag force the elaboration considering the log as if they are written in the traditional
way (not CSV format). You should use it when you’re analyzing log files written by WRT with version >=
12.1.0 PL 50 but not configured to use the CSV log format..
2
The “Help” button opens the user guide of LogAnalyzer (a PDF reader is needed on the PC where the
application is running).

Figure 1 Settings page: On machine elaboration

If “Advanced settings” mode is active, the following further controls are visible (Figure 2); they allow to:
5. Select a date range of interest for log file analysis (“Initial Date” and “Final Date” in “Range
Selection”; these controls are enabled if “Range Selection…” is selected)
6. Select the path of the folder containing Stdout.log and StdoutOld.log log files (default path is
“C:\wnc\home\d_xnc\logfile”). The latest change of this path in advanced settings is saved in a
setting file and is reloaded when the application starts. The use of logfile folder can be ignored (i.e.
because Not Available) selecting “N.A.” checkbox.
7. Select the path of the folder where old log files are stored (default path is
“C:\wnc\home\zarchive”). The latest change of this path in advanced settings is saved in a setting
file and is reloaded when the application starts. The use of zarchive folder can be ignored (i.e.
because Not Available) selecting “N.A.” checkbox.
8. Select the path of the folder where the report file will be saved; this path is automatically
completed pressing “Complete” button as described below:
o if logfile path is available, the destination path becomes: <path logfile>\Diagnostica
o if zarchive is available, but logfile is not, the destination path becomes:
<path zarchive>\..\Diagnostica
o otherwise, the destination path has the default value:
“C:\wnc\home\d_xnc\logfile\diagnostica”
9. Select the path with RTDB machine data to get information about axes configuration; the path can
be chosen through dialog Window or directly copied on its textbox or through drag-and-drop of
“data” folder on Settings page (when Advanced Settings mode is enabled).
The default path is “C:\wnc\home\d_xnc\dati\data”.
3
10. Import an archive file created through “Save Info…” button of LogAnalyzer; the import is done
selecting the path of the .zip file and specify (when asked) the folder path where the imported log
files must be extracted. The fields corresponding to the path of “logfile”, “zarchive” and report file
will be automatically completed.
11. Specify the path of the file that will be used to decode “BBOX” messages written by PLC, as
described in Report page chapter
12. Specify the path for the root folder, starting point of folder browser for manual path selections
(root folder path will be saved in a setting file and is reloaded when the application starts.
“MyComputer” means file system root of the PC)
13. Specify the text editor program that will be used to display the log through “Show log” button (this
choice will be saved in a setting file and reloaded when the application starts).

NOTE: starting from version 10.1.76.0, it’s possible to specify the paths described at points 678, 9 and 11
directly writing them in the corresponding text boxes (avoiding the use of dialog windows for folder
browsing). It’s possible to use file drag and drop in order to specify the path of a log archive to import
(point 9): if you drag and drop the .zip file on Settings page, it’s the same as specifying its path on the
corresponding text box; then it will be asked for the extraction path, as already said before.

After settings configuration, press “ANALYZE” button as described at point 1 and wait for the end of
elaboration: a progress bar will inform about the phase of current elaboration.

14. Furthermore, it is possible to display a machine hardware equipment, described through an .xml
file previously created by LogAnalyzer: this can be done pressing “Show Hardware” button and
selecting the .xml file with hardware equipment information. The resulting device tree (described
through the .xml file) will be displayed in “HWLoaded” page.

4
Figure 2 Settings page: Advanced settings

At the end of the elaboration, the focus automatically goes to “Statistics” page, where you can find the
error statistics related to WRT launches included in the specified date range. In “Report” page there is a
detailed report where WRT launches are listed with all related errors and events; hardware equipment
information is displayed in “Hardware” page.

During the elaboration, control group “State of elaboration” (Figure 3) is visible; it contains:
5
• A label describing the phase of log elaboration: “Archive extraction” with the name of the file
currently extracted; “Log Elaboration” during the parsing of the log files; “Elaboration terminated”
at the end of the elaboration.
• A progress bar showing the progress of the phase specified by the label
• “Stop now” button to interrupt the elaboration and show the partial results till then elaborated

Figure 3 State of the elaboration: during log file extraction from the archive (left), during log file elaboration (right).

Statistics page
In “Statistics” page (Figure 4) there is a summary reporting:
• Information about versions of WRT in use (if available)
• Date range and number of sessions (WRT launches) detected
• Detected errors and events
• EtherCAT net description and “per slave” errors

6
Figure 4 Statistics page (detail)

If machine data are available, the file oem_stataff.dat.ini is parsed to get information since the beginning of
the life of the machine (see Figure 5).

Figure 5 Lifetime machine statistics

Since version 10.1.43.0, in Statistics page there’s a graphical indication of the machine state, based on the
content of the examined log files (see Figure 6); a series of semaphores displays the occurrences of critical
errors like: plant errors (i.e. if it is necessary to reorganize the ENET fieldbuses using more EtherCAT bridges
7
like BH660 or CH111), EtherCAT errors, ENET errors, CANOpen errors, System errors (i.e. too high latency
values; it’s present since version 12.0.8.0). Because of their criticality, plant errors, EtherCAT errors and
system errors categories have zero tolerance thresholds, while it is possible to configure the tolerance
thresholds of ENET and CANOpen errors through appropriate settings in .\LogAnalyzer\LAOptions.txt file
(respectively:
ENET_ERR_SEM_TH=<ENET errors tolerance threshold>
CANOPEN_ERR_SEM_TH=<CANOpen errors tolerance threshold >),
or at runtime, checking “Enable threshold selection” and editing the appropriate threshold settings fields in
the semaphores.
If the number of the errors exceeds the one set as the tolerance threshold value, the semaphore becomes
red; otherwise it is green. If no sessions have been detected in the specified date range, the semaphores
are yellow.

8
Figure 6 Statistics page with semaphore (detail)

Report page
In Report page (Figure 7) the complete list of detected sessions is displayed, with information about the
related main events; in the centre of the page, each date corresponds to the beginning of each working
session (WRT launch): those which are highlighted corresponds to the sessions containing the categories of
errors/events selected in “Highlight session with:”; you can highlight sessions containing Halt, Irreversible
Halt, CanOpen errors, ENET errors, EtherCAT errors, WRT errors, other Noticeable Events, predefined
categories of WRT events (whose search has been enabled) and the occurrences of the custom events (if
used). Double clicking on a date of the list, a summary of the corresponding session will be displayed in
9
“Selected Session” square: “Show Details” checkbox filters less relevant information of the report (i.e.
EtherCAT net information if no EtherCAT errors are present); check “Show Details” to show all details.
“Show log” button displays the original portion of log files corresponding to the selected session using the
desired text editor (default: notepad.exe). Since version 10.1.61.0, selecting “Decode Log” flag, “Show Log”
button will display the portion of the log where “BBOX_” messages have been decoded using the header
file specified in the advanced settings (default: .\LogAnalyzer\blackbox.h). The “Keep open” flag inhibits the
closure of the windows with previously displayed session log. “Close All” button close all log display
windows. Finally, the “Glossary” button, to display the window where terms and errors used in the report
are listed and explained.

Since version 12.0.7.0 there are some further available features to filter log analysis results:

• Automatic filter to discard log files generated by simulation instance and erroneously mixed to real
machine instance’s log files (WRT 11 with PL < 105). In “Simulation Instance Filter” section you can
see if the filter has been used or not. Press “Further Info” button to display information about
parsed log files, the relationship between log files and detected sessions, invalidated log files if
any.

• Filter to discard errors and event that occurred N seconds before the end of each session (N
configurable): it permits to discards artificial events caused by machine shutdown with UPS
working. The filter is enabled through “Enable Filter” flag, while N can be set in “Seconds before
session end” field. Use “Apply” button to apply the new value to the detected sessions.

• Filter to set the threshold of sensitivity to irregular timing warnings in “Timing Warning Filter”,
“Threshold (us)” field. Use “Apply” button to apply the new value to the detected sessions
(available since version 12.0.18.0).

It is possible to parse parts of log file without WRT launch header (start of session): these sessions lack
some information contained in the initial part of a session (i.e. EtherCAT net description) and the starting
date of these sessions will be displayed with question marks and will have the caption “PARTIAL”.

10
Figure 7 Report page

EtherCAT Net Display


Since version 10.1.57.0 it is possible to display the tree graph of the EtherCAT net corresponding to a
certain session (pressing “EtherCAT” button in “Selected Session”, Figure 8). Each node corresponds to an
EtherCAT slave; selecting a node, it will be shown a summary of the EtherCAT errors detected by the
corresponding slave, with explicit indication of the slaves connected to each port where errors have been
detected.

LEGEND:

• Black: the input connection with this slave has been lost (not stable EtherCAT connection)
• Red:
o couple of slaves with detection of communication EtherCAT errors (defective connection or
broken slaves). If one of the nodes is the one corresponding to the “PC”, the connection
with the first slave of the net has been lost (ECAT 1363).
o slaves with detection of PDI Errors.
• Orange: slaves which detected communication errors but after the ones already marked as red.
• Yellow: slaves which detected CPU Processing Unit Errors (probably due to communication errors
detected by other slaves).

11
Figure 8 EtherCAT net representation

Since version 12.0.30.0, if you’re parsing log files of WRT version 12 (or later), you can display the hardware
equipment tree detected by each session: select a session date and press “Session Hardware” button. If the
log files come from a previous version of WRT, only the hardware equipment detected during the latest
session is available.

Since version 12.0.30.0, for log files from machines with Wood 1 Biesse PLC, for each session, you can get
further information parsing PLC messages. Select a session date and press “PLC Parser”. You can get
information about:
• Program executions
• Spindle machining
• Tool changes
• Axis movements
• Emergency Events
• Low Curtain Guard Events
• Key Pressed Events
• Machine in Power ON
Enabling the categories on the window in Figure 9 and pressing “Apply”, the corresponding log portions will
be highlighted. You’ll be able to filter the results:
• For the programs: all the programs, only aborted programs, program by name; by center
• For the spindles: acceleration, deceleration, steady phase or all; tool change operations; by spindle
name/inverter index number
• For the axes: by axis name, only PLC driven axes, all
• For key press: by key name, all
• For curtain guard: by curtain guard index
You can scroll the log file to the line corresponding the previous or next desired event through the special
navigation controls. In the “Description” box, you can read all the available information about the currently

12
displayed event (i.e. get by LogMonitorInverter messages for the spindles, by LogMonitorAsse for the axes,
etc.).

Figure 9 Parsing of PLC messages

Since version 12.0.30.0, if you selected at least one of the categories of the WRT predefined event
categories, after the analysis you can display some statistics about the WRT error categories you selected
(see Figure 10). You’ll get the number of occurrences of the errors by error label and code for each axis
(where specified; otherwise the cumulative number of occurrences). Selecting a certain error, you’ll get the
number of its occurrences by session date for the selected axis or for all axis (Figure 11). With CSV log
format, the WRT error statistics are always available at the end of the elaboration of the log files, regardless
the predefined categories selection.

13
Figure 10 WRT Error statistics

Figure 11 WRT Error occurrences by date

14
The destination folder will contain a text file with the detailed report, followed by statistics information
(the same displayed, respectively, in “Report” and “Statistics” page). The name of that file will be:
“diagnosi_<Initial date>_<Final date>.txt”.

As by-product of the elaboration, in %TEMP%\LogAnalyzer\temp a text file is stored: it contains the whole
stream of the analyzed log files (its name starts with “wholeLog_”).

Hardware page
“Hardware” page (Figure 12) displays a tree graph that describes the differences between reference
hardware equipment (stored during the latest machine validation point, if present) and the hardware
equipment which has been detected during the latest WRT launch. Missing elements (compared with
reference hardware equipment) will be displayed in red, added elements will be displayed in blue (if no
reference hardware equipment is available, the whole tree graph is blue). The elements which corresponds
to the ones in the reference hardware equipment are displayed in black. Tree structure is composed by:

• the root: it represents the type of the net (in the figure, ETherCAT type; it has index 0, the only
existent)

• nodes children of the root: they represent EtherCAT slaves (BH660, BH670, CH111, CH112, etc.)

• for each EtherCAT slave, fieldbus sources are displayed as children nodes; hardware modules
connected to the fieldbuses are displayed as children of the fieldbus nodes themselves.

NOTE: The information needed to display the tree graph of hardware equipment can be found in
wnc\d_xnc\logfile folder just since WRT version 10.3.0; information about Mechatrolink axes available
since WRT version 10.4.1.

EXAMPLE: In the example of Figure 12 four EtherCAT slaves are displayed (BH660 address 1, CH112 address
3, CH111 address 5, BH670 address 2).
BH660 has an ENET fieldbus:
- (channel 1) one RM850 (address 0), two P260 (address 2 and 6), one CE201 (address 3); the P260
with address 5 is highlighted because is missing regarding the reference
- (channel 2) one SM137 (address 0) and one P250 (address 2) which results “added” regarding the
reference.
To BH660 CANOpen bus the following modules are connected: three CC201 (address 2, 3 and 4) and two “SI
UNIT” (address 11 and 12).
The CH112 has two further CANOpen buses:
- (bus 2) Active Cube (address 91)
- (bus 3) five CC201 (address 1, 2, 7, 8 and 9) and two “SI UNIT” (address 11 and 12)
The CH111 has an ENET fieldbus, identified with logic index 2; its 4 channels/branches are connected to:
- (channel 1) six SM137 (address 1, 2, 4, 5, 7 and 8)
- (channel 2) two SM137 (address 1 and 2)
- (channel 3) two SM137 (address 1 and 2)
- (channel 4) six SM137 (address 1, 2, 4, 5, 7 and 8)
Six SGDV Mechatrolink drives (address 1, 2, 3, 4, 5, 6) are connected to the BH670.
For all drives corresponding to axes managed by WRT, the axis name and line number are displayed.
15
In the upper part of Hardware page, there are the radio buttons used for the choice of display conventions
for hardware module coordinates: selecting “WRT Error”, coordinates are displayed in the traditional way,
applying the offset to ENET bus and channel indexes, so to coincide with the coordinates reported in WRT
errors; selecting “PLC”, coordinates are displayed with PLC programmer style (ENET bus and channel
indexes start from 0); selecting “Diagram”, coordinates will be displayed as in the new electrical diagrams
(<EtherCAT bus ID>.<EtherCAT slave ID>.<ID of the slot on the EtherCAT slave>.<module ID >).
In the example, Diagram-style coordinates for the BH660 address 1 will be “1.1”; for ENET P801 module
with address 0 connected to the BH660, the coordinates will be “1.1.1.0”; for the CANOpen ACT with
address 2 connected to the BH660 will be “1.1.5.2” and so on.

16
Figure 12 Hardware page (detail)
17
Hardware display from xml file page (HWLoaded)
HWLoaded page displays the machine hardware equipment described in a .xml file through a tree graph;
the .xml file must be previously created by LogAnalyzer during log file analysis and it can even describe the
differences between detected hardware equipment and reference hardware equipment for a machine. The
.xml file path is selectable through the controls described in Settings page chapter, point 14; this feature
allow to display the hardware equipment of different machines or of the same machine in different
validation points, for comparisons or manual checks. The structure of the tree graph and the color
meanings are the same as described in Hardware page chapter. Coordinate display style can be switched
between “PLC” and Diagram” in this page, too.

NOTE: This page remains hidden till its first use.

Axes configuration parameters page (DataTable)


There are two ways to extract and display axes machine data configuration parameters:
- Insert a valid path for data folder in Settings page (the related “N.A.” checkbox must be unchecked)
and start log analysis.
- Insert a valid path in DataTable “Data Path” textbox and start data elaboration pressing “Parse
Data” button. Path selection can be done through drag-and-drop of data folder directly on
DataTable page.
In “Parameter Selection” section it is allowed to change the parameter set to be displayed: first choose one
of the available data tables; to remove a parameter, select its name from the drop down menu and press
“Remove” button; to add a new parameter to the ones that will be displayed, insert its name in the textbox
near “Add” button and press the button.
If “Undock Table” checkbox is checked, the table with the axes configuration parameters will be displayed
on a new Window instead of on the DataTable page itself.
DataTable page is illustrated in Figure 13.

18
Figure 13 Machine data page (DataTable)

Automatic Elaboration and On Machine Elaboration


Launching LogAnalyzer.exe with option “-a”, log file analysis of the last month of machine activity will
automatically start. At the end of the elaboration, a dialog window will ask the user to save a .zip containing
the archive of the log files used for the elaboration and its results. Unzipping this file, you’ll get a folder
named “tmpSendReport”; in this folder there will be “logfile” and “zarchive” folders. In “logfile” folder
you’ll find some of the files used for log analysis and the folder “Diagnostica” (containing the analysis report
and the .xml files with detected hardware equipment information) and the folder “equipment” (with .xml
files describing reference hardware equipment related to the machine validation points –end of
production, service actions –).

The option “-a” and the controls described at point 1 of Settings page chapter are thought to allow to a
non-expert user to execute a first log analysis directly on the machine and generate the following files:
• C:\wnc\home\d_xnc\logfile\Diagnostica\diagnosi_<initial date>_<final date>.txt
• C:\wnc\home\d_xnc\logfile\Diagnostica\HWInfo.xml
• C:\wnc\home\d_xnc\logfile\Diagnostica\HWMerge.xml
Those files can be sent to the Service together with C:\wnc\home\d_xnc\logfile and C:\wnc\home\zarchive
folders as a .zip file automatically generated when “Save Info…” button is pressed.

19
Interpretation of automatic elaboration results
The file “diagnosi_<initial date>_<final date>.txt” contains the same information displayed in “Report”
page; at the end of the file there is the same summary displayed in “Statistics” page: for the interpretation
of the results it is better to start reading this summary, in order to know the number and the type of the
interesting events; then, reading backward the file, it is possible to find the important events in the listed
working sessions. All these manual operations become automatic if log file folders are available (allowing
the elaboration to be repeated).

HWInfo.xml file can be used to display a hardware equipment using the hardware equipment display tool
of LogAnalyzer described at point 14 of the Settings page chapter. The tree graph with hardware devices
will be displayed in “HWLoaded” page.

Interpretation of log analysis results


See chapters: Report page, Statistics page and Hardware page.

See LogAnalyzer Glossary for a list of possible errors (the Glossary is displayed clicking “Glossary” button, in
the right part of the application window).

Options through configuration file


Through LAOptions.txt file (it must be in “LogAnalyzer” folder, which is in the same folder of
LogAnalyzer.exe file), you can configure the error tolerance thresholds used by the semaphores in Statistics
page; syntax for these options is:
ENET_ERR_SEM_TH=<n> set tolerance threshold for ENET errors
CANOPEN_ERR_SEM_TH=<n> set tolerance threshold for CANOpen errors

LogAnalyzer launch options


Managed LogAnalyzer launch options are:
• “-a”: when application is launched, log elaboration of the last month of machine activity
automatically starts. At the end of the elaboration, a popup asks for the path where logArchive.zip
file (containing logfile and zarchive folders and elaboration results) will be saved. The application
stays active, allowing report and detected hardware equipment tree graph examination.
• “-b <d|w|m|a> <Zip file path>”: automatically backup the logs without GUI; depending on the
options, the log collected will belong to, respectively: current day (b), last week (w), last month (m)
or all available logs (a). The logs will be compressed and saved as specified by zip file path. If the
destination path is not specified, a dialog window where you can choose it will open.
• “-y”: if added to the previous option, force overwriting of the specified destination file if already
existing with the same name.
• “-s”: if added to “-b” option, it hides the notifications about archive log files backup phases.
• “-it”: set the Italian language for Glossary and control texts. Default language is English.

20
Machine validation
In order to avoid analysis of log files referring to not significant period of the life of the machine (e.g. during
machine setup on production line), it is possible to mark the machine as “validated” (working) at the end of
production process and after each service action (e.g. drive substitutions, plant modifications, etc.).
When the machine is validated, the following actions are performed:
- A validation marker is written in Stdout.log file
- The file MachineValidation.log is updated (it contains the list of all validation points)
- The reference hardware equipment file is created and saved (in “logfile\equipment” folder). It
contains the description of the hardware equipment that has been detected during the latest WRT
launch before the validation; hence the importance to validate the machine when all hardware
devices have been detected and the machine is perfectly working
All these actions are performed by ValidateMachine.exe, which is used to create new validation points and
link them to a custom string (e.g. “END OF PRODUCTION”). The validation date is automatically linked to
the description string (see Figure 14).

Figure 14 ValidateMachine.exe application

The notes coupled with the validation point could be written in the “Additional Notes” textbox. The
validation is done when clicking on “Validate Machine” button.
Validation point creation can be automated launching ValidateMachine.exe with the following options:
“-b” for execution without dialog window (blind)
“-n=note” to set additional notes linked to the validation marker
When LogAnalyzer runs on a machine with at least one validation point, it is allowed:
- Analyze log files since one of the validation points (or since the latest one)
- Compare the hardware equipment that has been detected during the latest WRT session with the
reference hardware equipment

The option “-l” can be used to create and save the hardware equipment file corresponding to the latest
WRT launch (if occurred less than ten minutes before; add “-i” option to avoid this restriction) in
“logfile\equipment” folder, with the name:
<date of launch>_HWInfo.xml.
The latest of these files is replicated with the name Latest_HWInfo.xml.
This option cancels the other options, it prevents the user interface from being displayed and is thought to
be used at the end of WRT startup, so to have the history of hardware detection available for each WRT
launch.
21

You might also like