Prepare programs for standalone mode – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 78

Advertising
background image

Chapter 5

Developing Programs

5-18

In standalone mode, use BPI_ functions to communicate with a
programmable controller.

ATTENTION: The control coprocessor does not incorporate
hardware memory protection between processes. It is the user’s
responsibility to ensure that programs do not overwrite memory
used by other programs or by the operating system. This could
result in unpredictable system operation.

Standalone Program Requirements and Flow

¬

Function must be included first and once in each program. Note that for BASIC programs, CC_INIT is accessed using AB_BAS(0).

­

The multiĆtasking operating system can perform application processes that include combinations of the BPI_, CC_, and TAG_ functions.

C Program Development

BASIC Program Development

Start of mainprogram

BPI_ functions

Start of mainprogram

Write

ApplicationCode

­

BPI_ functions

AB_BAS(0)

¬

CC_ and TAG_

functions

CC_ and TAG_

functions

CC_INIT

¬

Write

ApplicationCode

­

Link API Functions to Programs

In C and assembler programs, ABLIB.L provides the interface (link) to the
library of control-coprocessor API functions.

In BASIC programs, AB_BAS provides the interface (link) to the library
of control-coprocessor API functions.

In C, BASIC, and assembler programs, use the CC_INIT function—use
AB_BAS(0) for BASIC programs—to initialize the control coprocessor.
The CC_INIT function must be called first and once only in any program
that uses CC_ or DTL_ functions.

Sample C Program

The following is a C programming example. It uses both BPI_WRITE and
BPI_READ functions to trigger programmable-controller block-transfer
writes and reads. See page 5-21 for more information.

Prepare Programs for

Standalone Mode

Advertising