59
1 Getting Started Exercise Part 1

1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

Embed Size (px)

Citation preview

Page 1: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

1

Getting Started Exercise

Part 1

Page 2: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

2

Profiles related to the exercise

• When starting use archive profile:GettingStarted_Start.zip

• The fully completed archive profile:GettingStarted_Part1Final.zip

Page 3: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

3

Configuring a Vision systemStep by Step

1. Create a new Scorpion Profile2. Configure camera/image input(s)3. Define a reference system (scaling/calibration of

the image)4. Configure Image processing tools5. Establish logical classification of results6. Configure the User Interface7. Configure communication to external systems

Page 4: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

4

ObjectivesConfigure an Object Presence control system

and learning the following:

• Restore an archived profile, saving and backup of profile• Using files as an image source• Basic operation of the Toolbox

– Scaling of images– Configuring a Blob tool– Visualisation of tools on the image– Establish classification criteria (OK/NoObject) using Logic tools

• Configure Logic states (OK/NoObject) for user interface and communication to other systems

• Using the History list and the standard statistics• Use RS232 for communication to other systems

Page 5: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

5

Create a profile from an archive file

1. Open Scorpion and click on restore

2. Select Getting Started_Start.zip

3. The ”Getting Started” profile is installed

Page 6: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

6

Create a new Profile - 1

1. Select ”New”

2. Give it a name”XYGettingStarted” where XY is your initials

• This profile is almost empty and is ideal if you want to start from scratch

Page 7: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

7

Create a new profile - 2

• You can copy the content of an existing profile to automatically add functionality to the new profile

1. Mark the profile called ”GettingStarted” and select copy

2. Select copy to the new profile”XXGettingStarted”

Page 8: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

8

Starting point

• Operation mode: (No password)– For operators– Can start and stop the inspection– Read history list, curves and

statistics– No access to any configuration

• Settings mode: (Password: 1234)– For operators certified to adjust

certain parameters, alarm limits and logic states

• Service mode: (Password: 911)– Full access to all functions

• Enter Service mode by pressing the service button and enter the password

Page 9: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

9

File as an image source

1. Simulation ON

2. Click on Snapshot

3. Check the image catalogueif no image on screen\Scorpion_200\GettingStarted\Images

1

2

3

Page 10: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

10

Show Info on the image

• With the cursor on the image right click the mouse and select ”Show info” from the menu

• X and Y number are pixel position, origo (X=0 and Y=0) is in the upper left corner

• Pixel value is the greyscale value (0 = Black, 256 = White)

Page 11: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

11

Zoom the image

• Press the left button on the mouse and mark the zoom area

• Release the button and the image is zoomed in

• Click on the image to zoom out

Page 12: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

12

Operating the Tool Box

1. Go to the Toolbox and click on New

2. Give the Tool a NameFor easy understanding of the task for this specific tool – use names

3. Select a Tool

4. Use help to get information about the tool

1

2

3

4

Page 13: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

13

Create a tool - Scaling

1. Name the tool - Scaling

2. Select the tool ”ScaleReference”Use help if you want information about the tool

3. Click OK

Page 14: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

14

Using a Tool - 1

• GENERALShow the name and type of tool. Comments can be entered in the description field

• SETUPFor entering parameters controlling the tool

Page 15: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

15

Using a Tool - 2

• VISUALISATIONFor adding graphics on the image, visualising the operation of the toolAll or this tool only visualisation, can be selected

• RESULTDisplaying all the results from the operation of the tool

Page 16: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

16

Image used for scaling

• In the catalogue Scaling there is an image with millimetre indicators

• Go to ”Camera” and select the correct directory “Scaling” under Image Setting

Page 17: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

17

Scaling image on the screen

Page 18: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

18

Manual measurement on the image

• When the mouse is positioned over the image right click to get the menu

• Select ”Show info” and then ”Measure”

• Measurements can now be done from the pixel origo point (0 ,0)

Page 19: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

19

Measure distance in pixels

• The distance is measured in pixels

• To set a new origo position the mouse directly on the new origo (use zoom if necessary)

• Then right click to get the menu and select ”Set origo”

• TASK: Measure how many pixels there are in 50 millimetres

Page 20: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

20

Configuration of ScaleReference

• If the number of pixels are 480, then we can calculate the parameter to be entered for X and Y

• 480 pixels/50 mm= 9.6

• Look at the result from the tool – it is the pixel resolution of the image(1 pixel = 0.10 mm)

Page 21: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

21

Visualisation and scaling

Page 22: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

22

Saving and storing

• Saving configuration– Pressing Profile button

– Each time you press the Start button

– Each time you close the application

• Archiving a profile– Select ”Maintenance”

– Press ”Backup” button and follow instructions

Page 23: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

23

Changing back to image catalogue

• Select ”Camera” and set the image catalogue back to ”Images”

• Press ”Snapshot” to verify that you get the correct images

Page 24: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

24

Start and Stop of Inspections

• Automatic inspection• Pressing ”Start” button set

Scorpion in Running mode

• For every new image an inspection is automatically executed

• The image can either be triggered from an external system or from an internal scheduler

• Pressing the ”Stop” button stop the process

• Manual inspection– Pressing ”Snapshot” button grab a

new picture

– Pressing ”Inspection” button execute the inspection

– Pressing ”Snapshot” button again will grab another new picture.

Page 25: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

25

Scheduler

• For setting up tasks running at scheduled intervals

• The task ”Trigger” is configured to grab an image every 1000 ms

• When ”Start” button is pressed a new image is grabbed every 1000 ms

• By pressing edit you can adjust the time interval

Page 26: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

26

Using a Blob to locate the object

• Add a new tool in the toolbox:

– Name= FindObject

– Tool = BlobTool

Page 27: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

27

Using Reference in a tool

• Select Scaling as parameter in the Reference box and click on ”Apply”

• Show info on the image

• mm coordinates are now used in this tool

Page 28: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

28

ROI – Region of Interest

• Each tool can must be configure to search in a specific area on the image (Range of Interest – ROI)

• Move the mouse to the centre of the image and read the X and Y coordinates.

• Enter the co-ordinates and specify the delta X and delta Y values

• The ROI visualisation is shown on the picture

Page 29: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

29

Understanding the Blob tool

• A blob search for areas in the specified ROI with greyscale values within a given range

• Place the mouse on the object and read the greyscale value

• If the maximum Threshold is set to higher value and the minimum to a lower, the Blob tool will find the object

Page 30: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

30

Apply your configuration

• To apply a new parameter set by you, the button apply must be pushed

• You can also set minimum an/or maximum requirements to the blob area to be located

Page 31: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

31

Blob visualisation

• Through the visualisation you can see how the tool works on the image

• Activate only CenterofGravity, MaxContour and ROI

• Remember to push ”Apply” before you see the result!

Page 32: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

32

Blob result

• Check the result of the blob tool. Here you can find the number of blobs, individual blob areas and ”Holes”

Page 33: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

33

Holes in a Blob

• A Hole is an area inside a blob with greyscale values outside the max and min values set in the blob tool

Page 34: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

34

Application of using holes

• Counting the dice

Page 35: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

35

Avoiding false alarms

• In a real control system situations may occur where the system will not recognise an object or cannot do the configured measurement.

• Consequently, a vision control system should be prepared and configured for such situations in order to operate properly

• In our example we know that it may occur that no object is present

• Therefore we want to establish a logical classification of Object Present

Page 36: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

36

ObjectPresent – logical classification

• To establish a logical classification we use the Logic Tool

• Push ”New” and name it ”ObjectPresent” and select ”LogicTool”

Page 37: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

37

Configuring a Logic Tool

• We can use the size of the blob area as the classification parameter

• Push Edit and select the ”FindObject” tool and select the blob(0) area

• Click OK and Apply, you will now see the value of the actual blob area

• Click Edit again and set the minimum area to i.e. 100

Page 38: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

38

Checking the ObjectPresent tool

• Select the result panel and go through all images and check that the result is correct

• Object present should give Value = 1

• Object absent should give Value = 0

Page 39: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

39

Configuring the User Interface

• In Settings mode we can define the Logical States the system shall communicate to the user and to the process control system

• The valid logical state after an inspection is displayed in the Result Panel

Page 40: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

40

OK condition - Object Present

• Double click on the existing OK state

• Now you can enter a new name, description and select the colour for display in the result panel

Page 41: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

41

Defining the OK (Present) condition

• Click on ”Constrains” and ”New”

• The box shows a list of all available logical classifications in the Toolbox

• Select ”ObjectPresent”• The OK condition is now

true when the logical classification ”ObjectPresent” is true (=1)

Page 42: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

42

Testing the OK condition

• Run through all pictures and check the result of the condition (true or false) and the display on the result panel

• When no object occur the result panel display ”Undefined Condition” since no condition for NoObject is yet defined

Page 43: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

43

Adding a NoObject Condition

• Click on ”New” for adding a new condition

• Name it ”NoObject”• Select Red as

background colour (when this condition is true the result panel will be red)

Page 44: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

44

Configuring the NoObject condition

• To define the NoObject condition we can use ObjectPresent Logical classification

• Click on ”New” and select ”ObjectPresent”

• To make the NoObject condition true when the logical classification ObjectPresent is false, we invert the statement by pushing the invert button

Page 45: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

45

Testing NoObject State

• Run through the pictures and check:– the result of the both

conditions (true or false)

– The colour and text in the result panel

Page 46: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

46

History list

• In the Operation Mode you will find the History list

• The history list contain the picture an all result from the inspection

• You can configure the list by right clicking the mouse

Page 47: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

47

Statistics

• In Statistics you find the result of current period and previous period.

• The statistics use the logical conditions

• By right clicking the mouse the statistics can be configured

Page 48: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

48

Scorpion Events

• All processing in Scorpion are managed through ”Events”

• For each Event one or more commands will be executed

• New Events and Commands can be configured by the user

• A more detailed description of Events are found in part 2

Page 49: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

49

Sending Status data to a PLS

• We want to send status data (object present or absent) using the RS232 interface

• We will link the timing of sending the data to the event ”Inspection”

• Initially the event inspection activate the command ”Inspect”.

• After that we want the system to send status data

Page 50: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

50

Adding a RS232 command

• In command sequence for Inspection click on ”New”

• Select ”RS232Cmd”

• Name the command ”SendStatus”

Page 51: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

51

The command protocol• Syntax

”Text” %dparameter– Text = user defined text– %d = format instruction for

the result value (1 digit)– Parameter = The parameter

description of the result from any of the tools in the toolbox

• To find the parameter description of the result push the ”Parameters” button on the top toolbar

• Select ObjectPresent and Value and click on the copy button

Page 52: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

52

Writing the command protocol

• Open the SendStatus command

• In the Parameter field write the following– Status=%d

• Place the cursor after the d and paste (right click the mouse)

• Status=%dObjectPresent.Value

Page 53: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

53

Testing the communication

• Mark the SendStatus command

• Push the Execute button – Now the command is run once

• In ”Communication” select RS232 - here the out messages are logged

• Check that the correct status value is sent

Page 54: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

54

Testing the Scorpion Profile

• Activate automatic inspection (push Start) and check that the status value sent over RS232 is correct for each inspection

Page 55: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

55

Exercise Summary

• Restore an archive profile, saving and backup of profile• How to use files as an image source• Basic operation of the Toolbox• Scaling of images• Configuring a Blob tool• Visualisation of tools on the image• Establish test criteria (OK/NoObject) using Logic tools• Configure Logic states (OK/NoObject) for user interface and

communication to other systems• Using the History list and standard statistics• Use RS232 for communication to other systems

Page 56: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

56

Related Tools

• Try to investigate the following advanced tools– Blob 2– MultiBlob

Page 57: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

57

Exercise Summary

• Restore a archived profile, saving and backup of profile• How to use files as an image source• Basic operation of the Tooolbox• Scaling of images• Configuring a Blob tool• Visaulisation of tools on the image• Establish test criteria (OK/NoObject) using Logic tools• Configure Logic states (OK/NoObject) for user interface

and communication to other systems• Use RS232 for communication to other systems

Page 58: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

58

End of Part 1

Congratulations!You have made your first

Vision system usingScorpion Vision Software

Please continou with Part 2

Page 59: 1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed

59