PMAC_技术培训(中级)_图文

E-MOTION

PMAC多轴运动控制卡 多轴运动控制卡 (中级培训) 中级培训)

LINEAR 插补方式
对PMAC 用户直线插补是最通用的方式. 直线插补 轨迹包括加减速时间和运动时间.

需要学习: 需要学习
什么是直线插补模式的轨迹 如何改变轨迹的特征 如何实现多个运动的速度混合

Linear 模式的轨迹
小Acceleration 时间
V

T A

T or M

P /F

tim e
T A

V

T A

T or M

P /F

T A

T or M

P /F

tim e T A

Linear 模式的轨迹(continued)
小Acceleration 时间
V

TM or T A

P /F

T A

TM or

P/F

tim e T A

V

T A TM or P /F TM or P /F TM or P /F

T A
tim e

T A

T A

Linear 模式的轨迹(continued)
加速时间等于运动时间
V

TM or
V

P/F

tim e

TM or
T A

P/F
T A

TM or

P/F
T A

tim e

Linear 模式的轨迹(continued)
加速时间等于运动时间
V

TM or
T A

P /F
T A

TM or

P/F
T A

tim e

V

TM or
T A

P/F
T A

TM or

P /F
TA TA

tim e

Linear 模式的轨迹
大 (速度限制) 加速时间 速度限制)
V

TM or
T A

P /F
T A

tim e

V

T or M
T A

P /F
T A

TM or

P /F
T A

tim e

Linear 模式的轨迹
大 (速度限制) 加速时间 速度限制)
V

TMor P/F
TA TA

TMor P/F
TA

time

加速参数
TA TS
V

编程加速时间
(单位: msec); 整数

编程S-曲线时间
(单位: msec); 整数

TA > 2 * TS

TS

TS

TS

TS

T

TA

TA

加速参数(continued)
V

TA <= 2 * TS

TS
2*TS

TS

TS
2*TS

TS

T

V

TS =0

TA

TA

T

例 3: 一个复杂的运动
This example introduces incremental and time-specification of moves, looping logic, using variables, scaling of axes, and simple arithmetic. Note that logical and mathematical operations do not delay moves.
;******************** Set-up and Definitions ******************** &1 ; Coordinate system 1 CLOSE ; Make sure all buffers are closed #1->1000X ; 1 unit (cm) of X is 1000 counts of motor 1 ;******************** Motion Program Text *********************** OPEN PROG 2 ; Open buffer for entry, Program #2 CLEAR ; Erase existing contents of buffer LINEAR ; Blended linear interpolation move mode INC ; Incremental mode - moves specified by distance TA500 ; 1/2 sec (500 msec) acceleration time TS250 ; 1/4 sec in each half of S-curve TM2000 ; 2 sec move time (to start of decel) P1=0 ; Initialize a loop counter variable WHILE (P1<10) ; Loop until condition is false (10 times) X10 ; Move X-axis 10 cm (=10,000 cts) positive DWELL500 ; Hold position for 1/2 sec X-10 ; Move X-axis back 10 cm negative DWELL500 ; Hold position for 1/2 sec P1=P1+1 ; Increment loop counter ENDWHILE ; End of loop CLOSE ; Close buffer - end of program

运行程序:
&1 B2 R ; 坐标系1, 指向运动程序2,运行

例 3: 一个复杂的运动
5000 Repeat 9 More Times Velo city (co u n t/seco n d )

0 0 1 2 3 4 5 6 Tim e (second)

-5000

直线插补测验
曲线的水平和垂直轴的含义? 什么是 TS, TA, TM and F? TM 和 F 的关系是什么? 以100msTA时间和20ms的TS时间,TM为500ms的 时间外成一个运动,总的运动时间是多少? 如果程序表达 TS100 TA100 TM100,完成3个混合 运动的总时间是多少?

PMAC 运动速度混合
PMAC 在如下情况下速度无法混合:

两个运动指令中间有 DWELL指令 DWELL指令 2 个向后跳转指令 (GOTO, ENDW) 速度混合功能无效设定 (Ix92=1)

B lending allow - Ix92 = 0, no D E ed W LL's, no double jum pback

B lending not allow - Ix92 = 1, D E ed W LL's or double jum pback

DWELL Vs. DELAY
DWELL 总使用固定的时基 (I10) 暂停时间不包括减速过程 直到DWELL结束才执行下面运动的计算 (add I11 time)

M ove Tim e TM or P/F

TA

I11 D ELL Tim W e Tim e

M ove Tim ... e

DWELL Vs. DELAY (continued)
DELAY 使用可变的时基 (% value) 暂停时间包括减速过程 最小暂停时间是当前 TA时间 下面运动时间开始于DELAY指令

M Tim ove e TM or P/F

DELAY Tim e

M Tim ... ove e

例4: 速度混合有效的例程
This example shows how to program a blended move on the PMAC and the function of Ix92. First the program specifies how to do the move, then commands the move.
******************* Set-up and Definitions ******************* DEL GAT &1 CLOSE #1->X I192=0 ; ; ; ; ; ; Erase any defined gather buffer Coordinate System 1 Make sure all buffers are closed Assign motor 1 to the X-axis - 1 program unit of X is 1 encoder count of motor #1 Enable blending

******************* Motion Program Text ********************** OPEN PROG CLEAR LINEAR ABS TA500 TS0 F5000 X10000 X20000 X30000 DWELL0 CMD"ENDG" CLOSE 1 ; ; ; ; ; ; ; ; ; ; ; ; ; Open buffer for program entry, Program #1 Erase existing contents of buffer Blended linear interpolation move mode Absolute mode - moves specified by position Set 1/2 sec (500 msec) acceleration time Set no S-curve acceleration time Set feedrate (speed) of 5000 units(cts)/sec Move X-axis to position 10000 Move X-axis to position 20000 Move X-axis to position 30000 Stop program lookahead Send On-line command to stop data gathering Close buffer - end of program

To run this program:
DEF GAT<CR> GAT &1 B1 R ; GATHER, CS. 1, point to Beginning of Program 1, Run

例4: 速度混合有效的例程
10000 Mtr 1 Cmd Vel (cts/sec)

5000

0 0 1 2 3 4 5 6 7 Tim e (second)

例5: 速度混合无效的例程
This example shows how to program moves on the PMAC and the function of Ix92. First the program specifies how to do the move, then commands the move.
******************* Set-up and Definitions ******************* DEL GAT &1 CLOSE #1->X I192=1 ; ; ; ; ; ; Erase any defined gather buffer Coordinate System 1 Make sure all buffers are closed Assign motor 1 to the X-axis - 1 program unit of X is 1 encoder count of motor #1 Disable blending

******************* Motion Program Text ********************** OPEN PROG CLEAR LINEAR ABS TA500 TS0 F5000 X10000 X20000 X30000 DWELL0 CMD"ENDG" CLOSE 1 ; ; ; ; ; ; ; ; ; ; ; ; ; Open buffer for program entry, Program #1 Erase existing contents of buffer Blended linear interpolation move mode Absolute mode - moves specified by position Set 1/2 sec (500 msec) acceleration time Set no S-curve acceleration time Set feedrate (speed) of 5000 units(cts)/sec Move X-axis to position 10000 Move X-axis to position 20000 Move X-axis to position 30000 Stop program lookahead Send On-line command to stop data gathering Close buffer - end of program

To run this program:
DEF GAT<CR> GAT &1 B1 R ; GATHER, CS. 1, point to Beginning of Program 1, Run

例5: 速度混合无效的例程
10000 Mtr 1 Cmd Vel (cts/sec)

5000

0 0 1 2 3 4 5 6 7 8 Tim e (second)

速度混合测验
使用 速度指令 (F) 在增量方式 (INC) ,指令 X1000 和指令 X100 X400 X500如果 Ix92=0, TA< TM or (TA<?P/F), 和 2×TS<TA有何区别?

矢量速率
PMAC 可以自动计算运动时间(TM)使电机运行与 希望的速度速率下. 这用于多个电机在一个坐标系下控制一个刀具,来 自动分配各自的速度

需要学习: 需要学习
速率指令的表达 PMAC如何计算速率

矢量速度轴
INC FRAX (X,Y) X3 Y4 F10

Dist = 32 + 42 = 5 M ove Time = 5/ 10 = 0.5 V = 3/ 0.5 = 6 x Vy = 4/ 0.5 = 8
Dist = 32 + 42 = 5 M ove Time = 5/ 10 = 0.5 V = 3/ 0.5 = 6 x Vy = 4/ 0.5 = 8 Vz = 12/ 0.5 = 24

INC FRAX (X,Y) X3 Y4 Z12 F10

矢量速度轴( 矢量速度轴(续)
INC FRAX (X,Y,Z) X3 Y4 Z12 F10

Dist = 32 + 42 + 122 = 13 M ove Time = 13/ 10 = 1.3 V = 3/ 1.3 = 2.31 x Vy = 4/ 1.3 = 3.08 Vz = 12/ 1.3 = 9.23

INC FRAX (X,Y) C10 F10

Dist = 0 M ove Time = 0/ 10 = 0 (< TA) Acceleration - limited move

速度时间单位
Ix90 速度时间单位
(单位: msec)

LENGTH UNIT AXIS DEF. SCALING F UNIT = => TIME UNIT Ix90 (msec)
例: #1 -> 2000X Ix90 = 1000

mm 2000 cts F UNIT = => 1000 msec sec

速率测验
如果坐标系1 的 I190=60000,那么速率时间单位是 什么? 如果X 和 Y 是速率轴, 如果指令 X100 Y200,各 , 自速度如何分配? 自速度如何分配 如果你编程指令 F5 定义速度为 5 inches/sec,如何 设定 Ix90和轴的定义?

Exercise 1: Indexing a Motor
Problem: You have been asked to use PMAC in an indexing application, PMAC must index motor #1, which drives a leadscrew, a distance of 10 cm, pause at this location for 4 seconds then return to its original location. Each of the moves must take place in 2 seconds. The program will be started by an ASCII command string sent to PMAC from a Programmable Logic Controller over the RS232 port. Hardware: 2000 counts per revolution encoder 5:1 gear reduction 1cm/rev pitch leadscrew SET Ix92=0 to enable blending

Exercise 2: Indexing a Motor
Problem: As is the case with all applications, the requirements have been changed. The following must be added to the basic requirements of exercise 1.
The desired motion profile has been changed. The system must now move from its zero location to 10 cm, pause for 4 seconds and then move to 20 cm in 2 more seconds and pause for 1 second. It then must return to 0 cm in 1.5 seconds. The system has now become a multi-axis project. Not one but four identical leadscrews must simultaneously execute this profile.

Exercise 2: Indexing a Motor (continued)
To minimize wear and tear on the mechanical components, instantaneous changes in acceleration (jerk) must be eliminated. This machine will be sold to a European company which will write some new programs for it. They only want to program in centimeters so your programs must also use centimeters. A feedrate override switch has also been added to the system. Your programmed pauses must now change as the feedrate override changes. This means that a 1.5 second pause will last 3 seconds at 50% feedrate override. Use M197->X:$0806,0,24,s for feedrate override control.

Exercise 3: Conditional Branching
Problem: The European Company is having a lot of success with your machine and your boss now has some extra R&D money. He wants you to write another application based on the same platform. 2 input switches have been connected to PMAC’s machine inputs 1 and 2. He wants these switches to control the motion of the stages as follows.
If machine input 1 is on, the stages should move from 0 cm to 10 cm at a speed of 1 cm/sec, pause for 1 second then return to 0 cm at the same speed and pause for 100 milliseconds until looking for the next input.

Exercise 3: Conditional Branching (continued)
If machine input 2 is on, the stages should move from 0 cm to -10 cm at a speed of 2 cm/sec, pause for 1 second then return to 0 cm at the same speed and pause for 100 milliseconds until looking for the next input. If both machine inputs 1 and 2 are on, or if neither are on, the stages should not move from 0 cm and should pause for 100 milliseconds until looking for the next input.

圆弧插补
PMAC 允许 X,Y, 和 Z 轴在一个坐标系下执行圆弧插补 指令。 TS 可控制起始和结束的加减速时间. 圆弧插补的混合 速度由指令(F) 或时间 TM来定义.

需要学习: 需要学习
什么变量控制圆弧插补 如何使用圆弧插补 如何定义插补平面

圆弧插补
圆弧插补的通常定义:
1) 运动分段时间 2) 插补平面定义 3) 终点坐标定义方式 Typical value: I13 = 10 NORMAL {vector} {data} … ABS INC (4) 圆心矢量的定义方式 ABS ( R ) (if vector mode definition is used) INC ( R ) (5) 圆弧方向定义 CIRCLE 1 CIRCLE 2 (6 ) 圆弧指令 X{Data} Y{Data} I{Data} J{Data} X{Data} Y{Data} R{Data} 例:
I13=10 NORMAL K-1 INC INC(R) CIRCLE 1 X20 Y0 I10 J0 ;Move Segmentation Time ;XY plane ;Incremental End Point definition ;Incremental Center Vector definition ;Clockwise circle ;Arc move
Center (10,0)

Start (0,0)

End (20,0)

CIRCULAR INTERPOLATION
+Z +Z

G17
+X

CW +Y +X

CW +Y

NORMAL K-1
+Z

NORMAL K1
+Z

CW

G18
+X +Y +X CW +Y

NORMAL J-1
+Z CW

NORMAL J1
+Z

G19
+X +Y +X CW +Y

NORMAL I-1

NORMAL I1

NORMAL VECTORS FOR CIRCULAR MOVES: THE PLANES AND CLOCK WISE ARCS THEY DEFINE

(NR L-VEC) M

E D N (25,30)

PMAC Circular Interpolation
N R AL K O M -1 S ,Y) D efaults AB (X IN (R C ) C C IR LE1 F10 X25Y 30I20J5

Y

Y
C C IR LE2 TM 1000 X15Y 10I-10

Y
SA T T R (10,5)

C NE E T R (15,20)

SA T T R (25,20)

C N ER E T (30,10)

I

J
I X Y
C C IR LE1 F25 X30Y 10I-10J10 or I-10J10
C NE E T R (20,20) E D N (0,10)

E D N (15,10)

Y

X

X Y

X
C C IR LE2 TM 2000 X0Y 10R 10 C C IR LE2 TM 2000 X0Y 10R -10

J

I
S A T,E D T R N (30,10) S A T (10,0) T R

Y

X X

X

圆弧插补例程
16 14

;Setup and definitions &1 #3->10000x #4->10000y i13=10 ;Motion Program Text

12

10

8

6

4

2

0 0 2 4 6 8 10 12 14 16

open prog4 clear normal K-1 rapid x1 y4 f5 linear y13 circle1 x2 y14 i1 j0 linear x3 circle1 x4 y13 i0 j-1 linear y7 circle2 x7 y4 i3 j0 linear x13 circle1 x14 y3 i0 j-1 linear y2 circle1 x13 y1 i-1 j0 linear x4 circle1 x1 y4 i0 j4 dwell100 rapid x0 y0 close

提前运算(前瞻功能) PRECALCULATION
在 blend 和 spline 运动中, 运动程序必须将当前运动 后几步的运动指令提前进行运算. 根据不同的运动模式,在程序运行中将进行0,1,或2 段运动指令的前瞻计算.

我们将要学习: 我们将要学习
前瞻功能做了些什么? 怎样停止前瞻功能? 如何使用同步变量?

PRECALCULATION
All program calculations and assignments, except for synchronous M-variable assignments, between the move in progress and the move being calculated are performed one line at a time during the look-ahead. This may be a problem with M-variables, particularly outputs, as the action will take place sooner than expected. Example: LINEAR X10 X20 M1=1 X50 ;linear move mode ;move X-axis to 10 ;move X-axis to 20 ;turn on output #1 ;move X-axis to 50

The output M1 will be turned on at the beginning of the X10 move due to PMAC’s precalculation of the program

PMAC Motion Program Precalculation

A. Two moves ahead LINEAR with I13=0 SPLINE1
1

2

3

4

Execute

"R"

I11
Calculate

4

5

6

time

1

2

3

PMAC Motion Program Precalculation
B. One move ahead LINEAR with I13>0 CIRCLE, PVT
1

2

3

4

Execute

"R "

I11

3 2

4

5

time

Calculate

1

PMAC Motion Program Precalculation

C. No moves ahead Ix92=1, RAPID, HOME, DWELL,"S"
"S " "R " 1 2
2a

Execute

3

I11
Calculate

I11 2
2a

DWELL time

I11 3

time

1

同步 M-变量 变量
Synchronous M-Variables assignments are a solution to the synchronization problems caused by move precalculation. When a Synchronous M-variable assignment is encountered, it is not executed immediately; but put on a stack for execution at the start of the next move in the program. Output actions are thus synchronized with the motion action Example: LINEAR X10 X20 M1==1 X50 ;linear move mode ;move X-axis to 10 ;move X-axis to 20 ;turn on output #1 ;move X-axis to 50

The statement M1==1 is encountered at the beginning of the move to X10, but the action is not performed until the start of blending into the move X50

MACROS
Macros allow you to assign a specific name to a PMAC variable or command for programming purposes. For example, you can define the word PUMP_PRESSURE to the variable P10. This allows you to use meaningful names in your programs which simplifies programming and memory management. Macros are a feature of the Executive Program and are not a PMAC feature. When a file with Macros is downloaded to PMAC, the executive program substitutes the appropriate PMAC commands or variables in place of the Macros. PMAC only sees the PMAC commands and variables.

PMAC 计算优先级
1. Single character I/O 单字符 单字符I/O
Serial, PC-bus, STD-bus; 200ns/char

2. Commutation Update换相更新率 换相更新率
E29-E33 set (9KHz default); 3usec/axis 3. Servo Update伺服更新率 伺服更新率 E3-E6 set freq (2.25KHz default);30usec/axis 4. Real Time Interrupt实时中断 实时中断 I8 设定频率; 循环于: A. 运动程序的计算 每次新运动的开始; 1 or 2 步提前 B. PLC0 当不执行运动程序 C. PLCC0 D. Dual Ported RAM双端口RAM Servo data buffers伺服数据存储器

PMAC 计算优先级
5. VME mailbox处理器 处理器 事件驱动 6. 后台任务 Done in time left over; rotates between: A. Communication line processing Event driven B. PLC1-31 one at a time C. PLCC one scan through all PLCC’s D. General Housekeeping E. Dual Ported RAM Data Buffers

P M A C M u lt it a s k in g E x a m p le
*
CT #1 #2 S e rv o #3 #4
P LC 0 P L C 1 ...

RTI

B a c k gro u n d

CT

#1

#2 S e rv o

#3

#4

P L C 1 ( c o n t.)

HK

P L C 2 ...

B a c k g ro u n d

CT

#1

#2 S e rv o

#3

#4

P L C 2 (c o n t.)

HK

Comm

P L C 3 ...

B a c k g ro u n d

*
CT #1 #2 S e rv o #3 #4
M o v e P la n n in g ... P LC 0

RTI

CT

#1

#2

#3

#4

P LC 0

P L C 3 (c o n t) ...

S e rv o

B a c k gro u n d

CT

#1

#2 S e rv o

#3

#4

P L C 3 ( c o n t)

HK

P L C 1 ...

B a c k g ro u n d

*
CT #1 #2 S e rv o #3 #4
P LC 0 P L C 1 (c o n t) ...

RTI

CT

#1

#2

#3

#4

P L C 1 ( c o n t)

HK

Comm

S e rv o
C T - C o n v e rs io n T a b le # n - M o to r n S e rv o U p d a te H K - H o u s e k e e p in g

B a c k g ro u n d

(m lt its s k )

PMAC 看门狗计时器
No
Frequency > 25Hz

Watchdog Timer Satisfied

Yes Turn Off Card No
DC Voltage > 4.75

Yes

PMAC algorithm to assure Watchdog gets 25 Hz signal and check for a minimum of 4.75V to the memory chips.

PMAC 看门狗计时器(续.) 看门狗计时器(
Real Time Interrupt

Read W.D Register Background Tasks are not occurring often enough, therefore stop updating timer

Is Register > 0

Decrement W.D. Timer Register

PMAC algorithm to assure Watchdog gets 25 Hz signal. This ensures both background and foreground tasks are done reasonably often.

通讯控制 I-变量 变量
I1: 串口模式 = 0, 2 :Host CS hand shake used = 1, 3 :Host CS hand shake disabled = 2, 3: Multiple card daisy chain enabled 握手字符控制 = 1: <LF> sent to acknowledge valid command = 2, 3: <ACK> sent to acknowledge valid command = 1, 3: <LF> precedes data response line 通讯完整性模式 = 0, 2 :Checksum disabled = 1, 3: Checksum enabled = 0,1 : Serial errors reported immediately = 2, 3: Serial errors reported at end of line 错误报告模式 = 0, 2: Returns <BELL> character = 1, 3: Reports error number

I3:

I4:

I6:

Communications Control I-Variables

I9:

Data Reporting Form = 1, 3: Long form data reporting = 2, 3: Hexadecimal address I-variable reporting DPRAM ASCII Communications = 0: Disables DPRAM communication = 1: Enables DPRAM communication DPRAM ASCII Communications Interrupt Enable = 0: Disables communications interrupt = 1: Enables communications interrupt

I58:

I56:

MCC SMCC PMAC-PC PMAC-VME PMAC-Lite RS422

ACC-26A RS422/232 TO RS232 OPTICALLY ISOLATED CONVERTER BOARD
TO PC-AT (RS232C)
J5 J1
1

CTS RXD/ E1A U1 MC34050 RTS TXD/
1

E1D

J2
1
3.88 in. (98.55 mm)

GE FANUC 90-70

RP3 RP2 RP1 U2 PMAC-Lite PMAC-STD32
(REQUIRES SPECIAL CABLE)

TO PC-XT (RS232C)

E3
1

E4
1 2

MAX232

1

J4
TB1 4.25 in. (107 mm.)

D10 J3

FOR RS-422 INSTALL U1, RP1, RP2, RP3, REMOVE U2 FOR RS-232 INSTALL U2, REMOVE U1, RP1, RP2, & RP3

P M A C M em ory M a pp in g
23 161 5

X -M em ory
87

0 23

1615

Y -M em ory

87

0

$0000 $00FF $0100 $17FF $1800

Internal DSP Memory
Fixed -U se C a lcu lation R e giste rs

U ser B uffer S torag e Sp ace

External Static RAM (Battery Backed)

$9FFF $BC 00 $BFFF $C 000 $C 03F $D 000 $D FFF $E000

U se r-W ritte n S ervo S to ra g e

M -Variable D efinitions

DSP-Gate Registers Dual-Ported RAM VME bus registers

V M E S etup R e g is ters

Mailbox R egisters

$F000
I/O Registers

$FFFF

PMAC Dual-Ported RAM 内存图 DualHost Address Offset 0x000 0x0024 0x0228 0x062C Control Panel Functions Servo Data Reporting Buffer Background Data Reporting Buffer ASCII Command Buffer (HOST to PMAC) 0x06D0 ASCII Response Buffer (PMAC to Host) 0x7E8 0x0800
(1) (2) (3)

PMAC Address $D000 $D009 $D08A $D18B

$D1B4

Pointers to Variable Size Buffers Room for Variable-Size Buffers Data Gathering Background Variable Data Binary Rotary Program

$D1FA $D200

0x3FFC

Open Use Space

$DFFF

PCOMM Dual Ported RAM 特性支持功能

Control Panel

Servo Time Fixed Buffer

Background Fixed Buffer

DPR Features

Variable Background

ASCII I/O

Binary Rotary Buffer

PMAC 通讯软件
Name ACC-9P ACC-9PN ACC-9PT ACC-9W Description PCOMM PCOMM-32 PTALK OCX PMAC Executive for Windows PMAC Executive for Windows 95,98, or NT PMAC Executive for DOS PMAC NC for Windows PMAC NC for Windows 95,98, or NT 16-bit Yes No No Yes 32-bit No Yes Yes No

ACC-9WN ACC-9DA ACC-33W ACC-33WN

No Yes Yes

Yes No No

No

Yes

新的PMAC 新的PMAC 软件
PMAC Panel - VI’s for LABView PMAC 连通性 - OPC Server for different field busse ControlNet, DH+, DeviceNet, Ethernet


相关文档

PMAC技术培训(中级)
【新整理】PMAC技术培训(中级)
PMAC初中级培训
【新版】PMAC技术培训(中级)
PMAC 技术培训(高级)
PMAC+技术培训(初级)
2006版PMAC初中级培训
PMAC运动控制卡初中级培训
PMAC技术培训高级
PMAC技术培训初级
电脑版