If the value of the variable result is equal to 999999.999, the above message statement returns the following:
The Final Value is 99999.99
The message command normally sends a carriage return and line feed following the statement. The carriage return
and the line feed may be suppressed by sending {N} at the end of the statement. This is useful when a text string
needs to surround a numeric value.
Example:
#A
JG 50000;BGA;ASA
MG "The Speed is", _TVA {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
description
" "
Surrounds text string
{Fn.m}
Formats numeric values in decimal n digits to the left of the decimal point and
m digits to the right
{P1}, {P2} or {E}
Send message to Main Serial Port, Auxiliary Serial Port or Ethernet Port
{$n.m}
Formats numeric values in hexadecimal
{^n}
Sends ASCII character specified by integer n
{N}
Suppresses carriage return/line feed
{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]=. For example, v1= returns
the value of v1.
Example - Printing a Variable and an Array element
Instruction
Interpretation
#DISPLAY
Label
DM posA[7]
Define Array POSA with 7 entries
PR 1000
Position Command
BGX
Begin
AMX
After Motion
v1=_TPA
Assign Variable v1
posA[1]=_TPA
Assign the first entry
Chapter 7 Application Programming
•
161
DMC-40x0 User Manual
Содержание DMC-4040
Страница 17: ...DMC 4080 Layout Figure 2 2 Outline of the of the DMC 4080 DMC 40x0 User Manual Chapter 2 Getting Started 8...
Страница 19: ...DMC 4040 Dimensions Figure 2 5 Dimensions of DMC 4040 DMC 40x0 User Manual Chapter 2 Getting Started 10...
Страница 20: ...DMC 4080 Dimensions Figure 2 6 Dimensions of DMC 4080 Chapter 2 Getting Started 11 DMC 40x0 User Manual...
Страница 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Страница 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Страница 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Страница 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Страница 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Страница 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Страница 220: ...Step 2 Remove ICM For DMC 4040 Proceed to Step 3 Configure Circuit Appendices 211 DMC 40x0 User Manual...
Страница 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Страница 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...