212 ● SA DMC-40x0 Command Reference
SA
FUNCTION: Send command
DESCRIPTION:
SA sends a command form one controller to another via Ethernet.
NOTE: A wait statement (e.g. WT5) must be inserted between successive calls to SA.
ARGUMENTS: SAh=arg or SAh=arg, arg, arg, arg, arg, arg, arg, arg, where
h is the handle being used to send commands to the slave controller.
arg is a number, controller operand, variable, mathematical function, or string; The range for
numeric values is 4 bytes of integer (2
31
) followed by two bytes of fraction (+/-
2,147,483,647.9999). The maximum number of characters for a string is 38 characters.
Strings are identified by quotations.
Typical usage would have the first argument as a string such as “KI” and the subsequent
arguments as the arguments to the command: Example SAF=”KI”, 1, 2 would send the
command: KI1,2
USAGE: DEFAULTS:
While Moving Yes Default Value -----
In a Program Yes Default Format -----
Command Line Yes
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_SAhn gives the value of the response to the command sent with an SA command. The h value
represents the handle A thru H and the n value represents the specific field returned from the
controller (0-7). If the specific field is not used, the operand will be –2^31.
RELATED COMMAND:
MG Display messages
1IH Opens handle
EXAMPLES:
#A
IHA=10,0,0,12 ;'Configures handle A to be connected to a controller with
;'the IP address 10.0.0.12
#B;JP#B,_IHA2<>-2 ;'Wait for connection
SAA="KI", 1, 2 ;'Sends the command to handle A (slave controller): KI 1,2
WT5
SAA="TE" ;'Sends the command to handle A (slave controller): TE
WT5
MG_SAA0 ;'Display the content of the operand_SAA (first response to
;'TE command)
: 132
--response from controller--
MG_SAA1 ;'
isplay the content of the operand
SAA (2nd response to TE
;'command)
: 12
--response from controller--
SAA="TEMP=",16 ;'Sets variable temp equal to 16 on handle A controller
EN ;'End Program