34 block_move@function, 34 block_move@ function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 102

7Ć14
hexadecimal 4Ćbit binary to the decimal equivalent (opposite of the
BCD_OUT% function). In the following example, assume the value at
INPUT_CARD% is 2381 hex:
IN_VALS%=BCD_IN%(INPUT_CARD%)
The hex value 2381 is converted to a 16Ćbit decimal value equal to
2381.
If the value input to BCD_IN% is greater than 9999 hex, the output
will be decimal 9999 and an error will be logged.
7.34
BLOCK_MOVE@ Function
Format:
BLOCK_MOVE@(source, dest, size)
where:
source and dest must be integer, double integer, boolean, or
real variables or oneĆdimensional integer arrays. If integer,
double integer, or boolean variables, they must be variables
defined in the configuration task that points to the desired
specific source or destination register on the network. If the
source or destination is an array, it must be 1Ć dimensional. The
array may be common or local.
size is the number of registers (16Ćbit words) to transfer from the
source to the destination.
The BLOCK_MOVE function transfers data to and from the network.
It is a boolean function and is TRUE if the operation is successful,
FALSE if not. The function allows the user to specify only a starting
variable name for the destination or source variable list and a length
of registers to be transferred. This eliminates having to define each
variable explicitly in the rack configuration and then transferring the
data one variable at a time with a long list of LET statements.
The BLOCK_MOVE function checks the individual register values as
they are moved; if any of the values are FORCED, the forced value
will be used. Thus, the execution time for the function varies
considerably and is dependent on the number of variables in the
current force list (maximum of 16) and whether any of those
variables are in the source or destination range of the
BLOCK_MOVE variables. In the following example, 32 registers are
moved:
IF NOT BLOCK_MOVE@(NETW_1_32%, NETW_2_32%,32)
THEN STOP
Keep in mind the following when forcing variables and overlaying
variable definitions (an integer is overlayed over several booleans):
1. If boolean variables are forced within a forced integer, double
integer, or real variable, the integer forced value will prevail.
For example, If A@ and B@ are I/O defined as bits within XYZ%,
XYZ% and A@ and B@ are all forced, and XYZ% is used as the
source variable in a BLOCK MOVE function; the result will be
that the XYZ% forced value will take precedence over the A@
and B@ forced values.