ASIX AX58400-TSB-1 User manual

1
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Revision 1.20
October 17th, 2023
rch 14th, 2020
rch 14th, 2020
rch 14th, 2020
AX58400 MotorControl User Guide

2
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Revision History
Revision
Date
Description
1.00
2021/06/28
Initial release
1.10
2021/08/17
Modify AX58400-TSB-1 and encoder power source
1.20
2023/10/17
1. Added Evaluation Board License Agreement.
2. Added another power USB connectivity and update related figures and
tables.

3
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
CONTENT
1. Introduction ....................................................................................................................7
2. Requirements..................................................................................................................8
3. Board Description.........................................................................................................14
3-1 AX58400-TSB-1...................................................................................14
3-2. X-NUCLEO-IHM08M1.........................................................................14
4. Hardware Setup ............................................................................................................15
4-1 Connectivity..........................................................................................15
5. Generate firmware and download to AX58400-TSB-1 ...............................................16
5-1 Use Beckhoff SSC tool to generate EtherCAT slave stack source code.
...................................................................................................................16
5-2 Use ARM KEIL MDK compiler firmware ...............................................21
5-3 Use ARM KEIL MDK download firmware..............................................22
5-4 Use STM32CubeProgrammer download ARM KEIL MDK firmware.....22
5-5 Use STM32 CubeIDE compiler firmware..............................................26
5-6 Use STM32CubeIDE download firmware.............................................28
6. Basic Operation of TwinCAT .......................................................................................29
6-1 Open XAE through Visual Studio 2010 / 2013......................................29
6-2 Project creation & download EEPROM ................................................29
7. PLC Application............................................................................................................35
7-1 Import PLC...........................................................................................35
7-2 PD Link ................................................................................................37
7-3 Link Reference.....................................................................................39
7-4 Execution PLC .....................................................................................40
8. Firmware Upgrade through EtherCAT FoE ................................................................46
8-1 Firmware Upgrade................................................................................46
9. Object Dictionary..........................................................................................................48
9-1 Objects Description..............................................................................48
10. Performance Evaluation .............................................................................................50
10-1 Minimum DC Cycle Time....................................................................50

4
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
List of figure
Figure 1 - 1 ..........................................................................................................................................................7
Figure 2 - 1 ..........................................................................................................................................................8
Figure 2 - 2 ..........................................................................................................................................................8
Figure 2 - 3 ..........................................................................................................................................................9
Figure 2 - 4 ..........................................................................................................................................................9
Figure 2 - 5 ..........................................................................................................................................................9
Figure 2 - 6 ........................................................................................................................................................10
Figure 2 - 7 ........................................................................................................................................................10
Figure 2 - 8 ........................................................................................................................................................10
Figure 2 - 9 ........................................................................................................................................................11
Figure 2 - 10 ......................................................................................................................................................11
Figure 2 - 11 ......................................................................................................................................................11
Figure 2 - 12 ......................................................................................................................................................12
Figure 2 - 13 ......................................................................................................................................................13
Figure 3 - 1 ........................................................................................................................................................14
Figure 3 - 2 ........................................................................................................................................................15
Figure 4 - 1 ........................................................................................................................................................15
Figure 5 - 1 ........................................................................................................................................................16
Figure 5 - 2 ........................................................................................................................................................16
Figure 5 - 3 ........................................................................................................................................................16
Figure 5 - 4 ........................................................................................................................................................17
Figure 5 - 5 ........................................................................................................................................................17
Figure 5 - 6 ........................................................................................................................................................17
Figure 5 - 7 ........................................................................................................................................................18
Figure 5 - 8 ........................................................................................................................................................18
Figure 5 - 9 ........................................................................................................................................................18
Figure 5 - 10 ......................................................................................................................................................19
Figure 5 - 11 ......................................................................................................................................................19
Figure 5 - 12 ......................................................................................................................................................19
Figure 5 - 13 ......................................................................................................................................................20
Figure 5 - 14 ......................................................................................................................................................20
Figure 5 - 15 ......................................................................................................................................................20
Figure 5 - 16 ......................................................................................................................................................21
Figure 5 - 17 ......................................................................................................................................................21
Figure 5 - 18 ......................................................................................................................................................21
Figure 5 - 19 ......................................................................................................................................................22
Figure 5 - 20 ......................................................................................................................................................22
Figure 5 - 21 ......................................................................................................................................................22
Figure 5 - 22 ......................................................................................................................................................23
Figure 5 - 23 ......................................................................................................................................................23
Figure 5 - 24 ......................................................................................................................................................23
Figure 5 - 25 ......................................................................................................................................................23
Figure 5 - 26 ......................................................................................................................................................24
Figure 5 - 27 ......................................................................................................................................................24
Figure 5 - 28 ......................................................................................................................................................24
Figure 5 - 29 ......................................................................................................................................................24
Figure 5 - 30 ......................................................................................................................................................25
Figure 5 - 31 ......................................................................................................................................................25
Figure 5 - 32 ......................................................................................................................................................25
Figure 5 - 33 ......................................................................................................................................................25
Figure 5 - 34 ......................................................................................................................................................26

5
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 5 - 35 ......................................................................................................................................................26
Figure 5 - 36 ......................................................................................................................................................26
Figure 5 - 37 ......................................................................................................................................................27
Figure 5 - 38 ......................................................................................................................................................27
Figure 5 - 39 ......................................................................................................................................................28
Figure 5 - 40 ......................................................................................................................................................28
Figure 6 - 1 ........................................................................................................................................................29
Figure 6 - 2 ........................................................................................................................................................30
Figure 6 - 3 ........................................................................................................................................................30
Figure 6 - 4 ........................................................................................................................................................31
Figure 6 - 5 ........................................................................................................................................................32
Figure 6 - 6 ........................................................................................................................................................32
Figure 6 - 7 ........................................................................................................................................................33
Figure 6 - 8 ........................................................................................................................................................33
Figure 6 - 9 ........................................................................................................................................................34
Figure 6 - 10 ......................................................................................................................................................34
Figure 6 - 11 ......................................................................................................................................................34
Figure 7 - 1 ........................................................................................................................................................35
Figure 7 - 2 ........................................................................................................................................................35
Figure 7 - 3 ........................................................................................................................................................36
Figure 7 - 4 ........................................................................................................................................................36
Figure 7 - 5 ........................................................................................................................................................37
Figure 7 - 6 ........................................................................................................................................................37
Figure 7 - 7 ........................................................................................................................................................38
Figure 7 - 8 ........................................................................................................................................................38
Figure 7 - 9 ........................................................................................................................................................38
Figure 7 - 10 ......................................................................................................................................................39
Figure 7 - 11 ......................................................................................................................................................39
Figure 7 - 12 ......................................................................................................................................................40
Figure 7 - 13 ......................................................................................................................................................40
Figure 7 - 14 ......................................................................................................................................................40
Figure 7 - 15 ......................................................................................................................................................41
Figure 7 - 16 ......................................................................................................................................................41
Figure 7 - 17 ......................................................................................................................................................41
Figure 7 - 18 ......................................................................................................................................................42
Figure 7 - 19 ......................................................................................................................................................42
Figure 7 - 20 ......................................................................................................................................................43
Figure 7 - 21 ......................................................................................................................................................43
Figure 7 - 22 ......................................................................................................................................................44
Figure 7 - 23 ......................................................................................................................................................44
Figure 7 - 24 ......................................................................................................................................................45
Figure 7 - 25 ......................................................................................................................................................45
Figure 10 - 1 ......................................................................................................................................................50
Figure 10 - 2 ......................................................................................................................................................50
Figure 10 - 3 ......................................................................................................................................................51

6
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
List of Table
Table 2 - 1..........................................................................................................................................................12
Table 2 - 2..........................................................................................................................................................13
Table 2 - 3..........................................................................................................................................................13
Table 3 - 1..........................................................................................................................................................14
Table 4 - 1..........................................................................................................................................................15
Table 7 - 1..........................................................................................................................................................39
Table 9 - 1..........................................................................................................................................................48
Table 9 - 2..........................................................................................................................................................49
Table 9 - 3..........................................................................................................................................................49

7
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
1. Introduction
This document introduces how to setup entire environment for motor control application on AX58400-TSB-1
with ST X-NUCLEO-IHM08M1. The demo application of EtherCAT master side develops using PLC
(Programmable Logic Controller) language through BECKHOFF TwinCAT engineering (XAE). The IDE relies
on Microsoft Visual Studio 2010 / 2013. We can execute the application through the IDE or pure BECKHOFF
runtime package (XAR). The firmware part of EtherCAT slave side develops using C language through ARM
KEIL MDK (Microcontroller Development Kit).
Figure 1 - 1
The firmware part mainly handles below tasks:
⚫BECKHOFF SSC (Slave Stack Code)
⚫Hardware access of SSC through SPI interface at MCU side
⚫CiA402 state machine and CSP mode operating.
⚫Control word, status word, target position and actual position accessed by EtherCAT PD (Process Data)
⚫Motor control state machine handling, current reading, SVPWM driving.
⚫The PLC part mainly handles below tasks:
⚫PD mapping / handling by PLC for CSP mode
⚫A demo GUI

8
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
2. Requirements
Before starting to setup the environment, we should prepare some software and hardware. Of course, they
are all running based on general desktop PC with windows 7 / 10 operation systems. We list software /
hardware requirements as following:
[Software at EtherCAT master side]
⚫Windows 7 / 10 operation system
⚫Microsoft Visual Studio 2010 / 2013
⚫Beckhoff TwinCAT XAE v3.1.4020 or later
Figure 2 - 1
Note: You can download the BECKHOFF TwinCAT here or contact ASIX Electronics Corporation.
[Software at EtherCAT slave side]
⚫STM32CubeProgrammer
Figure 2 - 2
⚫Note: You can download the STM32CubeProgrammer here

9
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
⚫STM32CubeIDE (for development only)
Figure 2 - 3
⚫Note: You can download the STM32CubeIDE here
⚫ARM KEIL MDK micro-Vision 5 V5.29 or later (for development only)
Figure 2 - 4
If you use a version older than version 5.29, you can use STM32CubeProgrammer download firmware.
⚫SSC Tool V5.12(for development only)
Figure 2 - 5
⚫Note: You can download the SSC Tool V5.12 here

10
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
[Hardware]
⚫AX58400-TSB-1 x 1
Figure 2 - 6
Figure 2 - 7
⚫STLINK-V3MINI x 1
Figure 2 - 8

11
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 2 - 9
⚫X-NUCLEO-IHM08M1 3-Phase Inverter Board x 1
Figure 2 - 10
Figure 2 - 11

13
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Table 2 - 2
Table 2 - 3
⚫24VDC/8A Power Supply x 1
Figure 2 - 13

14
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
3. Board Description
3-1 AX58400-TSB-1
The AX58400-TSB-1 is a development board with AX58400 dual core MCU and EtherCAT Slave Controller,
please refer to ASIX official website as below for more detail. https://www.asix.com.tw/
Figure 3 - 1
3-2. X-NUCLEO-IHM08M1
The X-NUCLEO-IHM08M1 is a three-phase brushless DC motor driver expansion board, please refer to ST
official website as below for more detail.
https://www.st.com/en/ecosystems/x-nucleo-ihm08m1.html
Attention! Before starting to build-up the system, please make sure the X-NUCLEO-
IHM08M1 board is ready by check these jumps and components status as below table.
Component
Status
R74, R86, R170
Removed
JP1, JP2, JP9
Closed
C3, C5 and C7
Removed
J5, J6
Short 3sh side
Table 3 - 1

15
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 3 - 2
4. Hardware Setup
4-1 Connectivity
Please based on below table to connect all necessary equipment.
Table 4 - 1
Then you can get the final slave side environment as following.
Figure 4 - 1

16
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
5. Generate firmware and download to AX58400-TSB-1
If you want to generate firmware and download to AX58400-TSB-1, you have 2 steps basically:
(1) Use EtherCAT Slave Stack Code to generate EtherCAT sources.
(2) Use ARM KEIL MDK compiler and download firmware.
5-1 Use Beckhoff SSC tool to generate EtherCAT slave stack source
code.
⚫Step 1: Double click “AX58400_MotorControl.esp”to open SSC project file in
folder “AX58400_BSP_v100\SampleCode\AX58400_MotorControl\For_SSC_Tool”.
Figure 5 - 1
⚫Step 2: Create new project.
Figure 5 - 2
⚫Step 3: Import Configuration file by click “Import” button.
Figure 5 - 3
⚫Step 4: Select “AX58400_MotorControlConfigurations.xml”from folder
“AX58400_BSP_v100\SampleCode\AX58400_MotorControl\For_SSC_Tool\Import\Configuration”.

17
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 5 - 4
⚫Step 5: Press OK.
Figure 5 - 5
⚫Step 6: Press Yes.
Figure 5 - 6
⚫Step 7: Import object dictionary.

18
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 5 - 7
⚫Step 8: Select “AX58400_MotorControl.xlsx”from folder
“AX58400_BSP_v100\SampleCode\AX58400_MotorControl\For_SSC_Tool\Import\Application”.
Figure 5 - 8
⚫Step 9: Import object dictionary success.
Figure 5 - 9
⚫Step 10: Create new Slave Files.

19
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
Figure 5 - 10
⚫Step 11: Save project.
Figure 5 - 11
⚫Step 12: Save project to folder
“AX58400_BSP_v100\SampleCode\AX58400_MotorControl\For_SSC_Tool”.
Figure 5 - 12

20
Copyright (C) 2021-2023 Reserved by ASIX Electronics Corporation
AX58400 MotorControl User Guide
Reference Design User Guide
⚫Step 13: Click “Yes” to replace “AX58400_MotorControl.esp”.
Figure 5 - 13
⚫Step 14: Create new Slave Files.
Figure 5 - 14
⚫Step 15: Create new Slave Files success.
Figure 5 - 15
Table of contents
Other ASIX Motherboard manuals