143 lines
3.4 KiB
Markdown
143 lines
3.4 KiB
Markdown
# How to Bode with TwinCAT
|
|
|
|
## Requirements
|
|
|
|
- PLC
|
|
- EL7XX Servodrive
|
|
- PC
|
|
- Visual Studio Code 2017
|
|
- TwinCAT 3
|
|
- eXtended Automation Runtime (XAR)
|
|
- Remote Desktop Connection
|
|
- Patience
|
|
|
|
---
|
|
|
|
## Introduction
|
|
|
|
The goal is to get a **Bode plot** of an **NC Axis** connected to the EL7XX Servodrive. This documentation should enable you to perform a Bode plot and tweak the settings for better performance.
|
|
|
|
---
|
|
|
|
## Steps
|
|
|
|
### 1. Setup a Standard TwinCAT Project
|
|
|
|
- Ensure your target axis is correctly set up.
|
|
- You should be able to jog the axis.
|
|
|
|
---
|
|
|
|
### 2. Verify Target Version
|
|
|
|
Make sure your target build version is `4026.67`. If not, see [How to upgrade](UpgradePLC.md).
|
|
|
|
---
|
|
|
|
### 3. Enable `TcComObjects`
|
|
|
|
Go to your TwinCAT project and select the following options in **TcComObjects**:
|
|
<img src="Images/ImgBode/TcCom.png" alt="TcComObjects" width="600"/>
|
|
|
|
---
|
|
|
|
### 4. Add Dynamic Container for Oversampling
|
|
*(Not available with EL7211)*
|
|
|
|
- Navigate to **I/O → Devices**
|
|
- **Right-click** on *Device 1* (assuming your axis is mounted here)
|
|
<img src="Images/ImgBode/DynCont1.png" alt="Dynamic Container" width="600"/>
|
|
- Select: **Append Dynamic Container**
|
|
- Agree to all pop-ups
|
|
|
|
---
|
|
|
|
### 5. Decrease PLC Cycle Time to `250 µs`
|
|
|
|
<img src="Images/ImgBode/RtSettings.png" alt="PLC Cycle Time" width="600"/>
|
|
|
|
---
|
|
|
|
### 6. Set NC Motion Task to Use PLC Cycle
|
|
|
|
<img src="Images/ImgBode/Axis_Cycle.png" alt="NC Motion Task" width="600"/>
|
|
|
|
---
|
|
|
|
### 7. Disable Encoder LP Filter
|
|
|
|
Disable the low-pass filter for the encoder (speed and/or position, depending on your measurement focus). Then **Download** the settings.
|
|
<img src="Images/ImgBode/EncSettings.png" alt="Encoder Settings" width="600"/>
|
|
|
|
---
|
|
|
|
### 8. Enable the Axis in Main Visualisation
|
|
|
|
Open the main visualisation and enable the axis as if you were going to jog it.
|
|
|
|
---
|
|
|
|
## Open New Bode Project
|
|
|
|
### 9. Open TwinCAT or Visual Studio Code
|
|
|
|
<img src="Images/ImgBode/BodeProject.png" alt="Open Bode Project" width="600"/>
|
|
|
|
---
|
|
|
|
### 10. Select Bode Plot
|
|
|
|
<img src="Images/ImgBode/openBodeOptions.png" alt="Bode Plot Options" width="600"/>
|
|
|
|
---
|
|
|
|
### 11. Set Target in Bode Properties
|
|
|
|
- **Target ID**: Set to the TwinCAT route of your PLC
|
|
- **Axis ID**: Set to the ID of the axis in your TwinCAT project
|
|
<img src="Images/ImgBode/TargetSettings.png" alt="Target Settings" width="600"/>
|
|
|
|
---
|
|
|
|
### 12. Adjust Settings for Performance
|
|
|
|
Tune the settings to get the best performance from the EL7XX.
|
|
<img src="Images/ImgBode/BodePltSettings.png" alt="Bode Settings" width="600"/>
|
|
|
|
---
|
|
|
|
### 13. Start Measurement
|
|
|
|
<img src="Images/ImgBode/StartMeasurement.png" alt="Start Measurement" width="600"/>
|
|
|
|
---
|
|
|
|
### 14. View Your Measurements
|
|
|
|
Measurements will appear under **Bode Plot**.
|
|
<img src="Images/ImgBode/MeasurementsPlace.png" alt="Measurement Location" width="600"/>
|
|
|
|
---
|
|
|
|
## Display Options
|
|
|
|
### 1. Navigate to the Bode Project
|
|
|
|
- Click on the project to open display options
|
|
<img src="Images/ImgBode/ExtendedViewNav.png" alt="Extended View Navigation" width="600"/>
|
|
|
|
---
|
|
|
|
### 2. Enable Extended View
|
|
|
|
- Set **Appearance / View Detail Level** to **Extended**
|
|
<img src="Images/ImgBode/ExtendedView.png" alt="Extended View" width="600"/>
|
|
|
|
---
|
|
|
|
### 3. Customize Measurement Appearance
|
|
|
|
Select individual measurements and adjust their appearance in the **Properties** panel.
|
|
<img src="Images/ImgBode/AperanceGraph.png" alt="Appearance Settings" width="600"/>
|
|
|