In this second tutorial we will continue introducing some key concepts of VIGO6 and you will learn how to use your component and locate it in hardware.
The below illustration shows what you will build in this tutorial. The red dots indicate tutorial steps.
The tutorial alternates between information and "hands on" exercises using the information just presented and supported by "how-to"-live demonstrations. These demonstrations are identified by this icon:
Now - lets get started.
Step 1: Create an assembly.
First step is to create an assembly for the temperature regulator:
Select ‘Create new type’ on the main button menu and select ‘Assembly’.
Rename to XX_Temperature_regulator_simple_assembly
Right click to add an instance of your control component (XX_Temperature_regulator_simple).
Right click to add an instance of temperature input transmitter interface PD_2855 Temperature_input_4_to_20_mA. Rename to "Temperature input"
Right click to add an instance of the output interface PD_2823 Digital_1A_DC_output. Rename to "DC Output"
Now find the the control component instance and right click on the Temperature connector and connect it to the just added temperature input transmitter interface.
Connect Output in the same way to digital DC output. Note that the editor only allows establishing a connection to a component of the specified type.
Automation of a plant is specified in a project.
The project also must include a Main asssembly, containing the control components, interconnections and devices necessary to build and run the plant automation.
By separating languages, units, color themes and module serial numbers from the control logic an assembly can be reused without any customization or recoding in different locations/countries simply by creating different projects and adding an assembly instance to each project
Step 3: Creating a main assembly
- Create new type - Assembly - rename it to XX_Temperature_regulator_simple_main
- Add the assembly PD_15858 Download_assembly_for_tutorial. The assembly includes a COPP PC device (used as downloader of customware) and a PD 610 COPP device (used to establish ethernet connection)
- Add your assembly: XX_Temperature_regulator_simple_assembly
- Add a PD 850 device - connect it to the net. This is the device that will hold your components
- Add a PD 9824 and name it "COPP PC with display". Connect it to the net. This is the device that will run your visualisation.
Now that we have an assembly that contain our control code and our interfaces to the outside world (our input and output), we are ready to decide which modules (and hence also networks) we need to run our setup. This we define in a Main assembly.
In COPP, a piece of physical equipment is represented by the COPP type "device". A device contain a CPU and some memory of various categories and can include I/O‘s with electrical connections to the plant. It contains Firmware and has room for Customware with Guest components. The control system “intelligence” is distributed into several Devices.
Step 4: Locate the control components.
Now you need to locate your software components in suitable hardware. For this tutorial we will use a PD 850 Multifunction module that contain both analogue and digital I/O as well as a processor, so all your components can reside in it.
Click on the PD 850 device. Double click on the components in the "Not located elements" and they will move to the "Located elements".
Step 5: Setting up your test environment.
Now you need to set up your test environment. For this tutorial you need a PD 850, a PD610 and a PD COPP PC.
Connect one input (a 4-20mA slider) to terminals 10 and 30(GND)
Connect one output (green or red LED) to terminal 01 and 21(GND).
Step 6: Finalising your project, downloading your code and testing your regulator.
Save and build.
Make sure that the COPP PC is started and the power is on on the modules. Connect the test bed (PD 610) to the PC via an USB-Ethernet Adaptor (we recommend D-link-1312).
Press the "Start project downloader" button.
A system window opens and you press "config all modules". Wait for the program to finish. Check that there are no failed modules.
Now your code is loaded into the modules.
Now your display PC will show you the visualisation and you can change the input by moving the potentiometer, change the set point by keying in a value and see how the output indicator change from on to off, depending on the temperature and the set point.