Using Macro to Create an E-Cam Curve

Một phần của tài liệu Application notes for ASDA series servo drive (Trang 96 - 104)

PR mode on ASDA-A2 provides two ways to create E-Cam curve for rotary shear by macro:

Using Macro 6 to create E-Cam curve for rotary shear with a fixed 51° sealing zone; Using Macro 7 to create E-Cam curve for rotary shear with adjustable sealing zone.

The E-Cam curve created by macro command is the same as that created by ASDA-Soft. The

March, 2015 2-33 Step 1: When using Macro 6, the first step is to store the required relevant parameters in

data array, which includes P5-81 (the start address of E-Cam curve in data array) and P5-85 (engaging time). When using Macro 6, P5-82 is always set to 7, which means the E-Cam curve has 7+1 divisions only and cannot be changed.

Step 2: Specify the scaling of the E-Cam curve, which includes the E-gear ratio P1-44/P1-45 (E-Cam is part of the system, which will be influenced by E-gear ratio.) and scaling of E-Cam curve P5-19.

P5-82 =7 (7+1 items) (This number is always 7 when using this macro.) P5-81

The starting address P5-85 = 0

Data Array

1

2 Position (PUU) Slave

Master (Pulse)

Slave E-Gear:

The scaling of E-Cam curve when output.

P1-44, P1-45, P5-19

Figure 2.48 Relevant Parameter Settings of E-Cam Curve when Using Macro 6

Step 3: See Figure 2.49. Figure out the mechanical specifications and enter relevant parameters, which is the same as the data required when creating E-Cam curve for rotary shears. Users may use HMI to input the required data and use HMI or PLC to calculate relevant values and download them to the servo drive.

Gear Box

Tooth #A (to motor)

Tooth#B

Cutting Length L

Diameter 編碼器直徑 d1

d2 Encoder pulse

number per revolutionN

切刀的數目 C

3

P5- 84 = N/(π* d 2 (mm) ) * L (mm) , P5- 83 = 1

P5- 94 = A *C P5- 95 = B

P5- 96 = L (mm)/( * d 1 (mm) ) *C * Vc*

Vc = Speed compensation Vc =1 Do not compensate π

#A

#B (to cutter)

L

Diameter d1 d2

N

Number of cutter

C

3

P5- 84 = N/(π* d 2 (mm) ) * L (mm) , (Pulse number required for L) P5- 83 = 1

P5- 94 = A *C P5- 95 = B

P5- 96 = L (mm)/( * d 1 (mm) ) *C * Vc* Vc =

π 10000001000000

Vc = 0.9, Slow down to 90 %, Vc = 1.1 Speed up to 110%

Figure 2.49 Mechanical Settings when Using Macro 6

Step 4: When all relevant parameters are set, write 6 to P5-97 to enable macro 6. After macro is enabled, read P5-97 again. If its value is 0x1006, it means the table is successfully created by the macro. If error codes are shown, please correct the parameter value according to the error message.

Figure 2.50 Enable Macro Command 6

After the curve is created successfully, it can be used to enable the E-Cam. When system setting is complete, most of the mechanical specification will not be changed. The parts that

Write P5-97 = 6

Read P5-97

P5-97 = 0x1006 ? Modify the parameter

value according to the error message

Success True False

List of error codes from P5-97 for #6 macro command F061h: E-Cam engaged. Unable to create a table.

F062h: Value of P5-94 exceeds the range of 1~65535.

F063h: Value of P5-95 exceeds the range of 1~65535.

F064h: Value of P5-96 exceeds the range of 300000~2500 F065h: Inappropriate address. Value of P5-81 exceeds the range.

F066h: Value of P5-82 must be 7.

F067h: Value of E-gear ratio is too high. Lower the value but keep the original ratio of P1-44 and P1-45. (1280:100 128:10)

March, 2015 2-35

 Macro 7 (E-Cam curve for rotary shear with adjustable sealing zone.)

When using flat cutters which cutting length is changed, the width of the cutter usually remains the same. However, different material will change the cutting length and angle in synchronous zone because this area is determined by material. This is an important reason why this macro command is created. When using Macro 7 and the material has to be changed, the setting can be completed by re-specifying the cutting length and specifying whether speed compensation is needed. Steps to set up are shown below.

Step 1: The first step is to store the required relevant parameters in data array in order to create an E-cam curve. P5-81 (the start address of saving the E-Cam curve in data array) and P5-85 (engaging timing) are included. What’s different from Macro 6 is that value of P5-82 is an adjustable variable, which range is from 30 to 72 when using Macro 7. That is, the E-Cam can be divided into 30 ~ 72 parts. To obtain the best resolution, set the area number to 72 is recommended.

Step 2: The second step is to specify the scaling of E-Cam curve, which includes system’s E-gear ratio P1-44/P1-45 (E-Cam is part of the system thus it might be changed by the system’s E-gear ratio.) and scaling of E-Cam curve (P5-19).

P5-82 = 30~72 (30+1 ~ 72+1 items) (Highly recommend to set P5-82 to 72.) P5-81

The starting address P5-85 = 0

Data Array

1

2 Position (PUU) Slave

Master (Pulse)

Slave E-Gear:

The scaling of E-Cam curve when output.

P1-44, P1-45, P5-19

Figure 2.51 Relevant Parameter Settings for E-Cam Curve when Using Macro 7

Step 3: Specify proportion of each speed areas on E-Cam curve. As the size of constant speed area on E-Cam curve is adjustable, other areas such as acceleration/deceleration area, S-curve, and Stop area have to be set manually. The setting proportion of each area has to be appropriate in order to operate smoothly. The function of S-curve is to smooth the curve when speed changes. Its setting is level- based, which is from 1 to 4. Others are specified according to its angle.

360o= 2 W + 2Acc + 2S + Y So ^S) * 360 / (P5-82)

So S

P5-82=72

1 2 3 4

10o 20 40o 80o

Y

3

360 = 2 W + 2Acc + 2So+ Y S ^S) * 360 / (P5-82)

S S

P5-82=72

1 2 3 4

10 20o 40 80

Y

3

=(

=(2 2

W W AccAcc

S

Acc

Acc WW 360 °

360 °

16 bits (S level, 1~4) 16 bits (W ,0~170º)

P5-93

32 bits (Y, Constant Speed Area, 0~330º, Decimal)

P5-94

P5-93.H (Hex.) P5-93.L (Hex.)

Figure 2.52 Setting Proportion of Each Speed Area of Rotary Shear Curve when Using Macro 7

Since the waiting area is adjustable, there are more limitations when creating E-Cam curve by Macro 7. See Figure 2.53.

Figure 2.53 Limitations of Creating E-Cam Curve for Rotary Shear by Macro 7

Step 4: See Figure 2.54. Figure out the mechanical specifications and enter relevant parameters. The required specification data is the same as that needed when creating E-Cam curve for rotary shear. Users may use HMI to enter the data or use HMI or PLC to calculate relevant values and download them to the servo drive.

16 bits (S level, 1~4) 16 bits (W ,0~170º) P5-93

32 bits (Y, Constant Speed Area, 0~330º, Decimal) P5-94

P5-93.H (Hex.) P5-93.L (Hex.)

360º = 2W + 2Acc + 2Sº +Y

a

a a

A A

a

W = 180 + 360/(P5-82) - 360/R + (P5-94)/2

R (Length Ratio) A a

W < W, Error Code F07A, enlarge waiting zone or narrow constant speed area.

W = W, The starting speed of the curve = 0.

W > W, The starting speed of the curve > 0.

P5-82 = 30~72 Data Array

March, 2015 2-37 Gear Box

Tooth #A (to motor) Tooth #B (to cutter)

Cutting Length L

Diameter Diameter d1

d2 Encoder pulse

number per revolution, N

The number of cutter,

C

4

P5-84 = N / (π * d2 (mm) ) * L (mm), (pulses required by L) P5-83 = 1

P5-95.H (in Hexadecimal) = A * C P5-95.L (in Hexadecimal) = B

P5-96 = L (mm) / (π * d1 (mm) ) * C * Vc * 1000000 Vc = Speed compensation, Vc = 1, Do not compensate.

Vc = 0.9, Slow down to 90%, Vc = 1.1, Speed up to 110% .

16 bits ( A x C) 16 bits ( B) P5-95

P5-95.H (Hex.P5-95.L(Hex.)

Figure 2.54 Mechanical Settings when Using Macro 7

Step 5: When all relevant parameters are set, write 7 to P5-97 to enable Macro 7. After it is enabled, read the same parameter P5-97 again, if the value is 0x1007, it means this table is created by macro successfully. If any error code occurs, please modify the parameter

according to the error message.

Figure 2.55 Enable Macro Command 7

List of error codes from P5-97 for #7 macro F071h: E-Cam engaged. Unable to create a table.

F072h: Value of P5-94 exceeds in the range of 0~330.

F073h: Value of P5-93.H (Hex.) exceeds the range of 1~4.

F074h: Value of P5-93.L (Hex.) exceeds the range of 0~170 (Dec.).

F075h: Value of P5-96 exceeds the range of 50000~5000000.

F076h: Value of P5-82 exceeds the range of 30~72.

F078h: E-gear ratio value is too big. Make the value smaller but keep the original ration of P1-44 and P1-45

(1280:100 128:10)

F077h: Inappropriate address. Value of P5-81 exceeds the range.

F079h: Acc zone is too small, narrow W, Y or S.

F07Ah: Waiting zone is too small. Enlarge W or narrow Y.

Write P5-97 = 7

Read P5-97

P5-97 = 0x1007 ? Modify the parameter

according to the error message

Success True False

*Please refer to Chapter 8 of ASDA-A2 User Manual for parameter details.

Two examples are presented below to help users create E-Cam curves with Macro 7.

Example 1:

When using Macro 7 to create E-Cam curve and R = 1.1 ~ 5 (when R > 1.0, cutting length is longer than cutter circumference), adopting rules presented in the diagram (Figure 2.56) can avoid occurrence of error codes.

Step 1: Figure out the length ratio R first. Make sure the value is within the range of 1.1 ~ 5 or this flow chart is not applicable.

Step 2: Specify the S level. Then, figure out the proportion of constant speed area and waiting zone to meet the range condition. Enter all the values to the designated parameters.

Step 3:

1) If not applying speed compensation, the setting is done after calculating value of P5-95 and P5-96.

2) If positive speed compensation is used, which means the slave axis speed is faster than the master axis, users may consider adjusting the size of the constant speed area or speed up the slave axis.

 Taking adjusting the speed of the slave axis as priority: Select the max. possible positive speed compensation. Then calculate the variation of the constant speed area based on this compensation value. A new range of the constant speed area can thus be acquired.

 Taking adjusting the size of the constant speed area as priority: If size of the constant speed area is the priority, select a new constant speed area to re-define the range and figure out the required compensation value.

Step 4: After setting the compensation value (Vc) and new range of the constant speed area, revise the setting of constant speed area.

Step 5: Figure out value of P5-95 and P5-96 and the setting is complete.

March, 2015 2-39

Figure 2.56 Diagram of Creating E-Cam Table with Macro 7 (R = 1.1 ~ 5) Calculate length

ratio R = A/a

1.1 R 5

False True

R > 5 Change mechanism or

Use other methods

Define S smooth level P5-93.H=S=1~4 Calculate the possible

biggest constant speed area Y=360/R - (3+2(s+1))*5

0 P5-94 Y Y 0 Lower S level

Calculate the waiting zone Wd=360 - 360/R - (2(s+1)-1)*5 P5-93.L = W = (Wd /2), convert to

Hex.

Speed compensation

Vc >1 True False

True False

Start

Finish Select possible

highest Vc

Y = 360/ R*(1-1/ Vc)

Calculate constant speed area Ynew = Y-Y 0 P5-94 Ynew

Select new constant speed area

Ynew < Y

Y = Y - Ynew 0 P5-94 Ynew

Calculate Vc Vc = 360/ (360 - Y*R)

Renew the waiting zone P5-93.L = Wnew

= (Wd+Y) /2, Covert to Hex.

Calculate P5-95 & P5-96.

P5-95.H = A*C, (Hex.) P5-95.L = B, (Hex.) P5-96 = 1000000*R*Vc

P5-97 = 7 1

1

V first Y first

Example 2:

When using Macro 7 to create an E-Cam curve and R = 0.5 ~ 1.09 (when R < 1.0, cutting length

< cutter circumference), follow the instructions shown in Figure 2.57 to write macro commands can avoid occurrence of error codes. Table in Figure 2.57 shows the setting range of waiting area and constant speed area based on the S level.

Marco Command P5-97 = 7 (8)

The table is for the case of R = 0.05~1.09 and P5-82 = 72.

P5-93.H = S = 1 ~ 4; P5-93.L = W = (Wd/2), (Hex.) P5-94 = Y; P5-95.H = A*C, (Hex.); P5-95.L = B, (Hex.)

P5-96 = 1000000 * R * Vc; P5-97 = 7

Figure 2.57 Diagram for Creating E-Cam table with Macro 7 (R = 0.05 ~1.09)

Một phần của tài liệu Application notes for ASDA series servo drive (Trang 96 - 104)

Tải bản đầy đủ (PDF)

(274 trang)