Prosoft-technology MVI56E-LDM Manual de usuario Pagina 173

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 172
ControlLogix Platform "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 167 of 264
March 12, 2014
OCXcip_GetIdObject
Syntax
int OCXcip_GetIdObject (OCXHANDLE apihandle,
OCXCIPIDOBJ *idoObject);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
idobject
Pointer to structure of type OCXCIPIDOBJ
Description
OCXcip_GetIdObject retrieves the identity object for the module.
apihandle must be a valid handle returned from OCXcip_Open.
idobject is a pointer to a structure of type OCXCIPIDOBJ. The members of this
structure will be updated with the module identity data.
The following example defines the OCXCIPIDOBJ structure:
typedef struct tagOCXCIPIDOBJ
{
WORD VendorID; //Vendor ID Number
WORD DeviceType; //General product type
WORD ProductCode: //Vendor-specific product identifier
BYTE MajorRevision; //Major revision level
BYTE MinorRevision; //Minor revision level
DWORD SerialNo; //Module serial number
BYTE Name [32]; //Text module name (null-terminated)
} OCXCIPIDOBJ;
Return Value
OCX_SUCCESS
ID object was retrieved successfully
OCX_ERR_NOACCESS
apihandle does not have access
Example
OCXCIPHANDLE apihandle;
OCXCIPIDOBJ idobject;
// Read ID data from ControlLogix in slot 0
OCXcip_GetIdObject(apihandle,&idobject);
printf ("ModuleName: %s Serial Number: %lu\n",
idobject.Name, idobject.SerialNo);
Vista de pagina 172
1 2 ... 168 169 170 171 172 173 174 175 176 177 178 ... 263 264

Comentarios a estos manuales

Sin comentarios