BASIC commands
PROGRAMMING MANUAL
93
R
e
vi
si
o
n
1
.0
3.2.111 ENCODER_WRITE
/i
3.2.112 END_DIR_LAST
/i
3.2.113 ENDIF
See
IF..THEN..ELSE..ENDIF
.
Type
Axis command
Syntax
ENCODER_WRITE(address, value)
Description
The
ENCODER_WRITE
command is applicable only to Flexible axis absolute
EnDat axis with
ATYPE
value 47. The command writes to an encoder param-
eter specified by the address. Bits 8 -15 of the address are the EnDat MRS
field settings and bits 0 - 7 are the offset within the EnDat MRS block. If a
CRC error occurs, this command will return 0. Writing to address 0 performs
an encoder reset function.For more information see EnDat absolute encoder
interface specification.In order to successfully write an encoder parameter
with this command, the
ENCODER_CONTROL
parameter must be set to 1,
encoder parameter read/write mode.
Arguments
•
address
Specifies the EnDat MRS field to write to.
•
value
Any valid BASIC expression.
Example
No example.
See also
AXIS
,
ENCODER
,
ENCODER_BITS
,
ENCODER_CONTROL
.
Type
Axis parameter
Syntax
END_DIR_LAST
Description
Allows the program to examine the end direction in radians of the last pro-
grammed
MOVESP
/
MOVEABSSP
/
MOVECIRCSP
move of 2 or more axes.
END_DIR_LAST
will be the same as
START_DIR_LAST
except in the case
of circular moves.
END_DIR_LAST
is used by the system to calculate the
change in angle when a new move is loaded.
END_DIR_LAST
can be written
to. This is often required when initialising a system or after a sequence of
moves which are not
MOVESP
/
MOVEABSSP
/
MOVECIRCSP
moves of 2 or
more axes.
Arguments
N/A
Example
>>MOVESP(10000,-10000)
>>? END_DIR_LAST
2.3562
See also
MOVESP
,
START_DIR_LAST
.