Академический Документы
Профессиональный Документы
Культура Документы
f o r E a s y P L C v. 5
Table of Contents
1. Visual Control Editor
2. Visual Control Plugin
www.nirtec.com
The Visual Control Plugin allows you to use a simple webcam, as system of optic recognition.
You will be able to add to your logic programs a big quantity of resources, you will be able to take
photographs in certain moments, to recognize parts/elements in function of their color, or for
example, to activate a relay when the camera detects movement in the area or areas that previously
you have configured.
From left panel, select the video source you have available in your system (previously you have to
install your webcam drivers) and select the resolution you want to use in the bottom combo box.
Press Start Button to preview the webcam image.
Press Camera Properties to access to your webcam image properties.
Press Take Photo button to save the webcam image in your hard disk as a photograph.
Regions.
The Regions are used in V.C Plugin as an area to control. You can create as many regions you
need, each one can detect movement or kinds of parts in function their colour.
To create a region, press the Create Region Button in the Regions tab.
First select the region colour, this is to see the marked area over the image, second press the
mouse left button and drag a rectangle to fill the selected region area:
In the regions grid you can change the region position and size, the colour, density and the
Sensibility.
The Density is used for averaging the colour of all the pixels inside the region. The Sensibility is
used to activate the motion detection in function of the color change of the pixels averaged.
Press Show Regions or Hide Regions to show/hide the created regions.
If Show Work is checked, when motion is detected, the region where the motion has been detected
will be visible for a moment.
Parts.
The Parts are used in V.C Plugin to recognize elements. You can create as many parts as you
need.
First you need to create the regions to discriminate the parts, after create the Parts and configure
the regions.
Example:
Put a part to be detected, create the regions (two in this example), press the Create New Part
Button in the Parts tab, a new id is associated to this part and you can use the regions you need to
recognize this part. If you want to use region 1 and 2, with the camera seeing the part, make double
click in Part grid row for id 0, and Region 0 column:
Part 0 is detected!
Part 1 is detected!
10
Start EasyPLC Program and create a new program. On Project Explorer tree, make mouse right
click on Plugins node, and select Add Plugin, from the Select Plugin window, select the
VisualControlPLG.dll, click on the new VisualControlPLC node and you will be able to see all the
methods & functions provided by the plugin.
Here is shown an example for motion detection:
First is necessary to initialize the plugin, in the init procedure, the program created with the Visual
Control Editor must be passed, then for motion detection the call to the MotionDetection procedure
must be called.
11
Now in the main section the following program is written. Here are scanned two regions, when
movement is detected, a digital output is active during 1.5 seconds and a sound is played. If the
movement is detected in region 1, also a photograph is saved in the PC hard drive.
Use the Script Wizard tool to write the program (double click) and see the Plugin methods & functions.
12
13
Here are explained the methods & functions available in Visual Control Plugin:
15
www.nirtec.com
16