Download Galil Motion Control Command Reference
Transcript
Galil Motion Control Command Reference
MG
Syntax:
Implicit Notation Only
Operands:
none
Burn:
not burnable
Message
Full Description
The MG command can be used in two ways:
1.) From a host PC "MG val" will return the value, where val is an operand, string, variable, or number, including mathematical expressions. This is
known as a solicited command, because the host sends the command and expects a response.
:MG TIME
261928200.0000
:variable = 10
:MG variable + 5
15.0000
:MG _TI0
255.0000
:MG "Foo"
Foo
:
2.) From embedded DMC code, the MG command will send an unsolicited, asynchronous message from the controller to the host. This can be used to
alert an operator, send instructions or return a variable value. This is known as an unsolicited command because the host is not expecting it; the DMC
code sends the data when the MG command is executed in embedded code.
The CW command controls the ASCII format of all unsolicited messages.
#POSERR
MG "Warning, position error exceeded"
RE
Messages sent from within embedded code can go to any of the Ethernet handles, or serial ports. See CF to set the routing of the message.
Arguments
MG "m", {^n}, V
where
"m" is a text string including alphanumeric characters (up to 76 characters)
{^n} is an ASCII character specified by the value n
V is a value, variable name, operand, array element, or mathematical expression
Multiple strings, variables, and ASCII characters may be used, each must be separated by a comma.
Formatters
{Fm.n} Display variable in decimal format with m digits to left of decimal, and n to the right.
{Zm.n} Same as {Fm.n} but suppresses leading zeros.
{$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 through 6
{N} Suppress carriage return line feed (\r\n) at the end of the message.
Formatters can be placed before or after each argument in MG.
Message Routing
Messages are routed based upon the CF setting. MG can override the global CF setting.
{Ex} Sends the message out the Ethernet handle x, where x is A,B,C,D,E,F,G or H
{Pn} Sends the message out the Serial port n, where n is 1 or 2 denoting Main or Auxilary (where equipped).
file:///C|/Documents%20and%20Settings/Andy/Desktop/Temp/4Kcom/index.html (232 of 358)5/24/2011 8:38:17 AM