Omron trajexia CJ1W-MCH72 Operation Manual page 149

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-73 DPOS
138
Example
One group of axes in a machine must be reset if a motion error occurs,
without affecting the remaining axes. This must be done manually by
clearing the cause of the error, pressing a button to clear the error flags
of the controllers and re-enabling the motion.
DISABLE_GROUP(-1) 'remove any previous axis groupings
DISABLE_GROUP(0,1,2) 'group axes 0 to 2
GOSUB group_enable 'enable the axes and clear errors
WDOG=ON
SPEED=1000
FORWARD
WHILE IN(2)=ON
check axis 0, but all axes in the group will disable together
IF AXIS_ENABLE =0 THEN
PRINT "Motion error in group 0"
PRINT "Press input 0 to reset"
IF IN(0)=0 THEN 'checks if reset button is pressed
GOSUB group_enable 'clear errors and enable axis
FORWARD 'restarts the motion
ENDIF
ENDIF
WEND
STOP 'stop program running into sub routine
group_enable: 'Clear group errors and enable axes
DATUM(0) 'clear any motion errors
WA(10)
FOR axis_no=0 TO 2
AXIS_ENABLE AXIS(axis_no)=ON 'enable axes
SERVO AXIS(axis_no)=ON 'start position loop servo
NEXT axis_no
RETURN
See also
N/A
/i
Type
Axis parameter (read-only)
Syntax
DPOS
Description
The DPOS axis parameter contains the demand position in user units,
which is generated by the move commands in servo control. When the
controller is in open loop (SERVO=OFF), the measured position
(MPOS) will be copied to the DPOS in order to maintain a 0 Following
Error.
The range of the demand position is controlled with the REP_DIST and
REP_OPTION axis parameters. The value can be adjusted without
doing a move by using the DEFPOS command or OFFPOS axis param-
eter. DPOS is reset to 0 at start-up or controller reset.
Arguments
N/A
Example
>> PRINT DPOS AXIS(0)
34.0000
The above line will return the demand position in user units.
See also
AXIS, DPOS, DEFPOS, DEMAND_EDGES, FE, MPOS, REP_DIST,
REP_OPTION, OFFPOS, UNITS.
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents