Oc_writeoutputimage -90 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 144

Advertising
background image

6–90

Library of Routines

OC_WriteOutputImage

Publication 1747-6.5.3 June 1998

OC_WriteOutputImage

OC_WriteOutputImage updates the output image on the scanner.

Syntax:

int

OC_WriteOutputImage(HANDLE handle, WORD *outimgcpy, int slotnum,

WORD offset, WORD len, WORD *imagebuf);

Parameters:

Description:

To guarantee that changes to the output image resulting from a series of calls to OC_WriteOutputImage are
posted to the I/O modules in a single output scan, OC_WriteOutputImage can be called to modify a local
copy of the output image, then finally called to write the entire copy of the output image to the scanner’s
shared memory. This preserves output image file integrity across multiple calls to OC_WriteOutputImage.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

outimgcpy

If

outimgcpy

is:

NULL

OC_WriteOutputImage writes data directly to the output
image in the scanner’s shared memory; if the update mode
is OUTUPD_CHANGE, the scanner is signalled to update
the outputs

not NULL OC_WriteOutputImage writes data to

outimgcpy

; the

output image data is not affected

If file integrity is not necessary, the host application can set

outimgcpy

to NULL.

slotnum

offset

len

If

slotnum

is positive, the output image for that slot is written from the

array pointed to by

imagebuf

. Then

len

words of output data starting

at word

offset

are written to the module in the slot, and will not write

past the end of the output image for the slot.
If

slotnum

is -1, the entire output image is written from 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
from the requested output image

Name:

Value:

Description:

SUCCESS

0

output image was written successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCPARAM

8

parameter contains invalid value

ERR_OCSCANCFG

14

scanner has not been configured

ERR_OCSLOT

12

slot number is invalid

Advertising
This manual is related to the following products: