<< Prev        Next >>

ID : 3591

DriveA

Function

To move each axis to an absolute position.

Syntax

DriveA[ @pass start displacement] target position[, motion option]

Guaranteed Entry

Pass start displacement
Designate the pass start displacement that specifies execution time of the next line. This is an optional value. This should be "@0" if this is omitted. Refer to Pass Start Displacement.
Target position
There are two ways to specify the target position: Specify the motion target axes (including extended-joints) and the target position; Specify all axes by joint type data.
Motion option
A motion option can be specified.

Description

Each axis moves to a designated absolute position. More than one axis can be specified.

To execute this statement, the task must acquire target axis control.

Specifying Target Position

Specify the target position as follows:

Individually designating single axis

Enclose the axis number and target position in brackets "()" to specify them.

Axis number is specified by integer type data. Axis number for which the task has no control cannot be specified.

For the target position, single precision real number type or joint type data can be designated. If joint type data is designated, elements other than specified axis elements will be ignored.

To specify more than one axis, separate multiple sets of an axis number and target position in brackets by comma(s).

'Example of individually specifying axes by DriveA statement
Dim aaa As Joint, bbb As Joint
aaa = J(10, 20, 30, 40, 50, 60, 70, 80)
bbb = J(110, 120, 130, 140, 150, 160, 170, 180)
'Move the axes 1, 7 and 8 to positions of 10 degrees, 170 degrees and 180 degrees, respectively.
DriveA (1,10), (7,aaa), (8, bbb)
Specifying all axes in a batch
To move the target axes simultaneously, enter the target position of axes where the task has the axis control in the corresponding elements of the joint-type data. Components of axes for which the task has no control are ignored.
'Example of specifying axes in a batch by DriveA statement
DriveA J[10]

Related Terms

Drive

Attention

When the same axis is specified twice in an instruction, the latter specification is given priority.

DriveA (7, 50), (7, 100) "The axis 7 moves to the 100 [Degree or mm] position.

Example

'!TITLE "Absolute Motion of Each Axis"
' Absolute motion to designated value of each axis
Sub Sample_DriveA

  TakeArm Keep = 1

  ' Move the axis 1 by 30 degrees (Deg)
  DriveA ( 1, 30 )

  Dim aaa As Single
  Dim bbb As Single
  Dim ccc As Single

  aaa = 25
  bbb = 30
  ccc = 35

  ' Move the axis 2 to the 25 degrees (Deg) value from the current position
  DriveA ( 2, aaa )

  ' Move the axes 1, 2 and 3 by 0.78 (rad), by the value indicated by bbb and by the value indicated
by ccc, respectively, in pass motion DriveA @P ( 1, RadDeg( 0.78 ) ), ( 2, bbb ), ( 3, ccc ) End Sub

ID : 3591

<< Prev        Next >>