Encoder_Status; Encoder_Turns; Encoder_Write; Endif - Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual

Hide thumbs Also See for TJ1-MC04 - PROGRAMMING 1:
Table of Contents

Advertisement

BASIC commands

3.2.99 ENCODER_STATUS

/i
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.

3.2.100 ENCODER_TURNS

/i
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.
PROGRAMMING MANUAL

3.2.101 ENCODER_WRITE

/i
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.

3.2.102 ENDIF

See
.
IF..THEN..ELSE..ENDIF
76

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-mc16 - programming 1Tj1-mc04 1

Table of Contents