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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 155
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 37
3–12 Developing Applications
Publication 1747-6.5.3 June 1998
Programming
Example for
Windows NT
The following Windows NT example (sample.c on your Windows NT API disk)
shows how to program the above steps. Callouts on the right margin identify the
code for each step.
/********************************************************************
* Title: Simple application sample code for 1746 I/O PCI Interface API
*
* Abstract:
*
* This file contains a simple application using the PCI
* bus interface API.
*
* Environment:
* 1747-PCIS 1746 I/O PCI Interface
* Microsoft Windows NT 4.0
* Microsoft Visual C++ / Borland C++
* (c)Copyright Allen-Bradley *
************************************************************************/
/*=======================================================================
= INCLUDE FILES =
=======================================================================*/
#include <windows.h>
#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <string.h>
#include "ocapi.h"
/*=======================================================================
= MODULE WIDE GLOBAL VARIABLES =
=======================================================================*/
HANDLE OChandle;
OCIOCFG OCcfg;
/************************************************************************
* Entry point:
* Ioexit
*
* Description:
* Common error handling routine. This routine displays any
* extended error and exits the program.
*
* Arguments:
* rc : int ( input )
* This error code is passed to the exit() routine.
*
* External effects:
* The program is terminated.
*
* Return value:
* none
*
* Access: Public
* -----------------------------------------------------------------------
* Notes:
*
*************************************************************************/
void Ioexit
int rc
) {
OCEXTERR exterr;
char *msg;
Vista de pagina 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 154 155

Comentarios a estos manuales

Sin comentarios