Oc_configuredii, Oc_configuredii -4, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 64: Parameters: description

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

6-4 Library of Routines

OC_ConfigureDII

OC_ConfigureDII allows an application to receive a message from the
scanner when an input bit pattern of a discrete I/O module matches a
compare value.

Syntax:

int

OC_ConfigureDII(HANDLE handle, DII_CFG *diicfg);

Parameters:

Description:

The application configures the compare value using this function and
when the comparison completes, the scanner generates a message to
the application. The application must then call OC_PollScanner to
retrieve the message.

The

DII_CFG

structure is defined as:

typedef struct {

BYTE

SlotNum;/* slot number 1-30*/

BYTE

IOIncludeMask;/* bits allowed mask */

BYTE

IOEdgeType;/* bit pattern to compare */

WORD

PresetCount;/* number of matches */

} DII_CFG;

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

diicfg

Points to the DII configuration

This value:

Means:

Slotnum

Must contain the slot number of a Class 0 Discrete Input module. An I/O error
report is generated if the scanner determines the slot does not contain a valid
discrete input module.

IOIncludeMask

Should contain the bits in the discrete input module to include in the
comparison. Only bits 0 - 7 of word 0 of the module can be configured for DII’s.

IOIncludeMask

is a bit-mapped mask. Any bit set to 1 in this mask includes

the corresponding bit of the discrete input module in the comparison. Any bit
set to 0 is ignored.

Advertising
This manual is related to the following products: