6.ADDRESS ASSIGNMENT TO POINTS OPERATION B-82604EN/01
- 50 -
6.11 NOTES AND TIPS ON USAGE
6.11.1 $SNPX_ASG Is Set, but Data That Should Have Been
Assigned Cannot Be Read/Written.
When a %R area not assigned with $SNPX_ASG is read from, 0 is
always read. When a non-zero value is set at the %R address in
question, the %R address can be considered to have been assigned to
other data.
When $SNPX_ASG is set as follows, for example, %R101
through %R150 are assigned both by $SNPX_ASG[1] and
$SNPX_ASG[2].
$ADDRESS $SIZE $VAR_NAME $MULTIPLY
$SNPX_ASG[1] 1 1000 R[1]@1.1 1
$SNPX_ASG[2] 101 50 PR[1] 100
In this case, $SNPX_ASG with the smaller number takes
preceedence.
In the above example, $R101 to %R150 are assigned to R[101] to
R[150]. So, PR[1] cannot be read from nor written to.
Next, suppose that 0 is set at the %R address in question. Also in this
case, it is considered that other data is assigned to the %R area as
explained above, and that the data is 0 by accident. Check for a
duplicate assignment.
If a duplicate assignment is not made, the assignment setting itself
may have a problem. Check the $SNPX_ASG setting. The following
are error-prone:
• The correct formats for $VAR_NAME are listed below. If the
setting does not follow any of these formats, assignment is not
performed.
“R[number]”
“PR[number]”
“PR[G number:number]”
When specifying a group, specify a colon ( : ) after a
group number.
“POS[number]”
“POS[G number:number]”
When specifying a group, specify a colon ( : ) after a
group number.
“ALM[number]”
“ALM[E number]”
“ALM[P number]”
Specify a number immediately after E and P. A colon ( : )
is not added.
“PRG[number]”
System-variable-name A system variable name begins with a dollar sign ( $ ).
$[KAREL-program-name]KAREL-variable-name
“DI[number]” “DI[S number]” “DI[C number]”
“DO[number]” “DO[S number]” “DO[C number]”
“RI[number]” “RI[S number]” “RI[C number]”
“RO[number]” “RO[S number]” “RO[C number]”