ECAT diagnostic and statistical information dashboard with Metabase
This article creates a dashboard in Metabase that visualizes the error counts of EtherCAT slaves.
It shows the error trend and latest state for each node and can be used to monitor network faults.
Try Creating a Dashboard for ECAT Diagnostic and Statistical Information
The dashboard we want
Show the latest error counts of the four ports for each node, and their past trends, in graphs
Steps to create the dashboard
- Step 1: Create a trend graph for node 1
- Step 2: Show the latest data for node 1
- Step 3: Edit the dashboard layout
- Step 4: Nodes 2 to 4
- Done
Step 1: Create a Trend Graph for Node 1
New question
- Click [+ New], then [Question]

- Select the database containing the diagnostic and statistical information (testSQLServer here)

- Select the table containing the slave information (SlaveStat here)

After selecting, the screen looks like this
- Select NodeAdr in the filter

Enter 1 to target node 1 only

It looks like this

- In Summarize, select four metrics, the maximum of ErrCnt0 to ErrCnt3, for the Y axis and RecDT for the X axis
In [Pick the metric you want to see], select [Max of ...]
Select [ErrCnt0]
Click [+] and select 1 to 3 in the same way
In [Pick a column to group by], select [RecDT]
- The settings look like this

- Click [Visualize] to show the graph

Select [Minute] for the X-axis span
It changes to a per-minute view
- Click [Save] and save it as 'Node1'
Add it to a dashboard
Click [Create a new dashboard] to create a new dashboard
Create it with the name "ECAT diagnostic and statistical information"
Click [Save] to save the created dashboard for now
To view the saved data, click [Browse all data >] under Analytics
The created dashboard and the Node1 graph are under Analytics
Step 2: Show the Latest Data for Node 1
SQL query
- Click [+ New], then [SQL query]

- Select the database containing the diagnostic and statistical information (testSQLServer here)

- Write the following SQL and
press
select top(1) ErrCnt0, ErrCnt1, ErrCnt2, ErrCnt3 from SlaveStat where NodeAdr=1 order by RecDT DESC
The result is shown at the bottom
-
Click [Save] and save it with the name 'Node1 latest'
Add it to the dashboard and save the dashboard as well
Step 3: Edit the Dashboard Layout
Dashboard
- To view the saved data, click [Browse all data >] under Analytics

- The ECAT diagnostic and statistical information dashboard, the Node1 graph and the Node1 latest data are there, so click [ECAT diagnostic and statistical information] to open it

- The created graph and data should be arranged on the dashboard like this

- Click the pencil at the top right to put the dashboard in edit mode

- Graphs and other parts can be dragged and resized, so arrange them freely

-
Finally, [Save]
Step 4: Nodes 2 to 4
Likewise...
Create nodes 2 to 4 in the same way and add them to the dashboard
For the graphs, change the NodeAdr filter to 2

and change NodeAdr=1 to 2 in the SQL for the latest data
select top(1) ErrCnt0, ErrCnt1, ErrCnt2, ErrCnt3 from SlaveStat where NodeAdr=2 order by RecDT DESC
Done
Finished dashboard
Finally
I created a dashboard from the ECAT diagnostic and statistical data, but this is just one example, so try various aggregation methods


