beautypg.com

Oc_readmodulefile -57 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 111

background image

OC_ReadModuleFile

Library of Routines

6–57

Publication 1747-6.5.3 June 1998

OC_ReadModuleFile

OC_ReadModuleFile reads a data file from a module.

Syntax:

int

OC_ReadModuleFile(HANDLE handle, BYTE ftype, WORD *mfile, int slotnum, WORD offset,

WORD len);

Parameters:

Description:

This function accesses an internal data file of the selected module. I/O scanning is blocked while this access
takes place.

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

ftype

Defines the module type as:
FILTYP_M0

M0 file

FILTYP_M1

M1 file

FILTYP_G

G file

mfile

Buffer file that contains data read from the module at

slotnum

The data in

mfile

is read from the module starting at word

offset

.

This function does not read data past the end of the module file for the slot.

slotnum

Must be a valid slot number

offset

Must be valid word number within module file

len

Number of words read from the module located at

slotnum

on the

scanner into the buffer

mfile

Name:

Value:

Description:

SUCCESS

0

file was read successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCPARAM

8

parameter contains invalid value

ERR_OCRESPONSE

10

scanner did not respond to request

ERR_OCSCANCFG

14

scanner has not been configured

ERR_OCSLOT

12

slot number is invalid

This manual is related to the following products: