How to configure third party IO and servos as EtherCAT slaves on the iCube controller
|
Version Number
|
Description
|
|---|---|
|
1.0
|
Initial version, Explains how to setup third party
EtherCAT
slaves
|
|
|
|
1. Hardware and Software Components
|
Component Name
|
Version
|
|---|---|
|
iC9xxxM-EC series
|
2023.3
|
|
iCube Engineer
|
2023.3
|
2. Solution details
2.1 Import ESI Files
- Navigate to File->Import->Import ESI File(s)..
-
In order for the controller to recognize the third party slaves, the ESI files that point to configurable devices needs to be added to the Network on the components side.
-
On the local PC select the .XML files for each of the third party devices
-
Press Ok to all messages
-
Verify that the ESI files were imported
-
Components->Network->Local->Devices->ESIImport()
-
2.2 Configure Plant
- Configure the Plant IP address to connect to the controller
-
Perform an EtherCAT Bus Scan
- The third party devices should show up in the EthetCAT bus scan
- Because the ESI file also contains additional setup instructions the third party devices should not need any more configuration in order to communicate with the PLC
-
Configuring Third Party Servo Motors
- Once the motor is added to the PLC go to servomotor tab -> Data List
- Add variables to each one of the variables on the Data List
- Check the CoE data tab to make sure the Data List variables are the right data types
- To power on and jog the third party device write and download the project
- Add the control word variable to the watch window
- Reference third party documentation and update the value of the control word to "power on" and "jog" the third party servo.
-
Configuring and running third party IO
- Once the third party IO is added to the Plant go to Plant ->EtherCat->Select the device->Module List
- Add the correct IO modules to the device
- Go to the Data list tab
- Add PLC variables to the data list to control the IO
- Download and run the program
- After all that the IO will be controlled through those PLC variables with the associated Data items
-
Additional Information about Configuring Third Party Devices
- Select the Init Commands tab
- Select the third party device in the plant and go to its Init Commands Tab
- These Init Commands are what the controller sends to the Slave in order take the EtherCAT slave from a Pre-Op state to a Safe-Op state
- Adding Init Commands (Optional)
- Press the button that says "Add New Init command".
- Select the Index address from the CoE Data List.
- This provides descriptions of the register but these comments are provided by the imported ESI file. Cross reference with third party documentation to ensure the index is correct for the desired purposes and more explanation on what the Index controls.
- Select in what state transition the controller will send command.
- Press "apply" to add the new Init Command to the Init Command list.
- Select the PDO Data tab.
- Select what PDO mapping will be used in the Data List
- This PDO mapping is provided by the ESI file and determines what data items are selected and can be tied to PLC variables and manipulated
- Since this default PDO mapping is determined by the ESI file this should be the same on TwinCat and be verified by runing the third party device on TwinCat
- These mappings can be edited with iCube Engineer directly in the PDO tab, see How to edit PDO objects . however, third party EtherCAT documentation should be considered before editing the PDOs.
-
Online Functions
- Rebuild and write and start the project to the controller
- Live Update of CoE data
- Go to Plant->EtherCAT->Online Functions->(Any of the third party devices)->CoE Data
- This CoE data tab is live updating to the slave and can read and write commands to the device
- Data can be refreshed and this is a live reading of the CoE data.
- The SDO Read and Writefunction blocks can also be used to update CoE data of the slave device
- Y_EC_COE_SdoWrite and Y_EC_COE_SdoRead can be used to do the same thing as the Online fucntion CoE data as well. Refer to the attached documentation in order to use this function blocks