Rockwell-automation 1747-PCINT API Software for 1746 I/O Instrukcja Użytkownika Strona 141

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 155
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 140
OC_WriteIOConfigFile Library of Routines 6–87
Publication 1747-6.5.3 June 1998
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 */
OCSLOTCFGSlotCfg[OCMAXSLOT];/* configuration for each slot */
} OCIOCFG;
Return Value:
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” );
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
Przeglądanie stron 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 154 155

Komentarze do niniejszej Instrukcji

Brak uwag