beautypg.com

Measurement Computing Micro 488/EX rev.2.1 User Manual

Page 121

background image

Section 5

Command Descriptions

5.51

RESPONSE

None

MODE

any

BUS STATES

None

EXAMPLES

10 PRINT#1,"MACRO 0"

Create Macro #0

20 PRINT#1,"COMMENT 'I have received an SRQ'"
30 PRINT#1,"ENDM"
40 PRINT#1,"ON SRQ DOMACRO 0"

Enable Macro 0 for On SRQ

As a peripheral, the ON LISTEN DOMACRO can be used to input data
from the active controller.

10 PRINT#1,"MACRO 20"

Create Macro # 20

20 PRINT#1,"ENTER"
30 PRINT#1,"ON LISTEN DOMACRO 20"

Re-enable for the next MLA

40 PRINT#1,"ENDM"

50 PRINT#1,"ON LISTEN DOMACRO 20"

Enable it for Listen

The data will be transmitted out to the serial host without having to
re-issue an ENTER command from the host each time.

The next example is an abbreviated form of the previous. Although
not as clear, it would require less USER heap memory if there were
more being done in the Macro.

10 PRINT#1,"MA20"

Create Macro # 20

20 PRINT#1,"EN"
30 PRINT#1,"ON L DO20"

Re-enable for the next MLA

40 PRINT#1,"ENDM"
50 PRINT#1,"ON L DO20"

Enable it for Listen