Measure Parts Using OCR-Barcode and Batch Files

In this example, there are two parts fixtured on the stage. Each part has a barcode associated with it.

The parts can be placed either on position 1 or 2. InSpec will identify which part is placed at which position on the stage using the OCR-Barcode feature.

The sequence of the programs used for this evaluation is detailed below.

Image A.

In Image A, the barcode associated with the ellipses is part 1 placed in position 1. The barcode associated with the triangles is part 2 and is placed in position 2.

 

'Page System'

Is the program used to measure the reference system on the stage called ‘Page Syst’. This system will be Stored and used in the rest of the programs as a starting reference point.

'Pos 1 System' Program

“Pos 1 System” should be executed right after runing the ‘Page System' program.

During this program a system named ‘Pos 1 System’ is crated and stored for future reference.

 

The barcode of the part in position 1 is read during this program. Using command line feature InSpec sends the barcode information to a batch file called “New Opening Program Pos 1”. The batch file uses the barcode information to determine which program to open next. Please note that the Batch files are saved as TXT files in this document. If you would like to use them, please change the file name to *.bat

'Program 1 Pos 1'

This program was created to measure part 1 when it is located at position 1. This program includes a command line feature to open the program 'Pos 2 System'.

 

 

'Pos 2 System'

This program measures the reference system for the part placed in position 2. Then it reads the barcode for the batch file to open the corresponding program for the part placed in position 2.

 

The batch file 'New Opening Program Pos 2' is used to open the corresponding program for the part placed on position 2. Please note that the Batch files are saved as TXT files in this document. If you would like to use them, please change the file name to *.bat

 

'Program 1 Pos 2'

This program is called by the batch file to measure the part 1 when placed on position 2.

'Program 2 Pos 1'

This program is called by the batch file to measure part 2 when placed on position 1. This program also scans the barcode of the part on position 2 to continue with the measurement of the next part.  

 

The barcode information scanned in ‘Program 2 Pos 1’ is used on the batch file ‘New Opening Program Pos 2’ to open the program corresponding to the part placed on position 2. Please note that the Batch files are saved as TXT files in this document. If you would like to use them, please change the file name to *.bat

 

'Program 2 Pos 2'

This program is used to measure the part 2 when placed on position 2. 


 



Product information is subject to change without prior notice as a result of ongoing technical development