Printed in the Federal Republic of Germany TR-Electronic GmbH 2016, All Rights Reserved
09/29/2020 TR-EMO-BA-GB-0022 v03 Page 121 of 153
10.3 Creation of a TwinCAT project for an encoTRive device
Start the PC with TwinCAT.
Open the TwinCAT PLC control.
Create a new PLC project from scratch.
Open the library manager and add the EtherCAT library to the project.
(you will need it later).
Open the PLC source window. Set in the empty code window of the main task
a single semicolon ';'. Now you can already compile the project. Save it.
Open the TwinCAT System Manager. The currently installed ESI files are
imported automatically from the TwinCAT directory IO.
Set it to the expert mode.
Start TwinCAT in the configuration mode.
Create a new TwinCAT project from scratch.
Assign the saved PLC project to this project.
Attach an EtherCAT master to the bus.
In the master settings select a compatible LAN adapter, install it and select it.
Scan for boxes -> "EncoTRive RELC" should appear.
Go to the tab "CoE". Now it should upload and display the whole CoE
directory. The progress is indicated by a progress bar.
Check the boxes for PDO assign and download in its tab "Process data".
Change its PDOs as you need them, by inserting or deleting objects, or accept
the default.
Export all variables in the PDOs to the mapping.
Create the mapping.
Go to the PLC folder and export the mapping to the assigned PLC project.
Go to the PLC folder, open the tab "Boot" and check all boxes.
Start TwinCAT in the Run mode.
Go to the PLC control. In global variables of the resources now the exported
variables should appear.
Recompile the project, go online and start it. Create it also as boot-project that
TwinCAT loads as default.
Go back to the System Manager. If it wants to reload the changed PLC
project, say yes.
Start TwinCAT again in the Run mode. Now the EncoTRive should go to
operational: The green state LED should be constantly on.