Displaying Variables And Arrays; Interrogation Commands - Galil Motion Control DMC-18 2 Series User Manual

Table of Contents

Advertisement

JG 50000;BGX;ASX
MG "The Speed is", _TVX {F5.1} {N}
MG "counts/sec"
EN
When #A is executed, the above example will appear on the screen as:
The speed is 50000 counts/sec
Using the MG Command to Configure Terminals
The MG command can be used to configure a terminal. Any ASCII character can be sent by using the
format {^n} where n is any integer between 1 and 255.
Example:
MG {^07} {^255}
sends the ASCII characters represented by 7 and 255 to the bus.
Summary of Message Functions:
FUNCTION
" "
{Fn.m}
{$n.m}
{^n}
{N}
{Sn}

Displaying Variables and Arrays

Variables and arrays may be sent to the screen using the format, variable= or array[x]=. For example,
V1= , returns the value of V1.
Example - Printing a Variable and an Array element
#DISPLAY
DM POSX[7]
PR 1000
BGX
AMX
V1=_TPX
POSX[1]=_TPX
V1=

Interrogation Commands

The DMC-18x2 has a set of commands that directly interrogate the controller. When these commands
are entered, the requested data is returned in decimal format on the next line followed by a carriage
return and line feed. The format of the returned data can be changed using the Position Format (PF),
and Leading Zeros (LZ) command. For a complete description of interrogation commands, see chapter
5.
DMC-18x2
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
DESCRIPTION
Surrounds text string
Formats numeric values in decimal n digits to the right of the decimal point
and m digits to the left
Formats numeric values in hexadecimal
Sends ASCII character specified by integer n
Suppresses carriage return/line feed
Sends the first n characters of a string variable, where n is 1 thru 6.
Label
Define Array POSX with 7 entries
Position Command
Begin
After Motion
Assign Variable V1
Assign the first entry
Print V1
Chapter 7 Application Programming • 137

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-1812Dmc-1822Dmc-1832Dmc-1842

Table of Contents