Publication 1762-RM001C-EN-P
ASCII Instructions 20-29
Using In-line Indirection
This allows you to insert integer and long word values into ASCII strings.
The Running bit (RN) must be set before the string value can be used.
The following conditions apply to performing in-line indirection:
•
All valid integer (N) and long word (L) files can be used.
Valid range is from 3 to 255.
•
File types are not case sensitive and can include either a colon (:)
or semicolon (;)
•
Positive value symbol (+) and leading zeros are not printed. Negative
values (-) are printed with a leading minus sign. Commas are not
inserted where they would normally appear in numbers greater than
one thousand.
Examples
For the following examples:
N7:0 = 25
N7:1 = -37
L8:0 = 508000
L8:1 = 5
.
Valid in-line direction:
Input: Flow rate is currently [N7:0] liters per minute and contains [L8:0] particles per liter
contaminants.
Output: Flow rate is currently 25 liters per minute and contains 508000 particles per liter
contaminants.
Input: Current position is [N7:1] at a speed of [L8:1] RPM.
Output: Current position is -37 at a speed of 5 RPM.
Invalid in-line indirection:
Input: Current position is [N5:1] at a speed of [L8:1] RPM.
Output: Current position is [N5:1] at a speed of 5 RPM.
NOTE
Truncation occurs in the output string if the indirection
causes the output to exceed 82 characters. The appended
characters are always applied to the output.