96
•
MG
DMC-1000/1500 Command Reference
DMC-1000
DMC-1500
MG
FUNCTION:
Message
DESCRIPTION:
The MG command sends data out the bus. This can be used to alert an operator, send
instructions or return a variable value.
ARGUMENTS:
MG "m", {^n}, V {Fm.n or $m,n} {N} {Pn}
where
"m" is a text message including letters, numbers, symbols or <ctrl>G (up to 31 characters).
{^n} is an ASCII character specified by the decimal value n
V is a variable name or array element where the following specifiers can be used for
formatting:
{Fm.n} Display variable in decimal format with m digits to left of decimal, and n to the
right.
{$m,n} Display variable in hexadecimal format with m digits to left of decimal, and n to
the right.
{Sn} Display variable as a string of length n where n is 1 thru 6
{N} Suppress carriage return line feed.
For DMC-1500 only:
{Pn} Specifies which serial port to send the message. -1 = main port,
2 = auxiliary port
Note:
Multiple text, variables, and ASCII characters may be used, each must be separated by
a comma.
Note:
The order of arguments is not important.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
-
In a Program
Yes
Default Format
Variable Format
Command Line
Yes
Can be Interrogated
No
Used as an Operand
No
EXAMPLES:
Case 1: Message command displays ASCII strings
MG "Good Morning" Displays the string
Case 2: Message command displays variables or arrays
MG "The Answer is", Total {F4.2}
Displays the string with the content of variable
TOTAL in local format of 4 digits before and 2 digits after the decimal point.
Case 3: Message command sends any ASCII characters to the port.
Carriage return MG {^13}, {^16}, {^48}, {^55} displays characters 0 and 7.