F7 – other operations – Rockwell Automation 2708-NAG Application Generation Software User Manual
Page 24

Chapter 3
Using Application Generator
3 – 14
Figure 3.15
AG More Complete Operations Menu
LENGTH: Returns the number of characters in a variable
LEFT: Isolates the left ‘n’ characters from a variable. Left 4 characters of
IN = 092890, returns 0928.
RIGHT: Isolates the right ‘n’ characters from a variable. Right 2 characters
of IN = ABCDEFG, returns FG.
MIDDLE: Is used to get data from the middle of a variable. Warning! If you
use middle on a variable that is too short and try to get characters that are not
present, AG will abort. The 2 middle characters, starting in position 3 will
return the following:
Variable = ABCDEFG
Variable = ABC
returns
returns
CD
program abort
TRIM: Removes spaces from the front and back of a variable.
UPPER CASE: Converts a variable into upper case.
CHAR and ASCII: converts the exchange character values into ASCII and
back to characters.
MODULUS: Is the positive remainder from a division operation.
Note: Watch the ‘Contents of Variables’ lines to see what each variable is
set equal to as the program runs in the stepping mode.
F7
– Other Operations
When
F7 – OTHER OPERATIONS
is selected the Main Operations Menu
is replaced with these options: