Rockwell-automation 1747-PCIS API Software - Open Controller Uživatelský manuál Strana 136

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 174
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 135
Publication 1747-UM002A-US-P - June 2000
6-76 Library of Routines
Example:
HANDLE Handle;
BYTE retent_data[500];
int retcode;
retcode = OC_WriteHostRetentiveData( Handle, retent_data,
0, 500 );
OC_WriteIOConfigFile
OC_WriteIOConfigFile writes the configuration data contained in the
iocfg structure to the file named filename.
Syntax:
int OC_WriteIOConfigFile(OCIOCFG *iocfg,
char *filename);
Parameters:
Description:
Configuration files created by OC_WriteIOConfigFile can be read by
OC_ReadIOConfigFile.
The
OCIOCFG structure is defined as:
typedef struct tagOCIOCFG
{
BYTE Rack1Size;/* number of slots in Rack 1 */
BYTE Rack2Size;/* number of slots in Rack 2 */
BYTE Rack3Size;/* number of slots in Rack 3 */
OCSLOTCFG SlotCfg[OCMAXSLOT];/* configuration for each
slot */
} OCIOCFG;
Return Value:
Parameter: Description:
iocfg A structure that contains the configuration data that is to be written
to
filename
filename References the file to write
If
filename does not exist, it is created.
Name: Value: Description:
SUCCESS 0 I/O configuration file was written successfully
ERR_OCFILERROR 19 error encountered while opening or writing the file
Zobrazit stránku 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 173 174

Komentáře k této Příručce

Žádné komentáře