Update block-transfer-read buffer (timed) – call 2 – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 90

Advertising
background image

Operating Functions

Chapter 5

5–53

Example:

u10 REM PRINT CONTENTS OF BTW BUFFER

u20 C=(XBY(7D0AH)*100H)+XBY(7D0BH)

u30 FOR I=0 TO 128

u40 PH0. XBY(C+I),

u50 NEXT I

u60 END

This routine transfers the block-transfer-read (BTR) buffer to the auxiliary
processor on the BASIC Module for use in the next BTR request from the
host processor. If no data transfer occurs within 2 seconds the routine
returns to BASIC without transferring data. This routine has no input
arguments and one output argument (the status of the transfer). A non-zero
returned means that no transfer occurred and the CALL timed out. A zero
returned means a successful transfer.

Example:

u10 CALL 2

u20 POP X

u30 IF X tu 0 PRINT “TRANSFER UNSUCCESSFUL”

This routine transfers the block-transfer-write (BTW) buffer of the
auxiliary processor on the BASIC Module to the BASIC BTW buffer. If no
data transfer occurs within 2 seconds the routine returns to BASIC with no
new data. This routine has no input arguments and one output argument
(the status of the transfer). A non-zero returned means that no transfer
occurred and the CALL timed out. A zero returned means a successful
transfer.

Example:

u10 CALL 3

u20 POP X

u30 IF X tu 0 PRINT “TRANSFER UNSUCCESSFUL”

5.7
Data Transfer Support
Routines (continued)

5.7.1
Update Block-Transfer-Read
Buffer (timed) – CALL 2

5.7.2
Update Block-Transfer-Write
Buffer (timed) – CALL 3

Advertising