Rockwell-automation 1747-PCIS API Software - Open Controller Manual de usuario Pagina 137

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 174
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 136
Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-77
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
OCIOCFG ‘iocfg
int retcode;
/* Either OC_CreateIOConfiguration() or
OC_GetIOConfiguration() were */
/* called previously to fill in ’iocfg’ structure */
retcode = OC_WriteIOConfigFile( &iocfg, ”RACK1.CFG” );
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.
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
Vista de pagina 136
1 2 ... 132 133 134 135 136 137 138 139 140 141 142 ... 173 174

Comentarios a estos manuales

Sin comentarios