Output Of Data (Numeric And String); Sending Messages - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

WT100;CB1
JP #CUT
EN
Inputting String Variables
String variables with up to six characters may input using the specifier, {Sn} where n represents the
number of string characters to be input. If n is not specified, six characters will be accepted. For
example, IN "Enter X,Y or Z", V{S} specifies a string variable to be input.

Output of Data (Numeric and String)

Numerical and string data can be output from the controller using several methods. The message
command, MG, can output string and numerical data. Also, the controller can be commanded to return
the values of variables and arrays, as well as other information using the interrogation commands (the
interrogation commands are described in chapter 5).

Sending Messages

Messages may be sent to the bus using the message command, MG. This command sends specified
text and numerical or string data from variables or arrays to the screen.
Text strings are specified in quotes and variable or array data is designated by the name of the variable
or array. For example:
MG "The Final Value is", RESULT
In addition to variables, functions and commands, responses can be used in the message command.
For example:
MG "The input is", @IN[1]
MG "The proportional Gain of X is", _KPX
Formatting Messages
String variables can be formatted using the specifier, {Sn} where n is the number of characters, 1 thru
6. For example:
MG STR {S3}
This statement returns 3 characters of the string variable named STR.
Numeric data may be formatted using the {Fn.m} expression following the completed MG statement.
{$n.m} formats data in HEX instead of decimal. The actual numerical value will be formatted with n
characters to the left of the decimal and m characters to the right of the decimal. Leading zeros will be
used to display specified format.
For example::
MG "The Final Value is", RESULT {F5.2}
If the value of the variable RESULT is equal to 4.1, this statement returns the following:
The Final Value is 00004.10
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.
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Wait 100 msec, then turn off cutter
Repeat process
End program
Chapter 7 Application Programming
119
i

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents