In this second tutorial, we will again present some of the key concepts of VIGO6. Further, you will learn how to use your component and locate it in hardware.

First, we will use the component we created in tutorial 1 and use an instance of the component in a control assembly. Next, the assembly gets located in the main assembly, that we add to a project. Last, we will run our program on a testbed.

The figure below shows what you will build in this tutorial. The red dots show the steps.

 

The tutorial switch between theory and hands-on exercises with "how-to" videos as a help. You can spot the videos by this icon:

Now, let’s get started.

Concepts

Throughout the tutorial, you need an understanding of the following concepts:

Assembly

Module

Project

You can find a description of each concept in the glossary. You can read it at once, or several times throughout the tutorial.

Step 1 - Create an assembly

1. The first step is to create an assembly for the temperature regulator:

    a. Select ‘Create new type’ on the main button menu and select Assembly.

    b. Rename to XX_Temperature_regulator_simple_assembly.

 

2. Add and setup the control component.

    a. Right-click to add an instance of your control component (XX_Temperature_regulator_simple) to your assembly.

Note that variables are no longer visible and that you can only see external methods. You can still see the instance constant, the registers and the connectors.
 
    b. Set the instance constant "Regulating_interval" to 2 seconds.

 

3.  Add Temperature input

    a. Right-click to add an instance of temperature input transmitter interface PD_2855 Temperature_input_4_to_20_mA.

    b. Rename to "Temperature_input".

 

4. Add DC Output

    a. Right-click to add an instance of the output interface PD_2823 Digital_1A_DC_output.

    b. Rename to "DC_Output".

 

5. Connect the components

    a. Now, find the control component instance and right-click on the Temperature connector and connect it to the just added temperature input transmitter interface.

    b. Connect Output in the same way to DC_output.

Note that the editor only lets you make a connection to a component of the type you have specified.

Step 2 - Create a main assembly

Now, we have an assembly with our control code. Further, it has interfaces to the outside world – the input and output. As a result, we are ready to decide which modules and networks we need to run our setup.

This we define in the main assembly.

1. Create new typeAssembly rename it to XX_Temperature_regulator_simple_main

2. First, add the assembly PD_15858  Download_assembly_for_tutorial to your main assembly. The assembly has a COPP-PC device that you can use as a downloader of customware. Further, it has a PD 610 COPPdevice that you can use to establish an Ethernet connection.

3. Next, add your assembly:  XX_Temperature_regulator_simple_assembly.

4. Add the device PD850, with GUID PD_2322 – PD850_MF_IO.

For this tutorial, we will use a PD 850 Multifunction module. It has analog and digital I/O as well as a processor. In effect, you can locate all your components in it.

5. Connect PD850 to the Light-Link net.

    a. Press the plus sign next to the PD850.

    b. Press the plus sign next to "NET TERMINALS".

    c. Right-click on Light-Link.

    d. Press connect and choose Light-Link.

6. Add a PD_955_PC_w_display and name it "COPP PC with display". This is the device that will run your view.

 

7. Connect the COPP PC with display to the IP/Ethernet net.

 

    a. Press the plus sign next to the COPP-PC to fold it out.

    b. Fold out "NET TERMINALS".

    c. Right-click on "LAN".

    e. Press "Connect" and choose "Ethernet".

Step 3 - Locate the control components

Now you need to locate your software components.

1. Click on the PD 850 device. Double-click on the components in the "Not located elements" in the properties area to the right, and they will move to the "Located elements".

Step 4: Setting up your test environment

1. You need a 24V power supply, PD 850 with the base module BM104, a PD610 with the base module BM020, and a V6_COPP_DEVICE.exe.

2. Connect the base modules with the COPP modules.

3. Connect power from the PSU to BM020.

4. Add a power rail from BM020 to BM104.

2. Connect one input, in the form of a 4-20mA slider, to terminals 10 and 30 GND.

3. Connect one output, it can be a green or red LED, to terminals 01 and 21 GND.

4. Install your COPP_PC.

    a. Copy it from the USB-device to your hard disk.

    b. Make note of where you install it. You will need to find it again to start the device.

Serial numbers, modules, and devices

We call the physical hardware module, as PD610 for a module. The
representation in VIGO6 is a device. The serial numbers on the modules
are eight digits numbers, and you can find them on the modules next to a
barcode. In the picture to the left, it is inside the yellow box.

For a COPP PC, the serial number is the name of the folder with your COPP PC.

You can insert serial numbers from the project view. First, you find and click on the device. Next, you find the serial number input text field in the properties area to the right in VIGO6. Last, you insert your serial number. You update the serial number for the device when you save and build your project.

The serial number for the custom COPP device, you get with your VIGO6 license is 20327971.

Step 5 - Create a project

1. Select "create new type" and project.

2. Rename the project to: XX_Temperature_regulator_simple_project.

Step 6: Setup your project

1. In your project add your main assembly "XX_Temperature_regulator_simple_main".

 

2.

    a. Find the "Project Downloader device" in the "Download_assembly_for_tutorial" assembly.

    b. Right-click and set it as a downloader.

 

3. Right-click on your main assembly and press "open type". This changes your perspective to the main assembly.

3. Now that you are in the main assembly, add your view "Window_for_XX-temperature_regulator_simple" as a guest view on the device "COPP PC with display".

    a. Fold out the device, embedded components, and display screen.

    b. Right-click on "guest view" and "Select root view for display"

    c. Fold out your assembly "XX_temperature_regulator_simple", and find your view under visualization and draft types.

 

4. Set the serial numbers for your devices – PD 850, PD 610, COPP-PC, and project downloader device. The serial number for the project downloader device is 20327971.

5. Save and build

6. Start the COPP-PC.

    a. Find the location of your COPP-PC

    b. Open "V6_COPP_DEVICE.exe".

7. Power on the modules.

8. Connect PD 610 to the PC via an USB-Ethernet Adaptor. We suggest D-link-1312.

Step 7: Download your code and test your regulator

1. Press the "Start project downloader" button.

A system window opens

2. Press "config all modules".

    a. Wait for the program to finish.
    b. Check that there are no failed modules.

Now your code is loaded into the modules.
Your display PC will show you the view, and you can change the input by moving the potentiometer.

3. Change the setpoint by keying in a value.

4. See how the output indicator change from on to off, depending on the temperature and the setpoint.

Now let us move to the next tutorial where you learn how to log data.