SetEngineTimeoutOCR_S

Specifies the number of seconds to wait before it is determined that an OCR/S recognition action is not running properly.

Important:
  • If legacy mode is not currently enabled, calling this action enables legacy mode and disables automatic retry mode.
  • In legacy mode, rules must be configured to retry recognition operations that fail. To avoid unnecessary rule configuration, use automatic retry instead of calling this action. For more information, see SetupAutomaticRetry.

Member of namespace

OCR_SR

Syntax

bool SetEngineTimeoutOCR_S (int Seconds)

Parameters

Seconds
Type int

Parameters

Seconds: The value that indicates the number of seconds to wait before it is determined that an OCR/S recognition action is stalled or exited.

Returns

False, if the parameter is not numeric or os less than 1. Otherwise, True.

Level

Page or Field.

Details

This action sets the number of seconds to wait before it is assumed that an OCR/S recognition action is no longer running correctly. When the timeout is reached, the recognition process is removed from memory.

If a recognition action does not complete within the specified number of seconds indicated by a SetOutOfProcessRecogTimeout action or a SetEngineTimeout action, it is assumed that the recognition engine encountered a severe error. It is removed from memory, and recognition is automatically restarted one more time. If the recognition action completes successfully within the specified time on either the first or second attempt, that recognition action is successful. If the recognition action does not complete by the specified time on the second attempt, the recognition action is set to abort, if the RecogContinueOnFailure(False) action was used.

If SetEngineTimeout is not called, the default value of 180 seconds isused. In normal conditions, the default value is sufficient and does not need to be changed. This value must be increased only if a single page consistently takes more than 3 minutes to complete, which is not a typical situation. The programmer can choose to shorten this time to reduce the time to detect failures earlier, provided there is time to perform recognition in worst case scenarios. For best results, this timeout can be set the same or longer than the value specified in a SetOutOfProcessRecogTimeout action.

Example
SetEngineTimeoutOCR_S(180)
RecognizeFieldOCR_S