Rockwell-automation 1747-PCINT API Software for 1746 I/O Manual de usuario Pagina 62

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 155
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 61
6–8 Library of Routines OC_CreateIO Configuration
Publication 1747-6.5.3 June 1998
Example:
OCIOCFG iocfg;
int retcode, numslots, i;
char module_name[] = ”1746-BAS”;
iocfg.Rack1Size = 10; /* 10 slot chassis */
iocfg.Rack2Size = 7; /* 7 slot chassis */
iocfg.Rack3Size = 0; /* Only 2 chassis */
numslots = iocfg.Rack1Size + iocfg.Rack2Size + iocfg.Rack3Size;
for ( i=1; i<numslots; i++ ){
iocfg.SlotCfg[i].mix = OCEMPTYMIX;
iocfg.SlotCfg[i].type = OCEMPTYTYPE; /* Empty all slots */
}
iocfg.SlotCfg[6].mix = 35;
iocfg.SlotCfg[6].type = 6; /* Slot 6 has 1746-BAS module */
or
iocfg.SlotCfg[6].name = module_name; /* Use name instead */
.
. /* Add additional module information to */
. /* match the physical I/O configuration */
.
retcode = OC_CreateIOConfiguration( &iocfg );
/* Use OC_DownloadIOConfiguration() to download the information */
Vista de pagina 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 154 155

Comentarios a estos manuales

Sin comentarios