6 - programming, Chapter objectives, Block-transfer with the basic module – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 133: 6 of this manual, Programming

Advertising
background image

Chapter 6

Programming

After reading this chapter you should be able to:

program your BASIC Module for use with a programmable controller.

use block-transfer to communicate with a programmable controller.

This chapter shows the BASIC programming and ladder logic needed for
use with your processor. It also gives you sample programs.

Your BASIC Module communicates with any processor that has
block-transfer capability. Your ladder logic program and BASIC program
work together to enable proper communications between the module and
processor.

The BASIC Module is a bi-directional block-transfer module.
Bi-directional means that the module performs both read and write
block-transfer operations. You transfer data (1 to 64, 16 bit words) from
your module to the processor’s data table with a block-transfer-read (BTR)
instruction. You transfer data (1 to 64, 16 bit words) to your module from
the processor’s data table with a block-transfer-write (BTW) instruction.

Important: The module’s read and write instruction enable bits must not
set at the same time. Your program must toggle requests for the read and
write instructions as shown in the sample programs.

The BASIC Module processor maintains a block-transfer-write (BTW)
buffer containing the values of the last BTW sent by the host processor.
You initialize this buffer using a CALL 4. You transfer data to the BASIC
Module’s buffer using CALL 6 or CALL 3. This buffer freezes and does
not change when CALL 6 or CALL 3 completes. This double buffering
and freezing ensures that the data does not change during processing by the
BASIC Module. The BTW buffer remains unchanged and is accessed
repeatedly by any of the data access routines provided. An additional
CALL 6 or CALL 3 changes the BTW buffer contents.

6.1
Chapter Objectives

6.2
Block-Transfer with the
BASIC Module

6.2.1
Block-Transfer-Write and
Block-Transfer-Read Buffers

Advertising