Create a project with 3-axis EtherCAT motion control in InoProShop. The following are the detailed steps:
Step 1: Create a New Project
Step 2: Configure the EtherCAT Master
Step 3: Add 3 SV630N Servo Drives as Slaves
Step 4: Add CIA402 Axes for Each Servo Drive and Configure Axis Parameters
Step 5: Create Reusable Axis Control Function Blocks (FB)
Step 6: Instantiate 3 Axis Control FBs in the Main Program and Connect Hardware Axes
Step 7: Write Test Logic (Enable, Homing, Jogging, Absolute Positioning, etc.)
Step 8: Compile, Download, and Debug
Below are the detailed steps.
Step 1: Create a New Project
Open InoProShop, select “File” -> “New Project”.
Select “Standard Project”, and choose the device type as AM500 series (e.g., AM523-0808TN).
Select the programming language as ST (Structured Text).
Specify the project name and save path, then click “OK”.
Step 2: Configure the EtherCAT Master
In the left device tree, double-click the “Network Configuration” node.
In the Network Configuration interface, click on the AM500 device image.
In the right properties window, check the “EtherCAT Master” checkbox.
Step 3: Add 3 SV630N Servo Drives as Slaves
In the right “Network Device List”, expand “EtherCAT Port” -> “Inovance”.
Find the “SV630N” device, drag and drop 3 instances under the EtherCAT Master.
Ensure the device order matches the actual hardware connection order, with default names SV630N_1, SV630N_2, SV630N_3.
Step 4: Add CIA402 Axes for Each Servo Drive and Configure Axis Parameters
Right-click the first SV630N slave, select “Add Object” -> “CIA402 Axis”, with the default name Axis_1.
Similarly, add axes for the other two SV630Ns, naming them Axis_2 and Axis_3.
Double-click each axis object to configure parameters:
Unit Conversion: Set the scaling factor numerator and denominator based on the mechanical structure. For example, if the motor has 10000 pulses per revolution and the lead screw has a pitch of 10mm, the numerator is 10000 and the denominator is 10, making the user unit millimeters.
Soft Limits: Set positive and negative limits based on the mechanical stroke.
Homing Parameters: Set the homing mode, homing speed, etc.
Step 5: Create Reusable Axis Control Function Blocks (FB)
Right-click “Application”, select “Add Object” -> “Program Organization Unit”, choose type “Function Block”, name it FB_AxisControl, and set the language to ST.
In FB_AxisControl, define interface variables and internal variables, and write control logic (including enable, homing, absolute positioning, relative positioning, jogging, stopping, etc.).
Step 6: Instantiate 3 Axis Control FBs in the Main Program and Connect Hardware Axes
In PLC_PRG or the global variable table, declare 3 instances of FB_AxisControl, such as fbAxis1, fbAxis2, fbAxis3.
Also declare 3 AXIS_REF variables, such as axAxis1, axAxis2, axAxis3, and bind them to the hardware configuration’s Axis_1, Axis_2, Axis_3 respectively.
In the main program, call these three FB instances and pass the corresponding AXIS_REF variables to the FB.
Step 7: Write Test Logic
Create some control variables in the global variable table, such as enable, homing, jogging, positioning commands, etc.
In the main program, call the corresponding functions of the FB instances based on these control variables.
Step 8: Compile, Download, and Debug
Compile the project, ensuring there are no errors.
Connect the PLC and download the program.
Run the program and test each axis’s functionality step by step.
Below is an example code for the FB_AxisControl function block and the main program.
FB_AxisControl Function Block Code Example:
Note: The following code is an example and may need to be adjusted based on actual requirements.
Complete Guide to Establishing an AM500 EtherCAT 3-Axis Motion Control Project
Below are the detailed steps and methods for establishing a project with EtherCAT 3-axis motion control.
1. Project Preparation Phase
1.1 Hardware Preparation List
Component Specification Quantity Remarks
PLC AM500 series (e.g., AM523-0808TN) 1 unit Main controller
Servo Drive SV630N series 3 units EtherCAT slaves
Servo Motor Compatible with SV630N 3 units Selected based on load
EtherCAT Cable Standard Cat 5e or higher 4 PLC→Servo 1→Servo 2→Servo 3
Power Module 24VDC 1 set Power supply for the system
Wiring Accessories Terminals, cables, etc. 1 batch Prepared as needed
1.2 Network Topology
AM500 (EtherCAT Master)
│
├─ SV630N #1 (Station Address: 1) → Motor #1
│
├─ SV630N #2 (Station Address: 2) → Motor #2
│
└─ SV630N #3 (Station Address: 3) → Motor #3
1.3 Software Environment
InoProShop V1.8.0.0 or higher
EDS/XML device description files for SV630N
Project Planning
2. InoProShop Project Creation and Hardware Configuration
2.1 Create a New Project
// Operation Steps:
// 1. Start InoProShop
// 2. File → New Project → Standard Project
// 3. Device Type: Select specific AM500 model (e.g., AM523-0808TN)
// 4. Programming Language: Structured Text (ST)
// 5. Name the project and select the save path
2.2 EtherCAT Master Configuration
Open Network Configuration
Double-click “Network Configuration” in the device tree
Click on the AM500 device image
Check the “EtherCAT Master” in the right properties window
Add SV630N Slaves
// Operation Steps:
// 1. In the right “Network Device List”, expand EtherCAT Port → Inovance
// 2. Find the “SV630N” device
// 3. Drag and drop 3 SV630Ns under the EtherCAT Master
// 4. Ensure the order matches the actual hardware connection order
// 5. The system automatically names: SV630N_1, SV630N_2, SV630N_3
Check Device Status
Ensure all slaves show green (normal status)
If any are red/yellow, check the device description files or physical connections
2.3 Servo Drive Parameter Configuration
Configure each SV630N:
Open the parameter editor
Right-click SV630N_1 → “Open Edit Interface”
Select the “Startup Parameters (SDO Settings)” tab
Configure key parameters
// Object Dictionary Parameter Configuration:
// 6060h (Operating Mode): 8 (CSP-Cyclic Synchronized Position Mode)
// 6040h (Control Word): Set according to control requirements
// Motor Code: Select the corresponding motor model
// Encoder Type: Set to match the actual encoder
// Configuration Process:
// 1. Click “Upload” to read the current parameters from the drive
// 2. Modify key parameters
// 3. Click “Download” to write to the drive
// 4. Save parameters to EEPROM (if supported)
Repeat Configuration
Repeat the above steps for SV630N_2 and SV630N_3
Note: Ensure that the station addresses of each drive do not conflict
2.4 Add and Configure CIA402 Axis Objects
Add Axis Objects
// For each SV630N:
// 1. Right-click SV630N_1
// 2. Select “Add Object” → “CIA402 Axis”
// 3. Name them: Axis_1, Axis_2, Axis_3
Configure Axis Parameters
Double-click Axis_1 to enter the configuration interface:
Basic Settings:
// Unit conversion configuration (key step!)
// Example: Lead screw pitch 10mm, encoder resolution 10000 pulses/rev
// Scaling factor numerator = 10000
// Scaling factor denominator = 10
// User unit = (pulse count × denominator) / numerator
// Soft limit settings:
// Positive limit value: Set according to mechanical stroke (e.g., 1000.0 mm)
// Negative limit value: -1000.0 mm
// Enable soft limits: Yes
Homing Settings:
// Homing Mode: 35 (Homing Switch + Index Pulse)
// Homing High Speed: 100.0 mm/s
// Homing Low Speed: 10.0 mm/s
// Homing Acceleration: 1000.0 mm/s²
// Homing Offset: 0.0 mm
Dynamic Parameters:
// Maximum Speed: 1000.0 mm/s
// Maximum Acceleration: 5000.0 mm/s²
// Maximum Deceleration: 5000.0 mm/s²
// Jerk: 10000.0 mm/s³
Copy Configuration
After configuring Axis_1, parameters can be copied to Axis_2 and Axis_3
Adjust unit conversion and limit values based on the mechanical characteristics of each axis
3. Create Reusable Axis Control Function Blocks
3.1 Create FB_AxisControl
Create a new function block
// Operation Steps:
// 1. Right-click “Application” → “Add Object” → “Program Organization Unit”
// 2. Name: FB_AxisControl
// 3. Type: Function Block (FB)
// 4. Language: Structured Text (ST)
// 5. Click “Open”
Complete Variable Declaration
FUNCTION_BLOCK FB_AxisControl
VAR_INPUT
// Control Commands
bEnable: BOOL; // Servo Enable
bHome: BOOL; // Homing Command
bMoveAbsolute: BOOL; // Absolute Positioning
bMoveRelative: BOOL; // Relative Positioning
bStop: BOOL; // Stop Command
bJogForward: BOOL; // Jog Forward
bJogBackward: BOOL; // Jog Backward
bReset: BOOL; // Fault Reset
// Motion Parameters
fPosition: REAL; // Target Position/Distance
fVelocity: REAL := 100.0; // Speed
fAcceleration: REAL := 1000.0; // Acceleration
fDeceleration: REAL := 1000.0; // Deceleration
fJogVelocity: REAL := 50.0; // Jog Speed
END_VAR
VAR_OUTPUT
// Status Feedback
bEnabled: BOOL; // Servo Enabled
bHoming: BOOL; // Homing in Progress
bMoving: BOOL; // In Motion
bHomed: BOOL; // Homed
bError: BOOL; // Error Status
iErrorID: UDINT; // Error Code
sStatusMessage: STRING(100); // Status Message
// Actual Values
fActualPosition: REAL; // Actual Position
fActualVelocity: REAL; // Actual Velocity
fFollowingError: REAL; // Following Error
END_VAR
VAR_IN_OUT
axAxis: AXIS_REF; // Axis Object Reference
END_VAR
VAR
// Motion Control Function Block Instances
fbPower: MC_POWER;
fbHome: MC_HOME;
fbMoveAbsolute: MC_MOVEABSOLUTE;
fbMoveRelative: MC_MOVERELATIVE;
fbStop: MC_STOP;
fbJogForward: MC_MOVEVELOCITY;
fbJogBackward: MC_MOVEVELOCITY;
fbReset: MC_RESET;
// Edge Detection Variables
bLastHome: BOOL;
bLastMoveAbsolute: BOOL;
bLastMoveRelative: BOOL;
bLastReset: BOOL;
// Internal State
rInternalJogVelocity: REAL := 50.0;
eAxisState: (STATE_IDLE, STATE_HOMING, STATE_MOVING, STATE_ERROR);
tErrorTimer: TON;
END_VAR
3.2 FB Implementation Logic
// FB_AxisControl Main Implementation
// Parameter Safety Check
IF fVelocity <= 0 THEN
fVelocity := 100.0;
END_IF;
IF fJogVelocity > 0 THEN
rInternalJogVelocity := fJogVelocity;
END_IF;
// 1. Servo Enable Control
fbPower(
Axis:=axAxis,
Enable:=bEnable,
Enable_Positive:=TRUE,
Enable_Negative:=TRUE,
Override:=TRUE);
bEnabled := fbPower.Status;
// 2. Fault Reset – Triggered on Rising Edge
fbReset(
Axis:=axAxis,
Execute:=bReset AND NOT bLastReset);
bLastReset := bReset;
// 3. Homing Control – Triggered on Rising Edge
fbHome(
Axis:=axAxis,
Execute:=bHome AND NOT bLastHome,
Position:=0.0, // Set position to 0 after homing
Velocity:=fVelocity, // Use set speed
Acceleration:=fAcceleration,
Deceleration:=fDeceleration);
bLastHome := bHome;
bHoming := fbHome.Busy;
// Homing Completion Status Handling
IF fbHome.Done THEN
bHomed := TRUE;
eAxisState := STATE_IDLE;
ELSIF fbHome.Busy THEN
eAxisState := STATE_HOMING;
END_IF;
// 4. Absolute Positioning – Triggered on Rising Edge
fbMoveAbsolute(
Axis:=axAxis,
Execute:=bMoveAbsolute AND NOT bLastMoveAbsolute,
Position:=fPosition,
Velocity:=fVelocity,
Acceleration:=fAcceleration,
Deceleration:=fDeceleration);
bLastMoveAbsolute := bMoveAbsolute;
// 5. Relative Positioning – Triggered on Rising Edge
fbMoveRelative(
Axis:=axAxis,
Execute:=bMoveRelative AND NOT bLastMoveRelative,
Distance:=fPosition, // Note: This is the distance to move
Velocity:=fVelocity,
Acceleration:=fAcceleration,
Deceleration:=fDeceleration);
bLastMoveRelative := bMoveRelative;
// 6. Jog Control
fbJogForward(
Axis:=axAxis,
Execute:=bJogForward,
Velocity:=rInternalJogVelocity);
fbJogBackward(
Axis:=axAxis,
Execute:=bJogBackward,
Velocity:=-rInternalJogVelocity // Negative Speed
// 7. Stop Control
fbStop(
Axis:=axAxis,
Execute:=bStop,
Deceleration:=fDeceleration);
// Motion State Detection
bMoving := fbMoveAbsolute.Busy OR fbMoveRelative.Busy OR
fbJogForward.Busy OR fbJogBackward.Busy OR
fbHome.Busy;
IF bMoving THEN
eAxisState := STATE_MOVING;
END_IF;
// Error State Handling
bError := fbPower.Error OR fbHome.Error OR
fbMoveAbsolute.Error OR fbMoveRelative.Error OR
fbStop.Error OR fbReset.Error;
// Error Code and Status Message
IF fbPower.Error THEN
iErrorID := fbPower.ErrorID;
sStatusMessage := ‘Servo Enable Error’;
ELSIF fbHome.Error THEN
iErrorID := fbHome.ErrorID;
sStatusMessage := ‘Homing Error’;
ELSIF fbMoveAbsolute.Error THEN
iErrorID := fbMoveAbsolute.ErrorID;
sStatusMessage := ‘Absolute Positioning Error’;
ELSIF fbMoveRelative.Error THEN
iErrorID := fbMoveRelative.ErrorID;
sStatusMessage := ‘Relative Positioning Error’;
ELSIF fbStop.Error THEN
iErrorID := fbStop.ErrorID;
sStatusMessage := ‘Stop Error’;
ELSIF fbReset.Error THEN
iErrorID := fbReset.ErrorID;
sStatusMessage := ‘Reset Error’;
ELSE
iErrorID := 0;
sStatusMessage := ‘Normal’;
END_IF;
// Read Actual Values and Monitor Data
fActualPosition := axAxis.PositionFeedback;
fActualVelocity := axAxis.VelocityFeedback;
fFollowingError := axAxis.FollowingError;
// Error State Machine
IF bError THEN
eAxisState := STATE_ERROR;
tErrorTimer(IN:=TRUE, PT:=T#5S);
IF tErrorTimer.Q THEN
// Attempt to auto-reset after error persists for 5 seconds
fbReset(Execute:=TRUE);
tErrorTimer(IN:=FALSE);
END_IF;
END_IF;
4. Application Layer Program Implementation
4.1 Global Variable Declaration
Create a global variable table GVL_MotionControl:
VAR_GLOBAL
// Axis Reference Variables – Must be bound to axes in hardware configuration
axAxis1: AXIS_REF; // Bound to hardware Axis_1
axAxis2: AXIS_REF; // Bound to hardware Axis_2
axAxis3: AXIS_REF; // Bound to hardware Axis_3
// Axis Control FB Instances
fbAxis1: FB_AxisControl;
fbAxis2: FB_AxisControl;
fbAxis3: FB_AxisControl;
// System Control Commands
bSystemEnable: BOOL; // System Enable
bEmergencyStop: BOOL; // Emergency Stop Signal
bHomeAllAxes: BOOL; // Home All Axes
bStopAllAxes: BOOL; // Stop All Axes
// Axis 1 Control Parameters
stAxis1Ctrl:
STRUCT
bEnable: BOOL;
bHome: BOOL;
bMoveAbsolute: BOOL;
bMoveRelative: BOOL;
bJogForward: BOOL;
bJogBackward: BOOL;
bReset: BOOL;
fPosition: REAL;
fVelocity: REAL := 500.0;
fAcceleration: REAL := 2000.0;
fDeceleration: REAL := 2000.0;
END_STRUCT;
// Axis 2 Control Parameters
stAxis2Ctrl:
STRUCT
bEnable: BOOL;
bHome: BOOL;
bMoveAbsolute: BOOL;
bMoveRelative: BOOL;
bJogForward: BOOL;
bJogBackward: BOOL;
bReset: BOOL;
fPosition: REAL;
fVelocity: REAL := 500.0;
fAcceleration: REAL := 2000.0;
fDeceleration: REAL := 2000.0;
END_STRUCT;
// Axis 3 Control Parameters
stAxis3Ctrl:
STRUCT
bEnable: BOOL;
bHome: BOOL;
bMoveAbsolute: BOOL;
bMoveRelative: BOOL;
bJogForward: BOOL;
bJogBackward: BOOL;
bReset: BOOL;
fPosition: REAL;
fVelocity: REAL := 500.0;
fAcceleration: REAL := 2000.0;
fDeceleration: REAL := 2000.0;
END_STRUCT;
// System Status
bAllAxesEnabled: BOOL;
bAllAxesHomed: BOOL;
bAnyAxisError: BOOL;
sSystemStatus: STRING(100);
// Recipe Data
rDefaultVelocity: REAL := 500.0;
rDefaultAcceleration: REAL := 2000.0;
rDefaultDeceleration: REAL := 2000.0;
END_VAR
4.2 Axis Reference Binding Configuration
Method 1: Bind in Variable Properties
Right-click axAxis1 → “Properties”
Select “Address” in the field and choose Application.GVL.Axis_1
Repeat for axAxis2 and axAxis3
Method 2: Bind through Initialization Program
// Execute in the program initialization section
axAxis1 := AXIS_REF_Init(Axis:=Axis_1);
axAxis2 := AXIS_REF_Init(Axis:=Axis_2);
axAxis3 := AXIS_REF_Init(Axis:=Axis_3);
4.3 Main Program Implementation
Create the main program MAIN:
PROGRAM MAIN
VAR
// Initialization Flag
bInitialized: BOOL := FALSE;
// Command Auto Reset Timer
tCmdResetTimer: TON;
// System Monitoring
tStatusUpdateTimer: TON;
iSystemStatus: INT;
END_VAR
// System Initialization
IF NOT bInitialized THEN
// Initialize Motion Parameters
stAxis1Ctrl.fVelocity := rDefaultVelocity;
stAxis1Ctrl.fAcceleration := rDefaultAcceleration;
stAxis1Ctrl.fDeceleration := rDefaultDeceleration;
stAxis2Ctrl.fVelocity := rDefaultVelocity;
stAxis2Ctrl.fAcceleration := rDefaultAcceleration;
stAxis2Ctrl.fDeceleration := rDefaultDeceleration;
stAxis3Ctrl.fVelocity := rDefaultVelocity;
stAxis3Ctrl.fAcceleration := rDefaultAcceleration;
stAxis3Ctrl.fDeceleration := rDefaultDeceleration;
bInitialized := TRUE;
END_IF
// Emergency Stop Handling
IF bEmergencyStop THEN
bStopAllAxes := TRUE;
bSystemEnable := FALSE;
sSystemStatus := ‘Emergency Stop Activated’;
END_IF
// Call Axis 1 Control FB
fbAxis1(
axAxis:=axAxis1,
bEnable:=stAxis1Ctrl.bEnable AND bSystemEnable AND NOT bEmergencyStop,
bHome:=stAxis1Ctrl.bHome OR bHomeAllAxes,
bMoveAbsolute:=stAxis1Ctrl.bMoveAbsolute,
bMoveRelative:=stAxis1Ctrl.bMoveRelative,
bStop:=bStopAllAxes,
bJogForward:=stAxis1Ctrl.bJogForward,
bJogBackward:=stAxis1Ctrl.bJogBackward,
bReset:=stAxis1Ctrl.bReset,
fPosition:=stAxis1Ctrl.fPosition,
fVelocity:=stAxis1Ctrl.fVelocity,
fAcceleration:=stAxis1Ctrl.fAcceleration,
fDeceleration:=stAxis1Ctrl.fDeceleration);
// Call Axis 2 Control FB
fbAxis2(
axAxis:=axAxis2,
bEnable:=stAxis2Ctrl.bEnable AND bSystemEnable AND NOT bEmergencyStop,
bHome:=stAxis2Ctrl.bHome OR bHomeAllAxes,
bMoveAbsolute:=stAxis2Ctrl.bMoveAbsolute,
bMoveRelative:=stAxis2Ctrl.bMoveRelative,
bStop:=bStopAllAxes,
bJogForward:=stAxis2Ctrl.bJogForward,
bJogBackward:=stAxis2Ctrl.bJogBackward,
bReset:=stAxis2Ctrl.bReset,
fPosition:=stAxis2Ctrl.fPosition,
fVelocity:=stAxis2Ctrl.fVelocity,
fAcceleration:=stAxis2Ctrl.fAcceleration,
fDeceleration:=stAxis2Ctrl.fDeceleration);
// Call Axis 3 Control FB
fbAxis3(
axAxis:=axAxis3,
bEnable:=stAxis3Ctrl.bEnable AND bSystemEnable AND NOT bEmergencyStop,
bHome:=stAxis3Ctrl.bHome OR bHomeAllAxes,
bMoveAbsolute:=stAxis3Ctrl.bMoveAbsolute,
bMoveRelative:=stAxis3Ctrl.bMoveRelative,
bStop:=bStopAllAxes,
bJogForward:=stAxis3Ctrl.bJogForward,
bJogBackward:=stAxis3Ctrl.bJogBackward,
bReset:=stAxis3Ctrl.bReset,
fPosition:=stAxis3Ctrl.fPosition,
fVelocity:=stAxis3Ctrl.fVelocity,
fAcceleration:=stAxis3Ctrl.fAcceleration,
fDeceleration:=stAxis3Ctrl.fDeceleration);
// Auto Command Reset Logic
tCmdResetTimer(IN:=TRUE, PT:=T#100MS);
IF tCmdResetTimer.Q THEN
// Single Command Auto Reset
IF stAxis1Ctrl.bHome AND NOT fbAxis1.bHoming THEN
stAxis1Ctrl.bHome := FALSE;
END_IF;
IF stAxis1Ctrl.bMoveAbsolute AND NOT fbAxis1.bMoving THEN
stAxis1Ctrl.bMoveAbsolute := FALSE;
END_IF;
IF stAxis1Ctrl.bMoveRelative AND NOT fbAxis1.bMoving THEN
stAxis1Ctrl.bMoveRelative := FALSE;
END_IF;
// Similarly handle Axis 2 and Axis 3…
IF stAxis2Ctrl.bHome AND NOT fbAxis2.bHoming THEN
stAxis2Ctrl.bHome := FALSE;
END_IF;
IF stAxis3Ctrl.bHome AND NOT fbAxis3.bHoming THEN
stAxis3Ctrl.bHome := FALSE;
END_IF;
// Reset Global Commands
IF bHomeAllAxes AND NOT (fbAxis1.bHoming OR fbAxis2.bHoming OR fbAxis3.bHoming) THEN
bHomeAllAxes := FALSE;
END_IF;
IF bStopAllAxes AND NOT (fbAxis1.bMoving OR fbAxis2.bMoving OR fbAxis3.bMoving) THEN
bStopAllAxes := FALSE;
END_IF;
// System Status Monitoring
tStatusUpdateTimer(IN:=TRUE, PT:=T#500MS);
IF tStatusUpdateTimer.Q THEN
// Comprehensive Status Judgment
bAllAxesEnabled := fbAxis1.bEnabled AND fbAxis2.bEnabled AND fbAxis3.bEnabled;
bAllAxesHomed := fbAxis1.bHomed AND fbAxis2.bHomed AND fbAxis3.bHomed;
bAnyAxisError := fbAxis1.bError OR fbAxis2.bError OR fbAxis3.bError;
// System Status Information
IF bEmergencyStop THEN
sSystemStatus := ‘Emergency Stop State’;
ELSIF bAnyAxisError THEN
sSystemStatus := ‘Axis Error – Check Each Axis Status’;
ELSIF NOT bAllAxesEnabled THEN
sSystemStatus := ‘Axes Not Enabled’;
ELSIF NOT bAllAxesHomed THEN
sSystemStatus := ‘Axes Not Homed’;
ELSIF fbAxis1.bMoving OR fbAxis2.bMoving OR fbAxis3.bMoving THEN
sSystemStatus := ‘In Motion’;
ELSE
sSystemStatus := ‘Ready’;
END_IF;
END_IF;
5. Debugging and Testing Process
5.1 Pre-Compilation Check
Syntax Check: Click “Check Program”
Address Conflicts: Use “Resource Usage Table” to check
Library References: Ensure all motion control libraries are added
5.2 Staged Debugging
Stage 1: Communication Establishment Test
// Test Steps:
// 1. Download the program to the PLC
// 2. Check EtherCAT Master Status (should be green)
// 3. Check each Slave Status (SV630N_1,2,3 should be green)
// 4. If any are red/yellow, check:
// – Physical Connections
// – Device Description Files
// – Station Address Configuration
Stage 2: Single Axis Function Test
// Axis 1 Test Sequence:
// 1. Set bSystemEnable := TRUE
// 2. Observe if fbAxis1.bEnabled becomes TRUE
// 3. Confirm SV630N #1 shows “Enabled” status
// 4. Jog Test:
// – Set stAxis1Ctrl.bJogForward := TRUE
// – Observe if the motor rotates correctly
// – Test bJogBackward
// 5. Homing Test:
// – Set stAxis1Ctrl.bHome := TRUE
// – Monitor fbAxis1.bHoming and fbAxis1.bHomed
// 6. Positioning Test:
// – Set stAxis1Ctrl.fPosition := 100.0
// – Trigger stAxis1Ctrl.bMoveAbsolute := TRUE
Stage 3: Multi-Axis Coordination Test
// Coordinated Motion Test:
// 1. Enable all axes simultaneously: bSystemEnable := TRUE
// 2. Sequential Homing: Trigger each axis to home in order
// 3. Synchronous Motion Test:
// – Set target positions for each axis
// – Trigger positioning commands simultaneously
// – Observe synchronization performance
Stage 4: Exception Handling Test
// Safety Function Verification:
// 1. Emergency Stop Test: Trigger bEmergencyStop := TRUE
// 2. Limit Test: Manually trigger limit switch
// 3. Communication Interruption: Simulate loose EtherCAT cable
// 4. Error Recovery: Test reset function
5.3 Performance Optimization Adjustments
Servo Gain Adjustments
// Adjust online via SDO parameters:
// – Position Loop Gain
// – Velocity Loop Gain
// – Integral Time
// Observe following error fbAxis1.fFollowingError
Motion Curve Optimization
// Adjust motion parameters:
stAxis1Ctrl.fAcceleration := 3000.0; // Increase acceleration
stAxis1Ctrl.fDeceleration := 3000.0; // Increase deceleration
// Observe motion smoothness
6. Project Delivery and Documentation
6.1 Project Archiving Content
InoProShop Project File (.project)
Servo Parameter Backup File
Hardware Configuration
FB Function Block Documentation
Test Report
6.2 Operational Key Points
Startup Process: Power On → Enable → Homing → Normal Operation
Safe Operation: Emergency Stop, Limits, Error Handling
Maintenance Guide: Parameter Backup, Fault Diagnosis
By following the above process, establish a stable and maintainable EtherCAT 3-axis motion control system. The modular design of the FB makes system expansion and maintenance very simple.