Pm designer operation manual – B&B Electronics WOP-2121V-N4AE - Manual User Manual
Page 417

14
PM Designer Operation Manual
14-8
CHAPTER 14 USING MACROS
The macro editor allows the following editing actions:
• Cutting, copying, pasting, and deleting selection of lines, multiple lines or text
• Undoing and redoing editing actions
• Using drag-and-drop editing to move or copy selection of text within one macro editor window, or between macro
editor windows.
The following table shows the supported editing commands.
Menu Command
Key Combination
Description
Cut
CTRL+X
Removes selected text from the active macro editor window.
Copy
CTRL+C
Duplicates selected text in the active macro editor window.
Paste
CTRL+V
Pastes cut or copied text into an active macro editor window.
DELETE
Deletes text without copying it to the Clipboard.
Undo
CTRL+Z
Reverses the last editing action.
Redo
CTRL+Y
Reapplies the prior editing that have been undone.
CTRL+A
Selects all texts in the active macro editor
Note that all editing commands require a selection in order to work. Some commands can make a selection based on the
current cursor location.
■ Using Comments in Macros
Comments are notes to be ignored when running the macro commands. Macro supports both single-line comments and
block comments. Single-line comments begin with two forward slashes (//) and run to the end of the line.
The following is an example of a macro command followed by a single-line comment.
IF
$U0.0
(B)
// Key Down
Block comments begin with an opening delimiter (/*) and run to a closing delimiter (*/). Comments do not nest.
The following is an example of a block comment.
/* $N1001=WH2021
$N1010=$N1001 */
■ Specifying Constants in Macros
To specify a hexadecimal number, use either the h or H suffix. For example, 12abH and 3ABh are valid hexadecimal
numbers. You can also use either the “0x” or “0X” prefix. For example, 0x1278abc and 0XFFFF0000 are valid hexadecimal
numbers.
To specify a binary number, use either b or B suffix. For example, 001100111b and 11110000B are valid binary numbers.
For decimal numbers, in most cases, you just type the numbers as they are to specify the constants. However, the
ambiguity exists when a constant is the same as a valid external variable. For example, if a panel application has a link to a
Modicon ModBus slave device, it is impossible to tell whether the number 40001 is a constant or a word address of the
controller. To avoid this kind of ambiguity, use the following methods to explicitly declare that a number is a constant:
1) Use K, k, D, or d suffix for an integer number. For example, -123K and -123d are valid specifications of constant -123.
2) Use either the f or F suffix for a decimal number with decimal point. For example, -12.3F and -12.3f are valid
specifications of constant -12.3.