beautypg.com

7 deleting a macro, 8 saving the log buffer to disk – Measurement Computing Micro 488/EX rev.2.1 User Manual

Page 60

background image

Section 4

General Programming

4.18

4.4.7 Deleting a MACRO

The ERASE command is included to delete a MACRO. It can simply be

re-defined as a new MACRO with null commands. This method, however,
will still require the 127 byte memory allocation. A better way is to ERASE
it from memory. This un-allocates memory assigned to the MACRO. An
ERASE

command without parameters will clear all MACRO buffers. Type the

following…

READ 1

The Micro488/EX will respond with…
TIME
ENDM01

Type…
ERASE 1

READ 1

The Micro488/EX will respond with, as a result of the programs ON ERROR
DOMACRO

command, the following error status…

C 10 G0 I S0 E06 T0 C0 NO MACRO

4.4.8 Saving the LOG Buffer to Disk

The following program example reads the Micro488/EX's log buffer

and sends the information it contains to a disk file. The example is written in
PC basic and utilizes software, Xon/Xoff, serial handshaking.

Read Log Buffer Program

100 '
110 ' Program to read the Micro488/EX's log buffer
120 ' and save it to a disk file.
130 ' Serial control is set to Xon/Xoff
140 ' IOtech, Inc.
150 '
160 ' Open the serial port for communications
170 OPEN "com1:9600,n,8,2" AS 1
180 PRINT#1,"@@"; ' reset the Micro488/EX