MotionWare With Vision Statements

The following statements are detailed in this section: INSPECT, PICTURE, REFINE_FRAME, and REFINE_TOOL. The statement SET_FRAME, detailed in MotionWare Statements, also has an optional vision argument.

INSPECT

The INSPECT statement causes evaluation of up to eight inspection records. The routine executes all --vision-- arguments regardless of pass/fail status. If one or more of the inspections fail, the OK_SIGNAL is set to FALSE. If all inspections pass, then the OK_SIGNAL is set to TRUE.

The syntax is:

INSPECT OPERATION --vision-- { &--vision-- { &--vision--
	{&--vision-- {& --vision-- { &--vision-- { &--vision-- _
	&--vision--}}}}}}} {SAVE_PREVIOUS --yes/no--} {OK_SIGNAL 
	--o_variable--} 

The --vision-- argument can be completed only with an Inspection record. An inspection record will appear in the pick list of available records only if TopLevel is selected in that record.

The one required argument for the INSPECT statement is the first vision argument (no brackets around the argument indicate it is a required argument). When this statement is executed, vision will take all the necessary pictures and evaluate all the necessary records to generate the value that the inspection record is to evaluate. (This statement will move the robot as necessary to take pictures, depending on the camera mounting and the parameters specified in the picture records.) The inspections are evaluated and the output variable, if defined, is set to TRUE (-1) if all the inspections succeed. Otherwise, it is set to FALSE (0). If Gather stats was selected in the inspection record, the values generated by the inspection are reported to the Inspection Results pages (see Inspection Results Page).

The optional arguments ({vision}) also require a top-level inspection record. Each of these records will be evaluated in the same manner as the required inspection record, as follows:

If {SAVE_PREVIOUS} is omitted or set to "no", all pictures needed for the inspection are taken. If a vision record that requires movement of the robot is in the inspection tree, the robot will move. If this argument is set to "yes", the system assumes that all picture data is available and will not acquire new images (although it will wait for any in-progress image processing to complete). If any required image data is not available, the sequence will halt with the appropriate error.

PICTURE Statement

The PICTURE statement takes the pictures required for a vision operation and (if specified) moves the robot to a picture-taking location.

The syntax is:

PICTURE FOR --vision-- {SINGLE_PICTURE --vision-- 
	{SAVE_PREVIOUS --yes/no--}} {OK_SIGNAL --o_variable--} 

This statement takes pictures for the vision operation specified in the FOR --vision-- clause and the vision server begins computing the vision result. This statement does not wait for the vision result to be computed but completes as soon as all the requested pictures are taken.

The robot may be moved if the picture records specify robot motions.

If the SINGLE_PICTURE --vision-- clause is not specified, all pictures for the entire vision operation are taken.

The SINGLE_PICTURE clause is useful only in situations where the vision operation is based on more than one picture. If the SINGLE_PICTURE --vision-- clause is specified, its argument must be the name of a picture record in the vision database. This statement then takes only that picture and completes as soon as the picture is taken. In the background, the vision server computes any vision results that depend on that picture.

If the SAVE_PREVIOUS --yes/no-- clause is omitted or set to no, all previous vision data for the initial vision operation is cleared and recomputed.

If the SAVE_PREVIOUS --yes/no-- clause is set to yes, the vision data that depends on this picture is cleared, but the remaining data for the vision operation is not cleared. This setting is used after the first picture in a multiple-picture application.

If the OK_SIGNAL --o_variable-- clause is specified, the output variable is set to TRUE if the picture taking succeeded. Otherwise it is set to FALSE. This variable does not reflect the status of the entire vision operation.

See the VisionWare User's Guide for details on creating vision records.

Vision Inspection Using a Fixed-Mount Camera

NOTE: See Program a Fixed-Mount Guidance Vision Cell for a detailed example on using fixed-mount camera vision guidance to acquire a part.

To specify the motion information for a picture-taking location that is based on a fixed-mount camera:

Edit -> Vision
Seek -> Index -> double-click the picture record

  1. If you want the robot to move as a part of the picture-taking operation, select Use it from the Motion group and click Setup .1

  2. When the motion information pop-up window is displayed, select Object moved by robot and the following options are displayed:

Figure 9-5. Picture Record Motion Options (Fixed-Mount Camera)

1

Select this option if the robot is holding the object in front of the camera when the picture is taken.

2

Select Robot location to move the robot to the path point specified by items 3 and 5 when taking a picture.

Select Vision target location and the robot will use the robot-to-field-of-view transformation created during camera calibration to move the robot gripper over the camera when taking a picture. The transformation in the path point specified by items 3 and 5 will be interpreted as an offset from the center of the corner of the field-of-view, rather than an absolute robot location.

3

Picture-taking locations are taken from the path database. Double-click this data box to display a list of defined paths.

If Robot location is specified, the path segment will be the actual robot location.

If Vision target location is specified, the path segment represents an offset from the vision target location. The path segment used for the picture-taking location is specified in item 5.

4

 To ensure all robot motion and camera vibration has stopped, it may be necessary to add settling time to the end of the robot motion. Small fields of view, heavy payloads, and high robot speeds require longer settling times. Use 0.3 as a starting point.

5

Enter the path segment number to use as the location. If Auto-select is used, segment 1 will be selected.

 

6

If Vision target location is selected, values in these data boxes will cause the robot to offset the center of the camera field-of-view from the location. The default values (50/50) center the robot at the vision location. This offset is in addition to any offsets defined in the path location.

7

Click Here to record the current location in the specified path database record as the picture-taking location.

If Robot location is selected, the position of the robot tool tip is recorded.

If Vision target location is selected, the position of the object being viewed by the camera is recorded.

 

8

Click Done to close this pop-up window.

Vision Inspection Using an Arm-Mounted Camera

To specify the motion information for an arm-mounted camera:

Edit -> Vision
Seek -> Index -> double-click the picture record

CAUTION: Whenever you use an arm-mounted camera, you must select Use it from the Motion group on the Picture record. You can then optionally click Set up to define a point path or picture-taking location, as described below.

If you want the robot to move as a part of the picture-taking operation, select Use it from the Motion group and click Setup to define a path point or picture-taking location.2

Figure 9-6. Picture Record Motion Options (Arm-Mounted Camera)

1

 Normally, since the robot is moving the camera over a stationary part, you will not select Object moved by robot. You would select this option in the special case of a camera mounted on a robot link such that the gripped part could be viewed by the camera.

2

Select Robot location to move the robot to the location specified in item 3 when taking a picture.

Select Vision target location and the robot will use the robot flange-to-field-of-view transformation created during camera calibration to move the camera (rather than the gripper) over the picture-taking location.

If you are using a computed frame for the vision inspection, and the tools needed to compute the frame will not fit on a single screen, you can use multiple picture records with different path segments to move the camera to the different locations. MotionWare will take care of the necessary calculations to generate the frame.

3

Picture-taking locations are taken from the path database. Double-click this data box to display a list of defined paths. Leave this argument blank to prevent the robot from moving (for example, if you have already positioned it with a MOVE statement).

If Robot location is specified, the path segment will be the actual robot location.

If Vision target location is specified, the path segment represents the location of the object to be viewed. The path segment used for the picture-taking location is specified in item 5.

4

To ensure all robot motion and camera vibration has stopped, it may be necessary to add settling time to the end of the robot motion. Small fields of view, heavy payloads, and high robot speeds require longer settling times. Use 0.3 as a starting point.

5

Enter the path segment number to use as the location. If Auto-select is used, segment 1 will be selected.

6

If Vision target location is selected, values in these data boxes will cause the robot to offset the center of the camera field-of-view from the location. The default values (50/50) center the robot at the vision location. This offset is in addition to any offsets defined in the path location.

7

Click Here to record the current location in the specified path database record as the picture-taking location.

If Robot location is selected, the position of the robot tool tip is recorded.

If Vision target location is selected, the position of the object being viewed by the camera is recorded.

8

Click Done to close this window.

 

1

If options are not available, they are not appropriate to the current camera calibration.

2

If the "Setup" button is not displayed, the camera is not correctly calibrated.