Skip to Main Content
Cognex Support Hub
LogoLogo

Repeat Loop to Move Search Region

How to move a search region by using a repeat loop, from the In-Sight spreadsheet

11.12.2024

Question

How to move a search region by using a repeat loop ?

Answer

Here is a zip file (In-Sight .jobx and image) for testing purpose : https://cognex-envision.my.salesforce.com/sfc/p/4W000003cdWO/a/Ue000000XFrV/2.9D_WK2zJQ9r8usx6qs2lT2rFPdpFLZPovRKL79w9k

  • In-Sight Vision Suite 24.3.0
  • Emulator : IS2802M
  • Cell A3 : Edit the OCR Region around the first string on top "19201080"
  • Cell B6 : Select the number of iteration (1 to 5)
  • Cell B12 : Adjust the incremental value (number of pixels between the regions) : here 65  

Open the .jobx from In-Sight Vision Suite, then load the "OCR" image (drag and drop in the spreadsheet) :

  • Line 19, Index 0 represents the first region on top, around the string “19201080”
  • Line 20, Index 1 represents the second region, around the string “19201081”
  • Line 21, Index 2 represents the third region, around the string “19201082”
  • Line 22, Index 3 represents the fourth region, around the string “19201083”
  • Line 23, Index 4 represents the fifth region, around the string “19201084”

All the read strings are in column “C” (cells C19 to C23”).

Only one ViDiELRead tool is used to read five strings.

Verwandte Materialien