BASIC commands
PROGRAMMING MANUAL
90
R
e
vi
si
o
n
1
.0
3.2.101 ELSE
See
IF..THEN..ELSE..ENDIF
.
3.2.102 ELSEIF
See
IF..THEN..ELSE..ENDIF
.
3.2.103 ENCODER
/i
3.2.104 ENCODER_BITS
/i
Arguments
•
parameter
The number of the parameter to write to. Note that the parameter num-
bers are hexadecimal. The format of the data can be found in the Refer to
the Servo Drive manual for the format of the data.
•
size
SIze of the parameter is specified in bytes. For most parameters the size
is normally 2 bytes. Some special parameters may be 4 bytes long. Sizes
for each parameter can be found in the Servo Drive manual.
•
value
The value to be written into Drive parameter.
•
mode
The write mode. Possible values: 0 (or omitted) - write and store in RAM;
1 - write and store in EPROM.
Example
IF DRIVE_WRITE($100,2,90) THEN
PRINT "The new speed loop gain is: 90"
ELSE
PRINT "The speed loop gain could not be written in RAM"
ENDIF
See also
•
DRIVE_READ
,
DRIVE_RESET
,
$ (HEXADECIMAL INPUT)
Caution
Be sure that no Parameter Unit or Personal Computer Software is
connected to the Servo Drive when executing this command. Oth-
erwise the program task will be paused until the connection of the
other device to the Servo Drive is removed.
Type
Axis parameter (read-only)
Syntax
ENCODER
Description
The
ENCODER
axis parameter contains a raw copy of the encoder hardware
register or the raw data received from the drive via MECHATROLINK-II. On
axes with absolute encoders, the ENCODER parameter contains a value
using a number of bits programmed with ENCODER_BITS.
The
MPOS
axis parameter contains the measured position calculated from
the
ENCODER
value automatically, allowing for overflows and offsets.
Arguments
N/A
Example
No example.
See also
AXIS
,
MPOS
.
Type
Axis parameter
Syntax
ENCODER_BITS = value
Description
This axis parameter configures the interface for the number of encoder bits for
Flexible axis SSI and EnDat absolute encoder axes. The parameter is appli-
cable only to axes of
ATYPE
values 47 and 48.
When applied to Flexible axis EnDat absolute encoder axis, bits 0 - 7 of the
parameter should be set to the total number of encoder bits. Bits 8 - 14 should
be set to the number of multi-turn bits to be used.
When applied to Flexible axis SSI absolute encoder axis, bits 0 - 5 of the
parameter should be set to the number of encoder bits. Bit 6 should be 1 for
binary operation, or 0 for Gray code.
For SSI encoders of the “Balluff” brand bits 8..10 allow an additional hardware
shift to be specified. Normally bits 8..10 are 0.
Note: If using Flexible axis absolute encoder axis, it is essential to set this
parameter for the axis before setting the ATYPE.
Arguments
N/A