Galil DMC-3425 Home Security System User Manual


 
DMC-3425 Chapter 7 Application Programming 137
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
{P1}or {Ea} Send message to Main 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
BGA Begin
AMA After Motion
V1=_TPA Assign Variable V1
POSA[1]=_TPA Assign the first entry
V1= Print V1
Interrogation Commands
The DMC-3425 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 Ch 5.
Using the PF Command to Format Response from Interrogation Commands
The command, PF, can change format of the values returned by these interrogation commands:
BL ? LE ?
DE ? PA ?
DP ? PR ?
EM ? TN ?
FL ? VE ?
IP ? TE
TP
The numeric values may be formatted in decimal or hexadecimal with a specified number of digits to
the right and left of the decimal point using the PF command.