Oc_readoutputimage, Oc_readoutputimage -51, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 111: Syntax, Parameters: description

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-51

Example:

HANDLE

Handle;

WORD

filedata[2];

int

retcode;

retcode =

OC_ReadModuleFile( Handle, FILTYP_M1, filedata,

6, 3, 2 );

/* Reads words 3 and 4 from module in slot 6. */

OC_ReadOutputImage

OC_ReadOutputImage reads the current output image from the
scanner.

Syntax:

int

OC_ReadOutputImage(HANDLE handle, WORD *

outimgcpy, int slotnum,

WORD offset, WORD len, WORD *imagebuf);

Parameters:

Description:

Since the scanner never changes data in the output image, it is not
necessary to copy the image, as with the OC_ReadInputImage
function, to preserve file integrity. It is supported, however, to provide
a consistent interface.

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

outimgcpy

If

outimgcpy

is:

NULL

OC_ReadOutputImage reads data directly from
the output image in the scanner’s shared
memory.

not NULL

OC_ReadInputImage reads data from

outimgcpy

which contains a copy of the

scanner’s output image.

slotnum
offset
len

If

slotnum

is:

positive

the output image for that slot is read into the
array pointed to by

imagebuf

. Then

imagebuf

is filled with

len

words of output data starting

at word

offset

of the module in the slot.

-1

the entire output image is read into the array
pointed to by

imagebuf

, and

offset

and

len

are ignored.

imagebuf

Must point to an array that is large enough to accept the amount of
data in the requested output image

Advertising
This manual is related to the following products: