Drive_Write; Edit; Else; Elseif - Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual

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

Advertisement

BASIC commands

3.2.89 DRIVE_WRITE

/i
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 the driver needs to be powered 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
For most parameters the size is normally 2 bytes. Some special parame-
ters 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
PROGRAMMING MANUAL
See also
DRIVE_READ, DRIVE_RESET, $ (HEXADECIMAL INPUT)
Caution
Be sure that no Parameter Unit or Personal Computer Software is
connected to the Servo Driver when executing this command. Oth-
erwise the program task will be paused until the connection of the
other device to the Servo Driver is removed.

3.2.90 EDIT

/i
Type
Program command
Syntax
EDIT [ line_number ]
ED [ line_number ]
Description
The EDIT command starts the built in screen editor allowing a program in the
controller to be modified using a VT100 Terminal. The currently selected pro-
gram will be edited.
The editor commands are as follows:
This command is implemented for an offline (VT100) terminal. Within Trajexia
Tools, users can select the command from the Program menu.
Quit Editor: [CTRL] K and D
Delete Line: [CTRL] Y
Arguments
line_number
The number of the line at which to start editing.
Example
No example.
See also
SELECT.
3.2.91 ELSE
See
.
IF..THEN..ELSE..ENDIF

3.2.92 ELSEIF

See
.
IF..THEN..ELSE..ENDIF
73

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-mc16 - programming 1Tj1-mc04 1

Table of Contents