Oc_writemodulefile -88 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 142

Advertising
background image

6–88

Library of Routines

OC_WriteModuleFile

Publication 1747-6.5.3 June 1998

OC_WriteModuleFile

OC_WriteModuleFile writes a data file to a module.

Syntax:

int

OC_WriteModuleFile(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 written to the module starting at word

offset

.

This function does not write 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 written 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

Advertising
This manual is related to the following products: