112
•
Chapter 7 Application Programming
DMC-1500
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 Description
" "
Surrounds text string
{Fn.m}
Formats numeric values in decimal n digits to the right of the decimal point
and m digits to the left
{N}
Suppresses carriage return/line feed
{P1} or {P2}
Send message to Main Port or Auxiliary Port
{Sn}
Sends the first n characters of a string variable, where n is 1 through 6.
{$n.m}
Formats numeric values in hexadecimal
{^n}
Sends ASCII character specified by integer n
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. These values may also be displayed using the message
command, MG. If a variable was not previously defined, using the command, VARIABLE=, will
cause the variable to be defined and the controller will not return an error. If the MG command is used
to display a variable which has not been defined, the controller will return an error.
Example - Printing a Variable and an Array element
Instruction Interpretation
#DISPLAY Label
DM POSX[7]
Define Array POSX with 7 entries
PR 1000
Position Command
BGX Begin
AMX After
Motion
V1=_TPX
Assign Variable V1
POSX[1]=_TPX
Assign the first entry
V1= Print
V1
Interrogation Commands
The DMC-1700 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.
Содержание DMC-1510
Страница 6: ......
Страница 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Страница 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 160: ...148 Appendices DMC 1500 Card Level Layout...
Страница 178: ...166 Appendices DMC 1500 ICM 1100 Drawing 1 3 4 0 0 4 4 0 2 4 0 7 0 0 4 5 3 7 0 5 7 0 2 8 5 1 0 0 1 0 1 0 7 0 1 0 0...
Страница 180: ...168 Appendices DMC 1500...
Страница 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...