Measurement-computing Micro 488/EX rev.2.1 Uživatelský manuál Strana 49

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 218
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 48
Section 4 General Programming
4.7
4.4 MACRO Programming
The
MACRO
command allows the user to build a file of sequential Micro488/EX
commands and execute them with a single
DOMACRO
command. The Micro488/EX is
capable of storing up to 100 different
MACRO
s.
Defining a
MACRO
is initiated by issuing the
MACRO
command. Each subsequent
character following this command, including terminators and intervening spaces, is
saved in a buffer up to, and including, the
ENDM
. After the
ENDM
, the Micro488/EX
appends the
MACRO
number to the
MACRO
buffer as a two digit decimal number. The
macro can then be executed by issuing a
DOMACRO
command. Any syntax errors that
are included within the
MACRO
are not checked until the
MACRO
is executed.
If a
MACRO
has not been defined, it does not consume any memory from the
USER heap. If a
MACRO
has been defined, any
MACRO
buffer previously allocated is
returned to the USER heap prior to requesting memory to re-define the
MACRO
. The
initial size of an allocated
MACRO
buffer is 127 character locations (bytes). If more
than 127 bytes are required to store the
MACRO
, additional memory is allocated in 127
byte increments. If there is no available memory in the USER heap, an '
OUT
OF
MEMORY
' error occurs and any memory allocated to that
MACRO
is returned to the heap.
4.4.1 Creating a MACRO
The user defines a macro by the following command sequence:
MACRO 1
<
list of valid Micro488/EX commands
>
ENDM
Type the following on the PC's keyboard to create a simple macro
MACRO 1
<return>
DAY
<return>
DATE
<return>
ENDM
<return>
Zobrazit stránku 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 217 218

Komentáře k této Příručce

Žádné komentáře