Create a TwinCAT Project from Existing Project

Auteur avatarGareth Green | Dernière modification 21/11/2019 par Gareth Green en cours de rédaction

Introduction

If you are confident and proficient in using the Visual Studio editor to create TwinCAT projects, you can shortcut a lot of the data inputting by copying and modifying an existing project. This will keep the naming conventions and links exactly the same

...This should only be attempted if the machine has exactly the same EtherCAT box, drive and module setup

Étape 1 - Choose a Similar Build and copy the Project

The build needs to be the same machine type and have an identical EtherCAT box and drive setup

You can create a backup in three ways

  1. Create an archive of an open project (you need to run Visual Studio on the desktop of the machine in question)
  2. Copy the contents of the c:\TwinCAT\Stuga\[BuildNo] folder from the "donor" to your new machine setup
  3. Use VPN to connect to the back end of the machine and upload the project from the target, then save it locally. this needs a good internet connection and Teamviewer remote VPN installed on the remote Beckhoff PC

Étape 2 - Paste the solution

Paste the solution on the ZX5 front end PC in C:/TwinCAT/Stuga.

Étape 3 - Open and rename

Open Solution and...

1: rename the solution to the current build (i.e. Z067).

2: rename the project to the current build.   



Étape 4 - Update MAC address

...Because you are working on a new PC, the physical hardware has changed. You need tell the project that the hardware is different

The hardware can use 1 or 2 devices. For the EtherCAT network port device:

  1. Double click
  2. Device MAC Addresses, Device 4 > Adapter > select OS (NDIS) > Search > EtherCAT. This should automatically update the mac address.


For the NDIS (PCI) Device

Device 1 > Adapter > PIC > Search > BUS.


Étape 5 - Update EtherCAT devices

Update EtherCAT devices. This compares the solution’s EtherCAT boxes to the ones on the current build. Any differences between the current solution and the current build will be highlighted and explained by the system. Issues highlighted in RED are completely different to what the solution would expect. Issues highlighted in BLUE are ok, this suggests that a new version of hardware is being used but is compatible with the solution.

To do this right click on the target device and press “Scan”.

NOTE: If this does not work, repeat steps, save changes and online reset (Right click device x).

Étape 6 - TwinSAFE System

AmsNetID the same on SYSTEM > Routes > “Target net ID”, must be the same as: SAFETY > ZX5_2_1 > ZX5_2_1 Project > Target System (Figure 1).



Étape 7 - Check safety options

To get the safety toolbar go to: View > Toolbars > Check TwinCAT Safety. This will show the safety options.

Étape 8 - Check safety

Go to: SAFETY > ZX5_2_1 > ZX5_2_1 Project > Target System. Press the refresh button to update the AmsNetID as it will currently have the ID if the machine that the software was copied from.  

Étape 9 - Copy serial number

Copy the serial number (Figure 2) for use in next step


Étape 10 - Verify Safety Project

  1. Verify Complete Safety Project
  2. Then Verify Complete Safety Project (Hardware Level)



Étape 11 - Download Safety Project

TwinSAFE Wizard:

  1. When prompted input, username: Administrator,
  2. Serial Number: (Copied from step above),
  3. Password: TwinSAFE.
  4. Then confirm.



Étape 12 - View Safety Project

Go to SAFETY > ZX5_2_1 > ZX5_2_1 Project > TwinSafeGroup1 > TwinSafeGroup1.sal, and press the Safety Goggles Icon (Figure 3). This should show the Estop circuit in green if working correctly.



Commentaires

Draft