BASIC commands
PROGRAMMING MANUAL
76
Revi
si
on 3.0
3.2.99 ENCODER_STATUS
/i
3.2.100 ENCODER_TURNS
/i
3.2.101 ENCODER_WRITE
/i
3.2.102 ENDIF
See
IF..THEN..ELSE..ENDIF
.
Type
Axis parameter (read-only).
Syntax
ENCODER_STATUS
Description
This parameter returns the status of the absolute encoder.
This parameter is applicable only to Flexible axis absolute Tamagawa axis
with
ATYPE
value 46. It returns both the status field SF and the ALMC
encoder error field. The SF field is in bits 0 - 7, while the ALMC filed is in bits 8
- 15. For more information see Tamagawa absolute encoder interface specifi-
cation.
If applied to axis of
ATYPE
value other than 46, this parameter returns 0.
Arguments
N/A
Example
PRINT (ENCODER_STATUS AXIS (1) AND 255)
This command will print SF field of the Tamagawa absolute encoder for axis 1.
See also
AXIS
,
ENCODER
,
ENCODER_BITS
.
Type
Axis parameter (read-only)
Syntax
ENCODER_TURNS
Description
The
ENCODER_TURNS
parameter returns the number of multi-turn count
from the encoder.
This is applicable only to Flexible axis absolute Tamagawa axis with
ATYPE
value 46 and Flexible axis absolute EnDat axis with
ATYPE
value 47.
The multi-turn data is not automatically applied to the axis
MPOS
parameter
after initialization. The application programmer must apply this from the pro-
gram using
OFFPOS
or
DEFPOS
commands as required.
If applied to axis of
ATYPE
value other than 46 or 47, the parameter returns 0.
Arguments
N/A
Example
PRINT ENCODER_TURNS AXIS (1)
This command will print absolute encoder multi-turn counts for axis 1.
See also
AXIS
,
ENCODER
,
ENCODER_BITS
.
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_WRITE
parameter should b set to 1,
encoder parameter read/write mode.
Arguments
•
address
Specifies the EnDat MRS field to write to.
•
value
A BASIC expression.
Example
No example.
See also
AXIS
,
ENCODER
,
ENCODER_BITS
,
ENCODER_CONTROL
.
I52E-EN-03.book Seite 76 Freitag, 29. Juni 2007 11:55 11