Return value: considerations – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 105

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-45

The

MsgID

member of the

msgbuf

structure will be one of the

following values:

The data returned in the

MsgData

member array depends upon the

value in

MsgID

:

Separate queues hold messages received from each source. The host
application must call OC_PollScanner periodically to read messages
from each enabled source to prevent messages from being discarded.
If a message queue is full when a new message is received, the oldest
message is discarded and the next call to OC_PollScanner results in a
return value of ERR_OCOVERRUN. The queue can hold as many as
five messages.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

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

This

MsgID

:

Returns:

MsgID=OCMSG_IOINT

MsgData[0]

slot number that generated the interrupt

MsgID=OCMSG_DIINT

MsgData[0

]

mask of last bit transition that generated the interrupt

MsgData[2

]

lowbyte of count of matches that generated
the interrupt

MsgData[3]

highbyte of count of matches that generated
the interrupt

MsgID=OCMSG_EOS_DMDIN
MsgID=OCMSG_EOS_DMDOUT
MsgID=OC_EOS

MsgData[0]

number of scans that occurred since the last
end-of-scan message of this type was read

Name:

Value:

Description:

SUCCESS

0

scanner was polled successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCOVERRUN

16

a message has been discarded

Advertising
This manual is related to the following products: