If a command associated with a macro is entered in the command line, this is expanded before it is sent to the controller. Then the response in the result window appears in a similarly expanded form.
The entry syntax is: <KEYWORD><macro>
<KEYWORD> is the command.
Macros
%P<NAME> |
If NAME is a POU-name, the expression is expanded to <POU-Index>, otherwise there is no alteration |
%V<NAME> |
If NAME is a variable name, the expression is expanded to #<INDEX>:<OFFSET>, otherwise there is no alteration (this notation #<INDEX>:<OFFSET> is interpreted by the controller as a memory address) |
%T<NAME> |
If NAME is a variable name, the expression is expanded to <VARIABLENTYP>, otherwise there is no alteration. |
%S<NAME> |
If NAME is a variable name, the expression is expanded to <SIZEOF(VAR)>, otherwise there is no alteration. |
The % character is ignored if the escape symbol \ (Backslash) is placed in front. The escape symbol as such is only transmitted if written \\.
Example
Entry in command line: (memory dump of the variable .testit ?)
mem %V.testit
Output in result window:
mem #4:52
03BAAA24 00 00 00 00 CD CD CD CD ....ÍÍÍÍ