Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual page 106

Multi-vendor interface module
Hide thumbs Also See for Allen-Bradley ControlLogix 1756-MVI:
Table of Contents

Advertisement

5-18
Serial Port API
Publication 1756-RM004B-EN-P - October 2000
MVIsp_GetDCD
Syntax:
int
MVIsp_GetDCD(int comport, int *state);
Parameters:
comport
port for which DCD is requested
state
pointer to int for desired state
Description:
This function allows the state of the DCD signal to be determined.
comport must be previously opened with MVIsp_Open. The current
state of the DCD signal is copied to the int pointed to by state.
Return Value:
MVI_SUCCESS
MVI_ERR_NOACCESS
MVI_ERR_BADPARAM
Example:
int
state;
if (MVIsp_GetDCD(COM1, &state) = = MVI_SUCCESS)
{
if (state = = ON)
printf("DCD is ON\n");
else
printf("DCD is OFF\n");
}
the DCD state was read successfully
comport has not been opened
invalid pointer

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents