All BASIC commands
Section 4-2
138
4-2-73 DPOS
/i
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
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
.
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...