General VisionWare Statements

See the AIM Baseline User's Guide for a description of how sequences are created and edited.

INSPECT

The INSPECT statement causes evaluation of up to eight inspection records. Records are evaluated until the first inspection fails, at which time execution stops and 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--}}}}}}} 
	{OK_SIGNAL --output--}
 

The --vision-- argument can be completed only with an Inspection record. An inspection record appears 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, VisionWare will take all the necessary pictures and evaluate all the necessary records to generate the value that the inspection record is to evaluate. The success of the inspection is evaluated and (if defined) a digital output signal is set based on the success of the inspection. If Gather stats was selected in the inspection record, the values generated by the inspection are reported to the Inspection Results pages (see This Topic).

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, with two exceptions. First, inspection records are evaluated from left to right until an inspection fails. After an inspection fails, no more inspection records will be evaluated. Second, if an inspection fails, the entire statement will be considered to have failed and the digital I/O signal specified in {OK_SIGNAL--output--} will be set accordingly.

INSPECT_LIST

The syntax and operation of INSPECT_LIST is identical to INSPECT except that all specified inspection records are evaluated regardless of whether any inspection fails.

OCR_OUTPUT

The OCR_OUTPUT statement is used in conjunction with an OCR Field record. See OCR Field Records for details on creating an OCR Field record. The format for the OCR_OUTPUT statement is:

OCR_OUTPUT FROM --vision {& vision {& vision 
	{& vision {& vision {& vision {& vision
	{& vision}}}}}}} 

The statement will evaluate each specified vision argument and output the recognized text to a disk file or serial line. See Logging Vision Results for details on opening a disk file or serial line. Unlike the INSPECT statement, the record selected to complete the --vision-- arguments for OCR_OUTPUT must be an OCR Field type record rather than an Inspection type record. TopLevel must be selected in the OCR Field record. If Full text recognition is selected, the recognized text will be output to the disk or serial line. If a verification option is selected, the expected text will be output to the serial line.

AUTO_BRIGHTNESS

This statement requires an inspection record that uses a window record. The specific operation in the inspection record should be average graylevel. The statement will attempt to maintain the average graylevel specified in the nominal data box by adjusting the OFFSET parameter in the picture record associated with the window record. The limits in the picture record will be used to set the OK_SIGNAL to FALSE if the average graylevel exceeds the limits. The --frequency-- argument specifies the number of cycles to wait before resetting the OFFSET. The syntax is:

AUTO_BRIGHTNESS WITH --vision-- {AT_FREQUENCY --constant--}
	{OK_SIGNAL --OUTPUT--}
 

PICTURE

This statement simply calls for the evaluation of a picture record. This is useful and sometime necessary to force the ordering of pictures so as to allow the scheduler to set up things for overlapping picture taking. If pictures appear in a conditional situation in the sequence, then picture pre-taking is not possible. The order of the pictures in the sequence must be fixed and guaranteed. The syntax is:

PICTURE --vision--
 

TopLevel must be selected in the picture record in order to appear in the pick lists of available records.

MESSAGE

This statement displays a message on the operator control panel.

MESSAGE --variable-- {TEXT --string--} {0: --constant--} 
	{1: --constant--} {2: --constant--} {3: --constant--} 
	{4: --constant--} {5: --constant--} {6: --constant--} 
	{RESPONSE --o_variable--} 

The MESSAGE --variable-- is a standard AIM error number (or variable record that specifies an error number), which is in the error database. The text specified in TEXT --string-- will be appended to this message and displayed on the task control panel.

The --constant-- arguments correspond to the seven standard operator response buttons on the Task Control Panel. A value of 0 indicates that the corresponding button is not valid, a value of -1 indicates that the standard AIM labels should be applied to the button, and a value greater than 0 indicates the button label should be taken from the corresponding standard AIM message number in the error database. If any nonzero values are specified for these seven arguments, the sequence pauses until an operator response button is pressed and the number of the button pressed is returned in the RESPONSE variable.

If all arguments are blank or 0, AIM handles errors in the normal fashion and does not wait for an operator response.

SET_RESPONSE

This statement allows an executing sequence to behave as if one of the operator response buttons had been pressed. The --variable-- should have a value of 0 to 6, corresponding to the 7 standard operator response buttons. If an invalid response code is received, an error is issued.

The syntax is:

SET_RESPONSE --variable--