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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 174
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 40
Publication 1747-UM002A-US-P - June 2000
Developing Applications 3-9
/*
** Download the configuration to the scanner
*/
retcode = OC_DownloadIOConfiguration( Handle, &OCcfg );
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_DownloadIOConfiguration failed: %d\n”,
retcode );
Ioexit( 1 );
}
/*
** Set output update mode to always
*/
retcode = OC_SetOutputUpdateMode( Handle, OUTUPD_ALWAYS );
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_SetOutputUpdateMode failed: %d\n”,
retcode );
Ioexit( 1 );
}
/*
** Set scan time to 5ms, periodic scan mode
*/
retcode = OC_SetScanTime( Handle, SCAN_PERIODIC, 20 );
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_SetScanTime failed: %d\n”, retcode );
Ioexit( 1 );
}
/*
** Goto Scan Mode
*/
retcode = OC_SetScanMode( Handle, SCAN_RUN );
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_SetScanMode failed: %d\n”, retcode );
Ioexit( 1 );
}
/*
** Turn on User LED 1
*/
retcode = OC_SetUserLEDState( Handle, 1, LED_GREEN_SOLID );
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_SetUserLEDState failed: %d\n”, retcode );
Ioexit( 1 );
}
printf( ”\n\n LED1 is on solid green now. \n” );
delay( 3000 );
Configure
the
scanner.
Control scanner
operation
Vista de pagina 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 173 174

Comentarios a estos manuales

Sin comentarios