
Chapter 5
'!" #!#$
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
¬
& %! &$% & #$% ! "#!# !% %% !# "#!#$ $ $$ &$
&%)%$ !"#% $($% "#!# ""%! "#!$$$ %% & ! %! $ ! % & %! $
C Program Development BASIC Program Development
%#% ! "#!#
& %! $
%#% ! "#!#
#%
""%! !
& %! $
¬
& %! $
& %! $
¬
#%
""%! !
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
Komentarze do niniejszej Instrukcji