beautypg.com

4 - rac6182-specific extensions to the ce api, Functions for digital output control, Do_readport – Rockwell Automation 6182 SDK User Manual

Page 41: Syntax, Remarks, Rac6182-specific extensions to, Chapter

background image

RAC6182-Specific Extensions to

RAC6182-Specific Extensions to

RAC6182-Specific Extensions to

RAC6182-Specific Extensions to
the CE API

the CE API

the CE API

the CE API

The functions described in this section provide application level access
to all digital outputs on the RAC6182 via a common interface. The
digital outputs include four diagnostic outputs on pins A, B, C and D of
header J10 on the system board, and a relay output, with contacts
terminated at connector J16, which accessible from the rear of the
RAC6182.

These functions allow getting, setting, and toggling of outputs, either
individually or simultaneously.

These functions are prototyped in the c header file
DiagnosticOutputAPI.h. This file also defines macros for bit masks to
be used to access individual outputs. These bit masks may be ORed for
simultaneous access of multiple outputs.

do_ReadPort

This function reads digital outputs. It is prototyped in
DiagnosticOutputAPI.h.

Syntax

#include

#include

BOOL do_ReadPort(UCHAR *pucData)

Remarks
pucData is a pointer to a caller allocated UCHAR variable in which
current settings of all discrete outputs are to be stored. Settings of
individual outputs are accessible via bit masks defined as macros in the
header file. These masks are to be applied (separately or bitwise ORed
together) to the variable following the call to this function.

Note that the relay contacts are normally closed (i.e., closed when the
relay is not energized). Thus, when the relay output is set to 1 or TRUE,
the contacts will be open and vice versa.

Macro

Digital Output

MASK_DIAG_PIN_A

J10, pin A (no external access)

MASK_DIAG_PIN_B

J10, pin B (no external access)

MASK_DIAG_PIN_C

J10, pin C (no external access)

Chapter

Chapter

Chapter

Chapter

4

Functions for Digital

Output Control

This manual is related to the following products: