Macros
9-4 Chapter 9
be executed from any mode, including the setup mode! This is often a source of confusion with beginning
programmers, especially when using a serial device such as a computer keyboard to enter macro
commands into a macro table. To better understand the concept of the % character, consider the following:
Executing a Macro Command
Suppose you have just created a new macro number and have selected P10001 to begin entering macro
commands using a computer keyboard connected through one of the comm ports. You are about to
execute the %S macro command as previously described. As you type the % character to begin the entry,
notice that nothing appears on the display! Remember, most macro commands can be executed in the
setup mode. Having received a % character, the Model 672/675 is now waiting for the next character to
determine what macro function, if any, to perform. Thus when you type S to complete the entry, the beeper
function is performed immediately. Since the macro command was processed, nothing was entered into the
macro table.
Entering a Macro Command
Using a serial device to enter a % character into a macro table or any other setup parameter is
accomplished by transmitting two consecutive % characters (%%). Considering the same %S example
above, press % to begin the entry. As before, nothing appears on the display. Type % again. This time the
% character appears in the entry buffer. Press S, then [ENTER] to save the command in the macro table.
C
REATING A
N
EW
M
ACRO
Each new macro must be assigned at P9990 and configured as described in the following procedure. New
macros can be assigned in any order beginning with any available macro number 1 → 250.
To create a new macro:
1. From the setup mode, key in 9990 [SELECT] to access the macro instance selection parameter.
2. Key in the macro number to create and press [ENTER].
3. Press [ENTER] again at the Make? NewMc prompt to confirm the entry. P9990 now shows the new
macro number.
4. Press [SELECT] to advance to the macro name parameter at P9991. If desired, key in the macro
name and press [ENTER]. Alpha characters may be entered through the front panel as described in
the Key-In Value Parameters section.
5. Press [SELECT] to advance to the macro priority parameter at P9992. Choose either Std or Immed by
pressing [ENTER] to toggle between the two choices.
6. Press [SELECT] to advance to the macro menu parameter at P9993. Choose Enbld or Disbl by
pressing [ENTER] to toggle between the two choices.
7. Press [SELECT] to advance to the limited access parameter at P9994. Choose yes or no by pressing
[ENTER] to toggle between the two choices.
8. Press [SELECT] to advance to the macro table at P10001. Begin entering the macro characters.
Alpha characters may be entered through the front panel as described in the Key-In Value Parameters
section. As you key in characters, they are placed in the entry buffer until you press [ENTER] to save
them in the macro table. Up to 79 characters can be held in the entry buffer before you must press
[ENTER], however it is good practice to press [ENTER] after each macro command to avoid time
consuming mistakes. Note that the parameter number automatically advances once per entered
character.
9. Save the macro configuration by exiting the setup mode as described in the Exiting The Parameter
Setup Mode section. Macros are saved to FRAM or instead to the database setup RAM if allocated at
P60040.
If you exit the setup mode without entering any characters in a macro table, the configuration
for that macro will be lost when changes are saved. The macro will no longer exist!