slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Robot Vision PowerPoint Presentation
Download Presentation
Robot Vision

Loading in 2 Seconds...

play fullscreen
1 / 111

Robot Vision - PowerPoint PPT Presentation


  • 119 Views
  • Uploaded on

Robot Vision. Exercise. The task. Robot co-ordinate system. To locate the picking point of the object = Centre of Gravity of the object To measure the rotation of the object = the angle between Y axes and the line going from centre point of mid hole and to centre point outer hole

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Robot Vision' - mary-figueroa


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
robot vision

Robot Vision

Exercise

the task
The task

Robot co-ordinate system

  • To locate the picking point of the object = Centre of Gravity of the object
  • To measure the rotation of the object = the angle between Y axes and the line going from centre point of mid hole and to centre point outer hole
  • To send the picking point co-ordinates (x,y) and rotation (angle) in the robot co-ordinate system to the Robot system using RS232

Origo

X

Y

Picking point

Angle

Robot Vision

configuring of scorpion robot vision system
Configuring of Scorpion Robot vision system
  • Create a new Scorpion Profile
  • Configure the image source - camera/file
  • Calibration of images
  • Locate the object and find the pick-up x,y coordinates
  • Calibration in Robot co-ordinates
  • Establish reference system to measure rotation
  • Configure the User Interface
  • Configure communication to external systems

Robot Vision

restore robot vision start profile
Restore Robot Vision Start profile

1. Open Scorpion and click on restore(if the menu is not visible right click on the mouse, click on “Show Buttons” for permanent display)

2. Browse to the catalogue “unsupportedprofiles”on the Scorpion CD

3. Select RobotVision_Start.zipan open the file

Robot Vision

create myrobotvision profile
Create MyRobotVision profile
  • Step 1 – Create a new Profile
    • Select ”New”
    • Give it the name”MyRobotVision”

Robot Vision

copy the content of robotvision start to the new profile
Copy the content of RobotVision_Start to the new profile
  • You can copy the content of an existing profile (including images) to automatically add functionality to the new profile
  • Mark the profile called ”RobotVision_start” and select copy
  • Select copy to the new profile”MyRobotVision”
  • Start MyRobotVision profile

Robot Vision

starting point
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

Robot Vision

configure the image source
Configure the image source

1

  • Select Service Tab
  • We will use stored images therefore activate Simulation ON
  • Click on Snapshot
  • If no image the image directory must be checked
  • Click on the image setting source
  • Browse to find the selected image directory
  • Assure that the directory for images are set to\Scorpion_200\MyRobotVision\Images

3

4

2

5

6

Robot Vision

vision strategy
Vision Strategy

Robot co-ordinate system

  • Calibration – for correcting lens distortion to get high precision
  • 4 point robot calibration to synchronize image and robot co-ordinate system
  • Use blob to find centre of gravity of the object
  • Use the big outer hole centre and mid hole centre to establish a local reference system handling rotation

Origo

X

Y

Picking point

Angle

Robot Vision

lens calibration
Lens calibration
  • In robot vision application the camera often have a large Field Of View (FOW) and a relative short distance to the object
  • This require a wide angle lens and consequently large lens distortion
  • Without correcting the distortion, the inaccuracy in the outer part of the FOW might cause the robot to fail picking the object correctly

Robot Vision

4 point robot calibration
4 point robot calibration
  • By using 4 point calibration you can establish a co-ordinate system equal to the one used by the robot
  • By moving the robot to the centre of each point the robot co-ordinates are found
  • In Scorpion the centre of each is found in the Scorpion reference system
  • This enable you to communicate pick up points and rotation in the robot co-ordinate system

Robot Vision

understanding lens correction and robot calibration
Correction of lens distortion is independent of distance to the object

The lens correction is done in one planeand valid for allrobot planes

Robot calibration is only valid for a specific distance to the object (Robot plane)

For each different robot picking plane a individual robot calibration must be done

Scorpion can handle multiple robot planes

Understanding lens correction and robot calibration

Robot plane 3

Robot plane 2

Robot plane 1

Robot Vision

pixel co ordinate system
Pixel co-ordinate system

Origo

X=0, Y=0

X=0, Y=1024

Y

  • Default co-ordinate system with Origo in upper left corner
  • X and Y pixels according to camera resolution
    • VGA 760 x 480
    • XGA 1024 x 768(used in the exercise)

X

X=768, Y=1024

X=768, Y=0

Robot Vision

show info on the image
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)

Robot Vision

zoom the image
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

Robot Vision

operating the tool box
Operating the Tool Box
  • Go to the Toolbox and click on New
  • Give the Tool a NameFor easy understanding of the task for this specific tool – use names
  • Select a Tool category and then a Tool
  • Use help to get information about the tool

1

2

4

3

Robot Vision

using a tool step 1
Using a Tool – step 1
  • GENERALShow the name and type of tool. Comments can be entered in the description field
  • SETUPFor entering parameters controlling the tool

Robot Vision

using a tool step 2
Using a Tool – step 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

Robot Vision

create a tool calibration
Create a tool - Calibration
  • Click on the button “New”
  • Name the tool - Calibration
  • Select the tool category Advanced
  • Select “Calibrator”Use help if you want information about the tool
  • Click OK

1

5

2

4

3

Robot Vision

selecting the image for calibration
Selecting the image for calibration

1

  • Open the tool named Calibration (double click on it) and click on the Set-up tab
  • Browse to find the calibration image in the “MyRobotVision/References” directory
  • Select calib1.bmp image and open

2

3

Robot Vision

configure the calibration tool
Configure the Calibration tool
  • Set number of rows and column – count from image
  • Set row and column spacing to 8 mm, and the unit to mm (millimetre)
  • Click on compute

1

2

3

Robot Vision

results from calibration
Results from Calibration
  • Scaling
    • Under the Result tab you will find the scaling factor
    • The scaling factor is only valid in the grid plane
  • Lens correction
    • On the image the actual correction is visualised as yellow arrows
    • Lens correction is valid in any plan (not only in the grid plane)

Robot Vision

multi co ordinate system
Multi co-ordinate system

Y

  • Pixel co-ordinate system (red)
    • the default coordinate system
    • Scaling is in pixels
  • Calibration co-ordinate system (blue)
    • Generated by the Calibration tool
    • Scaling is in mm

Y

X

X

Robot Vision

cursor information on the image
Cursor information on the image
  • With the cursor you can now display the x and y values in both co-ordinate system
  • Position the mouse over the image and right click
  • Highlight “Referencesystem”
  • Select the co-ordinate system

1

2

3

Centre hole co-ordinates:

Pixel co-ordinates

Calibrationco-ordinates

Robot Vision

manual measurements on the image
Manual measurements on the image
  • Position the mouse on the image and right click to get the menu (be sure that “Show info is activated first”
  • Select “Measure”
  • With the cursor you now can measure the distance from the default pixel co-ordinate origo and the angle of the line

1

2

Robot Vision

to measure from an arbitrary point
To measure from an arbitrary point
  • To set a new origo position the mouse where you want the new origo (i.e. centre of mid hole) and right click on the mouse
  • Select “Set Origo” and the cursor display distance from the new origo

2

1

Robot Vision

saving and storing the configuration
Saving configuration

Pressing Profile button

Every time you press the Start button

Every time you close the application

Archiving

The archive file is a zip file containing all configuration and images

Used for storing your profile

Ideal for sending to a Scorpion support centre for remote support

Saving and storing the configuration

Robot Vision

archiving a profile
Archiving a profile
  • Enter to Service mode
  • Press the Maintenance tab
  • Check that the Archive directory is selected
  • Press the Backup button
  • Scorpion suggest a default name
  • You can add comments before the zip file is generated

1

2

3

3

4

Robot Vision

trigger the camera
Trigger the camera
  • Hardwire trigger
    • Direct on camera from sensor
  • Soft trigger
    • External from PLC
      • RS232, TCP/IP, I/O
    • Internal - used in this exercise
      • Using Scheduler (pressing Start button)
      • Manual user input (pressing Snapshot button)

Robot Vision

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 according to the Trigger period

By pressing edit you can adjust the time interval

Scheduler

1

3

2

4

Robot Vision

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.

Start and Stop of Inspections

Robot Vision

using a blob to locate the object
Using a Blob to locate the object
  • Add a new tool in the toolbox:
    • Name= FindObject
    • Tool = BlobTool

1

2

3

4

Robot Vision

tool references
Tool references
  • All tools can have a Reference
  • To relate Search area to a specific point (i.e. Centre of Gravity of an area)
  • To relate Search area to a specific co-ordinate system, Calibration in this exercise

Robot Vision

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

ROI – Region of Interest

Robot Vision

understanding the blob tool
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

Robot Vision

apply your configuration
Apply your configuration
  • To apply a new parameter set by you, the button apply must be pushed
  • You can also set minimum and/or maximum requirements to the blob area to be located

Robot Vision

blob visualisation
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” to see the result!

Robot Vision

blob result
Blob result
  • In the result tab you find the different results of the blob tool
    • Number of blobs (1)
    • total blob area (2)
    • centre of gravity of the largest blob, blob[0] (3)
    • Number of ”Holes” in blob[0](4)
    • If there is more than 1 blob you will find values for blob[1-n] also

1

2

4

3

Robot Vision

holes in a blob
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

Robot Vision

picking location
Picking location
  • In this application the pick-up position is the centre of the object
  • This is equal to the centre of gravity co-ordinates found for the blob

Robot Vision

strategies to find a picking location
Strategies to find a picking location
  • Geometrical characteristic of the object is used to find the correct picking localisation. In this example the centre of gravity was the correct picking location. However other localisations might very well be used as well. Below are some examples
    • Mid point short edge
    • One corner of the long edge
    • Centre point of the small hole on the short edge

Robot Vision

co ordinate systems
Co-ordinate systems
  • The picking point is the centre of gravity of the blob. However the x,y co-ordinates we found in the blob is according to the “Calibration” co-ordinate system (Blue) used as the reference in the blob tool
  • We now need to recalibrate according to the Robot Calibration system

Robot Vision

4 point calibration steps
4 point calibration steps
  • By moving the robot to the centre of each point the robot co-ordinates are found
  • In Scorpion the centre of each point is found in the Scorpion reference system
  • By using the “ExternalReference” tool Scorpion can calibrate the image in robot co-ordinates

Robot Vision

4 point robot calibration1
4 point Robot calibration
  • First we need to find the four points and their centre of gravity in the robot calibration grid
  • Add a new tool in the toolbox:
    • Name= FindRefPoints
    • Tool = BlobTool

Robot Vision

find ref point image
Find Ref Point image

1

  • The image of the 4 point calibration grid is located in the directoryMyRobotVision/References
  • Follow the steps (1 – 5) and push the Snapshot button (6) until you get the right image

6

3

2

4

5

Robot Vision

configure findrefpoints tool

1

2

3

4

Configure FindRefPoints tool
  • Follow the steps to set reference to “Calibration” (1), the correct search area (2) and threshold levels (3). To eliminate disturbing blobs from the text “5cm” activate Smallest area = 10

Robot Vision

refpoints co ordinates
RefPoints co-ordinates
  • In the Result tab you find the centre of gravity x,y co-ordinates
  • Check by using the cursor in the image, that you note down the correct x and y values for point 1 – 4

Point 1

Point 2

Point 3

Point 4

Robot Vision

robot co ordinate system
Robot co-ordinate system
  • By moving the robot to the four points you get the equivalent robot co-ordinates

Origo

Point 1

Point 2

Point 3

Point 4

Robot Vision

external reference tool
External Reference tool
  • Next we need to co-ordinate the image and robot co-ordinate systems
  • Add a new tool in the toolbox:
    • Name= ExternalRefSystem
    • Tool = ExternalReference

Robot Vision

configure externalrefsystem tool
Configure ExternalRefSystem tool
  • Select Calibration as a reference (1)
  • Fill inn the local co-ordinates for all 4 points (2)
  • Fill in the external coordinates for all 4 points (3)

1

2

3

Robot Vision

the different reference system
The different Reference system
  • In the image you now have 3 different co-ordinate systems
  • The original Pixel systems (green)
  • The Calibration co-ordinate system (blue)
  • The Robot co-ordinate system (red)

Robot Vision

deactivate active a tool
Deactivate/active a tool
  • The Blob tool “FindRefPoints” is only used to find the centres of each point during robot calibration
  • During normal operation this tool has no task and should be deactivated (1) or deleted
  • Highlight the tool “FindRefPOints” and click the button “Deactivate”

Robot Vision

changes back to normal images
Changes back to normal images

1

  • To continuo we need to change back to the original images found in the directory:MyRobotVision/Images
  • Follow the steps (1 – 5) and push the Snapshot button (6) to check that you get the right image

6

3

2

4

5

Robot Vision

changing reference to the findobject tool
Changing reference to the FindObject Tool
  • To be able to find the centre of gravity x and y values we need to change the reference of the “FindObject” blob tool to the new “ExternalRefSystem”
  • Open the tool named “FindObject” select Setup tab and push the button (1)
  • Here you find the available references, but ExternalRefSystem is not THERE

1

Robot Vision

understanding the tool sequence
Understanding the tool sequence
  • All tools are executed in a sequence starting from the top of the toolbox
  • Only results from tool being executed before can be used
  • Therefore results from ExternalRefSystem cannot be accessed by “FindObject

Robot Vision

editing the tool sequence
Editing the tool sequence
  • By highlighting the tool and then using the Up and Down buttons, any tool can be moved
  • Move the FindRefPoints to number 2 and ExternalRefSystem to number 3.

Robot Vision

changing the reference to robot co ordinates
Changing the reference toRobot co-ordinates
  • Now you can change the reference of the “FindObject” blob tool to the new “ExternalRefSystem”
  • Open the tool named “FindObject” select Setup tab and push the button (1)
  • Select the ExternalRefSystem

1

Robot Vision

adjusting the search area according to the new reference system
Adjusting the search area according to the new reference system
  • Since the reference system is changed, the parameter values must be changed to give the correct search area

Robot Vision

scorpion logical conditions
Scorpion logical conditions
  • In an industrial application a number of situations may occur
  • In Scorpion you can define a set of conditions that will help you to handle the different situations during robot picking or inspection
  • The worst scenario is that a situation occur and neither the vision system nor the robot knows how to handle it
  • Then the system will fail and the process stop

Robot Vision

potential logical conditions in robot vision
Potential logical conditions inRobot Vision
  • OK
    • Object present
    • Can measure rotation
  • No Object
    • Object NOT present
  • Cannot measure rotation
    • Object present
    • Cannot measure rotation(missing the outer hole used to define rotation)

Robot Vision

understanding logical tool
Understanding Logical Tool
  • In a Logical tool any results in all prior tools can be tested against max and min conditions
  • Typical applications are:
    • Establish OK and Fail conditions
    • Testing measurements against tolerances
    • Verify presence of object
    • Validate type of object
    • Validate functionality of a tool

Robot Vision

object present
Object Present
  • For testing whether an object is present we could choose different parameter
    • Number of blobs(could be sensitive to dirt and small particles that may be identified as blobs)
    • Size of Blob area – a known parameter for the specified product
    • We will use Blob area

Robot Vision

object present logical condition
Object Present logical condition

1

  • Add a new tool (1), name it ObjectPresent (2) and select the LogicTool (3)
  • Open it and select the measured value from the tool FindObject (4) and the parameter blob area[0] (5) and set the minimum conditions to 500
  • Normal value for the blob area is around 1100

2

3

4

5

6

Robot Vision

checking the objectpresent tool
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

Robot Vision

controlling the orientation
Controlling the orientation
  • The task is to establish a new reference system that will give the rotation/angle relative to the external robot co-ordinate system (red)
  • By finding the centre point of the outer big hole a reference line can be designed and using the centre of gravity of the blob as origo we can generate the new reference system (blue)

X

X

Y

Y

Robot Vision

find the outer big hole
Find the outer big hole
  • Add a new tool, name it “FindHole” and select the Blob2 tool
  • Open the tool and select FindObject as the reference and “Apply”
  • When FindObject is used as reference, the Centre of Gravity of the object represent centre X = 0 and Y = 0 wherever the object is located on the image

Robot Vision

multi polygon and multi roi s
Multi Polygon and Multi ROI’s

Point co-ordinatesdefining the ROI

  • Multi polygon ROI
    • An ROI constructed from arbitrary points
    • The ROI is constructed by clicking the mouse while the “Ctrl” button is pressed on the points defining the ROI
  • Multi ROI’s
    • One tool can operate in several ROI’s

ROI-1

Mouse clicking points

ROI-2

Robot Vision

difference roi in blob2
Difference ROI in Blob2
  • Using two ROI’s where ROI-2 is a segment inside ROI-1, the difference area will be the final ROI for the tool
  • The red circle is ROI-1
  • The blue circle is the ROI-2
  • The search are is the difference, the grey area, and we can locate the the white outer hole

Robot Vision

define roi 1

7

1

2

3

4

6

5

Define ROI-1
  • Select “Add polygon” tab
  • Select “Circle” polygon
  • Enter 0 for centre X and Y
  • Enter Radius 16 (mm). You can use the cursor to find the correct radius to use
  • Set Minimum threshold to 100 and maximum to 256 since we are looking for white holes
  • Click on “Add”
  • Click on “Apply” and the ROI is active

Robot Vision

editing multiple roi s
Editing multiple ROI’s
  • Select the tab “Polygon” and you have an overview of the ROI’s
  • Number 1 is a default ROI and number 2 is the polygon you added
  • You can highlight the individual ROI’s by selecting “Highlight selection”
  • To delete the default ROI highlight 1 and click on the “Delete” button
  • Finally click on “Apply”

1

2

3

Robot Vision

constraints
Constraints
  • In many tools you can set a number of constraints to eliminate unwanted results
  • In this case you may detect small blobs that have no interest
  • They can be eliminated by setting constraints for the blob area
  • Setting smallest blob area to 10 will eliminate these blobs

Robot Vision

define roi 2
Define ROI-2
  • Define the ROI-2 with the following parameters
    • Centre X and Y = 0
    • Radius = 10
  • Add the polygon and then Apply
  • You now have to polygons and you see the two circles visualised in the image

Robot Vision

findhole results
FindHole results
  • Click on “Visualisation this only” to remove visualisation from the other tools
  • Select the “Result” tab and you will find all the results
  • Number of Blobs
  • Centre of Gravity

2

3

1

4

Robot Vision

the guard function
The Guard function
  • Used to activate tools only for a specific condition
  • Typical applications:
    • Selecting a set of tools tailored to a specific product (used when Scorpion is set to handle multiple products)
    • To prevent tools from giving false results when the condition is not fulfilled

Robot Vision

configure the guard function
Configure the Guard function
  • When the condition ObjectPresent is False (no object in the image), the FindHole tool have no meaning and should be guarded
  • Select the General tab
  • Click to the list of possible guard functions
  • Select “ObjectPresent”

1

2

3

Robot Vision

status for tools
Status for tools
  • In the Status column or in the Result tab you can see the status of the tool
    • Status = 1 - tool is OK
    • Status = 3 - there is an error in the tool
    • Tool is blocked by guard or reference
    • Tool is deactivated
    • Tool is not run
    • When tool is either blocked, deactivated or not run the Status in the result tab = 0

Run through all images andsee how status changeswhen there is no object

Robot Vision

toolbox overview
Toolbox overview
  • In the toolbox overview you will find the following columns with info
    • 1 = Status
    • 2 = Processing time for the tool
    • 3 = The name you gave the tool
    • 4 = The type of tool
    • 5 = Image number reference
    • 6 = The reference used by the tool
    • 7 = The guarding tool

1

2

3

4

5

6

7

Hint: to see all columns you may

have to adjust the column widths

Robot Vision

understanding geometry tools
Understanding Geometry tools
  • The Geometry tools are used to create new points and lines based on results from previous tools
  • Typical applications:
    • To construct geometrical structures without image processing techniques
    • Do measurements
      • Distances between lines and points
      • Length and angle of lines

Robot Vision

make the reference line
Make the reference line

1

  • Add a new tool named “ReferenceLine” and select the tool “LineFromPoints”
  • Guard with “ObjectPresent” condition
  • Use ExternalRefSystem (Robot co-ordinates) as reference and select centre of gravity of the object as point 1 and centre of gravity of the outer hole as point 2

2

3

4

5

6

7

Robot Vision

reference line check
Reference Line check
  • Scorpion visualise a line between the two points and a direction (from point 1 to point 2)
  • In the result tab you will find results as length and angle
  • If one of the points are missing the tool will have an error (status = 3)

Robot Vision

configure the referencelineok logic tool
Configure the ReferenceLineOK logic tool
  • We can use a logical tool to establish a condition validating the ReferenceLine
  • The procedure is:
    • Name: “ReferenceLineOK”
    • Tool: Logical tool
    • Guard: “ObjectPresent”
    • Add new logical parameter
    • Select Tool: ReferenceLine
    • Parameter: Status
    • Min and Max condition = 1
  • Check the result

1

2

3

4

5

6

Robot Vision

create the local co ordinate system
Create the local co-ordinate system
  • Based on the Reference Line and Centre of Gravity of the object we can create e new co-ordinate system.
    • Name: RotationRefSystem
    • Tool: PointLine Reference
    • Guard: ReferenceLineOK

1

3

2

4

Robot Vision

define the co ordinates
Define the co-ordinates
  • Select “ExternalRefSystem” to link this co-ordinate system to the robot system
  • Select Centre of Gravity as the origo point
  • Select ReferenceLine as the Line and the co-ordinate system will follow the rotation of the object

1

2

3

4

Robot Vision

scorpion co ordinate systems
Scorpion co-ordinate systems
  • We now have 4co-ordinate systems
    • The Pixel system (green)
    • The Calibration system (blue)
    • The Robot system (ExtrenalRefSystem) (red)
    • The Rotation system(light blue)
  • With the cursor you can toggle between the systems

1

2

3

4

Robot Vision

ok condition object present
OK condition - Object Present
  • Double click on the existing OK state
  • Now you can enter a name, description and select the colour for display in the result panel

Robot Vision

defining the ok present condition
Defining the OK (Present) condition

2

3

  • 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)

1

4

Robot Vision

including referencelineok
Including ReferenceLineOK
  • The OK condition is also dependent of that correct angle can be measures
  • Correct angle can only be measured when the logical statement “ReferenceLineOK” is true
  • Add “ReferenceLineOK” using the same procedure as for “ObjectPresent”

Robot Vision

testing the ok condition
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 and the object missing a hole occur, the result panel display ”Undefined Condition” since no condition for No Object and No Reference line is yet defined

Robot Vision

adding a noobject condition
Adding a NoObject Condition

1

  • Click on ”New” for adding a new condition
  • Name it ”No Object”
  • Select Yellow as background colour (when this condition is true the result panel will be yellow)

2

3

Robot Vision

configuring the no object condition
Configuring the No Object condition
  • To define the No Object condition we can use ObjectPresent Logical classification
  • Click on ”New” and select ”ObjectPresent”
  • To make the No Object condition true when the logical classification ObjectPresent is false, we invert the statement by pushing the invert button

Robot Vision

testing no object state
Testing No Object State
  • Run through the pictures and check:
    • the result of the both conditions (true or false)
    • The colour and text in the result panel

Robot Vision

adding cannot measure rotation logic condition
Adding Cannot Measure Rotation logic condition
  • Add a new state
    • Name it “Cannot Measure Rotation”
    • Select background colour “Red”

Robot Vision

configure cannot measure rotation
Configure Cannot Measure Rotation
  • The constrains needed are:
    • Object present
    • ReferenceLineOK
  • “ReferenceLineOK” must be inverted to give the result true (=1 in the result) when the line is failing

Robot Vision

testing the logic conditions
Testing the logic conditions
  • Run through all images and check that all logical conditions are working correctly

Robot Vision

displaying measurement values
Displaying measurement values
  • Any results from any tool can be displayed in the result panel
  • We want to display the inner and outer radius
  • Position the mouse inside the result panel and right click, select ”General”, ”No of measumentvalues” and enter 3 for 3 values
  • Check the result panel

1

2

3

4

Robot Vision

selecting parameters to be displayed
Selecting parameters to be displayed
  • Position the mouse over Tagvalue 1 and right click, select Measured Values, Parameter.
  • In the new dialog box click the ”..” button.
  • In the new dialog box you can select the tool and the parameter you want
  • Select the tool ReferenceSystem and the parameter Origo_x

1

2

3

5

4

Robot Vision

add name and unit to the value
Add name and unit to the value
  • Position the mouse over Tag Value 2, right click, select Measured Values and Caption.
  • Enter the name ”X value:”
  • Through the same procedure you can add unit (mm) and change the number of decimals
  • Repeat the procedure for displaying the outer radius as Tag Value 2 and name it ”Y value”

2

1

Robot Vision

adding angle value
Adding angle value
  • Finnaly select Tagvalue 3 and name it “Angle”
  • In the tool RotationRefSystem you will find the parameter Angle
  • Since the reference to this tool is the robot system (ExternalRefSystem) this value is relative to the robot co-ordinate system

Robot Vision

sending data to a robot or plc
Sending data to a Robot or PLC
  • We want to send status data (OK, No Object and Cannot Measure Rotation) using the RS232 interface
  • When the status is OK we want to send the data x, y and angle
  • We will link the timing of sending the data to the event ”Inspection”
  • Initially the event inspection activate the command ”Inspect” (running the tools)
  • After that we want the system to send status data

Robot Vision

adding a rs232 command
Adding a RS232 command
  • In command sequence for Inspection click on ”New”
  • Select ”RS232Cmd”
  • Name the command ”SendStatus”

5

1

4

2

3

Robot Vision

the command protocol
The command protocol
  • Syntax%dparameter
    • %d = format instruction for the result value (Integer number format)
    • Parameter = The parameter name 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

Robot Vision

writing the command protocol
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

Robot Vision

adding cannot measure rotation
Adding Cannot Measure Rotation

3

  • We can make a 2 bit code where the first bit is Object Present and second Cannot Measure Rotation
  • Copy the parameter Value from “ReferenceLineOK” tool
  • The parameters must be separated by a comma
  • Add %d to format the number
  • Paste the parameter

2

1

4

Robot Vision

testing the communication
Testing the communication

1

  • 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

2

3

4

5

6

7

8

Robot Vision

testing the scorpion profile
Testing the Scorpion Profile
  • Activate automatic inspection (push Start) and check that the status value sent over RS232 is correct for each inspection

Robot Vision

new command for sending data
New command for sending data
  • When the logical condition is OK x, y and angle values should be sent also over RS232
  • Add a new command after SendStatus
    • Name: SendData
    • Command: RS232
    • Guard: ReferenceLineOK

Robot Vision

configure the parameters
Configure the parameters
  • %f for floating point number format
  • Tool: RotationRefSystem
  • Parameters
    • Origo.x
    • Origo.y
    • Angle
  • Remember to format each parameter and to separate them with a comma

Robot Vision

testing the communication1
Testing the communication

1

  • Mark the SendData 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 data values are sent

2

3

4

5

Robot Vision

end of robot vision exercise
End of Robot Vision exercise

Congratulations!You have made your firstRobot Vision system using

Scorpion Vision Software

Robot Vision