Reference Manual
Chapter
2
IVC-2D
©
SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved
21
Setting Parameter Values
27.
In the table, right-click the value in the
Value on Device
column, and choose
Copy
Device Value to DB
to synchronize the value on the PC with the value in the device.
28.
Select the “Find left edge” step again, and double-click in the
Table
column for the
parameter
02=Column
.
29.
Fill in the number of the table row in which you pasted the value of the x coordinate.
30.
In a similar way, copy the value of the parameter
02=Column
in the “Find right edge”
step to the table, and replace the value in the program step with a reference to the
table row.
Now we are ready to add a step that calculates the angle of the top edge of the label.
The tool we are going to add takes the x and y coordinates of two points as parameters.
We just stored the x coordinates in the table, and the y coordinates are the results (output
parameters) of the two Find Column Edge steps in the program.
31.
Add a
Distance and angle
tool (from the
Measure
toolbar) to the program.
32.
Set the parameters
01=Start point X
and
03=End point X
to refer to the table rows
where you stored the x coordinates of the left and the right point on the label edge.
33.
Double-click the
Step
column of the parameter
02=Start point Y
.
A
Previous result
dialog box is displayed, in which you can select which result from
which program step number to use as parameter value.
34.
Choose the step number of the first
Find column edge
step and then the first result
from that step (there is only one result to choose from), and click
OK
.
The numbers of the step and the result are entered in the
Step
and
Result
columns of
the
02=Start point Y
parameter and the current value is displayed in the
Value
column.
35.
In a similar way, set the parameter
04=End point Y
to the result of the second Find
Column Edge step.
2.4.3
Using Conditions and Jumps
The angle of the label should now be tested to see whether or not it falls within the valid
range of angles, and accept or reject the bottle according to the result. This is done by
adding the following steps: