Galil Motion Control DMC-21 5 Series User Manual page 111

Table of Contents

Advertisement

MG"counts/sec";
EN;
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.
MG{^07}{^255};
This sends the ASCII characters represented by 7 and 255 to the bus.
Summary of Message Formatters
FORMATTER
" "
Surrounds text string
{Fm.n}
Formats numeric values in decimal n digits to the left of the decimal point and m digits to the right
{P1}
{E}
Send message to Main Serial Port or Ethernet Port
or
{$m.n}
Formats numeric values in hexadecimal
{^n}
Sends ASCII character specified by integer n
Suppresses carriage return/line feed
{N}
{Sn}
Sends the first n characters of a string variable, where n is 1 thru 6
Displaying Variables and Arrays
Variables and arrays may be sent to the screen using the format, variable= or array[x]=?.
Example - Printing a Variable and an Array element
#main;
DM
posA[7];
SH
A;
PR
1000;
BG
A;
AM
A;
MO
A;
v1=_TPA;
posA[1]=_RPA;
v1=?;
posA[1]=;
EN;
Interrogation Commands
The DMC-21x5 has a set of commands that directly interrogate the controller. When these command 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 Command Basics.
Using the PF Command to Format Response from Interrogation Commands
The
command can change format of the values returned by interrogation commands. The numeric values may
PF
be formatted in decimal or hexadecimal with a specified number of digits to the right and left of the decimal point
using the
command. If the number of decimal places specified by
PF
appears in all the decimal places.
Chapter 7 Application Programming ▫ 106
'end program
Table 7.9: List of different formatters to display information with messages
'label for main program
'define posA array with 7 elements
'enable A axis
'define position relative move
'begin motion
'wait for motion to finish
'disable A axis
'set variable to A axis motor position
'assign array element to A axis reference position
'print v1
'print posA[1]
'end program
DESCRIPTION
is less than the actual value, a nine
PF
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents