6.ADDRESS ASSIGNMENT TO POINTS OPERATION B-82604EN/01
- 24 -
6.2 READING FROM AND WRITING TO REGISTERS (%R)
The standard correspondence between robot controller data and PLC
addresses is as follows:
Robot controller data PLC address Example
Register %Rx R[1] ⇔ %R1
CAUTION
USE the value in the register as a 16-bit signed
integer. Any fractional part of the register value is
rounded off. Unless the register value is within the
range from –32768 to 32767, the register value
cannot be read or written correctly.
The correspondence between registers and PLC addresses is defined
with system variable $SNPX_ASG. The standard $SNPX_ASG
settings are provided as listed below. As a result, registers correspond
to PLC addresses as shown above. When the $SNPX_ASG settings
have been modified, the above correspondence is not obtained.
Therefore, before reading from or writing into registers through
CIMPLICITY, check that $SNPX_ASG is set as follows:
System variable Value
$SNPX_ASG[1].$ADDRESS 1
$SNPX_ASG[1].$SIZE 10000
$SNPX_ASG[1].$VAR_NAME R[1]@1.1
$SNPX_ASG[1].$MULTIPLY 1
$SNPX_ASG consists of 80 arrays $SNPX_ASG[1] to [80], each of
which has four elements including $ADDRESS, $SIZE,
$VAR_NAME, and $MULTIPLY. By modifying these settings, many
types of data can be assigned to %R. When CIMPLICITY reads from
and writes into position registers and system variables, which will be
described later, $SNPX_ASG is also used.
When assigning registers, set the elements of $SNPX_ASG as
follows:
$SNPX_ASG element Explanation
$ADDRESS Meaning: Start address of %R to be assigned.
Range: 1 to 16384
$SIZE Meaning: Number of %R’s to be assigned.
Two %R’s are required per register. Set this element according to the number of
registers you want to read from or write to.
(Addint @ to $VAR_NAME changes the number of %R’s per register.)
Range: 1 to 16384