TwinCAT 3 project with NC axis

The example describes how to generate a project with a TwinCAT NC axis.

The drives are controlled via the “Online” function of the NC axis.

 

Start TwinCAT XAE (VS 2013)

 

Create a new project

 

 

Select the target system:

 

Add the EtherCAT Master functionality to the ‘Device’ icon

 

 

Activate existing network adapter

 

Driver installed

Activate the adapter

 

Driver not installed

Siehe Adapter settings.

 

Scanning a network

Scanning is only possible with an activated network adapter.

 

Scanning is only possible in TwinCAT ‘Config Mode’.

 

 

TwinCAT/AMK cycle time

The following cycle times must be set to identical values.

TwinCAT

 

AMK

NC Task 1 SAF

=

ID1 'NC cycle time'

ID2 'SERCOS cycle time'

 

When the TwinCAT function ‘Activate Configuration’ is executed, the value from the NC task 1 SAF is automatically transferred to the AMK drive.

 

The cycle times become active with the next initialization in the AMK drive.

(System reset command, or 24 VDC OFF/ON)

 

For differing values, TwinCAT generates the status code ‘0x0037 - invalid SYNC1 cycle time’ and AMK the diagnostic message 2572, Info 27

 

 

 

Creating configuration and log-in

 

 

 

Function test ‘General’

In TwinCAT 'Run Mode' the Slave devices are automatically switched to the Bus State OP (Operational) (3). For faultless operation, the EtherCAT Master must be in OP state (4).

 

Function test ‘Drive’

Display of bus status (3) and current values of linked variables.