Specifications
BASIC commands
PROGRAMMING MANUAL 78
Revision 5.0
/i
/i
/i
3.2.93 DRIVE_WRITE
/i
9 Torque Limit
10 Latch Completed
11 In Range/Speed Limit
For Flexible Axis axes, this parameter holds the status of registration and
auxiliary inputs, as well as registration selection. The explanation of each bit
is given in the second table below. (Note: Only bits relevant to Flexible axis
are listed.)
Bit Description (Flexible Axis)
0MARK
1 MARKB
2 REG 0 selected current value
3 REG 1 selected current value
4 AUX IN current value
5 REG 0 current value
6 REG 1 current value
Arguments N/A
Example PRINT DRIVE_STATUS AXIS(4)
This command will print the current value of DRIVE_STATUS for axis(4).
Example BASE(3)
ATYPE = 44
IF (DRIVE_STATUS AND 32)= 32 THEN
PRINT "REG 0 input is ON for axis(3)"
ENDIF
See also AXIS, MARK, MARKB, REGIST.
Bit Description (MECHATROLINK-II)
Type Axis command
Syntax DRIVE_WRITE(parameter, size, value [,mode])
Description The DRIVE_WRITE function writes to the specified parameter of the Servo
Driver via the MECHATROLINK-II bus. Upon successful execution, this com-
mand returns -1. If the command cannot be executed, the value 0 is returned.
The command is executed on the driver for the base axis set with BASE. It
can be changed using the AXIS modifier, as with all other axis commands and
parameters. For some parameters to be written the driver needs to be pow-
ered off and on again. The DRIVE_RESET command can be used for that
purpose.
Note: This command waits for the response of the axis so, its execution is
slow and the time variable. Do not use this command together with other com-
mands that require quick execution.
Note: Executing a DRIVE_WRITE will temporarily disable the Servo Driver
Front Panel display.
Note: DRIVE_WRITE returns -1 on success. It also returns -1 with no parame-
ter read if the parameter number does not exist or has the wrong size.
Arguments • parameter
The number of the parameter to write to. Note that the parameter num-
bers are hexadecimal. The format of the data can be found in the Refer to
the Servo Driver manual for the format of the data.
• size
SIze of the parameter is specified in bytes. For most parameters the size
is normally 2 bytes. Some special parameters may be 4 bytes long. Sizes
for each parameter can be found in the Servo Driver manual.
• value
The value to be written into driver parameter.
• mode
The write mode. Possible values: 0 (or omitted) - write and store in RAM;
1 - write and store in EPROM.
Example IF DRIVE_WRITE($100,2,90) THEN
PRINT "The new speed loop gain is: 90"
ELSE
PRINT "The speed loop gain could not be written in RAM"
ENDIF