3 Demo

Last modified by Jim on 2023/03/04 16:43

1 Servo communicates with WECON HMI

This demo shows most parameter of servo,user could debug servo parameter in HMI directly

Download link

2 Servo position control with WECON PLC

This demo shows how to control servo position by WECON PLC

Download link

3 Servo position control with WECON PLC&WECON HMI

Download

4 VD1/VD2 Servo Position control

This case uses three commonly used PLC positioning instructions to implement the servo position control mode actions.

VD1 I/O wiring

image-20220729134512-1.png

VD2 I/O wiring

image-20220729134540-2.png

Parameter setting

Step 1: Power on the servo, set the M key on the panel of the servo drive, set the value of function code P0-1 to 1, and 1 is the position control mode;

CodeParameter NameProperty

Effective

Time

RangeFunctionUnitDefault
P0-1Control mode (default setting)At stopPower-on again1~10

1: Position control mode

2: Speed control mode

3: Torque control mode

-1

Step 2: Set the value of function code P0-4, 0 is forward rotation, 1 is reverse rotation

CodeParameter NameProperty

Effective

Time

RangeFunctionUnitDefault
P0-4

Rotating direction

selection

At stop

Power-on

again

0~1

Forward direction:viewed from the motor shaft.

0: CW direction as the forward direction

1: CCW direction as the

forward direction

-0

Step 3: Set the value of function code P6-04 to 1. 0 is the hardware DI_1 channel, which requires wiring; 1 is the virtual DI_1 channel,no wiring is required.

CodeFunctionEffective timeDefaultRangeDescription
P13-1Virtual VDI_1 input value00-1

VDI1 input level:

0: low level. 1: high level.

Step 4: Set the value of the function code P13-1 to choose whether VDI1 is valid at high or low levels.

✎Note: the value of function code P6-02 should be set to 1. Only in this way can the motor rotate.

CodeFunctionEffective timeDefaultRangeDescriptionUnit
P6-02DI_1 function selection10-16

1: SON, Servo ON

2: A-CLR, Fault and warning clear

3: POT, Forward limit switch

4: NOT, Reverse limit switch

5: ZCLAMP, Zero speed clamp

6: CL, Clear the position deviation

7: C-SIGN, Instruction negation

8: E-STOP, Emergency stop

9: GEAR-SEL, Electronic gear switching 1

10: GAIN-SEL, Gain switch

11: INH, Position reference inhibited

12: VSSEL, Damer control switch(not implemented yet)

13: INSPD1, Internal speed command selection 1(not implemented yet)

14: INSPD2, Internal speed command selection 2(not implemented yet)

15: INSPD3, Internal speed command selection 3(not implemented yet)

16: J-SEL, Inertia ratio switch(not implemented yet)

 

PLC Project

image-20220729134604-3.png

Explanation

The program uses M0,M1,M2 as the switch button of three modes of actions.

When M0 is turned on, the Y0 servo motor rotates 5000 pulses in the direction of Y3.

When M1 is turned on, the Y0 servo motor rotates 20,000 pulses at the speed of 4,000 pulses, and Y3 represents the direction of the motor.

When M2 is turned on, the Y0 servo motor moves to the absolute position of 2000 at the speed of 4000 pulses, and Y3 represents the direction of the motor.


PLC demos download

Position control mode

5 VD2 Multi-position mode

Version

Only SA(absolute servo) series servo can support multi-position mode.

Only firmware version U2-4 is 1.10 or more can support multi-position mode.

1639116818619-611.png

Demo: control 2 internal position

Parameter

  • P0-1=1 position mode
  • P0-16=10000 one circle pulse of motor
  • P1-6=1 Position source: Internal position mode
  • P6-2=20 enabe signle of intenal position mode
  • P6-3, P6-4 depend on your requirement
  • P6-5=21
  • P6-6,P6-7 depend on your reuqirement 
  • P6-8=22
  • P6-9,P6-10 depend on your reuqirement 

If you select P6-4=VDI1,P6-7= VDI2,P6-10= VDI3,please control trigger virtual port with P13 group parameter

Please check detail information about 21 22 23 24 command in the 6.2.1 Position instruction input setting

As below:

In this operation mode, the next operation position number can be set when operating the current position number. There is no waiting time between each position, and the interval time is determined by the instruction delay of the host computer. The operationg position number is determined by the DI terminal logic, and the related function codes are shown in Table 6-16.Table 6-16.

DI function codeFunction nameFunction
21Internal multi-position selection 1To form a multi-position operation position number
22Internal multi-position selection 2To form a multi-position operation position number
23Internal multi-position selection 3To form a multi-position operation position number
24Internal multi-position selection 4To form a multi-position operation position number

Table 6-16 DI function code

The multi-position position number is a 4-digit binary number, and the DI terminal logic is level valid. When the input level is valid, the position selection bit value is 1, otherwise it is 0. Table6-17 shows the correspondence between the position bits 1~4 of the internal multi-position and the position number.

Internal multi-position position selection 4Internal multi-position position selection 3

Internal multi-position position selection 3

Internal multi-position position selection 3

Operating position number
00001
00012
00103
…………
111116

Table 6-17 Correspondence between position selection and position number in internal multi-position