Oc_pollscanner -50 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 104

Advertising
background image

6–50

Library of Routines

OC_PollScanner

Publication 1747-6.5.3 June 1998

OC_PollScanner

OC_PollScanner reads module I/O interrupt, discrete input interrupt, and end-of-
scan notification messages from the scanner.

Syntax:

int

OC_PollScanner(HANDLE handle, int MsgFilter, MSGBUF *msgbuf);

Parameters:

Description:

The

MSGBUF

structure is defined as:

typedef struct {

BYTE

MsgID;

BYTE

MsgData[4];

} MSGBUF;

The

MsgID

member of the

msgbuf

structure will be one of the following values:

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

MsgFilter

If

MsgFilter

is:

OCMSG_DIINT
OCMSG_IOINT,
OCMSG_EOS,

OC_PollScanner returns a message only

OCMSG_EOS_DMDIN

of the corresponding type, if any

or
OCMSG_EOS_DMDOUT
OCMSG_ANY

OC_PollScanner searches for a

message, in

the order OCMSG_DIINT, OCMSG_IOINT,
OCMSG_EOS_DMDIN,
OCMSG_EOS_DMDOUT, then
OCMSG_EOS, from any of the sources.

msgbuf

A structure that contains scanner messages

This value:

Means:

OCMSG_NONE

No message available

OCMSG_IOINIT

I/O module interrupt message, see OC_SetModuleInterrupt

OCMSG_DIINT

Discrete input interrupt message, see OC_ConfigureDII

OCMSG_EOS_DMDIN

End-of-scan notification message from OC_DemandInputScan command,
see OC_EnableEOSNotify

OCMSG_EOS_DMDOUT

End-of-scan notification message from OC_DemandOutputScan
command, see OC_EnableEOSNotify

OCMSG_EOS

End-of-scan notification message for timed I/O scan, see
OC_EnableEOSNotify

Advertising
This manual is related to the following products: