Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 24

UN286 Motion Library Instruction Manual

Chapter 1 Special Register

1.1 Interpolation Register

Register No. Type Value Unit description


VD651 DWORD 1-200000 Pulse/S Current interpolation vector speed
VD655 DWORD 1-2147483647 Pulse/S*S Current interpolation acceleration
VD659 DWORD 0-2147483647 Pulse Interpolation vector length
VD663 DWORD 0-2147483647 Pulse Interpolation remaining vector length
VB667 BYTE 0-32 Reserve(interpolation stop reason)

1.2 Axis register

Remark: Axis 1 base address is 200, Axis 2 base address is 300, Axis 3 base address is 400, Axis 4 base address is 500, below
addresses all are the offset addresses of relative axis base address.

Register No. Type Value Unit description


VD0 DWORD 1-200000 Pulse/S Axis running speed
VD4 DWORD 1-200000 Pulse/S Axis start speed
VD8 DWORD 1-200000 Pulse/S Axis finish speed
VD12 DWORD 1-2147483647 Pulse/S*S Axis acceleration
VD16 DWORD 1-2147483647 Pulse/S*S Axis Deceleration
VD20 DWORD Reserve ms Reserve( Despiking time)
VD24 DWORD 0-1 Smooth proportion
VW28 WORD 0-65535 Fifteenth- limit signal enable (0x8000)
Fourteenth-alarm signal (0x4000)
Thirteenth-in position signal (0x2000)
Eleventh-Emergency signal (0x0800)
Ninth-soft limit (0x0200)
Eighth-limit decelerate stopping (0x0100)
Seventh-soft limit decelerate stopping (0x0080)
VB30 BYTE 0-255 Seventh-overturn limit signal active level (0x80)
Sixth-overturn alarm signal active level (0x40)
Fifth-overturn in position signal active level (0x20)
Fourth-overturn emergency signal active level (0x10)
Third-overturn origin signal active level (0x08)
VB31 BYTE Reserve Reserve( pulse mode)
VB32 BYTE 0-1 Back to origin point direction
VB33 BYTE 0-2 Back to origin point mode
VD34 DWORD 1-200000 Return origin point speed
VB38 BYTE Reserve Reserve (return origin point INDEX signal No.)
VD39 DWORD Symbol on 27th Pulse Positive soft limit (-67108614~67108613)
VD43 DWORD Symbol on 27th Pulse Negative soft limit (-67108614~67108613)
VD47 DWORD Reserve Reserve ( input number of filter)
VB60 BYTE 0-1 Axis status: 0-run 1-stop
VB61 BYTE 0-1 Servo alarm status: 0-no, 1-servo alarm
VB62 BYTE 0-1 In position signal status: 0-no, 1-in position signal valid
VB63 BYTE 0-1 Positive limit status :0-no, 1-positive limit valid
VB64 BYTE 0-1 Negative limit status: 0-no, 1-negative limit valid
VB65 BYTE 0-1 Positive soft limit status: 0-no, 1-positive soft limit valid
VB66 BYTE 0-1 Negative soft limit status: 0-no, 1-negative soft limit valid
VB67 BYTE 0-1 Origin point signal status: 0-no, 1-origin point signal valid
VD68 DWORD Symbol on 27th Pulse Current axis position (-67108614~67108613)
VD72 DWORD Symbol on 27th Pulse Current axis target position (-67108614~67108613)
VD76 DWORD 1-200000 Pulse/S Current axis speed
VD80 DWORD 1-2147483647 Pulse/S*S Current axis acceleration
VD84 DWORD Symbol on 27th Pulse Axis plan position (-67108614~67108613)
VD88 DWORD 0-200000 Pulse/S Axis plan speed
VB92 BYTE 0-255 Axis motion mode:
0.......no
2.......point movement mode
4.......speed movement mode
8........back to origin point movement mode
128.....interpolation movement mode
VB93 BYTE 0-32 Reserve ( axis stop reason)

Chapter 2 instruction description

2.1 Motion module initialization

Instruction block
diagram

Input parameter EN BOOL ENABLE BIT


Output parameter NO
Function description Start and initialization motion control function
Net one net title
Demo
Motion control module initialization

Remark After close then can not call motion control instruction
2.2 Axis parameter configuration

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

SPEED DWORD Axis run speed (1-200000)


Input parameter
SPEED-START DWORD Axis start speed (1-200000)

SPEED-END DWORD Axis stop speed (1-200000)

ACC DWORD Axis acceleration (>1)

DEC DWORD Axis deceleration (>1)

SMOOTH REAL Axis smooth rate, floating point input, range (0.0~1.0)

Output parameter No
Function description Initialize axis parameter
Demo Axis speed initialization

Remark Start speed, stop speed, run speed, acceleration and deceleration must be >0 integer

2.3 Interpolation parameter configuration

Instruction block
diagram
EN BOOL Enable

ID BYTE Interpolator No. Input 0

SPEED DWORD interpolation run speed (1-200000)


Input parameter
SPEED- DWORD interpolation start speed (1-200000)

START

SPEED-END DWORD interpolation stop speed (1-200000)

ACC DWORD interpolation acceleration (>1)

DEC DWORD interpolation deceleration (>1)

SMOOTH REAL interpolation smooth rate, floating point input, range (0.0~1.0)

Output parameter No
Function description Initialize interpolation parameter
Demo Interpolation speed initialization
Remark Start speed, stop speed, run speed, acceleration and deceleration must be >0 integer

2.4 Special signal configuration

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

LIMIT BOOL Limit if enable (0 not enable 1 enable)


Input parameter
ALARM BOOL Alarm if enable (0 not enable 1 enable)

INPUT BOOL In position signal if enable (0 not enable 1 enable)

EMG BOOL Emergency signal if enable (0 not enable 1 enable)

SOFT-LIMIT BOOL Soft limit if enable (0 not enable 1 enable)

Output parameter No
Function description Configure special signal
Demo

Remark No
2.5 Special signal active level configuration

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

LIMIT BOOL Overturn limit signal active level (0 not overturn 1 overturn)
Input parameter
ALARM BOOL Overturn alarm signal active level (0 not overturn 1 overturn)

INPUT BOOL Overturn in position signal active level (0 not overturn 1 overturn)

EMG BOOL Overturn emergency signal active level (0 not overturn 1 overturn)

HOME BOOL Overturn origin point signal active level (0 not overturn 1 overturn)

Output parameter No
Function description Configure special signal active level
Demo Configure active level
Remark Default active level is high level

2.6 Soft limit configuration

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

PLUS_LIMIT BOOL + soft limit


Input parameter
DEC_LIMIT BOOL - soft limit

Output parameter No
Function description Configure soft limit value
Demo Configure soft limit
Remark No

2.7 Single axis stop immediately

Instruction block
diagram
Input parameter EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

Output parameter No
Function description axis stop immediately
Demo Single axis stop immediately

Remark No

2.8 All axis stop immediately


Instruction block
diagram
Input parameter EN BOOL Enable

Output parameter No

Function description All axis stop immediately

Demo All axis stop immediately

Remark No

2.9 Single Axis Deceleration stop

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

DEC1 DWORD Axis 1 deceleration configuration (1-2147483647)


Input parameter
DEC2 DWORD Axis 2 deceleration configuration (1-2147483647)

DEC3 DWORD Axis 3 deceleration configuration (1-2147483647)

DEC4 DWORD Axis 4 deceleration configuration (1-2147483647)

Output parameter No
Function description Axis decelerate stopping
Demo Axis decelerate stopping

Remark All axis deceleration must be >0 integer

2.10 All axis decelerate stopping

Instruction block
diagram
EN BOOL Enable

DEC1 DWORD Axis 1 deceleration configuration (1-2147483647)

DEC2 DWORD Axis 2 deceleration configuration (1-2147483647)


Input parameter
DEC3 DWORD Axis 3 deceleration configuration (1-2147483647)

DEC4 DWORD Axis 4 deceleration configuration (1-2147483647)

Output parameter No
Function description All Axis decelerate stopping
Demo All Axis at 22000 decelerate stopping

Remark All axis deceleration must be >0 integer

2.11 Change position instruction

Instruction block
diagram
EN BOOL Enable

POS1 DWORD Axis 1 position configuration (-67108614~67108613)

POS2 DWORD Axis 2 position configuration (-67108614~67108613)


Input parameter
POS3 DWORD Axis 3 position configuration (-67108614~67108613)

POS4 DWORD Axis 4 position configuration (-67108614~67108613)

Output parameter No
Function description Change Axis position
Demo Configure Axis 1 position 1000, Axis 2 1234, Axis 3 344, Axis 4 1000

Remark No

2.12 Back to Origin point instruction

Instruction block
diagram
EN BOOL Enable

COOR BYTE Always at 0

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable
Input parameter
DIR_0 BYTE Axis 1 back to origin point direction

MODE_0 BYTE Axis 1 back to origin point mode

SPEED_0 DWORD Axis 1 back to origin point speed

DIR_1 BYTE Axis 2 back to origin point direction

MODE_1 BYTE Axis 2 back to origin point mode

SPEED_1 DWORD Axis 2 back to origin point speed

DIR_2 BYTE Axis 3 back to origin point direction

MODE_2 BYTE Axis 3 back to origin point mode

SPEED_2 DWORD Axis 3 back to origin point speed

DIR_3 BYTE Axis 4 back to origin point direction

MODE_3 BYTE Axis 4 back to origin point mode

SPEED_3 DWORD Axis 4 back to origin point speed


Output parameter All back to origin point speed must be >0 integer, if back to origin point speed < axis start speed, then run at
axis start speed.
Function description Back to origin point mode 0: once back to origin point, meet origin point switch decelerating stop, meet limit
switch reserve, meet twice limit stop back to zero movement, if forward back to zero, meet +limit then
reserve seeking origin point switch, if not find origin point switch, meet -limit, then stop directly.

Back to origin point mode 1: once back to zero plus reserve seeking, meet origin point switch +exit, reserve
seeking origin point again, the processing of limit as mode 0

Back to origin point mode 2: twice back to zero, meet origin point switch -exit, reserve seeking origin point
again, the processing of limit as mode 0
Demo Back to origin point movement
Remark Reserve seeking speed of back to origin point same as axis start speed.
2.13 speed movement instruction

Instruction block
diagram
EN BOOL Enable

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

DIR BYTE Direction, correspond with Axis No. corresponding position 1 means this axis forward 0 reserve
Input parameter
MODE BYTE Set 0

SPEED1 DWORD Axis 1 configure speed (1-200000)

SPEED2 DWORD Axis 2 configure speed (1-200000)

SPEED3 DWORD Axis 3 configure speed (1-200000)

SPEED4 DWORD Axis 4 configure speed (1-200000)

Function description Acceleration to appointed speed, continue moving at this speed, till get deceleration or stopping instruction

Demo All Axis forward


move at 2000

Remark Speed not exceed configured axis running speed, if over, then configure moving at axis running speed.
2.14 speed motion online change speed

Instruction block
diagram
Input parameter EN BOOL Enable bit
AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

SPEED1 DWORD Axis 1 set speed (1-200000)

SPEED2 DWORD Axis 2 set speed (1-200000)

SPEED3 DWORD Axis 3 set speed (1-200000)

SPEED4 DWORD Axis 4 set speed (1-200000)

Output parameter N/A


Function description After speed reach target speed1, uniform motion according to this speed, during the motion process, target
speed1 is modified to target speed2, current speed accelerate to target speed2, if receive decelerate or
stop instruction, then decelerate to ET, stop.

Speed Variable &


accelerate
instruction
Speed2 variable &
decelerate
Speed1 instruction
time

Demo
Remark Variable speed set must above 0, no matter target speed increase or decrease, all vary according to axis
accelerate parameter ACC (refer to 2.2)

2.15 speed motion online change direction


Instruction block
diagram

Input parameter EN BOOL Enable bit

AXIS BYTE Axis serial no.

DIR BYTE Motion direction (0-negative, 1-positive )

Output parameter N/A


Function description
Speed

Change direction instruction time


Demo
Remark If current speed is not run speed, it will automatically accelerate to run speed when changing the direction

2.16 point to point movement

Input parameter EN BOOL Enable bit

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

IFABS BYTE 0 relative motion, 1 absolute motion

IFCHANGEPOS BYTE Set 0, reserve

POS1 DWORD Axis1 set position (-67108614~67108613)

POS2 DWORD Axis2 set position (-67108614~67108613)

POS3 DWORD Axis3 set position (-67108614~67108613)

POS4 DWORD Axis4 set position (-67108614~67108613)

Output parameter N/A


Function description 1. If distance satisfy condition, there is constant speed stage, control motor start to run with initial speed,
when it reaches running speed, run with constant speed, finally arrive in target location with end speed.
Speed
Positio
n control
instruction
time
2. If
distance
doesn’t
satisfy
condition,
without
constant
speed
stage,
Speed control
motor
start to
run with
initial speed, PLC automatically plans max. speed, and arrive in target location with end speed.

Posi
tion
control

instruction time
Demo Axis0 and axis1 respectively run to the position of 2000 and 3000.

Remark None

2.17 point to point movement online change location

Instruction Diagram
Input Parameter EN BOOL Enable bit

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

POS1 DWORD Axis1 set position (-67108614~67108613)

POS2 DWORD Axis2 set position (-67108614~67108613)

POS3 DWORD Axis3 set position (-67108614~67108613)

POS4 DWORD Axis4 set position (-67108614~67108613)

Output Parameter None


Function Description During point to point movement, you can modify target location. If target location is before deceleration
point, then PLC will first decelerate to stop, then reverse move to given target location. If don’t start point to
point movement at present, invoking this instruction, equals invoking absolute location point to point
movement instruction.

Speed Change
target
location
instruction
time
Demo
Remark None

2.18 Linear interpolation instruction


Instruction Diagram
Input Parameter EN BOOL Enable bit

COOR BYTE Set 0

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

IFABS BYTE 0 relative movement, 1 absolute movement

POS1 DWORD Axis1 set end position (-67108614~67108613)

POS2 DWORD Axis2 set end position (-67108614~67108613)

POS3 DWORD Axis3 set end position (-67108614~67108613)

POS4 DWORD Axis4 set end position (-67108614~67108613)

Output Parameter None


Function description
Demo Axis 1,2,3,4 interpolate to 10000 position, absolute movement

Remark None

2.19 3 points circular interpolation instruction


Instruction Diagram

Input Parameter EN BOOL Enable bit

COOR BYTE Interpolation coordinate system, always set to 0

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

IFABS BYTE 0 is relative coordinate, 1 is absolute coordinate

ENDPOS1 DWORD End point coordinate (-67108614~67108613)

ENDPOS2 DWORD End point coordinate (-67108614~67108613)


ENDPOS3 DWORD End point coordinate (-67108614~67108613)

ENDPOS4 DWORD End point coordinate (-67108614~67108613)

MIDPOS1 DWORD Intermediate point coordinate(-67108614~67108613)

MIDPOS2 DWORD Intermediate point coordinate(-67108614~67108613)

MIDPOS3 DWORD Intermediate point coordinate(-67108614~67108613)

MIDPOS4 DWORD Intermediate point coordinate(-67108614~67108613)

Output Parameter None


Function Description Circular interpolation, 3 points arc not supports full circle way, circle center end supports full circle interpolation.

Demo Axis 0 and axis


1 draw half
circle by
[0,5000] as
center of circle

Remark Please use circle center end way for full circle interpolation

2.20 center of circle end circular interpolation instruction


Instruction Diagram

Input Parameter EN BOOL Enable bit

COOR BYTE Interpolation coordinate system, always set to 0

AXIS BYTE Axis No., low four byte means 4 axis, corresponding position 1 means this axis enable

IFABS BYTE 0 is relative coordinate, 1 is absolute coordinate

IFANTICLOCK BYTE 0 is clockwise, 1 is anticlockwise

ENDPOS1 DWORD End point coordinate (-67108614~67108613)

ENDPOS2 DWORD End point coordinate (-67108614~67108613)

ENDPOS3 DWORD End point coordinate (-67108614~67108613)

ENDPOS4 DWORD End point coordinate (-67108614~67108613)

CENTER1 DWORD Center of circle coordinate (-67108614~67108613)

CENTER2 DWORD Center of circle coordinate (-67108614~67108613)

CENTER3 DWORD Center of circle coordinate (-67108614~67108613)

CENTER4 DWORD Center of circle coordinate (-67108614~67108613)

Output Parameter None


Function Description Circular interpolation, 3 points circular do not support full circle way, circle center end support full circle
interpolation.
Demo Doing relative movement full circle interpolation by center of circle end way, center of circle (10000,0) end
point (0,0)

Axis 0 and axi1 draw anticlockwise full circle by [0, 10000] as center of circle.

Remark Please use center of circle end way for full circle interpolation

Chapter 3 UN286 FAQs

Q 1: instruction calls are normal, motor doesn’t work


Step1: check whether the wiring is right;
(1) pulse and direction output, whether servo enabled signal etc. already correctly connect to motor drive; please refer to
hardware wiring manual for wiring way;
(2) whether drive is power on or not, whether motor wiring is correct;
Step 2: check forbidden motor run signal
(1) UN286 PLC every axis has special signal: limit (positive limit and negative limit), origin, alarm etc. During normal operation,
confirm signals of corresponding axis NOT disabled. Confirmation method please check as below, the limit, alarm, soft-spacing in
this chart must be 0:
9 Mc_stat_axis_0:VB260 unsigned 0
0 Mc_stat_alm_0:VB261 signed +0
1 Mc_stat_arrive_0:VB262 signed +0
2 Mc_stat_plus_limit_0:VB263 signed +0
3 Mc_stat_dec_limit_0:VB264 signed +0
4 Mc_stat_soft_p_limit_0:VB265 unsigned 0
5 Mc_stat_soft_d_limit_0:VB266 signed +0
6 Mc_stat_home_0:VB267 signed +0
7 Mc_stat_position_0:VD268 signed +399664
8 Mc_stat_tgt_position_0:VD272 signed +341449
9 Mc_stat_speed_0: VD276 signed +10597
0 Mc_stat_acc_0:VD280 signed +0
1 Mc_stat_plan_position_0: VD284 signed +399659
2 Mc_stat_plan_speed_0:VD288 signed -10633
3 Mc_stat_mode_0:VB292 signed -128
4 Mc_stat_stop_cause_0:VB293 signed +0

Step 3: confirm effective electrical level of limit etc. Signals


Switches that equipment use might be normally close or normally open, need to check electrical level on the state of switch
effective. Effective electrical level set, please check “2.5 special signal effective electrical level configuration”

Step 4:check whether parameters are correct or not


(1) please refer to below diagram, axis 1 point to point move to absolute coordinate -200000 position, if current position is
-200000, motor won’t work.

(2) confirm whether


axis speed,
accelerate speed
etc. normally set

Step 5: check
whether invoke l
motion module
initialization function
Please refer to
motion module
initialization

Q2: Motor only can work toward one direction


Step 1: confirm whether servo motor parameters set rightly or not
Step 2: confirm whether there is broken line for direction signal.

Q3: circular interpolation couldn’t work


(1) if it’s 3 points circular interpolation, confirm whether 3 points coordinate are point-blank;
(2) Confirm whether full circle interpolate by using 3 points way circular interpolation;
(3) For center of circle end way circular interpolation instructions, whether the distance of starting point to center of circle equals the
distance of terminal point to center of circle;

Q 4: interpolation movement doesn’t work


(1) confirm all participant interpolation axis’s limit, alarm etc. signals effective or not
(2) interpolation parameters:whether interpolation speed, interpolation accelerate speed etc. set rightly, please refer to
“interpolation parameter configuration module”.

Q 5: after limit or alarm effective, motors sequentially run towards that direction
Because UN286 support limit, origin etc. Signals reuse, when use limit and origin etc. special signals, need first to enable this
function, please refer to “special signals configuration module” to set. Please check reuse diagram of UN286 special signals and
general input as below:

You might also like