TwinCAT 3 Bode Plot - first steps
In order to enable you to get up and running quickly and to simplify work with the TwinCAT 3 Bode Plot, the first steps towards a Bode Plot recording are briefly summarized on this page.
If you wish to make a Bode Plot recording of a TwinCAT CNC axis, note the instructions for configuring TwinCAT CNC axes at the end of the section.

In order to make the Bode Plot recording, the drive axis executes a motion sequence that is dependent upon the settings. At the start of the Bode Plot recording the drive axis starts up automatically in accordance with the set motion profile and can endanger people and material. During the Bode recording the drive axis remains integrated in the application context (e.g. releases, monitoring, etc.).
- Ensure safety during the Bode Plot recording.
1. Installation
For a basic understanding it is important to know that the TwinCAT 3 Bode Plot is part of the Measurement installation, which also includes the Scope View and the Scope Server. Some functions are used across Measurement installations. For example, the toolbar controls both Scope and Bode projects. Since all measurement projects use the Scope Server for the recording of the data, this is always installed as well. However, it can also be installed individually on a target device via the component installation.
2. Licensing
For the Bode Plot, the “Base” license is initially activated, irrespective of whether it has been installed via its own Measurement setup or via the TwinCAT 3 XAE setup.
3. New project
Open a new Visual Studio project in one of the installed versions via the context menu of the TwinCAT tray icon.

A new Visual Studio window opens. Create a new Measurement project via the TwinCAT 3 start page or via the File menu.
A window opens showing the existing Measurement templates. Select the already pre-configured Bode Plot here.
A solution with a project tree opens in the Solution Explorer. You can find the Bode Plot at the lowest level.
In the Properties window, set the "Axis ID" and "Target Net ID" for the drive axis with which the Bode Plot is to be created.
4. Preparing a TwinCAT project:
Before you can execute the actual Bode Plot, you must adjust the settings of the TwinCAT project once only.
Announce the TcNcObjects Class Factory: the Bode Plot is executed by a TcCom object in the TwinCAT system. To ensure that this can be generated automatically from the Bode project, you must announce the Class Factory for TcNcObjects.
Append dynamic containers to the EtherCAT master: for dynamic communication with the drive, reserve a memory range once only per EtherCAT device. Confirm the subsequent dialog for querying the container size with OK.

5. Making a Bode Plot recording
After having selected the target system and the drive axis, you can parameterize the recording in the Plot properties. The details for the plot settings can be found in the section "Bode Plot - Plot properties". The Bode Plot is started with the "Start Record" button in the Measurement toolbar. During the recording the current time signals are displayed below in the plot. You can abort the recording at any time with the Stop button.
6. Error
If errors should occur during the recording, they are displayed in the Visual Studio error list. For example, the Bode Plot signals a missing axis release when trying to start the recording.

However, the error list only displays the errors output by projects that are part of the active solution.
Example: If a lag error is signaled for the drive axis and the project is not part of the active solution, a general Bode Plot error is output.
If the project is part of the active solution, then the lag error is also output in the error list.
7. Analysis
Following the recording you can see all the characteristic curves created so far. You can change the display options in the properties. For example, it may be useful to view the "path" as well as the "open control loop" and "closed control loop", or to highlight or mask individual characteristic curves. Details for the settings can be found in the section "Bode Plot - Set properties".
Beyond that you can also append filter sets for the simulation of filters or result sets for the determination of overlapping results.

Notes on the configuration of TwinCAT CNC axes
If a Bode Plot recording is to be made of a TwinCAT CNC axis, the matching speed standardization f must be set for this in the axis parameter set.
On the basis of the AX5000's internal speed scaling (1 increment corresponds to a speed of 5.588 x 10-5 rpm), the following equation is used for the calculation:

with
f: scaling factor [µm/min] or [10-3°/min]
d: feed per motor revolution [µm/rev] or [10-3°/rev]
i: gear ratio [-]
The resulting factor must then be entered in the axis parameter set for the respective axis. This is done by means of the parameters P-AXIS-00205 - P-AXIS-00207.
Example:
Linear axis with 5 mm feed per motor revolution and gear ratio 4.

This results in the following axis parameters:
antr.v_time_base | 0 | (P-AXIS-00207: time base = 1/min ) |
antr.v_reso_num | 100000 | (P-AXIS-00206: standardization factor counter) |
antr.v_reso_denom | 6985 | (P-AXIS-00205: standardization factor denominator) |
Further information on the axis parameters can be found in the Beckhoff information system in the documentation "TwinCAT CNC". (TwinCAT 2 > TwinCAT NC > TwinCAT CNC > TwinCAT CNC axis parameters)