Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 155

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Header File C-7

typedef struct tagFORCEDATA

BYTE SlotNum;

/* slot number */

WORD WordOffset;

/* offset to word to force */

BYTE IOType;

/* selects force inputs or outputs */

WORD ForceMask;

/* bits set to 1 are forced, 0 removes forces */

WORD ForceVal;

/* selects force state of bits set to 1 in ForceMask */

} FORCEDATA;

/************************************************************

* Structure Name: DII_CFG

*

* Description:

*

* Passed to OC_ConfigureDII().

* Configures a discrete input interrupt for a module.

*

*************************************************************/

typedef struct tagDII_CFG

{

BYTE SlotNum; /* slot number */

BYTE IOIncludeMask; /* declare which Discrete Inputs can cause interrupts */

BYTE IOEdgeType; /* select required transition of each discrete input */

WORD PresetCount; /* set the number of transitions required to cause interrupt */

} DII_CFG;

/************************************************************

* Structure Name: STSFILE

*

* Description:

*

* Scanner status file.

*

*************************************************************/

typedef struct tagSTSFILE

{

WORD wWordNum[OCSTSFILEWSIZE];

} STSFILE;

/************************************************************

* Structure Name: MSGBUF

*

* Description:

*

* Returned by OC_PollScanner().

* MsgID identifies the message type. Type-specific

* data is contained in MsgData[].

*

*************************************************************/

#define OCMSGDATASIZE 4 /* number of bytes of message data */

typedef struct tagMSGBUF

{

BYTE MsgID; /* Message type */

BYTE MsgData[OCMSGDATASIZE]; /* Type-specific data */

} MSGBUF;

/************************************************************

* Structure Name: OCEXTERR

*

Advertising
This manual is related to the following products: