Prosoft-technology MVI56E-LDM Manuel d'utilisateur Page 122

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 264
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 121
CIP API Functions ControlLogix Platform "C" Programmable
Developer's Manual Linux Application Development Module
Page 116 of 264 ProSoft Technology, Inc.
March 12, 2014
OCXcip_SetTagDbOptions
Syntax
int OCXcip_SetTagDbOptions (OCXHANDLE apihandle,
OCXTAGDBHANDLE tdbHandle,
DWORD optFlags,
WORD structAlign);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
TagDbHandle
Handle created by previous call to OCXcip_CreateTagDbHandle
optFlags
Bit masked option flags field. Multiple options may be combined (with)
OCX_CIP_TAGDOPT_NORM_STRINGS:
Normalized strings are stored as <DATA><NULL> (instead of
<LEN><DATA>. OCXcip_GetSymbolInfo() and
OCXcip_GetStructMbrInfo() will report strings as having a datype of
OCX_CIP_TAGDB_DATYPE_NORM_STRING. The report eleSize will be
the size of the string data buffer including space for the NULL term
(OCX_CIP_STRING82s will have an eleSize of 83). The reported
hStruct will be zero(no a struct). When accessing normalized strings
(with OCXcip_AccessTagDataDb()), pass a daType of
PCX_CIP_TAGDB_DATYPE_NORM_STRING.
OCX_CIP_TAGDBOPT_NORM_BOOLS:
With this option, OCX_CIP_BOOL variables will be treated as bytes.
OCX_CIP_BYTE, OCX_CIP_WORD, OCX_CIPDWORD, and
OCX_CIP_LWORD types will be converted to arrays of OCX_CIP_BOOLs.
A normalized OCX_CIP_DWORD will be normalized to an array of 32
OCX_CIP_BOOL (which will occupy 32 bytes) for example. When
accessing arrays of BOOKs (with OCXcip_AccessTagDataDb()), any
number of array elements may be specified - masked and unmasked
controller reads/writes will be executed as required to complete the tag
access. Some OCX_CIP_BOOLs cannot be normalized. The
FUNCTION_GENERATOR structure has OCX_CIP_BOOLs that are
aliased into an OCX_CIP_DINT. Since the DINT base member is not
expanded into a BOOL array, the BOOL alias structure members cannot
be normalized. A special (and rarely used) data type has been created to
identify alias structure member OCX_CIP_BOOLS that could not be
normalized: OCX_CIP_TAGDB_DATYPE_NORM_BITMASK.
OCX_CIP_TAGDBOPT_STRUCT_MBR_ORDER_NATIVE: This option will
cause OCXcip_GetStructMbrInfo() to retrieve structure members in
native order (lowest offset to highest) instead of alphabetical order. This
is not a normalization option.
structAlign
Ignored if no normalization options are used. If normalization is enabled,
this may be 1, 2, 4, or 8 (4=recommended). Structure members will be
aligned according to the minimum alignment requirement. That is, if
structALign is 4, OCX_CIP_DINTs will be aligned on 4 byte boundaries,
but OCX_CIP_INTs will be aligned on 2 byte boundaries.
Vue de la page 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 263 264

Commentaires sur ces manuels

Pas de commentaire