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.
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.
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
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 type – Assembly – 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 COPP–device that you can use to establish an Ethernet connection.
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.
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
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.
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.
Step 6: Setup your project
b. Right-click and set it as a downloader.
a. Fold out the device, embedded components, and display screen.
5. Save and build.
6. Start the COPP-PC.
a. Find the location of your COPP-PC
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.