35 gateway_cmd_ok@ function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 103

7Ć15
2. If the destination is forced and the source is forced, the
destination forced value will prevail. The BLOCK MOVE function
will return a FALSE status if any of the following occurs:
The BLOCK_MOVE function will return a FALSE status if any on the
following occurs:
1. The number of registers to transfer (transfer size) is:
D Less than or equal to zero
D Greater than 32767
2. The source or destination variable address is less than the valid
starting offboard address for that rack configuration:
D If there is no Common Memory module (M/N 57C413), the
starting address must be equal to or greater than
200000(hex)
D If there is a Common Memory module (M/N 57C413), the
starting address must be equal to or greater than
220000(hex)
3. The number of registers to transfer is greater than the number of
elements in the source or destination array. If the source or
destination is an array and the number of elements is greater
than the number of registers to move, only the number
requested will be moved and the rest of the array will not be
affected.
7.35
GATEWAY_CMD_OK@ Function
GATEWAY_CMD_OK@ is a boolean function that performs register
transfers to or from the Interface modules, including the
AllenĆBradley (M/N 57C418), Modbus (M/N 57C414), and AutoMate
(M/N 57C417) modules. This function cannot be used on the
AutoMax PC3000. If the operation is successful, the function returns
a 0 value. If the operation is not successful, the operation returns an
error code that is determined by the hardware with which the
Interface module is communicating.
Format:
GATEWAY_CMD_OK@(status, cmd_code, slave_drop, &
slave_reg, master_var, num_regs)
where:
status is an integer variable representing the location where the
resulting command status is stored; status will contain a zero if
the transfer operation is successful and an error code if it is
unsuccessful. The error code is dependent on the module used.
See the instruction manual for the specific Interface module for
the error codes.
cmd_code is a variable name or expression of type integer
representing the command sent to the Interface module; the
commands available are specific to each interface module. See
the instruction manual for the specific Interface module for the
available commands.
slave_drop is a variable name or expression of type integer
representing the device address (e.g., node number) of the
hardware the Interface module is communicating with