Ligne 99 :
Ligne 99 :
{{Tuto Step
{{Tuto Step
|Step_Title=<translate>Name all EtherCAT devices according to network</translate>
|Step_Title=<translate>Name all EtherCAT devices according to network</translate>
− |Step_Content=<translate>Click twice on each device (not double click) to enable the device to be renamed
+ |Step_Content=<translate>{{Warning|...Do not start this step until the EtherCAT network is fully verified. You will waste a lot of time if you ignore this!}}
+
+
+ Click twice on each device (not double click) to enable the device to be renamed
rename to [https://stuga.dokit.app/wiki/Naming_Conventions_for_Electrical_Components convention]</translate>
rename to [https://stuga.dokit.app/wiki/Naming_Conventions_for_Electrical_Components convention]</translate>
Version du 20 novembre 2019 à 15:48
How to create a new TwinCAT3 Project from scratch
Auteur Gareth Green | Dernière modification 12/09/2023 par Gareth Green en cours de rédaction ⧼frevu-button-review-label⧽
Difficulté
Hard Difficile
How to create a new TwinCAT3 Project from scratch
TwinCAT3, Project, New
Étape 1 - Start a new project
Open Visual Studio
Click on New project
Choose TwinCAT projects->TwinCAT XAE Project (xml format)
Name is build number (no Suffix)
Location is c:\TwinCAT\Stuga\
Untick "Create Directory for solution"
This creates the template
Étape 2 - Add PLC Project for Reset
On PLC, right click and Add Existing Item
Navigate to g:\Design\TwinCAT3\PLC_Reset_1_1
Select the .Plcproj file
Copy Project to solution file
Étape 3 - Add PLC Project for tcMulti
Add Existing Item
Navigate to g:\Design\TwinCAT3\tcMulti_6_24
Select the .Plcproj file
Copy Project to solution file
Navigate to tcMulti_6_24 project->POUs->MAIN
Scroll down to the machine types. The "comment State" can be toggled on and off by right clicking next to the step number on the left
Your goal is to ensure the correct machine is highlighted and the incorrect ones are commented out (in green)
Click Save All
...Check the date next to the machine types - you will want the latest one
Étape 5 - Add TwinSAFE project
...From Z071 there is no twinSAFE project as the Estop circuit is hard wired
Étape 6 - Add the route to the PLC
From Dropdown box select the Build number (If it does not exist we will need to add a new route)
If there is a request for a platform change, click Yes
On success, the Route dropdown will not read Error
Étape 7 - Scan for Devices
Expand IO
Right click on devices, Scan
Click OK on the Hint:
Untick RT-Ethernet
Untick COM-Port
Just have the EtherCAT ports
Scan for boxes - Yes
If there is a request for New Device Type, Click Apply to All, Click Yes
Étape 8 - Check EtherCAT validity
Check the Devices and boxes match the expected EtherCAT setup
...Check the green lights on the etherCAT boxes for connection status. Flickering Green means it is OK
Repeat steps 7 and 8 until the physical network matches the scanned network
You may need to Right Click->scan Boxes on the second device if the EtherCAT boxes do not appear
...If the boxes do not appear in the right order, there could be an EtherCAT In /Out crossover
Étape 9 - Name all EtherCAT devices according to network
...Do not start this step until the EtherCAT network is fully verified. You will waste a lot of time if you ignore this!
Click twice on each device (not double click) to enable the device to be renamed
rename to convention
Étape 10 - Add Drive Configurator
...This step needs to be done for the AX8000 drives only
Étape 11 - Double check all IO references with someone else
Any mistakes made will save hours if spotted here
Étape 12 - Activate configuration
Étape 13 - Add Axis Task
Axis task may need to be added under the MOTION tree:
Add New Item
NC/PTP Configuration
Leave the Name as default
Étape 14 - Add Axes
If the axes do not exist under MOTION->NC Task->Axes, add them
Right Click Add axis
Name to convention nn Axis
Repeat for each axis on machine
Étape 15 - Map Axes
Double click an axis
Settings tab
Click Link To IO
Connect to associated Drive
Repeat for each axis
...Make sure you select the correct channel number / letter is it is a dual drive
Étape 16 - Add Drive Configurator
...This step needs to be done for the AX8000 drives only
Étape 17 - Map all IO
Using the circuit diagrams, link all the IO refs up to the inputs and outputs
Double click on the slices and Field Bus boxes in turn
Ensure you can see the Input / output channels (may need some resizing
Double click on the relevant IO channel
Type the number in the box
For Inputs, use ibInputArray and match the number. outputs use qbOutputArray
Repeat for all IO
...Make sure you are using ibInputArray and qbOutputArray and not any others
...Once you have used a reference, it disappears. if you have done this wrong, you can right click->clear the link
Étape 18 - Double check all IO references with someone else
Any mistakes made will save hours if spotted here
Étape 19 - Activate configuration
Étape 20 - Add Axis Task
Axis task may need to be added under the MOTION tree:
Add New Item
NC/PTP Configuration
Leave the Name as default
Étape 21 - Add Axes
If the axes do not exist under MOTION->NC Task->Axes, add them
Right Click Add axis
Name to convention nn Axis
Repeat for each axis on machine
Étape 22 - Map Axes
Double click an axis
Settings tab
Click Link To IO
Connect to associated Drive
Repeat for each axis
...Make sure you select the correct channel number / letter is it is a dual drive
en
none
0
Draft
Vous avez entré un nom de page invalide, avec un ou plusieurs caractères suivants :
< > @ ~ : * € £ ` + = / \ | [ ] { } ; ? #
Pas encore enregistré ? Créez un compte pour profiter de toutes les fonctionnalités du service !
Copiez-collez le code ci-dessous à intégrer sur votre page