Sei sulla pagina 1di 45

REV

A00

DATE
2015-11-01

EC NO.

SPECIFICATION DRAWING
DESCRIPTION

Initial Release Linux version

DRW
EN

SEE ENGINEERING CLERK FOR PREVIOUS HISTORY

6100 SCANNER
API PROGRAMMING MANUAL
DOCUMENT FILED IN ENGINEERING VAULT

Pertech Industries, INC.


RIVERTON, WYOMING
DRAWN
SCALE
Rocky Harting N/A

SIZE
A

TITLE
6100 SCANNER API PROGRAMMING MANUAL
PART NO.
SH 1
REV.
Alfa
OF 45
08

6100 Scanner

API PROGRAMMING MANUAL

Legal Notices
Disclaimer
Information in this document is subject to change without notice. Consult your Pertech Industries
sales representative for information that is applicable and current. Pertech Industries reserves the
right to improve products as new technology, components, software, and firmware become
available.
Pertech Industries will not be liable for personal injury or property damage except for personal
injury or property damage caused by Pertech Industries negligence or willful act. In no event shall
Pertech Industries be liable for loss of profit, loss of use, loss of revenue, business interruption,
direct, consequential or special damages, or for loss or damage caused by or resulting from errors
or defects in the graphic materials generated by the equipment furnished hereunder whether such
liability is in warranty, negligence, or otherwise.
Copyright
Copyright 2006-2015 by Pertech Industries, Inc.
Riverton, Wyoming USA
All rights reserved
Printed in USA
Property of Pertech Industries, Inc.
No part of this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose without the express written permission of Pertech
Industries.
Trademarks
PERTECH is a registered trademark of Pertech Industries, Inc. Other trademarks are the property
of their respective holders.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 2

6100 Scanner

API PROGRAMMING MANUAL

Table Of Contents
1 Introduction.......................................................................................................................5
1.1 MICROSOFT Environment.......................................................................................5
1.2 LINUX environment..................................................................................................6
2 Usage Model.....................................................................................................................6
3 Data Structures................................................................................................................10
3.1 Status structure.........................................................................................................10
3.2 Scan Function Structure...........................................................................................11
3.3 Transmit Format Structure.......................................................................................12
4 Properties........................................................................................................................13
4.1 PiScanGetPropStatus...............................................................................................13
4.2 PiScanGetPropScanStatus........................................................................................13
4.3 PiScanGetPropConvFact..........................................................................................13
4.4 PiScanGetPropDocLength.......................................................................................14
4.5 PiScanGetPropDocWidth.........................................................................................14
4.6 PiScanGetPropLastMICRDecodeScheme...............................................................14
4.7 PiScanGetPropMICRString.....................................................................................15
4.8 PiScanGetPropAPIVersion......................................................................................15
5 Methods...........................................................................................................................16
5.1 PiScanOpenDevice..................................................................................................16
5.2 PiScanGetStatus.......................................................................................................16
5.3 PiScanSelectScanFunctions.....................................................................................16
5.4 PiScanSelectImageTransmitFormat.........................................................................18
5.5 PiScanWaitForDocAndScan....................................................................................18
5.6 PiScanSelectImageTransmitDefaults.......................................................................19
5.7 PiScanWaitForScanComplete..................................................................................19
5.8 PiScanCancelScanWait............................................................................................20
5.9 PiScanXmitFromImageBuffer.................................................................................20
5.10 PiScanXmitDocumentTags....................................................................................20
5.11 PiScanSetMICRDecodeScheme............................................................................21
5.12 PiScanXmitMICRDecodeString............................................................................21
5.13 PiScanXmitRawMICR...........................................................................................22
5.14 PiScanXmitRawCMC7MICR................................................................................22
5.15 PiScanFreeBufferIndex..........................................................................................23
5.16 PiScanEjectDocument............................................................................................23
5.17 PiScanRewind........................................................................................................23
5.18 PiScanFwdFeedAndStamp....................................................................................23
5.19 PiScanStampAndEject...........................................................................................24
5.20 PiScanControlLEDBlink........................................................................................24
5.21 PiScanResetScanner...............................................................................................24
5.22 PiScanSoftResetScanner........................................................................................25
5.23 PiScanCloseDevice................................................................................................25
5.24 PiScanFirmwareDownload....................................................................................25
5.25 PiScanXfn..............................................................................................................25
5.26 PiScanXmitCardswipeTrack..................................................................................27
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 3

6100 Scanner

API PROGRAMMING MANUAL

5.27 PiScanResetCardswipe.........................................................................................27
6 Raw Image Format..........................................................................................................27
7 Code Examples...............................................................................................................30
8 Error codes......................................................................................................................36
9 Notes regarding .NET data types....................................................................................39
10 The PiScan.INI configuration file.................................................................................39
11 Workflow Diagrams......................................................................................................41

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 4

6100 Scanner

API PROGRAMMING MANUAL

1 Introduction
The Application Programming Interface (API) for the Pertech Industries 6100 dual sided scanner and
MICR reader is implemented as a library of function enclosed in a .lib file for the LINUX distribution and a
Microsoft DLL file. Once Opened (connection made to a working device) the device control firmware can
be operated as needed any order of methods is accepted, and the device will report its success or failure as
appropriate. The application is then in complete control of device (and presumably operator actions) by
commanding document insertion, scanning and stamping, image formatting, and document re-scanning or
ejection. Operations are carried out or rejected depending on the physical status of a document held by the
unit. This device has a single restriction in that if a document is stamped, it can only be ejected in the
forward direction, exiting out the back, thus preventing potential contamination of the contact image sensor
window.
As this scanning device is also a MICR code line reader, MICR can be automatically read along with the
scan and the decoded MICR string is available in the header of the image. The raw MICR signal can
optionally also be retrieved as data in addition to retrieving the image.
Important note if you are upgrading to version 2.xx from version 1.xx of the API: You must get the
latest 6100 scanner driver from Pertech Industries. API versions 2.xx and above use PRIUSBD, and
not the PERTECHMCRO driver used in the versions 1.xx API. Please contact Pertech Industries
technical support at 307-856-4821 ext 317 or visit www.pertechindustries.com.

1.1 MICROSOFT Environment


The following modules are used in the installation and programming of the 6100:
PiScan.h
PiScan.lib
PiScan.dll
PriBin.dll
MICRLib.dll
PiScan.INI
The OCR version of the API will also require:
SIPC006A
storage.dat
storage7.dat
amplib.dll
amplm.dll
amppx.dll
logosDM.dll
lvscar.fnt
lvscmc7.fnt
lvsmicr.fnt
lvsnum.fnt
lvsocra.fnt
lvsocrb.fnt
AMPLIB.INI

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 5

6100 Scanner

API PROGRAMMING MANUAL

It is left up to the application writer to place these files where required. The DLL files can usually be
placed in the system directory, but they can also be kept with the application if desired.
This programming guide defines the methods that the application can invoke and the properties the
application can read.
Note: That the OCR version of the API will only work with certain models of the 6100. It will default to
magnetic decoding of MICR if OCR is not available.
Note: Some less used options might not be implemented in the preliminary release of the API. In such
cases a NotImplemented status will be returned.

1.2 LINUX environment


The following modules are used in the installation and programming of the 6100:
PiScan.h
PiScan.INI
libjavawrap6100.so
libjpeg must be installed according to the environment
libMICR_API.so
libPIImage.so
libPISCAN.so
libtiff must be installed according to the environment
The OCR version of the API will also require:
tbd

2 Usage Model
The conceptual model of this image scanner, MICR reader, and self-inking stamper device is one of being
entirely host application activated; as there are no user buttons or sensor triggering actions that an operator
can make to initiate an action. With an application that can respond quickly, this device (scanner will be
used interchangeably throughout the rest of this specification) can be made to appear as always ready to
accept a document. Document insertion can handle both standard documents (such as checks) or ID card
insertion. If an ID card (stiff document) is inserted on the wrong side (i.e. where a check goes) then a
physical path limitation will halt its progress and an error condition will be reported.
An internally incremented counter (signed integer) may be used as an automatically generated document
ID. Processing can be commanded for any combination of image and/or MICR only, stamp only, or
movement only (used for ejecting and in maintenance calibration). This API runs internal protective
timeouts so that all methods return to the application, with the exception of the PiScanWaitForDocAndScan
method which has a wait timeout parameter that is added to the internal protective timeout. This supplied
timeout is implicitly repeated by the PiScanWaitForScanComplete method, if that method is issued.
Document and/or MICR scanning and data transfer is a two step process and there are two scanner option
setting methods one for scan function, and the other for the desired image processing and formatting to be
done before transferring data. In addition to scanning and selecting the desired image format, the
application is also required to eject the document and free the data buffer used. In case the application is
requesting an image and/or MICR scan and there is no free buffer, then no scanning takes place. The
number of buffers available depends on the amount of installed device memory; so it may be possible to
have several scans and then several transmissions of the captured data, followed by buffer freeing.
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 6

6100 Scanner

API PROGRAMMING MANUAL

Once a scan is performed the assigned device buffer retains the image and MICR signal in raw format.
MICR data (if captured) is automatically decoded into an ASCII string. At transmission time, image data
undergoes any extra image format processing and the image can be repeatedly requested and processed into
different formats or cropped if needed. It is possible to repeatedly transmit different crop areas (specified
rectangular portions) of the captured image or only transmit the MICR raw signal.
If a jam occurs, the transport stops, an error status is returned, and however much of an image has been
captured is saved, allowing treatment as if it was the desired complete image. The application is expected
to next issue an eject command, making an attempt to clear the jam via reverse or forward movement
and/or instruct the operator to unlatch the cover and manually clear the media. Note that any document
longer than the maximum length of 8.75 will be reported as a Document Too Long error (because sensors
are covered and the maximum running motor steps have been exceeded). To alert the operator, the
application can issue a command to use the 6100 front LED for signaling of needed manual intervention.
When the 6100 scanner does not receive any command requests for approximately five minutes, it will
enter a low power mode. The secondary status field will indicate this mode when it is equal to
PrsStat_LowPower (see sections 4.1 and 8). Please note that in low power mode, the document sensors
will no longer indicate document presence. All API methods with the exception of PiScanGetStatus (see
section 5.2) will cause the scanner to resume full power operation.
A simple example of an applications device operation would be this list of actions:
1. Select scan functions (must be called first time to acquire a scan buffer index).
2. Wait for document insert and then scan and/or read MICR.
3. Review status to see if want to instruct operator to remove the document, or to change parameters
and stamp or even rescan.
4. Select the desired presentation options including the format of the image (if want changes from the
defaults).
5. Receive the data that was captured and processed per the functions and format options.
6. Perform any additional verification of data to decide on next steps.
7. Review MICR data (assuming that we are not stamping everything) and decide if want to stamp. If
so then invoke the stamp command.
8. Decide about additional image format selection and transmission of cropped areas.
9. Copy out the image and relevant image tag (descriptive) data.
10. Eject the document.
11. Free that images data buffer.
12. Repeat.
13. Perform a parallel activity of transaction batching for the sending of images to a financial house
and/or image archiving.
This sample application sequence is pictured below along with a potential need for the application to
submit a part of the image for some external custom OCR process, such as courtesy amount recognition.
The actions performed by the PR6100 are shown in blue lettering; not shown completely is that each
method returns a status which the application should look before proceeding to the next action:

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 7

6100 Scanner

API PROGRAMMING MANUAL

Select scan
functions

Wait for document


insert & scan

Status OK?

Free image buffer

signal operator
intervention

Y
Select image
format

Receive image
and MiCR data

MICR OK,
should
stamp?

Y
Set stamp
position, issue
stamp and eject
command

Need crop
image for
OCR?

Clock

Y
Select format and
size, and Receive

Copy Image,
Eject document;
Free image
buffer

Trigger for periodic


clearing

Application
saves images
& MICR per
workflow

Interface to
send
images&data
for $
collection

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 8

6100 Scanner

API PROGRAMMING MANUAL

Default values for scan and presentation options exist after power-up and after any resets. All application
set property values are retained in volatile memory.
Please see section 9 for more detailed workflow operation.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 9

6100 Scanner

API PROGRAMMING MANUAL

3 Data Structures
3.1 Status structure
Every method returns a status value that is stored in the API and can be retrieved by calling
PiScanGetPropStatus or PiScanGetPropScanStatus. (Please see description of each method to see how the
structure applies). Note that some of the data items returned may not apply to a particular method.
The status value is a structure that has the following data items:
typedef structure
{
BYTE
ub_uf;

// Unique Flag:
//
Always equal to 0x1A.
//
Indicates this is a response from a
//
commanded function.

BYTE

ub_id;

// Identification of the device class:


//
Always equal to 0xCC.

BYTE

ub_cc;

// 2nd byte of the firmware command code:


//
Values are from the command specification.

BYTE

ub_sens;

// Sensor State:
// Bits indicating sensors:
//
(0 is open, 1 is currently covered)
//
Bit 0 = front right entry
//
Bit 1 = front right inside
//
Bit 2 = front left entry
//
Bit 3 = front left inside
//
Bit 4 = cover open
//
Bit 5 = middle sensor
//
Bit 6 = reserved
//
Bit 7 = magnetic card data available

BYTE

ub_bx;

// Image buffer index:


//
When returned from the PiScanSelectScanFunctions
//
method, this may refer to the next free buffer
//
to be used as a parameter to several other
//
methods.
//
It may also identify the devices buffer that is
//
holding the data relevant to this status return.
//
Values start at 1, as 0 stands for none or not
//
applicable.

BYTE

ub_bs;

// Image buffer state:


//
Values:
//
0 = free
//
1 = in current use,
//
2 = data ready,
//
3 = successfully transmitted at least once.
//
Not applicable if ub_bx is zero.

BYTE

ub_stat;

// Primary status:
//
The value will be equal to one of
//
the Error Codes listed in this guide.
//
e.g. PrsStat_OK = 0.

BYTE

ub_sstat;

// Secondary status:
//
Additional status to alert application
//
to conditions of possible interest;
//
Mostly used when Primary status = 0.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 10

6100 Scanner

API PROGRAMMING MANUAL

WORD

uw_reserved;

// 2 byte reserved.

SHORT

uw_docid;

// Document number:
//
Internally generated image counter
//
value for the data in the buffer;
//
Equal to -1 if none. Note that this
//
rolls over at 32,767.

DWORD

ul_vlen;

// Length of following data:


//
Not applicable to all methods.
//
If a command does not return any data,
//
this will be equal to zero.
//
(Check command description for specific
//
use; e.g. For transmit image command,
//
this will be size of scanned image.)

} PriStatStr;

The values of ub_stat and ub_sstat that are particularly relevant may be mentioned in the method
descriptions; the complete list can be found at the end of the document.

3.2 Scan Function Structure


The Scan Function structure contains the information used to setup the PiScanSelectScanFunctions method.
The user will need to declare this structure, fill in the entries as desired and pass a pointer to the method.
See PiScanSelectScanFunctions for more information.
typedef struct
{
BYTE
bufIndex;

// Buffer Index:

BYTE

scanOpt;

// Capture Choice (Scan Option):


// Bit fields may be logically ORd:
//
Bit 0 = If 1, then Scan Front
//
Bit 1 = If 1, then Scan Back
//
Bit 2 = If 1, then Capture MICR
//
Bit 5 = If 1, then Left side insert (ID card)
//
Else Right side insert (check)
// Ex: scanOpt = 0x7 = Front, back & MICR on right side.

WORD

delayTime;

// Delay Time until motor start:


//
Time in milliseconds from entry sensor covered
//
to motor startup. Default = 330.
//
0 = immediate motor start.

WORD

fixLength;

// Fixed Length:
//
0 = automatic determination by device.
//
Values 16 (8.75X200dpi) max pixels will be rounded
//
down to a mod 16 value.

WORD

fixWidth;

// Fixed Width:
//
0 = automatic determination by device.
//
Values 16 832 max pixels will be
//
rounded down to a mod 16 value.

BYTE

imgArgmt;

// Image Arrangement or Scan Type:


//
1 = Scan at 200 DPI grayscale (All Models).
//
2 = Scan at 200 DPI color (Color models only).
//
3 = Scan at 400 DPI grayscale (Color 400 DPI models)
//
4 = Scan at 400 DPI color (Color 400 DPI models)

} PriScanFunct;

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 11

6100 Scanner

API PROGRAMMING MANUAL

3.3 Transmit Format Structure


The Transmit Format structure contains information to be used in both the
PiScanSelectImageTransmitFormat and PiScanSelectImageTransmitDefaults methods. The user will need
to declare this structure, fill in the entries as desired and pass a pointer to the method. See
PiScanSelectImageTransmitFormat for more details of these parameters.
typedef struct
{
BYTE
bufIndex;

// Buffer Index:
//
Buffer in which to apply these settings.

BYTE

format;

// Format:
//
0 = TIFF G4 compressed binary
//
1 = TIFF gray (default on monochrome units)
//
2 = TIFF color (default on color units)
//
3 = JPEG grayscale carried in TIFF envelope
//
4 = JPEG color carried in TIFF envelope
//
5 = Reserved
//
6 = Reserved
//
7 = JPEG grayscale in JFIF format.
//
8 = JPEG color in JFIF format.
//
9 = TIFF uncompressed binary.

WORD

cropSpec[4];

// Crop Offset & Size:


//
cropSpec[0]: horizontal offset from 0,0
//
(start is top left.)
//
cropSpec[1]: vertical offset down from 0,0
//
(start is top left.)
//
cropSpec[2]: horizontal size in pixels,
//
(0 = full horizontal)
//
cropSpec[3]: vertical size in pixels,
//
(0 = full vertical)

BYTE

convFact;

// Conversion factor:
//
(1-100) Specifies either threshold or JPEG quality.
//
if 0 and JPEG, the default conversion factor is 75.
//
if 0 and bitonal threshold, the default is 50.
//
See description of PiScanGetPropConvFact for details.

BYTE

freeFlag;

BYTE

rotation;

BYTE

selectSide;

BYTE

binParm;

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

Automatic clear after transmit.


0 = Do not automatically free buffer after transmit.
1 = Automatically free buffer after transmit.
Image Rotation Select.
0 = None
1 = Rotate Counter Clockwise
2 = Rotate Clockwise
Side Select.
Bit 0 : If 1, then transmit Front
Bit 1 : If 1, then transmit Back (N/A on single
sided units)
Ex: selectSide = 0x3, then transmit front and back
Bit 2 : If 1, and Bit 0 and 1 are equal to 1, then
flip the back side (left) 180 degrees.
Ex: selectSide = 0x7, then transmit front and back,
with back side image flipped 180 degrees.
Bi-Tonal method selection
0 = Standard method
1 = Threshold method, default select cutoff
2-100 Reserved

} PriFormatStr;

Note that the selectSide parameter is only applicable if PriScanFunct.ScanOpt selects both front and back
images. The binParm parameter is only applicable if format parameter is 0 (TIFF G4 binary).

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 12

6100 Scanner

API PROGRAMMING MANUAL

4 Properties
These are essentially the options and metadata surrounding the acquisition of front and back images and of
MICR data. Property values contain image and MICR data and report on the state of the device. Properties
that do not have valid data at the time of reference contain a null value.

4.1 PiScanGetPropStatus
This property returns the status structure in conjunction with the return from every method invocation. For
example, to see the status of the scanner after invoking PiScanEjectDocument, call PiScanGetPropStatus to
see the results of the call. Every method invocation should be followed with PiScanGetPropStatus to
retrieve the results.
An application can call to get the scanner status at any time, which could be useful to monitor the document
entry sensors for example. To do this, a call to PiScanGetStatus will be made first, followed by
PiScanGetPropStatus to see the results.
To check the status of a scan that is pending, use PiScanGetPropScanStatus (see 4.2).
Prototype:
DWORD PiScanGetPropStatus(PriStatStr *statStruct);
Parameters:
statStruct: A pointer to the 16 byte PriStatStr structure. This property will have filled in the fields
of PriStatStr upon return. See 3.1

4.2 PiScanGetPropScanStatus
This property returns the status structure after a scan is completed, and reports on the document state at that
time. It is undefined when a PiScanWaitForDocAndScan method is invoked and set when that method
completes. This function can be used when using the polling method of scanning (see example of a polled
sequence in section 7).
The status notification of when the image is ready to be transmitted can also be reported via the
applications call to the PiScanWaitForScanComplete method (presumably on an application thread
auxiliary to the main one started before making the scan call). The scan result status is reported in the
associated parameter of PiScanWaitForScanComplete.
This status property will remain unchanged for non-scan methods while the standard PiScanGetPropStatus
property will change with the invocation of every method.
Prototype:
DWORD PiScanGetPropScanStatus(PriStatStr *statStruct);

Parameters:
statStruct: A pointer to the 16 byte PriStatStr structure. This property will have filled in the fields
of PriStatStr upon return. See 3.1

4.3 PiScanGetPropConvFact
Only available on WINDOWS version
This property reports on the conversion factor from the raw image captured to the desired format that was
used. Values are from 1 (min) to 100 (max), that were used when processing from the captured grayscale or
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 13

6100 Scanner

API PROGRAMMING MANUAL

color data before it is transmitted. If the output format is B/W (i.e. one bit per pixel) then the conversion
value is used to alter the thresholding of the raw image, with increasing values indicating whiter (less
black) images. If the output is JPEG, then this number indicates image quality (which inversely affects
image size.)
When not set by the application as a parameter of the PiScanSelectImageTransmitFormat or
PiScanSelectImageTransmitDefaults methods, this value will report the default that was used. It reports the
value from the TIFF header of the last image or document tags transmission. It will not be updated until
after successfully acquiring data from PiScanXmitDocumentTags, PiScanXmitFromImageBuffer, or
PiScanWaitForScanComplete (with auto-transmit set).
Prototype:
DWORD PiScanGetPropConvFact(LPWORD convFact);

Parameters:
convFact: A pointer to a WORD that will receive the conversion factor upon return from this call.

4.4 PiScanGetPropDocLength
Only available on WINDOWS version
This property reports the motor run length of the captured document. Note that for documents that are
greater than max document length listed in device specifications, the scanner will capture up to the max
document length and report a DocLength error. The image as captured up to that length will be available
for presentation. It is only valid after an image or tags are transmitted. It reports the value from the TIFF
header of the last image or TIFF header transmission. It will not be updated until after successfully
acquiring data from PiScanXmitDocumentTags, PiScanXmitFromImageBuffer, or
PiScanWaitForScanComplete (with auto-transmit set).
Prototype:
DWORD PiScanGetPropDocLength(LPWORD docLength);

Parameters:
docLength: A pointer to a WORD that will receive the document length upon return from this call.

4.5 PiScanGetPropDocWidth
Only available on WINDOWS version
This property reports the width of the captured image. It is only valid after an image or tags are
transmitted. It reports the value from the TIFF header of the last image or TIFF header transmission. It
will not be updated until after successfully acquiring data from PiScanXmitDocumentTags,
PiScanXmitFromImageBuffer, or PiScanWaitForScanComplete (with auto-transmit set).
Prototype:
DWORD PiScanGetPropDocWidth(LPWORD docWidth);

Parameters:
docWidth: A pointer to a WORD that will receive the document width upon return from this call.

4.6 PiScanGetPropLastMICRDecodeScheme
Only available on WINDOWS version
This property will return the last MICR decode scheme used to decode the MICR String in the method
PiScanXmitMICRDecodeString. For 6100 Scanners equipped with OCR and magnetic decoding, this may
return a 1 if the string was decoded magnetically, or a 2 if the string was decoded with OCR. For non-OCR
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 14

6100 Scanner

API PROGRAMMING MANUAL

models, only a 1 for magnetic decode will be returned. A 0 is returned if PiScanXmitMICRDecodeString


was not called for the scan sequence.
This property is new as of version 2.06 of the API.

Prototype:
DWORD PiScanGetPropLastMICRDecodeScheme(LPDWORD Scheme);

Parameters:
LAST MICR DECODE
PARAMETER DEFINITION
Scheme value returned
Description
Hex
Decimal
00
0
Clear MICR decode not called
01
1
Last MICR decode was magnetic
02
2
Last MICR decode used OCR

4.7 PiScanGetPropMICRString
Only available on WINDOWS version
This property should only be used for legacy applications. Please use the method
PiScanXmitMICRDecodeString for new applications.
This property contains the decode results from the MICR signal (if any) that was captured and decoded
when the image was transmitted, presented as a NUL terminated ASCII string. It is available after the
transmission of either the front or the back images of a document, as it reports the MICR string included in
the last image header transmitted.
The string returned can be a maximum of 80 bytes. It is only valid after an image or tags are transmitted
and updated after the next transmission. It will not be updated until after successfully acquiring data from
PiScanXmitDocumentTags, PiScanXmitFromImageBuffer, or PiScanWaitForScanComplete (with autotransmit set).
Note that this property behaves differently than PiScanXmitMICRDecodeString in that it returns the MICR
string reported in the last transmitted TIFF image header. PiScanXmitMICRDecodeString can be used
anytime after a scan, where PiScanGetPropMICRString will not change until the image or document tags
are transmitted using one of the above methods.
Prototype:
DWORD PiScanGetPropMICRString(LPBYTE stringMICR);

Parameters:
stringMICR: A pointer to a buffer that will receive the NUL terminated ASCII string.

4.8 PiScanGetPropAPIVersion
This property contains the API release version as a NUL terminated ASCII string. It is available after Open
and is no longer than 31 bytes.
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 15

6100 Scanner

API PROGRAMMING MANUAL

Prototype:
DWORD PiScanGetPropMICRString(LPBYTE stringVersion);

Parameters:
stringMICR: A pointer to a buffer that will receive the NUL terminated ASCII string.

5 Methods
All methods return a method status (values defined at the end of this specification) and also set the
PiScanGetPropStatus property or PiScanGetPropScanStatus property. Except for the
PiScanWaitForDocAndScan method, the requested function is performed and the returned status reflects
the result. PiScanWaitForDocAndScan initializes a waiting action and then immediately returns. The
application can either use the related method, PiScanWaitForScanComplete, or instead could just look for
changes in (poll) the PiScanGetPropScanStatus property to determine when a scan has completed.

5.1 PiScanOpenDevice
This method establishes the connection to the scanner and initializes all properties to default state. The
device id is reserved for future API capability and should be set to NULL.
The default state will be that all buffers are free; relevant properties are initialized to default values; and
waiting for document entry is terminated.
Prototype:
DWORD PiScanOpenDevice(LPBYTE deviceID);

Parameter:
deviceID: A pointer to a buffer to receive the device ID.

5.2 PiScanGetStatus
This method simply reports the device current state by updating the status property, which can be read with
PiScanGetPropStatus.
If the 6100 Scanner enters low power mode, the PiScanGetStatus/PiScanGetPropStatus pair can be used to
monitor this. The secondary status field will indicate PrsStat_LowPower (see section 8). All other API
methods, with the exception to PiScanGetStatus will cause the 6100 to resume full power operation. For
more information regarding low power mode, see the section 2 paragraph regarding low power.
Prototype:
DWORD PiScanGetStatus();

Parameters:
None

5.3 PiScanSelectScanFunctions
This method sets the options used for the next scan the delay time between document detect and motor
start-up; front-rear image capture; and automatic or fixed image size.
This method must be called at least once with an image buffer index value of 0 in order to acquire a free
device buffer as a target for the first upcoming scan. The function choices and whether fixed size or
automatic document size detection should be used to determine the processing performed. The returned
Pertech Industries, Inc.
Document Alfa Rev. 00
2015/11/01
Page 16

6100 Scanner

API PROGRAMMING MANUAL

image buffer index (in the status structure buffer index field, i.e. ub_bx) is needed in other methods and
the image buffer it refers to should be freed when all processing of document data is completed.
If the application sets max dimension size(s), then the set size(s) are used for capture.
This commands arguments are stored and associated with the assigned buffer, and it is normally a prelude
to the PiScanWaitForDocAndScan method.
The capture choice (scan option) parameter provides for two independent images or an appended image
that appears as shown next

Note that the capture choice (scan option) parameter is applied at scan capture time, not transmit time. For
example, selecting front only with this method will cause the scanner to only capture the front image into
the buffer. The back image will not be available until back image is selected and the document is
rescanned. It is recommended that the capture choice always select both front and back images: If only
one side of the image is desired, then PiScanSelectImageTransmitFormat or
PiScanSelectImageTransmitDefaults can be used to transmit either or both without having to rescan the
document.
The imgArgmt (sometimes referred to as scan type) parameter can be used to change the type of scan that
is made at the time the image is captured. All 6100 models support imgArgmt =1, which is 200 DPI
grayscale and is the fastest image acquisition. If using a color model, note that if grayscale is selected at
this time, it will not be possible to transmit the image in color later.
Scan Type
ImgArgmt
Hex
Decimal
01

02

03

04

Scan Type
Scan at 200
DPI grayscale
Scan at 200
DPI color
Scan at 400
DPI grayscale
Scan at 400
DPI color

Supported Models
All
All except 200 DPI
grayscale
400 DPI Color
400 DPI Color

MICR data will not be available using 400 DPI scanning. Also with 400 DPI, the scanner model may not
contain enough memory to scan any document larger than an ID Card. For these reasons, do not select 400
DPI scanning on checks, it is intended for ID card scanning only.
Prototype:
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 17

6100 Scanner

API PROGRAMMING MANUAL

DWORD PiScanSelectScanFunctions(PriScanFunct *scanFuncts);

Parameters:
This method expects an input parameter, which points to the PriScanFunct structure defined the
Data Structure section of this document. See 3.2

5.4 PiScanSelectImageTransmitFormat
This method sets the options used to process the image from raw capture data for the next presentation.
This includes which image format to use; optional crop dimensions; quality factor to use if JPEG
compressing; auto buffer freeing upon completion; rotation; side selection; and bi-tonal conversion
parameters. Do not select automatic freeing if the same image in different formats or other crop areas may
be needed from the raw data. If selected, automatic freeing will only occur after a subsequent call to
PiScanXmitFromImageBuffer; calls to other Xmit methods will not automatically free the buffer. The
selected format will apply to the next transmission from the indicated buffer until the buffer is freed.
The selectSide parameter provides for two independent images or an appended image that appears as
shown next - normal and counter clockwise rotated:

Note that if both front and back were selected using PiScanSelectScanFunctions,
PiScanSelectImageTransmitFormat can be used to transmit either or both without having to rescan the
document. If PiScanSelectScanFunctions was previously used to only capture one side of the document
into the scanners buffer, and the selectSide parameter does not match that side, a primary error of
PrsStat_NoDocument will be returned when PiScanXmitFromImageBuffer is called. (For example, if only
the front side was captured, selectSide must also be equal to transmit front only.)
The selectSide parameter also can be set so that the back image is flipped 180 degrees when both images
are appended. This is useful for ID cards, where having one file with side by side images is beneficial for
OCR, and the direction of the text will be the same for both sides. To use this, set the selectSide parameter
to 7.
Prototype:
DWORD

PiScanSelectImageTransmitFormat(PriFormatStr *xmitFormat);

Parameters:
This method expects an input parameter, which points to the PriFormatStr structure defined the
Data Structure section of this document. See 3.3

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 18

6100 Scanner

API PROGRAMMING MANUAL

5.5 PiScanWaitForDocAndScan
This method sets up the device per the current scan functions set by the PiScanSelectScanFunctions
method, starts a waiting action for document insertion, and returns.
WaitTime is an unsigned integer in 10ths of a second, with 0 = no waiting (i.e. scan the document already
present) and a maximum value of about 65535 after which it rolls over. If a document is already present or
inserted in time and the wait not cancelled, then it will be scanned per the selected options and the
PiScanGetPropScanStatus property will be set.
After performing the scan using the specified insert side (set by PiScanSelectScanFunctions), the document
is held in the device at its trailing edge.
If a document insert is attempted at the wrong side, it will not cover the correct sensor so the transport
motor wont start and eventually a timeout error will be returned to the application.
When txFlag is 1, the device will automatically transmit the image when the scan is complete. (This would
be functionally equivalent to calling this method and then calling PiScanXmitFromImageBuffer when
PiScanWaitForDocAndScan is complete.) When txFlag is 1, then the PiScanWaitForScanComplete
method must be called to receive the data.
Prototype:
DWORD PiScanWaitForDocAndScan(BYTE bufIndx,WORD waitTime, BYTE txFlag);

Parameters:
bufIndx:
waitTime:
txFlag:

Specifies which buffer index to store the image.


Specifies the time in 10ths of a second to wait for a document to be inserted.
Specifies whether or not to immediately transmit after image capture.

5.6 PiScanSelectImageTransmitDefaults
Only available on WINDOWS version
This method sets the default options used to process the image from raw capture data for the next
presentation. It behaves identically to PiScanSelectImageTransmitFormat except this methods settings
will apply to all free buffers; and these settings will persist until changed or the device is reset or re-opened.
This method uses the same parameter list as the PiScanSelectImageTransmitFormat method. This method
ignores the buffer index parameter.
Prototype:
DWORD PiScanSelectImageTransmitDefaults(PriFormatStr *xmitFormat);

Parameters:
See PiScanSelectImageTransmit for description:Section 5.4

5.7 PiScanWaitForScanComplete
This method does not return until a scan is completed or a timeout occurs; the time limit used is the same as
was given in the PiScanWaitForDocAndScan method. Upon return the PiScanGetPropScanStatus property
will be set. Use this method instead of polling (reading for a change in the returned status).
If txFlag was equal to 1 in the preceding PiScanWaitForDocAndScan method, then after scanning a
transmit is done using the current transmit options, which can be changed before scanning; with the
transmission filling Recbuf and setting buffer size Reclen.. When txFlag is 1 this
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 19

6100 Scanner

API PROGRAMMING MANUAL

PiScanWaitForScanComplete method should be called to receive the data. If txFlag is 0 then only the scan
status property will be set.
The recBuf size should be set to a maximum scanned image size. The maximum buffer size that the 6100
can transmit for a 200 DPI monochrome image is 3,312,384 bytes. It is recommended that this size be used
to guarantee no overrun or PrsStat_SmallBuf error. (This size can also be read from the diagnostic function
to retrieve configuration, under the tag <MaxBufferSize>). recLen indicates the size of this buffer, and
after return it will report the actual size of received data when done.
Prototype:
DWORD PiScanWaitForScanComplete(LPDWORD recLen, LPBYTE recBuf);

Parameters:
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.8 PiScanCancelScanWait
This method cancels any waiting action. If a document had already started scanning, then this will be
reported as a method failure.
Prototype:
DWORD PiScanCancelScanWait();

Parameters:
None.

5.9 PiScanXmitFromImageBuffer
This method will use the current image transmit format property values to have the device format the
scanned image and transmit the data into the given buffer.
The recBuf size should be set to a maximum scanned image size. The maximum buffer size that the 6100
can transmit for a 200 DPI uncompressed monochrome image is 3,312,384 bytes. It is recommended that
this size be used to guarantee no overrun or PrsStat_SmallBuf error. (This size can also be read from the
diagnostic function to retrieve configuration, under the tag <MaxBufferSize>). recLen indicates the
size of this buffer, and after return it will report the actual size of received data when done.
Prototype:
DWORD PiScanXmitFromImageBuffer(BYTE bufIndex,LPDWORD recLen, LPBYTE
recBuf);

Parameters:
bufIndex: Specifies which buffer index to retrieve the image.
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.10 PiScanXmitDocumentTags
This method is for legacy applications and should not be used.
This method will transmit an image header without the image. The receive buffer should provide enough
room for all the automatically generated tags. Usually 1K is more than safe. recLen indicates the size of
the buffer, and after return it will report the actual size of received data when done.
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 20

6100 Scanner

API PROGRAMMING MANUAL

Prototype:
DWORD PiScanXmitDocumentTags(BYTE bufIndex, LPDWORD recLen, LPBYTE
recBuf);

Parameters:
bufIndex: Specifies which buffer index to retrieve the document tags.
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.11 PiScanSetMICRDecodeScheme
This method may be optionally called before PiScanXmitMICRDecodeString to change the scheme used to
decode the MICR data. This method will only change the decode scheme on OCR and magnetic equipped
6100 scanners. On non-OCR models, it will have no effect.
If the scheme parameter is greater than 2, or the 6100 is not equipped with OCR, the return value will be
PrsStat_ParamFail.
This method is new to version 2.06 of the API.
Prototype:
DWORD PiScanSetMICRDecodeScheme(DWORD Scheme);

Parameters:

SET MICR DECODE SCHEME


PARAMETER DEFINITION
Scheme value
Description
Hex
Decimal
Automatic. Let XmitMICRDecodeString
00
0
decide best scheme.
01
1
Force to only use magnetic decode
02
2
Force to only use OCR decode

5.12 PiScanXmitMICRDecodeString
This method sets the MICRString property from the device saved data at the indicated index and returns the
data in the given buffer. The string returned can be a maximum of 80 bytes, so the buffer should be at least
of that size. The parameter, recLen, will be set to the actual string size upon return.
For 6100 scanners equipped for both OCR and Magnetic decoding of MICR, this method will use the
scheme specified by a previous call to PiScanSetMICRDecodeScheme. When the decode scheme is set to
Automatic, then this will return the decode scheme that had the least amount of rejected characters. To
determine which scheme was used, this may be followed with a call to
PiScanGetPropLastMICRDecodeScheme. If the 6100 scanner is not equipped for OCR, then this method
will only decode magnetically.
The default MICR Translation of characters follows. Note these can be changed in the PiScan.INI file (see
section 10):

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 21

6100 Scanner

API PROGRAMMING MANUAL

E13B Character
0-9
S1
S2
S3
S4
REJECT

Name

CMC7 Character
0-9
SI
SII
SIII
SIV
SV
REJECT

Name

String Symbol
0-9
@
$
+
-
*

Transit Number
Amount
On Us
Dash

String Symbol
0-9
@
$
+
-
>
*

Internal
Terminator
Amount
Unused
Routing

Prototype:
DWORD PiScanXmitMICRDecodeString(BYTE bufIndex, LPDWORD recLen, LPBYTE
recBuf);

Parameters:
bufIndex: Specifies which buffer index to retrieve the MICR string.
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.13 PiScanXmitRawMICR
This method will fill the given buffer with the raw E13B MICR signal data values each is 2 bytes. The
size of the buffer should be at least 2 X 200 X doc length in inches. recLen indicates the size of the buffer
and after return it will report the actual size of received data when done. This method can be used to
examine the MICR signal curve. Practical applications should use PiScanXmitMICRDecodeString.
Prototype:
DWORD PiScanXmitRawMICR(BYTE bufIndex, LPDWORD recLen, LPBYTE recBUF);

Parameters:
bufIndex: Specifies which buffer index to retrieve the raw MICR data.
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.14 PiScanXmitRawCMC7MICR
This method will fill the given buffer with the raw CMC7 MICR signal data values each is 2 bytes. The
size of the buffer should be at least 4 X 200 X doc length in inches. recLen indicates the size of the buffer
and after return it will report the actual size of received data when done. This method can be used to
examine the MICR signal curve. Practical applications should use PiScanXmitMICRDecodeString.
Prototype:
DWORD PiScanXmitRawCMC7MICR(BYTE bufIndex, LPDWORD recLen, LPBYTE recBUF);

Parameters:
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 22

6100 Scanner

API PROGRAMMING MANUAL

bufIndex: Specifies which buffer index to retrieve the raw MICR data.
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.

5.15 PiScanFreeBufferIndex
This method frees an image buffer so that a subsequent scan can use the space. This method should be used
if automatic freeing is not a selected option of the previous transmit method. The image format associated
with the given buffer index is reset to the current Image Transmit Default.
Note: If a previous scan did not complete properly, a buffer may temporarily still be in use when this
method is called until the scanner finishes processing data. This will result in the method returning a failure
code. A wait loop that uses PiScanGetPropStatus to check that the ub_bs field is not equal to 1 (in use)
before calling PiScanFreeBufferIndex is suggested. (see status structure definition, section 3.1)
Prototype:
DWORD PiScanFreeBufferIndex(BYTE bufIndex);

Parameters:
bufIndex: Specifies which buffer index to free.

5.16 PiScanEjectDocument
This method removes the document, either in the forward scan direction or reverses out the document.
Success of this effort can be determined by looking at the sensor state in the standard Status property.
Prototype:
DWORD PiScanEjectDocument(BYTE Direction);

Parameter:
Direction: 0 = move forward and out the device back, 1 = reverse out the front.

5.17 PiScanRewind
This method is to be used after a scan is complete, and the document is still held in the rear nip point of the
scanner. Calling this method will cause the document to be reversed to the front of the scanner. The
document will be held on to the scanner at the front nip point. It is then possible to use the Feed Forward
and Stamp command to multi-stamp the document.
Note that this differs from PiScanEjectDocument in the forward direction, which removes the document
completely from the entry rollers.
Prototype:
DWORD PiScanRewind(void);

5.18 PiScanFwdFeedAndStamp
This method must be preceded with the PiScanRewind method. It will feed the document forward by the
stamp position specified then stamp the document. The method can then be repeated up to the maximum
stamp iterations allowed by the scanner, after which, the primary status field returns a Parameter NA error.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 23

6100 Scanner

API PROGRAMMING MANUAL

It is recommended that the first stamp after the PiScanRewind method set the stamp position at a distance
of 520 in order for the document to reach the stamp. After that, any distance may be used. Please use care
that the stamp does not fire inside the scanner mechanism without a document in place.
Prototype:
DWORD PiScanFwdFeedAndStamp(WORD stampPosition);

Parameter:
stampPosition: The number of 1/200 steps to feed the document forward from the current
position before stamping.

5.19 PiScanStampAndEject
This method stamps a document at the requested position. If the document is still being held in the nip
point (i.e. has not been ejected) after finishing a scan, this method will invoke the scanner to reverse the
document back into the scanner by a distance and stamp. The reverse distance will be one inch plus the
additional amount requested.
After stamping the document is ejected in the direction selected.
Prototype:
DWORD PiScanStampAndEject(WORD stampPosition, WORD direction);

Parameter:
stampPosition: The number of additional 1/200 steps to reverse the document from one inch of
the right edge of the check before stamping.

5.20 PiScanControlLEDBlink
This method sets the color and blink rates for the device LED.
Prototype:
DWORD PiScanControlLEDBlink(BYTE color, BYTE blinkOptions);

Parameters:
color: 0 = green, 1 red, 2 = yellow
blinkOptions: 0 = stop blinking, 1 = slow, 2 = fast

5.21 PiScanResetScanner
Only available on WINDOWS version
This method sets all the device properties to factory default values, and the device is put into an initial state.
The image buffer(s) are set to empty; relevant properties are also initialized to power up values; and the
communication link is reset.
The API does not need to be re-opened since the API will attempt to reestablish connection automatically.
This may take several seconds as the operating system re-assigns handles and drivers to the scanner.
Therefore, if this hard reset method is not needed, consider using the PiScanSoftResetScanner method.
Prototype:
DWORD PiScanResetScanner();

Parameters:
None.
Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 24

6100 Scanner

API PROGRAMMING MANUAL

5.22 PiScanSoftResetScanner
This method sets all the device properties to current default values. The image buffer(s) are set to empty,
and relevant properties are also initialized to default values. The communication link is not reset.
Prototype:
DWORD PiScanSoftResetScanner();

Parameters:
None.

5.23 PiScanCloseDevice
This method frees working storage and releases the device I/O resources. Any application threads that were
sharing the API will have to invoke the Open method to continue using the scanner. All buffers are freed
and set to current defaults.
Prototype:
DWORD PiScanCloseDevice();

Parameters:
None.

5.24 PiScanFirmwareDownload
This method is for advanced users. This method will download new firmware to the scanner. The
firmware image is a *.brn type of file supplied by Pertech Industries.
During the firmware download process, the 6100 scanner will start blinking the LED amber rapidly until
the 6100 resets itself. Do not reset the 6100 manually during this time or the scanner may become
inoperable and require that the unit be serviced. The process typically may take 2 to 3 minutes. All API
functions will be disabled, returning the PrsStat_FWDownload status until the API detects the 6100 scanner
has accepted the new firmware and reset itself.
Prototype:
DWORD PiScanFirmwareDownload(DWORD size, LPBYTE data_str);

Parameters:
size: A DWORD that specifies the size of the firmware image in bytes (size of the *.brn file).
data_str: A byte pointer to a buffer to that contains the firmware image (pointer to the *.brn file).

5.25 PiScanXfn
This diagnostics method can be used to retrieve firmware version, scanner configuration data, or statistics.
The parameter diagFn selects the type of diagnostic information requested. The data will be returned into
the supplied buffer. Statistics and Configuration are returned as an ASCII string in XML format.
recLen indicates the size of the buffer recBuf, and after return it will report the actual size of received data
when done. It is recommended to use a 10K byte buffer for receiving the information.
Prototype:
DWORD PiScanXfn(BYTE diagFn, LPDWORD recLen, LPBYTE recBuf);

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 25

6100 Scanner

API PROGRAMMING MANUAL

Parameters:
diagFn: 0x47 = return firmware version
0x4B = return scanner statistics
0x49 = return configuration data
recLen: A pointer to a DWORD to receive the size of the image buffer in bytes.
recBuf: A pointer to a buffer to store the image data.
Firmware version (diagFn = 0x47):
The returned string will resemble the following:
Model: 61xxxx-xxxx, Main: x.xxx.xx.xx, Boot: x.xxx.xx.xx
Statistics (diagFn = 0x4B):
The returned string will resemble the following:
<?xml version="1.0" ?>
<Statistics version="1.0.0">
<Event>
<Parameter>
<Name>HoursOn</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>ChkScans</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>IDScans</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>SkewCount</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>CoverOpen</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>FwdPaperSteps</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>RevPaperSteps</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>Stamps</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>GoodMICRScans</Name>
<Value>0</Value>
</Parameter>
<Parameter>
<Name>FailedMICRScans</Name>
<Value>0</Value>
</Parameter>

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 26

6100 Scanner

API PROGRAMMING MANUAL

</Event>
</Statistics>

Configuration (diagFn = 0x49):


The returned string will resemble the following:
<?xml version=1.0 ?>
<Configuration version=1.0.0
<Equipment>
<ManufacturerName>Pertech Industries</ManufacturerName>
<ModelName>613211-001A</ModelName>
<SerialNumber>12345</SerialNumber>
<FirmwareRevision>1.08.060.01A</FirmwareRevision>

<MaxBufferSize>3312384</MaxBufferSize>
<Buffers>3</Buffers>
<DPI>200</DPI>
<MICRInstalled>1</MICRInstalled>
<Color>0</Color>
<StampInstalled>1</StampInstalled>

<USBDescriptor>Serial</USBDescriptor>
<WarmUp>1</WarmUp>
<ImageSide>Both</ImageSide>
<MICRAutoFont>1</MICRAutoFont>
<MidSensor>1</MidSensor>
<MaxIDWidth>467</MaxIDWidth>
<Cardswipe>1</Cardswipe>
</Equipment>
</Configuration>

5.26 PiScanXmitCardswipeTrack
This method is used to return the cardswipe data from supported tracks. The given buffer is populated with
the results of the last scan, and the trackLen buffer is sized to reflect the actual size of data. A zero result in
trackLen indicates a failure to read the track, or no track data available yet.
Prototype: DWORD PiScanXmitCardswipeTrack( BYTE trackIndex, LPBYTE trackLen, LPBYTE
trackBuf);
Parameters:
trackIndex: Specifies which card track data to return.
trackLen: a pointer to a BYTE to receive the size of the track information in bytes.
trackBuf: a pointer to a byte buffer to store the data.

5.27 PiScanResetCardswipe
This method sets all track data lengths to zero and obliterates any previous reads on all tracks from device
memory. This should be used prior to PiScanXmitCardswipeTrack calls to assure track data received is
from the most recent cardswipe action. It may also be used immediately after a successful track read to
prepare for a future cardswipe event.
Prototype: DWORD PiScanResetCardswipe();

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 27

6100 Scanner

API PROGRAMMING MANUAL

6 Raw Image Format


This scanner captures images in a raw format that is compatible with a TIFF structure using a restricted set
of tags. This format is compatible with a standardized RAW format, DNG (digital negative) defined by
Adobe, but of course doesnt carry any of the digital photography tags. The image is captured in full color
or grayscale, depending on the type of contact image sensors installed.
Most of the PR6100 tags are set as a result of scanning. The application can add information that will be
relevant to its operation by defining some extra-meaning user tags before scanning.
The following is an example of TIFF tags that may be set by the scanner after image capture:

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 28

6100 Scanner

API PROGRAMMING MANUAL

Tag Number
(hex)
100
101
102
103

Data type

Definition

Long
Long
Short
Short

106

Short

10E
10F
110
111
112
115
116
117
11A
11B
128
131
[TBD]
[Future]
D010-D0FF

String
String
String
Short
Short
Short
Long
Long
Rational
Rational
Short
String
Long

Image Width in pixels


Image Length in pixels
Bits per sample: 1 (for B/W), 8 (for grayscale), 24 (for color)
Compression: 1 = no
4 = CCITT Group 4 (ITU T.6) B/W
7 = JPEG
Photometric interpretation = 1 (black is zero)
= 2 (RGB)
Image description: decoded MICR line
Make: Pertech Industries, Inc
Model: PR6100 #[ serial number ]
Strips per image =1
Orientation = 1: upper left across top to lower right
Samples per pixel = 3 for color, or = 1 for grayscale
Number of rows in strip = Image width
Image byte count
Width resolution = 200 /1dpi
Length resolution = 200 /1dpi
Resolution unit = 2 (meaning in inches)
Firmware version identification : FW release number
[Possible tags for JPEG may be added]
[Reserved values to report on quantities potentially useful to
automatically determine image quality]

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 29

6100 Scanner

API PROGRAMMING MANUAL

7 Code Examples
The following shows a pseudo-code example sequence for acquiring an image from a check. Note that
there are many options available and this only shows one possibility. Many steps have been left out for
brevity. Each PiScan call should be followed with PiScanGetPropStatus (or PiScanGetPropScanStatus) to
examine the status fields for possible errors, not all are shown in this example. For a more complete
reference, study the Visual Basic Pertech Industries API Tester with source code.
// Declarations
PriFormatStr xmitFormat;
PriScanFunct scanFunct;
PriStatStr statStruct;
DWORD errorcode;
unsigned char device_id = 0;
errorcode = PiScanOpenDevice(&device_id);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
return (int)errorcode;
}
// Set transmit defaults for all free buffers
xmitFormat.binParm = 0;
// Standard bi-tonal conversion
xmitFormat.bufIndex = 0;
// N.A. for this command
xmitFormat.convFact = 0;
// N.A. for this format
xmitFormat.freeFlag = 0;
// No auto free
xmitFormat.format = 0;
// Select G4 Bi-tonal
xmitFormat.rotation = 1;
// Rotate counter clockwise
xmitFormat.selectSide = 3;
// Select front and back
errorcode = PiScanSelectImageTransmitDefaults (&xmitFormat);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
return (int)errorcode;
}
// Transmit defaults only needs to be setup as desired after
// opening or reset. It is not required for each scan.
// START OF SCAN LOOP
// Repeat the following for each scan
// Set scan functions for this scan
scanFunct.bufIndex = 0;
// API to return a free buffer
scanFunct.scanOpt = 7;
// Select Front and back with MICR
scanFunct.delayTime = 250;
// 250 ms until motor starts
scanFunct.fixLength = 0;
// Auto detect length
scanFunct.fixWidth = 0;
// Auto detect width
scanFunct.imgArgmt = 1;
// Arrangement 1.
errorcode = PiScanSelectScanFunctions(&scanFunct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Get general status for further information
errorcode = PiScanGetPropStatus(&statStruct);
// Check that function call was good.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 30

6100 Scanner

API PROGRAMMING MANUAL

if (errorcode != PrsStat_OK)
{
// Handle error
}
// Now check status fields
switch(statStruct.ub_stat)
{
case PrsStat_OK:
// Good
break;
case PrsStat_NoBuf:
// No free buffers available, terminate scan
return PrsStat_NoBuf;
case PrsStat_ParamFail:
break;
// Note that other codes should be examined, not shown in this example
}
// Check secondary status for any possible warnings
if (statStruct.ub_sstat != PrsStat_OK)
{
// Display message or handle accordingly
}
BYTE bufferIndex = statStruct.ub_bx;
WORD waitTime = 100;
BYTE txFlag = 0;

// save the buffer index that API returned.


// amount of time to wait for document
// do not auto transmit in this example

// call the Wait For Doc And Scan function


errorcode = PiScanWaitForDocAndScan(bufferIndex, waitTime, txFlag);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
//
//
//
//
//
//

This example immediately follows the PiScanWaitForDocAndScan call


with PiScanWaitForScanComplete. Another option is to poll the
PiScanGetPropScanStatus until the buffer state field (ub_bs) returns
data ready (2) (or ub_stat is equal to Time Out, skew or other error)

// WaitForScanComplete will not return until document is ready or timed out


// This example is not using auto transmit, so recLen and recBuf are not used.
DWORD recLen = 0;
// the size of the image
BYTE* recBuf = NULL;
// temp storage for the image
// call the Wait for scan to complete function
errorcode = PiScanWaitForScanComplete(&recLen, recBuf);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Returned, get SCAN status for information
errorcode = PiScanGetPropScanStatus(&statStruct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Now check status fields
switch(statStruct.ub_stat)
{

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 31

6100 Scanner

API PROGRAMMING MANUAL

case PrsStat_OK:
// Good
break;
case PrsStat_TimeOut:
// A document was not seen in requested time
// Handle error
break;
case PrsStat_DocLength:
// Document exceeds max length
// Handle error
break;
case PrsStat_Skew:
// A document was not inserted properly
// Handle error
break;
// Note that other codes should be examined, not shown in this example
}
// Check secondary status for any possible warnings
if (statStruct.ub_sstat != PrsStat_OK)
{
// Display message or handle accordingly
}
// If all went well above, Get MICR string
recLen = MAX_ASCII_MICR_SIZE;
// the size of the ASCII MICR
recBuf = new BYTE[MAX_ASCII_MICR_SIZE]; // temp storage for the ASCII MICR
// call the Get Decoded MICR String function
errorcode = PiScanXmitMICRDecodeString(bufferIndex, &recLen, recBuf);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Call to PiScanGetPropStatus here and examine ub_stat and ub_sstat,
// and handle any errors accordingly. Eliminated here for brevity.
// Store MICR text
delete [] recBuf;
recLen = MAX_IMAGE_SIZE;
recBuf = new BYTE[MAX_IMAGE_SIZE];

// the size of the image


// temp storage for the image

//call the Transmit Image function


errorcode = PiScanXmitFromImageBuffer(bufferIndex, &recLen, recBuf);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Call to PiScanGetPropStatus here and examine ub_stat and ub_sstat,
// and handle any errors accordingly. Eliminated here for brevity.
// Examine image. For example sake, assume that we now want to return
// the front image only in grayscale without rescanning.
xmitFormat.binParm = 0;
xmitFormat.bufIndex = bufferIndex;
xmitFormat.convFact = 0;
//
xmitFormat.freeFlag = 0;
//
xmitFormat.format = 1;
//
xmitFormat.rotation = 1;
//
xmitFormat.selectSide = 1;
//

N.A. for this format


No auto free
Select Grayscale
Rotate counter clockwise
Select front only

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 32

6100 Scanner

API PROGRAMMING MANUAL

errorcode = PiScanSelectImageTransmitFormat(&formatFunct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Call to PiScanGetPropStatus here and examine ub_stat and ub_sstat,
// and handle any errors accordingly. Eliminated here for brevity.
//call the Transmit Image function
errorcode = PiScanXmitFromImageBuffer(bufferIndex, &recLen, recBuf);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Call to PiScanGetPropStatus here and examine ub_stat and ub_sstat,
// and handle any errors accordingly. Eliminated here for brevity.
// Display image, store, etc.
delete recBuf[];
// Free the buffer for next image.
errorcode = PiScanFreeBufferIndex(bufferIndex);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Call to PiScanGetPropStatus here and examine ub_stat and ub_sstat,
// and handle any errors accordingly. Eliminated here for brevity.
// Repeat for next scan
// GOTO START OF SCAN LOOP

The following shows a pseudo-code example sequence for capturing an image from a check using a polling
loop. Note that there are many options available and this only shows one possibility. Many steps have
been left out, including the transmit step for brevity. Each PiScan call should be followed with
PiScanGetPropStatus (or PiScanGetPropScanStatus) to examine the status fields for possible errors, not all
are shown in this example. For a more complete reference, study the Visual Basic Pertech Industries API
Tester with source code.
DWORD PolledSequence(void)
{
PriScanFunct scanFunct;
PriStatStr statStruct;
DWORD errorcode;
BOOLEAN scanComplete;

// PiScan scan functions.


// PiScan returned status.
// Loop control variable

// START OF SCAN
// Repeat the following for each scan
//******************************************
// STEP 1 : Free the buffer
//******************************************
do
{
DWORD freeStatus = PiScanFreeBufferIndex(m_BufferIndex);

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 33

6100 Scanner

API PROGRAMMING MANUAL

// In case of a previous image scan has not yet finished processing


// due to some scan error such as a Skew,
// then FreeBufferIndex will return PrsStat_InvBuf.
// In this case, after a few milliseconds the Buffer will
// again be available. This loop is shown as an example.
} while (freeStatus == PrsStat_InvBuf);
//******************************************
// STEP 2:Set scan functions for this scan
//******************************************
scanFunct.bufIndex = 0;
// API to return a free buffer
scanFunct.scanOpt = 7;
// Select Front and back with MICR
scanFunct.delayTime = 250;
// 250 ms until motor starts
scanFunct.fixLength = 0;
// Auto detect length
scanFunct.fixWidth = 0;
// Auto detect width
scanFunct.imgArgmt = 1;
// Arrangement 1.
errorcode = PiScanSelectScanFunctions(&scanFunct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
MessageBox( NULL, "Could not SelectScanFunctions", "Error" , MB_OK |
MB_ICONINFORMATION );
// Handle error here
return errorcode;
}
//******************************************
// STEP 3:
// We must get PropStatus after SelectScanFunctions in order to retrieve
// the buffer index the API wants us to use. We can check status while we are at it.
//******************************************
errorcode = PiScanGetPropStatus(&statStruct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
MessageBox( NULL, "Could not GetPropStatus","Error",MB_OK | MB_ICONINFORMATION );
// Handle error here
return errorcode;
}
// Use this opportunity to check primary status fields
switch(statStruct.ub_stat)
{
case PrsStat_OK:
// Good
break;
case PrsStat_NoBuf:
// No free buffers available, terminate scan
return PrsStat_NoBuf;
case PrsStat_ParamFail:
return PrsStat_ParamFail;
default:
return statStruct.ub_stat;
}
// Check secondary status for any possible warnings
if (statStruct.ub_sstat != PrsStat_OK)
{
// Display message or handle accordingly
}
// Save the Buffer index that the API returned (ub_bx field)
m_BufferIndex = statStruct.ub_bx;

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 34

6100 Scanner

API PROGRAMMING MANUAL

// NOTE that now that the API has given us a buffer index to use,
// before we can scan a new item, we will have to free it by calling
// PiScanFreeBufferIndex.
//******************************************
// STEP 4 : Set WaitForDocAndScan parameters and call it.
//******************************************
WORD waitTime = 65535;
BYTE txFlag = 0;

// amount of time to wait for document (MAX in this case)


// do not auto transmit in this example

// call the Wait For Doc And Scan function


errorcode = PiScanWaitForDocAndScan(m_BufferIndex, waitTime, txFlag);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
// note that you can call PiScanGetPropStatus here for further info if needed.
MessageBox( NULL, "Could not WaitForDocAndScan", "Error" , MB_OK |
MB_ICONINFORMATION );
// Free the buffer for next scan
if (PiScanFreeBufferIndex(m_BufferIndex) != PrsStat_OK)
{
// Handle error
}
return errorcode;
}
// Loop Control variable
scanComplete = FALSE;
//******************************************
// STEP 5 : Poll the API status until a scan is completed
//******************************************
do
{
// The API will update its status properties after each method call, but when
// polling like this, we have to manually tell it to do so before asking for
// those properties.
errorcode = PiScanGetStatus();
// Ignoring errorcode here.
// The above GetStatus call updated the API's status properties, now read them.
// NOTE we are looking at "PropScanStatus", as opposed to "PropStatus"!
errorcode = PiScanGetPropScanStatus(&statStruct);
// Check that function call was good.
if (errorcode != PrsStat_OK)
{
// Handle error
}
// Now check the IMAGE BUFFER STATUS field (ub_bs) for data ready
switch(statStruct.ub_bs)
{
case 0:
// Free
// If buffer is still free, then nothing has been scanned yet.
break;
case 1:
// Currently in use
scanComplete = TRUE;
// Test show that if this happens, then the scan completed,
// but with problems.
// We will want to get out of the loop, but we can check what
// went wrong by looking at ub_stat field.
break;
case 2:
// data ready
// GOOD Scan!
scanComplete = TRUE;

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 35

6100 Scanner

API PROGRAMMING MANUAL


break;
case 3:
// image was transmitted successfully at least once
// Since we are acquiring a new buffer, this shouldn't happen
break;

}
// Now check primary status fields to see if there was an error in the scan
switch(statStruct.ub_stat)
{
case PrsStat_OK:
// Good
break;
case PrsStat_TimeOut:
MessageBox( NULL, "Timed OUT", "Error", MB_OK | MB_ICONINFORMATION );
// A document was not seen in requested time, or missed
// triggering inner sensor.
break;
case PrsStat_DocLength:
MessageBox( NULL, "Doc Too Long", "Error", MB_OK | MB_ICONINFORMATION );
// Document exceeds max length
break;
case PrsStat_Skew:
MessageBox( NULL, "Skew", "Error", MB_OK | MB_ICONINFORMATION );
// A document was not inserted properly
break;
default :
MessageBox( NULL, "Scan not good", "Error", MB_OK | MB_ICONINFORMATION );
// A document was not inserted properly
break;
// Note that other codes should be examined, not shown in this example
}
// Check secondary status for any possible warnings
if (statStruct.ub_sstat != PrsStat_OK)
{
// Display message or handle accordingly
}
// Use this opportunity to update any data in the application,
// cancel the scan if needed, etc.
}while (scanComplete == FALSE);
//******************************************
// STEP 6 : Read the MICR and Get the Image
//******************************************
// Not shown in this example
}

8 Error codes
The following error codes are defined and will be included in the PiScan.h header file for interpretative
display and/or during debugging.
Device level codes:

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 36

6100 Scanner

API PROGRAMMING MANUAL

Error Code
0

Mnemonic
PrsStat_OK

1
2
3

PrsStat_JAM
PrsStat_NoBuf
PrsStat_ParamNA

4
5
6

PrsStat_ParmFail
PrsStat_TagFail
PrsStat_InProgress

Meaning
OK for requested method, may be qualified by an extended
status that could be of interest to the application. A zero value
in the extended status field means there is no additional status
A jam condition exists
No free buffers available
One or more parameters not applicable to this configuration /
firmware release; applicable parameters accepted
One or more parameters out of range; command rejected
TIFF user tag number out of range or bad structure
Requested operation was already set / in progress

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 37

6100 Scanner

API PROGRAMMING MANUAL

Error Code
7

Mnemonic
PrsStat_OpFail

8
9
10
11
12
13

PrsStat_TimeOut
PrsStat_InvBuf
PrsStat_DocLength
PrsStat_NoImage
PrsStat_SmallCrop
PrsStat_Reset

14
15
16
17

PrsStat_MotorTime
PrsStat_NoMICR
PrsStat_CoverOpen
PrsStat_DocumentSize

18
19
20

PrsStat_NotImplemented
PrsStat_NoDocument
PrsStat_Skew

21
22

PrsStat_NotWaiting
PrsStat_MICROverFlow

23

PrsStat_LowPower

24

PrsStat_XmitNA

25
26
50

PrsStat_Warmup
PrsStat_NoSwipe
PrsStat_Lockup

Meaning
Function did not complete; reason may be given in secondary
status
Timed out waiting for document insertion
Invalid buffer index parameter
Maximum document length has been exceeded
No scan data captured in buffer
Requested cropping exceeds available image
Going into device reset; may not be received by host if the
reason for the command was a transmission problem
Max motor run time reached, operation not completed
No MICR signal captured in this scan
Operation stopped due to cover open
Application set size not matched by the document that was
inserted
The function is not implemented in this release
The requested device side was not used for the insertion
Skew was detected in transport, may effect image, MICR
read, stamp position
Device was not waiting for document insertion
Returned in the secondary status field in the unlikely event of
an internal MICR buffer overflow.
Returned in the secondary status field if the scanner is in low
power mode.
The requested transmit format is not available for the type of
image that was scanned.
Indicates that the scanner is warming up after a hard reset.
No swipe information available
Firmware / hardware lockup; the device requires reset, done
by power cycling

Driver level codes:


Error Code
31
32
33

Mnemonic
PrsStat_NotConnected
PrsStat_NotOpen
PrsStat_Timeout

34

PrsStat_SmallBuf

35

PrsStat_NotCompatible

36

PrsStat_FWDownload

42

PrsStat_Illogical

51-99

PrsStat_SysErr

52
53
54

PrsStat_MICRDecodeRevErr
PrsStat_MICRDecodeFwdErr
PrsStat_MICRSecLibErr

Meaning
A device connection currently does not exist
The device has not been successfully opened
An expected I/O did not finish within a safety timeout,
data is missing or incomplete
Supplied buffer was too small to acquire the requested
data, only data up to the size parameter was copied
The command sent is not compatible with the present
version of scanner Firmware
Firmware is currently being downloaded. Until the
scanner resets itself, the API functions are disabled.
An argument value is not applicable to the requested
method option
Operating system generated error, sometimes also
reported by a window pop-up. The range of numbers
may allow tracking back to the code to pinpoint the
failure
Reverse MICR algorithm error.
Forward MICR algorithm error.
MICR Security Library error on intialization.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 38

6100 Scanner

Error Code

API PROGRAMMING MANUAL

Mnemonic

Meaning

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 39

6100 Scanner

API PROGRAMMING MANUAL

9 Notes regarding .NET data types.


This document has assumed a programming level of Visual Studio 6 using the straight C language. Be aware that Microsoft has changed data types
significantly with the .NET languages. These issues can lead to stack imbalance errors.
In the included sample code, variable types to be returned from API calls are set to DWORD. The DWORD data type in VS 6.0 corresponds to a 32-bit
variable, which is what the API returns. In Visual Studios 2005 (VB), these variable types need to be set to integer types, which correspond to the same bit
width. A long in VS 2005 is typically a 64-bit container.
According to the MSDS documentation:
If you are interfacing with components not written for the .NET Framework, for example Automation or COM objects, keep in mind that Long has a different
data width (32 bits) in other environments. If you are passing a 32-bit argument to such a component, declare it as Integer instead of Long in your new Visual
Basic code.
To summarize, the following variables should be used in .NET in regard to the data types described in the API Programming Manual (Document Alfa):
API MANUAL
Byte
WORD
DWORD

.NET DATA TYPE


Byte
Short
Integer

10 The PiScan.INI configuration file


Starting with version 2.06 of the API, a text file may be included in the directory, or folder, where the API files are located, called PiScan.INI. If this file exists,
the API will read the contents for keys that can change the behavior of the API.
There are 3 keys: MICRSPACE, E13BTABLE, and CMC7TABLE. These key names should be surrounded by square brackets (ASCII character hex 5B for the
left opening bracket and ASCII character hex 5D for right closing bracket), followed by a new line character, then the value of the key. The 3 keys can appear in
any order. If any of the keys do not exist in the file, then the API will use defaults.
As an example, the PiScan.INI file contents may look like the following:

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 40

6100 Scanner

API PROGRAMMING MANUAL

[MICRSPACE]
1
[CMC7TABLE]
1234567890ABCDE*
[E13BTABLE]
0123456789@F+->*
1.
2.
3.

[MICRSPACE] The value following on the line after this key can be either a 0 (ASCII hex 30) or a 1 (ASCII hex 31). When the key value is 0, then
any spaces (blanks) encountered during the MICR decoding will be removed. When the key value is 1, then the spaces will be included in the decode
string. The default is 0.
[E13BTABLE] There should be a string of 16 characters that follow this key on the next line. Each character in a E13B decode will be translated to
the character in the position that represents that character. In the example above, the S2 or Amount character will be translated into an F character,
rather than the default $. Please note in E13B, that the 1 character is first in the list.
[CMC7TABLE] There should be a string of 16 characters that follow this key on the next line. Each character in a CMC7 decode will be translated to
the character in the position that represents that character. In the example above, all special characters are replaced with ABCDE. Please note that with
CMC7, the 0 character is first in the list.
E13B Character
0-9
S1
S2
S3
S4
Unused
REJECT

Name

CMC7 Character
0-9
SI
SII
SIII
SIV
SV
REJECT

Name

Pertech Industries, Inc.

Transit Number
Amount
On Us
Dash

Internal
Terminator
Amount
Unused
Routing

String Position
1 to 10 (position 1 is 1)
11
12
13
14
15
16

Default String Symbol


0-9
@
$
+
-

String Position
1 to 10 (position 1 is 0)
11
12
13
14
15
16

Default String Symbol


0-9
@
$
+
-
>
*

Document Alfa Rev. 00


2015/11/01
Page 41

6100 Scanner

API PROGRAMMING MANUAL

11 Workflow Diagrams
The following three diagrams show more detail regarding the intended workflow of the 6100 scanner.
1. Scanning checks into a buffer.
2. Transmitting data after a scan.
3. Multi-buffer use.

Pertech Industries, Inc.

Document Alfa Rev. 00


2015/11/01
Page 42

6100 Scanner

Pertech Industries, Inc.

API PROGRAMMING MANUAL

Document Alfa Rev. 00


2015/11/01
Page 43

6100 Scanner

Pertech Industries, Inc.

API PROGRAMMING MANUAL

Document Alfa Rev. 00


2015/11/01
Page 44

6100 Scanner

Pertech Industries, Inc.

API PROGRAMMING MANUAL

Document Alfa Rev. 00


2015/11/01
Page 45

Potrebbero piacerti anche