![Parker 6250 Скачать руководство пользователя страница 88](http://html.mh-extra.com/html/parker/6250/6250_user-manual_755628088.webp)
80
6250 Servo Controller User Guide
Step 1 Initialize a Data Program.
> DEL DATP1
Delete data program #1 (
DATP1
) in preparation for creating a new
data program #1
> DATSIZ1,1Ø
Create data program #1 (named
DATP1
) with an allocation of 10
data elements. Each element is initialized to zero.
Step 2 Define the
SETUP
Subroutine.
Note that the
SETUP
subroutine need only run once.
> DEF SETUP
Begin definition of the subroutine called
SETUP
- JOYVH3,3
Set the high velocity speed to 3 rps
- JOYVL.2,.2
Set the low velocity to 0.2 rps
- JOYAXH1,2
When axes select input is set high, apply analog input 1 to axis 1
and apply analog input 2 to axis 2
- VAR1=Ø
Set variable #1 equal to zero
- VAR2=Ø
Set variable #2 equal to zero
- DRIVE11
Enable the drives for both axes
- MA11
Enable the absolute positioning mode for both axes
- END
End definition of the subroutine called
SETUP
Step 3 Define the
TEACH
Subroutine.
> DEF TEACH
Begin definition of the subroutine called
TEACH
- HOM11
Home both axes (absolute position counter is set to zero after
homing move)
- DATPTR1,1,1
Select data program #1 (
DATP1
) as the current active data program,
and move the data pointer to the first data element. After each
DATTCH
value is stored to
DATP1
, increment the data pointer by 1
data element.
- REPEAT
Set up a repeat/until loop
- JOY11
Enable joystick mode on both axes. At this point, you can start
moving the axes into position with the joystick. While using the
joystick, command processing is stopped here until you activate the
joystick release input. Activating the joystick release input disables
the joystick mode and allows the following commands to be
executed (assign the motor positions to the variables and then store
the positions in the data program).
- VAR1=1PM
Set variable #1 equal to the position of motor 1
- VAR2=2PM
Set variable #2 equal to the position of motor 2
- DATTCH1,2
Store variable #1 and variable #2 into consecutive data elements.
(The first time through the repeat/until loop, variable #1 is stored
into data element #1 and variable #2 is stored into data element #2.
The data pointer is automatically incremented once after each data
element and ends up pointing to the third data element in
anticipation of the next
DATTCH
command.)
- WAIT(INO.5=b1)
Wait for the joystick release input to be de-activated
- UNTIL(DPTR=1)
Repeat the loop until the data pointer wraps around to data element
#1
(data program full)
- END
End definition of the subroutine called
TEACH