Quick start

To get started, the first step is to install the required NuGet package "Beckhoff.TwinCAT.HMI.AuditTrail".

Installation of a NuGet package

1. Create or open an existing HMI project.
2. Right-click on the References folder.
3. Select Manage NuGet packages.
A new window opens with the Package Manager.
4. Select Beckhoff Offline Packages (1.14) as the package source if the corresponding TcPkg has been installed or nuget.org.
5. Switch to the Browse tab.
You will receive an overview of the available packages.
6. Select the required package.
An overview opens on the right side.
7. Select the version you want to install and install it.
The package is now available to you.

Installation of a required database

Install the database required by Audit Trail.

Configuring the Audit Trail Extension

1. Open the configuration page of the Audit Trail in the HMI project
2. Go to the DB settings tab
Quick start 1:
3. Establish the connection to the database here.
The diagnostics window shows whether a connection has been established.
This completes the basic configuration.

Enable reauthentication on a symbol in Visual Studio / TcXaeShell

Quick start 2:
1. Open the TwinCAT HMI Configuration window.
2. Go to the Server Symbols / Mapped Symbols tab.
3. Activate the checkmark under the Reauthentication Required column.
All symbols with the checkmark set require reauthentication in order to write the value.

You can find more information under Add new authentication.

Adding a symbol in Visual Studio / TcXaeShell

Quick start 3:
1. Open the TwinCAT HMI Configuration window.
2. Go to the Server Symbols / Mapped Symbols tab.
3. Select the symbols to be added to the Audit Trail.
4. Add these to the Audit Trail configuration by right-clicking on Audit Trail Settings.
A pop-up opens for further settings.
5. Define whether symbol monitoring is active and a comment must be entered when writing.
The symbols you have configured are now automatically logged in the Audit Trail during a write operation. If the comment function has been activated, this is also entered.

You can find more information under Add symbols.

Adding an event in Visual Studio / TcXaeShell

Quick start 4:
1. Open the TwinCAT HMI Configuration window.
2. Go to the Server Symbols / Audit Trail / Events tab.
3. Add a new filter option by double-clicking on create new event filter or by right-clicking on New Audit Trail Event Filter.
4. Define a name for your filter.
5. Create an appropriate filter configuration.
All events that match your filter are also included in the Audit Trail.

You can find more information under Add events.

Adding a JavaScript in Visual Studio / TcXaeShell

1. Add a new JavaScript file to the project.
2. Open the JavaScript file you have created.
3. Call the function TcHmi.Server.AuditTrail.createAuditLogEntryEx.
This function adds a new entry to the audit trail.

You can find more information under Add JavaScript.