BASIC commands
PROGRAMMING MANUAL
85
R
e
vi
si
o
n
1
.0
3.2.92 DRIVE_ALARM
/i
3.2.93 DRIVE_CLEAR
/i
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 parameter.
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
.
Type
Axis command
Syntax
DRIVE_ALARM(VR)
Description
The DRIVE_ALARM function reads the current alarm of the Servo Drive that
is connected to the Trajexia system via MECHATROLINK-II. Upon successful
execution, the command returns -1 and stores the value in the VR memory
location specified by the VR parameter. If the command cannot be executed,
the value 0 is returned. The command is executed on the Drive for the base
axis set by BASE. The base axis can be changed with the AXIS modifier, as
with all the other axis commands and parameters.
This command waits for the response from the axis, The execution of the
command can be slow and variable in time. If you require a quick response
do not use this command.
Arguments
•
VR
The alarm value is stored on the VR address on successful execution.
Example
IF NOT DRIVE_ALARM(10) AXIS(2)THEN
PRINT "Failed to readalarm for Servo Drive"
ELSE
IF VR(10) = 0THEN
PRINT "ServoDrive healthy"
ELSE
PRINT "Servoalarm code: "; VR(10)
ENDIF
ENDIF
This example reads an alarm of the Servo Drive driving axis 2 and present
that information to the user.
See also
N/A
Type
Axis command
Syntax
DRIVE_CLEAR
Description
The
DRIVE_CLEAR
command clears the alarm status of the Servo Drive
connected via the MECHATROLINK-II bus. This command is not capable of
clearing all the possible alarm states. Some alarms can only be cancelled by
turning off the power supply (both the TJ2-MC64 and the Servo Drive), and
then turning it on again. Also, an alarm will not be cleared if the cause of the
alarm is still present. The command is executed on the Drive for the base axis
set by BASE. The base axis can be changed with the AXIS modifier, as with
all the other axis commands and parameters.
Arguments
N/A
Example
No example.
See also
DRIVE_STATUS
.
Caution
Be sure that no Parameter Unit or Personal Computer Software is
connected to the Servo Drive when executing this command. Oth-
erwise the program task will be paused until the connection of the
other device to the Servo Drive is removed.