What hexadecimalwhat s your numberr immediately precedes the following: E9

PMAC培训教程中文版_文档资料库
当前位置: >>
PMAC培训教程中文版
PMAC 初级班培训课程深圳市钧诚科技有限公司 电话:1 传真:5 网址:.cn PMAC 代表 Programmable Multi-Axis Controller 可编程的多轴控制器PMAC 可以服务于各个行业,从精密到微米级的设备到 上
千马力的重型设备。PMAC应用包括:? ??? ??机器人 食品机械 机床 印刷机械 木工机械 包装机械 及其他?? ??? ?装配线 材料处理 光学控制 橡胶机械 自动缠绕设备 激光切割1 PMAC可编程控制器? ? ? ?指令8轴同时运动 使用数字过程处理芯片 (DSP) PMAC的 CPU 使用 Motorola DSP56001 或 DSP56002 他可以 处理所有8轴的计算 Turbo PMAC 使用 Motorola DSP5630x 处理所有32轴 的计算DSP 56001 ? 20MHz 电池 RAM DSP 56002 ? 20-80 MHz 闪存 RAM DSP 5630x ? 80-120 MHz 闪存 RAM 对于 TURBO PMAC2 PMAC(1) 产品PMAC PC PMAC-Lite 所有产品? ?PMAC STD PMAC VMEMini PMAC 区别? ? ?运行于独立的控制器 由主机发送指令,指令通过 串口或者总线外观 总线接口 使用的I/O端口3 PMAC2 产品PMAC2 PC Mini PMAC2 PMAC2 PC Ultralite PMAC2-Lite PMAC2 VME PMAC2 VME Ultralite 所有产品? ? ? ? ? ?区别? ?作为独立的控制器运行 由主机通过传口或总线发送 指令 在板DPRAM选项 在板A/D转换选项 32位在板I/O PWM, PFM, DAC 输出模式外形 总线形势4 Turbo PMAC 产品TURBO PMAC1 PC TURBO PMAC1 VME TURBO PMAC2 PC TURBO PMAC2 VME TURBO PMAC2 PC Ultralite TURBO PMAC2 VME Ultralite UMAC PACK SYSTEMThe Turbo PMAC CPU 可以既用于 PMAC1 又可用于 PMAC2. The Turbo CPU 插板 直接插于 传统的 PMAC 底板上. 由于 Ultralites 具有在板的 CPU 部件, 所以是 新的设计.5 PMAC卡的准备PMAC1 E-point 跳线 PMAC2 E-Point 跳线和软件 ? 卡号 (菊花链连接的PMAC卡) ? 串口通讯波特率 ? PC 总线地址 ? 伺服时钟频率 ? 编码器设定 (差分/单端) ? 模拟量电源和地 (隔离/不隔离) ? 重新初始化* 请参考PMAC硬件手册6 系统框图Machine I/OAmplifierA BCA B CinterfacePMACMotorEnc. HallsSoftware Interface7 PMAC 关于任务的构造PMAC 关于特定的应用,可如下配置:? ?写运动程序和PLC程序 选择硬件设定 (通过选项和附件)每个PMAC固件有8轴的能力. 这8轴可以:? ? ? ?完全联动于一个坐标系下 可以独立的运行于各自的坐标系下 可以几个组合,实现某个功能 可以与其他的 15块PMAC级连,实现128轴的 完全同步运动8 PMAC关于任务的构造 (续)PMAC’s CPU 与轴的通讯 通过特殊设计的用户门阵列 ICs (DSPGATES). 每个门阵列:? ? ?4 路输出通道 4 路编码器输入通道 4 通过附件具有4路模拟量输入通道I 型 PMAC 可以使用 1 to 4 门阵列.9 PMAC MOTION CONTROLLER CUSTOM GATE ARRAY ICSELECTABLE-FR EQUENCY CLO CK IN TS PU ENCO DER SAM PLE SERVO PHASE DAC/ADC 160 PIN PLCC PACKAGEL D L DH M 1-4 O E +LIM 1-4 IT -LIM 1-4 IT FAU 1-4 LTAEN 1-4 A EQ 1-4 UDAC 1DAC 2 INPUT FLAG SA B C4 ANALOG OU TPU TS. 16/18 BIT RESO LUTIO NL DFLAG CO NTROL ENCOD ER 1 OU TPUT FLAGSDAC 3L D4 ENCO DER INPUTSA B CDAC 4 ENCOD ER 2 DAC SHIFT R ISTERS (4) EG SERIAL DATA OU T1 2 3 4A B CDSP-GATEENCOD ER 3 ADC SHIFT R ISTERS (4) EG SERIAL DATA IN ADC 16/18 BIT MU X4 ANALOG INPUTSA B CENCOD 4 ER ANALOG CO NTROL ENCOD ER CON TRO L DIGITAL CO NTROL PW (4) M REG ISTER S24-B IT DATA BUS 16-B IT ADD RESS BUSCLOCK M UX CO NTROLACCE SSORY BOAR D6 Lines6 PW Outputs per channel for Digital Amps M and PulsE & Direction Outputs for Stepper Motor(G TE-AR A Y)10 P S IO IN R M N R G T R O IT N C E E T E IS EA DR D EOTU UP T4C C IT P R IR U S E GT A RY AE R A P A EC C H S LO KP S IO C M A ER G T R O IT N O P R E IS E(4C m a c a n lsa a a b , o c a n l 1o ly o p re h n e re v ila le n h n e n )E L Q.P A EC P U ER G T R H S A T R E IS EF EIN U S IV P T &C C A N L & HN E 4F G LA S D IT L IG A F T R IL E P S IO O IT N CPU E AT R T IG E R GR C NR L O T O& O E C P U ER G T R H M & A T R E IS EA BE C D RIN U N O E P T 30M zM X H A. (E G R T ) D E AE S R OC O K E V L C A Q A /B U D DC D G E O INW O EC N R L /M D O T O X ,X ,X ,P ,C K 1 2 4 /D LC U T O N D E T N IR C IO2 B U /D W P S IO R G T R 4 IT P O N O IT N E IS E (3 M zM X 0 H A .)S R OP S IO C P U ER G T R E V O IT N A T R E IS EE C D RC C N O E LO K 10M zD F U T H EA L 30M zM X H A. 24B D T IT A A 4B A D E S IT D R S B S U A D N DT AA C NR L O T OT E R G T R (2 IM R E IS E S ) 1 , E C D RP R DM A U E E T /T N O E E IO E S R M NC N R LR G T R O T O E IS EH M FA O E LG &IN E DX 5IN U S PT 1 E CE R ) N. R. 2 AT R )C P U E 3E L ) Q. 3S A U TT S 1 C NR L 6 O T OSPMAC 1 CUSTOM GATE ARRAY (DSP GATE) ENCODER FUNCTIONS( RD NOE ) B A \E C D R11 PMAC 可以做的工作执行运动程序? PMAC 在某一时间执行一个运动, 并执行有关运动的所有计算 ? PMAC 总是提前混合即将执行的运动执行PLC程序? 以处理器允许的时间尽可能快的扫描PLC程序? PLC适用于某些异步于运动程序的运动过程12 PMAC 可以做的工作(续)伺服环更新? 伺服环更新对于PMAC的用户是看不到的,是由PMAC卡 自动执行的任务 ? 伺服环根据运动的设计者编写程序公式,从当前的实际 位置和指令位置增加指令的数值.换向更新 ? PMAC 以9KHZ的频率自动进行换向计算和控制? PMAC 测量并估算 转子的磁场定向,然后处理电机的相 之间的指令13 PMAC 可以做的工作(续)常规管理 ? 跟随误差限制 ? 硬件超程限制 ? 软件超程限制 ? 放大器报警在每个PLC扫描之间, PMAC 执行上述任务保证自身的正常更新,如果这 些功能不能在最小的频率内检测,卡上的看门狗将报警.同上位机通讯 ? PMAC 可以与上位机实时通讯 ? 如果指令是违法的, 他将报告给上位机 任务优先级 ? 任务优先级保证卡的工作效率和安全 ? 优先级是固定的,但是他们的频率时可以由用户控制的14 JDISP ACC12 40?2 LCD DisplayJTHUMB ACC34x 32in/32 out multiplexed IO ACC16 Thumbwheel ACC27 8in/8out dedicated IO ACC8Dopt7 Resolver Input ACC8Dopt9 Yaskawa Input ACC35 Driver for ACC 34x ACC33 Control Panel for NCJRS422 ACC26 Opto Isolated RS422 Daisy Chain PMAC’sJOPTO ACC21S OPTO22 Racks Greyhill Racks 8 inputs 8 outputsJPAN ACC18 ACC39JXIO Extension InputsJMACH1 and JMACH2 4 DAC’s 4 Encoders 4 ?LIM 4 Home Flag 4 Amp Fault 4 Amp Enable 5V and Digital GND ±15V and AGND ACC8DJ1J2E 1 3 3J3E8J4116 E 22 EE23J7J51 1 1E 89E25 24 EJS1 JS217 EJ613 E19 E183 3 3E0P3E 2 1 1TP17 EE3E621 E 20 E90 E27 E E26E9831E3 3P475 E 74 EE 88 E 87E5 8JEQU Outputs from position compareJEXP ACC-24 PMAC Extension Card ACC-29 MLDT ACC-14 Parallel I/O Option 2 DP RAM ACC-49 Sanyo Absolute EncoderPMAC1 LAYOUT15J8E83 E82 81 E E843 3 39 E 94 E 93 E 40 E 34 E 44 EE38 E48E8 2 E9 233JEXPJANA ACC28A 16 Bit A/D33380 E 79 E 78 E 77 E 76 E86 E73 E 72 E51 E53 E65 E92 E 91 EE6671 E JTHMB ACC34x 32in/32 out multiplexed IO ACC16 Thumbwheel ACC27 8in/8out dedicated IO ACC8Dopt7 Resolver Input ACC8Dopt9 Yaskawa Input ACC35 Driver for ACC 34x PMAC NC Control PanelsJMACRO ACC42 MACRO Interface for PMAC2JHW 20-pin IDC 2 Encoders 2 PFM or PWM Channels JEQU Outputs from position compareJMACH1, JMACH2, JMACH3, JMACH42 Output Channels (PWM, PFM, DAC) 2 Encoders 2 ?LIM 2 Home Flag 2 Amp Fault 2 Amp Enable 4 ADC Inputs 5V and Digital GND ACC8F, ACC8FP, ACC8E, ACC8K1, ACC8K2, ACC8TJANA Option12 8-16 Channel 12-bit ADCJOPTO ACC21A, 40-pin IDC to 50-pin OPTO22 32-bit Input/Output 40-pin IDCJRS232* RS232 CommunicationJDISP ACC12 40?2 LCD DisplayJ1J2J3J4J5J6J7J8*JRS422 Option 9L Opto Isolated RS422 Daisy Chain PMAC’sJMACH12JMACH11JMACH10JEXPJEXP ACC-24P2 PMAC Extension Card ACC-14 Parallel I/O ACC-49 Sanyo Absolute Encoder ACC-51 4096?InterpolatorPMAC2 LAYOUT 16JMACH9 PMAC 反馈性能?不带附件:??正交编码器带 1/T 插补 脉冲加方向带 1/T 插补 模拟量正玄输出信号,采用ACC-8D opt.8 可达到256倍频,采用ACC-51 附件可达到4096倍频 接收并行绝对编码器反馈 接收并行激光干涉仪反馈 其他的并行字反馈 接收4路旋变反馈?ACC- 8D option 8 and ACC-51:??ACC-14D/V:? ? ??ACC-8D option 7:? PMAC Feedback Capabilities??ACC- 8D option 9?接收安川绝对编码器反馈 接收线性电压信号, 电位机反馈信号 接收其他类型的电压传感器信号 磁制伸缩位移传感器 相当的传感器 三洋并行绝对编码器反馈ACC-28A, ACC-28B , ACC-36, or PMAC2 Option12? ??ACC- 29 (PMAC2内置):? ?? ?ACC-49:?SSI Interface (ACC-xxE)?接收同步串行编码器,适用于MACRO 或TURBO的装置 演示DEMOPMAAC有一个4轴或8轴的演示装置,它包括伺服电机, 限位开关,回零标志信号,ACC21A操作面板附件 和LCD 显示(ACC12) Deltatau 的工程师使用该演示盒作为硬件和软件的开发。用户 可以用作4轴应用的模拟。 演示盒可以购买或者租借。19 PEWIN执行软件执行程序是一个工具,用来帮助同PMAC卡进行通讯,和 编译程序,以及诊断PMAC卡的故障。 执行程序可以使你存取所有PMAC的特性,例如,你可以:??? ? ? ? ?给PMAC发送在线指令 监视位置 速度 跟随误差 监视PMAC卡的电机,坐标系和全局的状态 监视,修改和查询PMAC卡的变量 执行电机的伺服环调整和自动调整 备份和恢复PMAC卡的所有设置文件 使用帮助文件发现PMAC卡的问题20 PMAC 用户手册PMAC用户手册包括8章. 下面是这些章节的题目及功能1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 介绍 PMAC开始 PMAC 特性 与PMAC通讯 故障诊断 输入/输出: PMAC与机床连结 配置电机 配置PMAC通讯 闭合伺服环 使应用安全 基本电机运行 定义坐标系 计算特性 PMAC的程序编写 索引21 PMAC 软件手册The PMAC 软件手册包含7章. 下面是每章的标题 1. 2. 3. 4. 5. 6. 7.PMAC 信息概要 PMAC I-变量定义 PMAC 在线指令讲解 PMAC 编程指令讲解 PMAC I/O 和内存图 编程举例 PMAC PROM 软件升级列表22 PMAC 系统构成硬件 接线连结检查软件设置和定义M变量定义图坐标系定义和比 例关系系统编程设计程序结构(计算机,运动 ,PLC’s)编写和调试程序23 PMAC 指令1. 在线指令 (立即执行, 不会存储) A. 全局指令 B. 坐标系定义 (&n …) C. 电机定义 (#n…) 方式设定, 运动指令, 查询, 变量 设定, 缓冲区控制 2. 缓冲区指令 (可存储) A. 运动程序 运动, 方式,计算, 逻辑, 指令, 信息 B. PLC 程序 计算, 逻辑, 指令, 信息 * 用OPEN表达式,使缓冲区指令输入24 PMAC 变量和功能1. I-变量 (1024) ? 初始化和 变量设置 ? 提前定义其含义 ? 有的影响卡的全局 ? 有的是电机的定义 ? 有的是坐标系的定义 ? 有的是编码器的定义 2. P-变量(1024)? 用户定义的变量 ? 48-bit 浮点格式 ? 全局存取 (与坐标系无关)25 PMAC 变量 (继续)3. Q-变量 (1024)? 用户定义的变量 ? 48-bit 浮点格式 ? 与坐标系的定义有关4. M-变量 (1024) ? 提供用户有权使用卡的内存和I/O寄存 ? 用户定义地址, 偏置值, 和位宽度 ? 无方向, 可双向, BCD码, 可用的浮点格式26 PMAC Memory Mapping23 1 15 6X-Memory8702 31 5 61Y-Memory870$0 00 0 $0 0F F $0 10 0 $1 7F F $1 80 0Internal DSP MemoryFixed-Use Calculation RegistersUser Buffer Storage SpaceExternal Static RAM (Battery Backed)$9 F FF $B C 00 $B F FF $C 0 00 $C 0 3F $D 0 00 $D F F F $E 00 0User-Written Servo StorageM-Variable DefinitionsDSP-Gate Registers Dual-Ported RAM VME bus registersVME Setup RegistersMailbox Registers$F 0 00I/O Registers27$F F F F PMAC I-变量 概述I0-I99 I100-I186 I187-I199 I200-I286 I287-I299 ….. I800-I886 I887-I899 I900-I989 卡全局设定 电机1 设定 坐标系 1 设定 电机 2 设定 坐标系 2 设定 电机 8 设定 坐标系 8 设定 硬件 设定28 基本电机定义 I-变量Ix00 电机 x 有效 (x = 电机序号) Ix00=0 电机 x 无效 不执行伺服计算 没有位置报告 电机 x 有效 伺服计算速度为 30msec/cycleIx00=129 基本电机定义 I-变量Ix01 电机 x 换相 (x = 电机序号) Ix01=0 不需PMAC执行换相 不执行换相计算 一路模拟量输出 由PMAC执行换相 相计算速度为 3msec/cycle 一个电机需要2路模拟量 Ix70-Ix83 必须使用30Ix01=1 电机 x 保护变量Ix15 在终止和遇到限位时的减速速率 (单位: cts/msec2; 浮点形式) 一定不要设为“0”!!! (电机将没有减速) Ix16 准许的最大编程速度 (单位: cts/ 浮点) 只对直线速度混合方式 (I13=0) 速度修调可使此速度比例变化 (% 值) 也适用于RAPID快速方式,如果 I50=131 电机 x 保护变量(续)Ix17 允许的编程最大加速度 (单位: cts/msec2; 浮点) 只对直线混合运动 (I13=0) 速度修调可使此速度比例变化 (% 值) 也适用于RAPID快速方式,如果 I50=1 Ix19 允许的JOG最大加速度 (单位: cts/msec2;浮点) 可以用 TA (Ix20) and TS (Ix21)修调 如果 Ix20=0 and Ix21=0,总用此加速度32 Ix25 - Motor x Flag Address and ModesModes Hex($) PMAC address of flags52C004Bin 0 1 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0=0 =1 =0 =1Use amplifier enable function Do not use amplifier enable function Enable hardware position limits Disable hardware position limits=0 Enable amplifier fault input =1 Disable amplifier fault input =00 Kill all PMAC motors on fault or F.E. =01 Kill all C.S. motors on fault or F.E. =1x Kill this motor only on fault or F.E. =0 Low true fault input =1 High true fault input33 Ixx25 - Motor x Flag Address for TURBOTURBO PMAC address of flags Hex($)078008B 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 in因为TURBO PMAC的内存地址,一个新的标志设定变量需要设置(I**24)34 Ixx24 - Motor x Modes (for TURBO)Modes Hex($)520000Bin 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=0 PMAC1 =1 PMAC2 =0 =1 =0 =1 Use amplifier enable function Do not use amplifier enable function Enable hardware position limits Disable hardware position limits=0 Enable amplifier fault input =1 Disable amplifier fault input =00 Kill all PMAC motors on fault or F.E. =01 Kill all C.S. motors on fault or F.E. =1x Kill this motor only on fault or F.E. =0 Low true fault input =1 High true fault input35 电机手动JOG运动方式JOG方式是PMAC卡的最简单闭环运动形式 JOG的控制指令为PMAC卡的在线指令 Jogging 可用于简单定位或以常速运动,象在 主轴的应用 需要学习的: ? 怎样JOG指令电机 ? 怎样改变JOG的速度 ? 怎样改变JOG的加速度36 在线JOG指令J+ - Jog 正向连续运动 J- - Jog 反向连续运动 J/ - Jog 运动停止 (或者闭环) J= - Jog 返回前一个JOG的 (或上一个编程) 位置 J={常数} - Jog 到指定的位置 (单位是脉冲counts) J^{常数} - Jog 从当前实际位置运动指定的距离 J:{常数} - Jog 从当前指令位置运动指定的距离 J=* - Jog 运动一个变量 (PMAC 的内存地址) J={常数或 *}^{常数} - Jog 直到触发变量 Ix19-Ix22 用于JOG控制. 变量可以在运动中改变, 但只有到下一个JOG指令时才有效37 在线JOG指令例子#1J+ - Jog #1电机正向运动 #1J=1000 #2j+ - Jog #1电机正向运动到1000cts 并且 jog #2电机正向运动 I122=30 - Set 电机#1 jog 速度为 30 counts/msec I220=50 - Set 电机#2 jog 加速时间为 50 msec注 : 电机如果定义在坐标系下,且正在执行程序时,是 不能对此电机进行JOG运动38 电机 x Jog 变量Ix19 最大允许的 Jog 加速度 (单位: cts/msec2; 浮点形式) 可以修调 如果 Ix20=0 and Ix21=0,使用Ix19的设定 Jog 加速时间: (单位: 整形) 如小于2倍的Ix21, 则无效Ix20Ix21Jog S-曲线加速时间 (单位:整形) 可以修调TA(Ix20)Jog 速度 (单位: cts/ 浮点) 绝对值39Ix22 Motor x 运动变量Ix20 加速时间 (Jog, Home) Ix21 S-曲线加速时间 (Jog, Home)VIx21=0Ix20Ix2 0T40 Motor x运动变量Ix20 加速时间 (Jog, Home) Ix21 S-曲线加速时间 (Jog, Home)VIx20 & 2 * Ix21Ix212*Ix21Ix21Ix212*Ix21Ix21T41Note that Ix20 is not used Motor x 运动变量Ix20 加速时间 (Jog, Home) Ix21 S-曲线加速时间 (Jog, Home)VIx20 & 2 * Ix21Ix2 1Ix21Ix2 1Ix2 1T42Ix20 Jog Move TrajectoryVelRunning a Program=0 (if command was J+ or J-)Jog Stop given (J/) Running a Program=1Running a Program=1 Desired Velocity Zero=0 In Position=0Max Accel =Ix19Max Accel =Ix19Ix22Desired Velocity Zero=1 Running a Program=0 In Position=1 (when FE in range)Time Ix21 Jog Start given (J+) I12Note: If the jog command is not of indefinite length (not J+ or J-) then the &Running a Program& status bit will be high for the entire jog moveIx21Ix20Ix21Ix20Ix21I12Note: Rate of acceleration limited by Ix19 - can override Ix20 and Ix2143 Jogging 小测验怎样使电机 1 以10 cts/msec jog 运动? 怎样使电机2在2秒达到其jog速度,其加速度 时间为1秒钟怎样使电机 1 以300 RPM jog运动?*所用电机带500线编码器 (2000 cts/rev 经过4倍频 译码)44 电机回零运动回零运动可通过一个运动程序或在线指令实现. 回零触发由用户选择 在上电和复位时 大多数机床需要回零以确定编 程的零位需要学习的:? ? ?怎样使用在线指令回零 怎样改变回零的速度和方向 怎样设定回零触发.45 在线回零指令HM - 作回零运动 HMZ - 将当前位置作为零位在线指令举例: #1HM - 电机#1执行回零运动 #1HM #2HM #3HM C 同时开始回零运动 注: 当一个电机在一个坐标系下正在执行程序时, 在线回零指令无效46 PMAC 回零变量Ix19 最大允许的 Jog 加速度 (单位: cts/msec2; 浮点形式) 可以修调 如果 Ix20=0 and Ix21=0,使用Ix19的设定 回零加速时间: (单位: 整形) 如果小于2倍的Ix21,此参数无效?Ix20 Ix21回零 S-曲线加速时间 (单位:整形) 可以修调TA(Ix20)Ix23 Ix26回零速度 (单位: cts/ 浮点) 回零偏置值 (单位: 1/16 cts) 距离为从零点开始47 MOTOR x 回零触发I902, I907, ..I977: 编码器位置捕捉控制 (I9n2 对 PMAC2)变量设定决定那个信号或几个信号的组合作为回零和寄存的 触发I903,I908, … , I978: 标志信号的选择控制 (I9n3 对 PMAC2) 决定那个 FLAGn 用于位置捕捉0: HMFLn 1: -LIMn* 2: +LIMn* 3: FAULTn* * must disable normal function with Ix2548 Homing Search Move TrajectoryVel Trigger Occurs Home Complete=0 Home Search In Progress=1 Net distance from trigger position = Ix26 Home Complete=1 Home Search in Progress=0Ix23Time Ix21 Ix20 Ix21 Ix21Desired Velocity Zero=1 In Position=1 (when FE in range)Note: Rate of acceleration limited by Ix19 - can override Ix20 and Ix21Ix21 Ix20Ix21 Ix20Ix2149 回零运动小测验怎样实现电机 #1 以10 cts/msec 负向回零 ? ? 怎样使电机1和电机2同时开始回零? ? 怎样使电机2回零运动到正限位? ? 怎样使电机3回零运动时,捕捉home flag 信号和编码器CHC信号??50 P-变量P-变量是用户全局变量可用于PMAC编程中的 计算.? 48-位浮点形式 ? 1024 P-变量从 P0 to P1023可用于: 1.计算 P100=P101*(sin(45)) 2. 软件触发 IF( M1!= 1 AND P10 = 0)51 P-变量 继续假设你编写运动轨迹为 SIN(q) + COS(q) 的运动程序. 你可以如下编写:使用提前计算出的每点坐标 使用变量公式或X1 X1.3 . . X0.9824 X1P1=0 WHILE (P1&361) P2=SIN(P1) +COS(P1) X(P2) P1=P1+1 ENDWHILE52 编程计算PMAC的 DSP具备在运动程序中执行大量的计算的能力OPEN PROG 1 CLEAR WHILE(1=1) IF(P1&0) P2=SIN(P1)+COS(P1) p3=2 IF(P1&3) P2=SIN(P1)+COS(P1) P3=2 ? ? ? IF(P1&99) P2=SIN(P1)+COS(P1) p3=99 ENDIF ? ? ? ENDIF ENDIF X+1 ENDWHILE CLOSE Q-变量Q-变量是用户全局变量可用于PMAC编程中的计算.Q-变量时坐标系下的 变量多坐标系下使用需注意需要学习: ? Q-变量在内存总是如何组成的 ? 如何确定那个变量对您的系统有效54 Q-变量内存图内存访问通过键入 Q(序号) 改变,根据当前的坐标系.&1 Q0 accesses location &2 Q0 accesses location&7 Q0 accesses location &8 Q0 accesses location$$这种地址使多坐标系应用时,简化内存管理。如果在8个坐标系 执行8个运动程序, 所有的程序可以使用相同的变量序号 Q0 to Q 减少繁琐,并没有内存冲突55 Q-变量 内存结构在不同坐标系,访问同一内存地址的Q变量不相同&1 Q0 &2 Q512&7 Q640 &8 Q128accesses location accesses locationaccesses location accesses location$$随着使用坐标系的增加,每个坐标系的重叠的Q变量 会减少56 Q-Variable MapPMAC Mem Loc. $1400 ... $147F $1480 ... $14FF $1500 ... $157F $1580 ... $15FF $1600 ... $167F $1680 ... $16FF $1700 ... $177F $1780 ... $17FFCoord Sys. 1 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023Coord. Coord. Sys. 2 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511Coord. Coord. Sys. 3 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767Coord. Coord. Sys. 4 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255Coord. Coord. Sys. 5 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895Coord. Coord. Sys. 6 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383Coord. Coord. Sys. 7 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q127 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639Coord. Coord. Sys. 8 Q128 ... Q255 Q256 ... Q383 Q384 ... Q511 Q512 ... Q639 Q640 ... Q767 Q768 ... Q895 Q896 ... Q1023 Q0 ... Q12757 M-变量M-变量用于访问 PMAC内存地址和I/O点地址M-变量没有预先定义的含义.用户必须通过定义 M-Variables 访问PMAC 的地址. M-变量一旦定义好后,可用于计算和判别触发 需要学习: ? M-变量如何指向内存 ? 通过M-variables如何读和设定I/O点58 PMAC Memory Mapping23 1 15 6X-Memory8702 31 5 61Y-Memory870$0 00 0 $0 0F F $0 10 0 $1 7F F $1 80 0Internal DSP MemoryFixed-Use Calculation RegistersUser Buffer Storage SpaceExternal Static RAM (Battery Backed)$9 F FF $B C 00 $B F FF $C 0 00 $C 0 3F $D 0 00 $D F F F $E 00 0User-Written Servo StorageM-Variable DefinitionsDSP-Gate Registers Dual-Ported RAM VME bus registersVME Setup RegistersMailbox Registers$F 0 00I/O Registers59$F F F F 简单 M-变量定义X: {地址}, {偏置位}, {宽度}, {格式} Y: {地址}, {偏置位}, {宽度}, {格式}偏置位 C 是启始的位号 宽度 C 缺省宽度为 1; 可以是 1, 4, 8, 12, 16, 20,or 24 位宽 格式- 缺省 U (无方向的); 可以设为有方向 S定义 M-变量 M0-&x:$ M1-&Y:$FFC2,8,1 M9-&Y:$FFC2,8,8 M102-&Y:$C003,8,16,s M197-&Y:$,s M120-&Y:$C000,20,1指向伺服时钟 指向机床输出点 1 指向机床输出点 1-8 指向DAC 1输出 指向速率修调 指向轴1的回零标志信号Delta Tau 建议的 M-变量定义在 PMAC 软件参考手册60 M-变量 定义PMAC1 memory location Y:$FFC2 mapped to the JOPTO port: 8 inputs and 8 outputs OutputsBIT23222120191817161514131211109876543210M9-&Y:$FFC2,8,8 M19-&y:$FFC2,0,8;JOPTOJOPTO port input wordInputs使用 M-变量 M9=1 机床输出1有效 M9=45 机床输出有效1,3,4,6 打开并且关闭 机床输出 2,5,7,8 45= 二进制61 M-变量测验? 如何定义 M-变量读取输入点2 ? ?如何定义 M-变量读取输入点1 到 8? ?如何定义 M-变量读取输出点1 到 8?? 如何打开输出点 1,2, 和 8?? 如何告知输入点 1,2, 和 8 有效?? 为何以及在哪里定义 M-变量?62 PMAC 设置PMAC 必须配置以用于系统的工作(电机,编码器等) 设置可通过在线指令实现或者提供的Windows设置程序 P1SETUP.需要学习: ? PMAC 如何用 P1SETUP 程序设置 ? P1SETUP 程序实现的工作 ? 如何存储 PMAC 配置63 Important Setup I-Variables SETUP PROGRAM FUNCTIONCommunications Variables Motor Activated Flags & Modes Variable DAC Configuration Position Encoder Configuration DAC Trimming &Velocity& Encoder Configuration Encoder Relative Scaling Preliminary Tuning Variables Jogging Setup Variables Position Capture Configuration Homing Setup VariablesI-VARIABLESCONFIGUREDI3, I4, I9 I100 I125 I102, I169 I103, I900 I129 I104 I109 I111,I112,I169 I130,I131,I132 I119,I120 I121,I122 I902,I903 I123,I12664 Setup I-Variable Names Use the PMAC manual to find the name and function of the variables used in the setup program .I-VARIABLEI3 I4 I9 Ix00 Ix02 Ix03 Ix04 Ix09 Ix11 Ix12 Ix19 Ix20 Ix21 Ix22 Ix23 Ix25 Ix26 Ix29 Ix30 Ix31 Ix32 Ix67 Ix69 I900 I902 I903NAME AND FUNCTION65 设置测验? 如何使 PMAC 记住设置内容? ?如何复制 PMAC的 配置到 PC的硬盘? ?如何校正PC硬盘上的配置文件与 PMAC的 存储配置相同?66 PMAC 调整PMAC的 伺服算法必须设置以适用于系统电机和放大 器的工作. 设置可通过I变量的调整,获取适当的PID增益数值称作 调整 需要学习: W PID 增益的含义 ? PID 伺服环的功能 ? 如何设置系统 PID 增益 .67 典型 P.I.D 伺服环Following Error 跟随误差Command Position=Commanded Position 指令位置-Actual Position 实际位置DAC 16 Bit?10V+ -ErrorPID Digital Number Servo Algorithm ?32767 DAC BitsAMPMActual PositionEncP (proportional gain比例增益) I (integral gain积分增益) D (derivative gain微分增益)Spring弹性,弹力 Shock Absorber 减震,吸收68 DACStep Move Tuning 阶跃调整DAC OutputDAC Ix69 DAC Ix69TimeNote: The intent is to operate within the linear range of the system. This is usually a step size approx. 1/2 motor rev.TimeTimeParabolic Move TuningVel A c cTimeTimeVelocity ProfileF . .E F . .EAcceleration ProfileTimeTimeH h ve ig l/F co E rre tio la n C u : D m in a se a p g F ix: In re se K (Ix3 ) c a 2 vffF.E. F.E.High vel/FE correlation Cause: Friction Fix: Add &Friction Feedforward& (Ix68) and/or turn on integral gain (Ix33, Ix34)TimeTimeHigh acc/FE correlation Cause: Inertial lag Fix: Increase K (Ix35)a ffHigh acc/FE correlation Cause: Physical system limitations Fix: Use less sudden accel, or add &Friction Feedforward& (Ix68)(m ov-tun)1 /16 5 /9-Ix69-Ix69DAC Saturation Cause: Too much Proportional or DAC Limit is too low Fix: Raise DAC Limit (Ix69) or Lower K (Ix30)pNoisy DAC Holding Position Cause: Quantization Fix: Decrease K (Ix31)dDAC Ix6920% Ix69DACTime -20% Ix69-Ix69TimeMore DAC Available Cause: Not enough Proportional Fix: Evaluate performance and maybe increase K (Ix30)pPhsical System Limitation Cause: Limit of the Motor/Amplifier/Load and gain combination Fix: Evaluate Performance and maybe use more K (Ix30)69 POSStep Move Tuning 阶跃调整1/2 to 1/4 motor revTimeNote: The intent is to operate within the linear range of the system. This is usually a step size approx. 1/2 motor rev.Commanded PositionPOS1/2 to 1/4 motor revPOS1/2 to 1/4 motor revTimeTimePOS1/2 to 1/4 motor revO vershoot and Oscillation Cause: too little Damping or too much proportional gain Fix: Increase K (Ix31) Decrease Kd (Ix30) p POS1/2 to 1/4 motor revPosition Offset Cause: Friction or Constant Force Fix: Increase K I (Ix33)TimeTimeSluggish Response Cause: Too much Damping or too little Proportional Fix: Increase K p (Ix30) or Decrease K d (Ix31)Phsical System Limitation Cause: Limit of the Motor/Amplifier/Load and gain combination Fix: Evaluate Performance and maybe use more K p (Ix30)70 VelAccParabolic Move Tuning 抛物线运动Velocity ProfileF.E.TimeTimeAcceleration ProfileF.E.TimeParabolic Move TuningVel A c c Time TimeTimeVelocity ProfileF . .E F . .EAcceleration ProfileTimeTimeH h ve ig l/F co E rre tio la n C u : D m in a se a p g F ix: In re se K (Ix3 ) c a 2 vffF.E. F.E.High vel/FE correlation Cause: Friction Fix: Add &Friction Feedforward& (Ix68) and/or turn on integral gain (Ix33, Ix34)TimeTimeHigh acc/FE correlation Cause: Inertial lag Fix: Increase K (Ix35)a ffHigh acc/FE correlation Cause: Physical system limitations Fix: Use less sudden accel, or add &Friction Feedforward& (Ix68)(m ov-tun)1 /16 5 /9H igh vel/FE correlation C ause: D ping am Fix: Increase K (Ix32) vffF.E. F.E.High vel/FE correlation Cause: Friction Fix: Add &Friction Feedforward& (Ix68) and/or turn on integral gain (Ix33, Ix34)TimeTimeHigh acc/FE correlation Cause: Inertial lag Fix: Increase K (Ix35)affHigh acc/FE correlation Cause: Physical system limitations Fix: Use less sudden accel, or add &Friction Feedforward& (Ix68)71 VelAccTimeTimeVelocity ProfileF.E. F.E.Acceleration ProfileTimeTimeNegative vel/FE correlation Cause: Too much vel FF Fix: Decrease K (Ix32)vffHigh vel/FE correlation Cause: Damping & Friction Fix: Increase K (Ix32) firstvffF.E.F.E.TimeTimeNegative acc/FE correlation Cause: Too much acc FF Fix: Decrease K (Ix35)affMod. vel/FE & acc/FE correlation Cause: Inertial lag and friction Fix: Increase K (Ix35) firstaff72 PMAC 自动调整PMAC Executive Software执行软件提供PID AUTO-TUNING 自动调整功能,易于调整 PID .The Auto-Tuning 自动调整功能是电机运动,估算响应, 根据所需 响应自动计算需要的增益值.73 PMAC 自动调整PMAC 的auto-tuning PID自动调整适用于从未使用过 PMAC Executive Auto-tuner的用户. 出于安全, 对新客户建议使电机 空载,来熟悉自动调整功能. 一旦掌握之后可以带负载调整. 自动调整根据电机的快速运动将计算电机的动态特性然后计 算电机的 PID 增益. 如果在需要的负载方式进行自动增益, 电机不能发生剧烈运动,说明不能进行自动增益调整, 如果 是这种情况你可以手动调整PID增益.74 PMAC 自动调整步骤(1) 校正 DAC模拟量输出 在自动调整使用DAC校正, 在 P1Setup 程序中有过程描 述, 或者可以手动调整伺服放大器的电位计以保证DAC 输出为0% 时电机不运动 (2) 选择 PID 自动调整的对话框. 选择 “带宽自动选择”,确认 不选择加速度前馈和积分增益. 选择“开始 PID自动调整” 按钮。 这将使PMAC选择一个保守的带宽值,比例增益和微分 增益。75 PMAC自动调整步骤 (续.)(3) 将自动调整产生的带宽值放大 2 或 3倍,输入带宽设置窗 口. 再选择阻尼比为0.7. 取消自动选择带宽,再点击开始 PID Auto-tuning 按钮 (4) 选择速度前馈, 加速度前馈, 和软或硬积分增益(您的选择) 再点击开始 PID Auto-tuning 按钮 (5) 增加带宽,再点击开始 Autotuning按钮.不断增加带宽直到电机 开始震荡, 然后降低带宽然后选择开始 PID Auto-tuning 按钮 直到电机不再震荡.76 坐标系一个运动程序需要运行在一个坐标系下. 根据运动程序中需要运动的电机,将需要运动的 电机组合在一个坐标系下需要学习:? ? ?PMAC轴的含义 坐标系的定义 如何定义坐标系77 PMAC 轴的特性允许定义的轴: X,Y,Z,U,V,W,A,B,CX,Y,Z: 传统上的主要直线轴? ?矩阵轴的定义 矩阵轴的转换??圆弧插补切削半径补偿78 PMAC 轴的特性 (续)U,V,W: 传统上的第二直线轴?矩阵轴的定义A,B,C: 传统的旋转轴(A 围绕 X, B 围绕 Y, C 围绕 Z)?位置翻转 (Ix27)79 坐标系定义坐标系定义如下,坐标系下的轴分配到该坐标系 下&1 #1-&X #2-&Y #3-&Z&2 #4-&20X #6-&25.4Y80 坐标系定义 (续)目的是组合电机在一个坐标系下?组合的电机将使许多电机运行一个运动程序. 一些应 用,如等高线,需要电机精确同步运动. 一个运动程 序可以计算许多电机组合的运动轨迹,然后高精度的 执行所需轨迹的运动.应用举例: 加工中心, 机器人, 龙门结构, X-Y 平台81 定义坐标系 (续)将每个轴定义在不同的坐标系下?如果PMAC控制多个机床, 每个独立的运动需要一个 运动程序. 对于此情况,你可以设置多个坐标系使一 个机床独立于其他的机床.例如: 包装线, 机器人搬运, 主轴82 多轴定义(&-&坐标系; #-&电机; X-&轴)&1 #1-&X &2 #2-&X{ {该定义是允许的. 两个电机在不同的坐标系下定义 为X轴&1 #1-&X #2-&X该定义是允许的. 电机将同样作X-轴轨迹, 象龙门机床83 多轴定义 (续)&1 #1-&X #1-&Y{ {该定义不允许. 一个电机不能在一个程序中执行不同 的运动轨迹. 第一个轴的定义将被第二个轴的定义 代替 该定义不允许. 当运行两个程序时,一个电机将接收 不一致的指令. 第二个坐标系的定义将被拒绝.84&1 #1-&X &2 #1-&X 坐标系定义? ?PMAC 支持8轴 (控制环) 每个电机可以有一个输出 (非换相) 或者两个输出 (换相)?8个电机可以定义如下:构成8个独立的系统 构成一个8轴的系统 系统可以任意组合85 坐标系定义 (续)?每个坐标系可以定义速率轴 “FEEDRATE” ,其他轴可以是坐标系下的时间轴. 分配给坐标系下的电机以 “轴定义表达式”, 使轴与电机匹配, 并且带有放大和平移的功能:例: #1 -& 10000X + 5000?86 坐标系定义 (续)?笛卡尔坐标轴可以是直线轴电机的组合:#1 -& A11X + A12Y + A13Z + B1 #2 -& A21X + A22Y + A23Z + B2 #3 -& A31X + A32Y + A33Z + B3 这里 A11 到 A33 是比例因子 而 B1 到 B3 是偏移量这样允许坐标系旋转和转换87 坐标系定义?比例和平移Y (in)Motor #2 (10,000 cts ) in#1 -& 10000X + 40000 #2 -& 10000Y + 200004&X (in) 2& Motor #1 (10,000cts ) in88 坐标系定义(续)?比例和旋转#1 -& 7071.07X - 7071.07Y #2 -& 7071.07X + 7071.07Ycts Motor #2 (10,000 in )45 Motor #1 (10,000 cts )in89X(i n )Y ) (i n 坐标系定义(续)?正交校正ctsY (in)Motor #2 (10,000 in ) #1 -& 10000.00X - 2.91Y #2 -& 10000.00YX (in) 1 arc min (exaggerated) Motor #1 (10,000 in )cts90 坐标系小测验????PMAC卡中多少坐标系可以被定义? 在坐标系2下哪个电机可以被定义为X轴? 电机3带有2048线的编码器,其连接丝杠螺距为 0.25英寸,通过3:1的减速机。如何在坐标系7下 将电机3定义为Z轴? 如何将坐标系下定义的电机取消和如何清除一个坐 标系?91 运动程序运动程序是指令坐标系的轴作定位和轮廓运动等.运动程序是多数PMAC卡应用的核心.需要学习:?? ?什么是运动程序如何写一个运动程序 如何运行一个运动程序92 运动程序PMAC 编程?在某一时刻执行一个运动,执行运动所需的所有计算? ? ? ?在坐标系下运行一个程序可以在多个坐标系下同时运行 一个程序可以在不同的坐标系下运行 一个坐标系一段时间只能运行一个运动程序93 运动程序(续)开始一个程序?指向一个坐标系,用在线指令: &n??用在线指令指向程序: Bn用在线指令运行: R or &CTRL-R&停止程序? ?用在线指令指向坐标系: &n用在线指令: Q, S, A, or &CTRL-Q&, &CTRLS&, &CTRL-A&, &CTRL-K&94 PMAC 运动程序表达式?运动指令X Z3000 U(P1*3.14159) V(20*SIN(Q6)) DWELL, DELAY?模态指令ABS, INC, FRAX, NORMAL LINEAR, RAPID, CIRCLEn, SPLINEn, PVT TA, TS, TM, F?变量付值{variable} = {expression}95 PMAC运动程序表达式(续)?逻辑控制表达式N, O, GOTO, GOSUB, CALL, RETURN G, M, T, D (special CALL statements) IF, ELSE, ENDIF, WHILE, ENDWHILE?辅助表达式COMMAND, SEND, DISPLAY ENABLE PLC, DISABLE PLC96 PMAC 逻辑操作used in Motion Programs and PLCs?Logic Operators逻辑操作符& | ^ (bit by bit AND) (bit by bit OR) (bit by bit Exclusive OR)Comparators比较符= != & !& &?(equal to) (not equal to) (greater than) ( less than or equal to) (less than)Functions函数SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, SQRT, LN, EXP, ABS, INT97 PMAC 程序结构建立一个程序:CLOSE DEL GAT &n #{motor}-&{axis scaling}{axis} OPEN PROG n CLEARMotion program statementsCLOSE从内存中删除一个程序OPEN PROGn CLEAR CLOSE98 例 1: A Simple Move一个简单的运动This example shows how to program a simple move on the program specifies how to do the move, then commands the move.********************* Set-up and Definitions *********************DEL GAT &1 CLOSE #1-&X ; ; ; ; ; 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********************* Motion Program Text ************************* OPEN PROG 1 ; Open buffer for program entry, Program #1 CLEAR ; Erase existing contents of buffer LINEAR ; Blended linear interpolation move mode ABS ; Absolute mode - moves specified by position TA500 ; Set 1/2 sec (500 msec) acceleration time TS0 ; Set no S-curve acceleration time F5000 ; Set feedrate (speed) of 5000 units(cts)/sec X10000 ; Move X-axis to position 10000 DWELL500 ; Stay in position for 1/2 sec (500 msec) X0 ; Move X-axis to position 0 CLOSE ; Close buffer - end of program To run this program: &1 B1 R ; Coord. System 1, point to Beginning of Program 1, Run 99 Example 1: A Simple Move10000Mtr 1 Cm d Vel (cts/sec)50000 0 1 2 3 4 5 6-5000-10000Tim e (second)100 ?What part of a motion program file is part of a PMAC program buffer? What can be part of a program file? What types of commands go in motion programs and where are these found in the manual? If you SAVE a program file as EXAMPLE5.PMC, what name will PMAC call it? What editor can you use to write your PMAC programs?101? ??? 数据采集PMAC 已经内置数据获取能力称为数据采集功能.需要学习:?什么数据可以被采集??如何进行数据采集 何时进行数据采集102 PMAC 数据采集? ? ? ? ? ? ?实时采集任何PMAC卡的地址信息 最多达 24 个地址,每个地址 24 或 48 位宽, (由 I21I44定义; I20作为标志) 采样周期从 1 到 to 8千万个伺服周期 (I19) 可以由外部触发采集 可上载到计算机用于处理和分析 PMAC 执行程序可产生采集数据的图形和平台 用于: 系统判别 伺服环调整 程序的编译 设备的编译和维护103 数据采集过程 & 采样周期PMAC 可用在线指令采集数据. 指令可通过在线窗口或运动程序中的在线 指令或 PLC程序发送.DEFFINE GATHER (DEF GAT) GATHER (GAT) END GATHER (ENDG) PMAC准备采集数据 PMAC开始采集过程 PMAC的采集结束在运动程序或 PLC程序, 采集指令可如下使用: COMMAND “DEFFINE GATHER” COMMAND “GATHER” COMMAND “END GATHER”CMD”DEF GAT” CMD”GAT” CMD”ENDG”数据采集周期由 I19设定. (I19 的单位是伺服周期.) 如 I19设定为 1,采样周期为 2250 Hz在缺省! 如果希望采样周期为 100 Hz (22.5 次低于), I19应设为大约 22 或 23 (I19 应设为整数). 这将产生一个实 际的采样周期 110 或95HZ.104 例 2: 一个简单的数据采集的例程该例子表示如何编写一个运动,并加入采集.********************* Set-up and Definitions ********************* DEL GAT &1 CLOSE #1-&X ; ; ; ; ; 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********************* Motion Program Text ************************* OPEN PROG CLEAR LINEAR ABS TA500 TS0 F DWELL500 X0 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 Stay in position for 1/2 sec (500 msec) Move X-axis to position 0 Stop program lookahead Send On-line command to stop data gathering Close buffer - end of program运行程序和采集:DEF GAT&CR& GAT &1 B1 R ; 采集, 坐标系1,指向程序1的开始,运行105 例 2: 一个简单的数据采集的例程10000Mtr 1 Cm d Vel (cts/sec)50000 0 1 2 3 4 5 6-5000-10000Tim e (second)106 数据采集测验? ? ? ?什么是 PMAC 的数据采集? PMAC如何存储采集数据? PMAC可以采集什么信息? 如果您想采集周期为 10 Hz (每秒钟10次), I19应如何设定,如果伺服周期为 2.25 KHz.107 LINEAR 插补方式对PMAC 用户直线插补是最通用的方式. 直线插补 轨迹包括加减速时间和运动时间.需要学习:? ? ?什么是直线插补模式的轨迹如何改变轨迹的特征如何实现多个运动的速度混合108 Linear 模式的轨迹小Acceleration 时间VT ATM orP /Ftim eT AVT ATM orP /FT ATM orP /Ftim e T A109 Linear 模式的轨迹(continued)小Acceleration 时间VTM or T AP/FT ATM orP/Ftim e T AVT A TM or P/F TM or P/F TM or P/FT Atim eT AT A110 Linear 模式的轨迹(continued)加速时间等于运动时间VTM orVP/Ftim eTM orT AP/FT ATM orP/FT Atim e111 Linear 模式的轨迹(continued)加速时间等于运动时间VTM orT AP/FT ATM orP/FT Atim eVTM orT AP/FT ATM orP/FT A T Atim e112 Linear 模式的轨迹大 (速度限制) 加速时间VTM orT AP /FT Atim eVTM orT AP /FT ATM orP /FT Atim e113 Linear 模式的轨迹大 (速度限制) 加速时间VTM or P/FTA TATM or P/FTAtime114 加速参数TA 编程加速时间(单位: msec); 整数TSV编程S-曲线时间(单位: msec); 整数TA & 2 * TST STST ST ST115TATA 加速参数(continued)VTA &= 2 * TSTS2*T STSTS2*T STSTVTS =0TAT AT116 例 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,运行117 例 3: 一个复杂的运动5000 Repeat 9 More TimesVelocity (count/second)0 0 1 2 3 4 5 6 Time (second)-5000118 直线插补测验?曲线的水平和垂直轴的含义??? ?什么是 TS, TA, TM and F?TM 和 F 的关系是什么?以100msTA时间和20ms的TS时间,TM为500ms的时间外成一个运动,总的运动时间是多少? 如果程序表达 TS100 TA100 TM100,完成3个混合 运动的总时间是多少??119 PMAC 运动速度混合PMAC 在如下情况下速度无法混合:? 两个运动指令中间有DWELL指令 ? 2 个向后跳转指令 (GOTO, ENDW) ? 速度混合功能无效设定 (Ix92=1)B lending allow - Ix92 = 0, no D E ed W LL's, no double jum pbackB lending not allow - Ix92 = 1, D E ed W LL's or double jum pback120 DWELL Vs. DELAYDWELL ? 总使用固定的时基 (I10) ? 暂停时间不包括减速过程 ? 直到DWELL结束才执行下面运动的计算 (add I11 time)M ove Tim e TM or P/FTAI11 DW ELL Tim e Tim eM ove Tim ... e121 DWELL Vs. DELAY (continued)DELAY ? 使用可变的时基 (% value) ? 暂停时间包括减速过程 ? 最小暂停时间是当前 TA时间 ? 下面运动时间开始于DELAY指令Move Time TM or P/FDELAY Tim eMove Time ...122 例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 F X2 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 programTo run this program:DEF GAT&CR& GAT &1 B1 R ; GATHER, CS. 1, point to Beginning of Program 1, Run123 例4: 速度混合有效的例程10000Mtr 1 Cm d Vel (cts/sec)50000 0 1 2 3 4 5 6 7 Tim e (second)124 例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 F X2 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 programTo run this program:DEF GAT&CR& GAT &1 B1 R ; GATHER, CS. 1, point to Beginning of Program 1, Run125 例5: 速度混合无效的例程10000Mtr 1 Cm d Vel (cts/sec)50000 0 1 2 3 4 5 6 7 8 Tim e (second)126 速度混合测验?使用 速度指令 (F) 在增量方式 (INC) ,指令 X1000 和指令 X100 X400 X500如果 Ix92=0, TA& TM or (TA&?P/F), 和 2?TS&TA有何区别?127 矢量速率PMAC 可以自动计算运动时间(TM)使电机运行与 希望的速度速率下. 这用于多个电机在一个坐标系下控制一个刀具,来 自动分配各自的速度需要学习:??速率指令的表达PMAC如何计算速率128 矢量速度轴INC FRAX (X,Y) X3 Y4 F10Dist ?32 ? 4 2 ? 5Move Time ? 5 / 10 ? 0.5 Vx ? 3 / 0.5 ? 6 Vy ? 4 / 0.5 ? 8INC FRAX (X,Y) X3 Y4 Z12 F10Dist ?32 ? 4 2 ? 5Move Time ? 5 / 10 ? 0.5 Vx ? 3 / 0.5 ? 6 Vy ? 4 / 0.5 ? 8 Vz ? 12 / 0.5 ? 24129 矢量速度轴(续)INC FRAX (X,Y,Z) X3 Y4 Z12 F10Dist ?3 2 ? 4 2 ? 12 2 ? 13Move Time ? 13 / 10 ? 1.3 Vx ? 3 / 1.3 ? 2.31 Vy ? 4 / 1.3 ? 3.08 Vz ? 12 / 1.3 ? 9.23INC FRAX (X,Y) C10 F10Dist ? 0 Move Time ? 0 / 10 ? 0 (& TA) Acceleration - limited move130 速度时间单位Ix90 速度时间单位(单位: msec)LENGTH UNIT AXIS DEF. SCALING F UNIT = ?? TIME UNIT Ix90 (msec)例: #1 -& 2000X Ix90 = 10002000 cts mm F UNIT = ?? 1000 msec sec131 速率测验?如果坐标系1 的 I190=60000,那么速率时间单位是 什么?如果X 和 Y 是速率轴, 如果指令 X100 Y200,各 自速度如何分配? 如果你编程指令 F5 定义速度为 5 inches/sec,如何 设定 Ix90和轴的定义???132 Exercise 1: Indexing a MotorProblem: 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 blending133 Exercise 2: Indexing a MotorProblem: 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.134 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:$,s for feedrate override control. 135?? Exercise 3: Conditional BranchingProblem: 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.136 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.?137 圆弧插补PMAC 允许 X,Y, 和 Z 轴在一个坐标系下执行圆弧插补指令。 TS 可控制起始和结束的加减速时间. 圆弧插补的混合速度由 指令(F) 或时间 TM来定义.需要学习:? ? ?什么变量控制圆弧插补 如何使用圆弧插补 如何定义插补平面138 圆弧插补圆弧插补的通常定义: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 TXYIncremental End PIncremental Center VCArc moveCenter (10,0)Start (0,0)End (20,0)139 CIRCULAR INTERPOLATION+Z +ZG17+XCW +Y +XCW +YNORMAL K-1+ZNORMAL K1+ZCWG18+X +Y +X CW +YNORMAL J-1+Z CWNORMAL J1+ZG19+X +Y +X CW +YNORMAL I-1NORMAL I1NORMAL VECTORS FOR CIRCULAR MOVES: THE PLANES AND CLOCK WISE ARCS THEY DEFINE(NRML-VEC)140 EN D (25,30)PMAC Circular InterpolationNORM K-1 AL Defaults ABS (X,Y) INC (R) CIRCLE1 F10 X25Y30I20J5YYCIRCLE2 TM I-10YSTAR T (10,5)C ENTER (15,20)STAR T (25,20)C ENTER (30,10)IJI X YCIRCLE1 F25 X30Y10I-10J10 or I-10J10C ENTER (20,20) EN D (0,10)EN D (15,10)YXX YXCIRCLE2 TM R10 CIRCLE2 TM R-10JISTAR T,EN D (30,10) STAR (10,0) TYX XX141 圆弧插补例程16 14;Setup and definitions &1 #3-&10000x #4-&10000y i13=10 ;Motion Program Text121086420 0 2 4 6 8 10 12 14 16open 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 142 圆弧插补测验? 什么指令使PMAC执行圆弧插补指令? ? I13 应设置多少?143 提前运算 PRECALCULATIONIn order to blend and spline moves together, a motion program must look ahead of the move in progress. Depending on the mode of movement, the look-ahead may be zero, one or two moves beyond the move in progress.What to learn:? ? ?What happens during precalculation How to stop precalcualtion How to use synchronous variables144 PRECALCULATIONAll 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 ;move X-axis to 10 ;move X-axis to 20 ;turn on output #1 ;move X-axis to 50The output M1 will be turned on at the beginning of the X10 145 move due to PMAC’s precalculation of the program PMAC Motion Program PrecalculationA. Two moves ahead LINEAR with I13=0 SPLINE11234Execute&R&I11Calculate456time123146 PMAC Motion Program PrecalculationB. One move ahead LINEAR with I13&0 CIRCLE, PVT1234Execute&R &I113 245timeCalculate1147 PMAC Motion Program PrecalculationC. No moves ahead Ix92=1, RAPID, HOME, DWELL,&S&&S& &R & 1 22aExecute3I11CalculateI11 22aDWELL timeI11 3time1148 同步 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
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 ;move X-axis to 10 ;move X-axis to 20 ;turn on output #1 ;move X-axis to 50The 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 X50149 MACROSMacros 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.150 PMAC 计算优先级1. Single character I/O 单字符I/OSerial, PC-bus, STD- 200ns/char2. 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伺服数据存储器151 PMAC 计算优先级5. VME mailbox处理器 事件驱动 6. 后台任务 Do 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 Buffers152 PMAC Multitasking Example*CT #1 #2 Servo #3 #4PLC 0 PLC 1...RTIBackgroundCT#1#2 Servo#3#4PLC 1 (cont.)HKPLC 2...BackgroundCT#1#2 Servo#3#4PLC 2 (cont.)HK CommPLC 3...Background*CT #1 #2 Servo #3 #4Move Planning ... PLC 0RTICT#1#2#3#4PLC 0PLC 3 (cont) ...ServoBackgroundCT#1#2 Servo#3#4PLC 3 (cont)HKPLC 1 ...Background*CT #1 #2 Servo #3 #4PLC 0 PLC 1 (cont) ...RTICT#1#2#3#4PLC 1 (cont)HKCommServoCT - Conversion Table # n - Motor n Servo Update HK - HousekeepingBackground153(mltitssk) PMAC 看门狗计时器NoFrequency & 25HzWatchdog Timer SatisfiedYesTurn Off CardNoDC Voltage & 4.75YesPMAC algorithm to assure Watchdog gets 25 Hz signal and check for a minimum of 4.75V to the memory chips.154 PMAC 看门狗计时器(续.)Real Time InterruptRead W.D Register Background Tasks are not occurring often enough, therefore stop updating timerIs Register & 0Decrement W.D. Timer RegisterPMAC algorithm to assure Watchdog gets 25 Hz signal. This ensures both background and foreground tasks are done reasonably often.155 通讯控制 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 number156I3:I4:I6: Communications Control I-VariablesI9:Data Reporting Form = 1, 3: Long form data reporting = 2, 3: Hexadecimal address I-variable reportingDPRAM ASCII Communications = 0: Disables DPRAM communication = 1: Enables DPRAM communication DPRAM ASCII Communications Interrupt Enable = 0: Disables communications interrupt = 1: Enables communications interruptI58:I56:157 MCC SMCC PMAC-PC PMAC-VME PMAC-Lite RS422ACC-26A RS422/232 TO RS232 OPTICALLY ISOLATED CONVERTER BOARDTO PC-AT (RS232C)J5 J11CTS RXD/ E1A MC34050 U1 RTS TXD/1E1DJ213.88 in. (98.55 mm)GE FANUC 90-70RP3 RP2 RP1 U2 PMAC-Lite PMAC-STD32(REQUIRES SPECIAL CABLE)TO PC-XT (RS232C)E31E41 2MAX2321J4TB1 4.25 in. (107 mm.)D10 J3FOR RS-422 INSTALL U1, RP1, RP2, RP3, REMOVE U2 FOR RS-232 INSTALL U2, REMOVE U1, RP1, RP2, & RP3158 PMAC Memory Mapping23 1 15 6X-Memory8702 31 5 61Y-Memory870$0 00 0 $0 0F F $0 10 0 $1 7F F $1 80 0Internal DSP MemoryFixed-Use Calculation RegistersUser Buffer Storage SpaceExternal Static RAM (Battery Backed)$9 F FF $B C 00 $B F FF $C 0 00 $C 0 3F $D 0 00 $D F F F $E 00 0User-Written Servo StorageM-Variable DefinitionsDSP-Gate Registers Dual-Ported RAM VME bus registersVME Setup RegistersMailbox Registers$F 0 00I/O Registers159$F F F F PMAC Dual-Ported RAM 内存图Host Address Offset 0x000 0x8 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$D1B4Pointers to Variable Size Buffers Room for Variable-Size Buffers Data Gathering Background Variable Data Binary Rotary Program$D1FA $D2000x3FFCOpen Use Space$DFFF160 PCOMM Dual Ported RAM 特性支持功能Control PanelServo Time Fixed BufferBackground Fixed BufferDPR FeaturesVariable BackgroundASCII I/OBinary Rotary Buffer161 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 16-bit Yes No No 32-bit No Yes YesYesNoACC-9WNNo Yes YesYes No NoACC-9DAACC-33W ACC-33WNPMAC Executive for DOSPMAC NC for WindowsPMAC NC for Windows 95,98, or NTNoYes162 新的PMAC 软件PMAC Panel - VI’s for LABViewPMAC 连通性 - OPC Server for different field busse ControlNet, DH+, DeviceNet, Ethernet163 PLC编程PMAC卡除了运行运动程序,还可以运行 PLC程序. PMAC PLC 程序使能 PMAC卡执行一个硬件的PLC任务, 并且独立于运动程序 学习什么: 如何写一个PMAC卡的PLC程序 如何运行PMAC 的PLC 程序 如何使用 PMAC PLC 程序164 PMAC PLC 编程* 象许多硬件 PLC一样执行许多任务 * 通过计算重复循环并且快速 and rapidly regardless of status of motion programs PLCs 用于: 监测输入点 设定输出点 改变增益 监测卡的状态 指令动作 发送信息165 PMAC PLC 类型前台PLC (PLC0 or PLCC0)执行与伺服中断 扫描速率由 I8控制 对于时间临界的任务 C 尽可能的短!!后台 PLC (PLC1-31 or PLCC1-31)在伺服周期之间运行 重复速率是由: 伺服频率 电机的轴数 运动程序的计算 PLC 程序的长度和复杂程度166 PLC & PLCC 区别PLCC’s 编译的 PLC’sFaster Execution from: 消除解释时间 具有整形计算的能力 浮点操作在编译的 PLC程序要快 2到 3 倍 整形操作 (包括布尔型) 要快 20到 30 倍167 后台 PLC/PLCC 执行示例Uncompiled PLC1, 2, 3 Compiled PLCC1, 2, 3, 4 Execution order: PLC1 PLCC1, 2, 3, 4 PLC2 PLCC1, 2, 3, 4 PLC3 PLCC1, 2, 3, 4 PLC0 and PLCC0 are at a higher priority level and can interrupt any of the background PLC's168 PLC 编程控制I5 = 0 无PLC程序被使能 = 1 前台PLC’s使能 后台PLC’s不使能 = 2 前台PLC’s 不使能 后台PLC’s 使能 = 3 所有 PLC’s 和 PLCC’s 使能 所有存在的PLC’s在上电和复位时由 I5变量决定169 PLC 编程控制 (续.)在线指令, 运动程序和PLC程序表达式 ENABLE PLC n DISABLE PLC n 控制程序可以是独立的或成组的&CONTROL-D& 禁能 PLC 程序 OPEN PLC n禁能 PLC n CLOSE 不使能 PLC n170 PMAC PLC程序表达式1. 条件表达式 (可嵌套) IF({condition}) WHILE({condition}) AND({condition}) OR({condition}) where {condition}={expression}{comparitor}{expression} [AND/OR{expression}{comparitor}{expression}...] 2. 逻辑控制表达式 ELSE ENDIF ENDWHILE 3. 动作表达式 {variable} = {expression} COMMAND “{on-line command}” SEND “{message}” DISPLAY “{message}”171 PLC 延时计时器既然 DWELL and DELAY 指令可用于运动程序, PMAC 定时器寄存 器可用于PLC编程的延时使用 4个 PMAC 内存地址可用: X:$,s Y:$,s X:$,s Y:$,s例: 如果希望在 PLC程序中实现1s延时 M70-&X:$,s open plc 1 clear . m70=(8/(I10) while (m70&0) endwhile . close计时器寄存单位是伺服周期. 每个伺服周期寄存器连续递减.172 PLC 小测验? Name 3 types of PLC programs.? What determines if a PLC program will run or not?? How do you make PLC programs 2,3, and 10 runautomatically at power up or reset?? How do you know if a certain command can be usedin a PLC program?? How do you make your Y-axis move from a PLC program?173 PLC 计数器延时Start Read Other PLC'sVariable = Initial ValueWhile Variable & LimitVariable=Variable +1 Perform Desired actionsPerform Desired ActionsEnd174 PLC 计时器延时StartTimer Register = Delay TimeRead Other PLC'sWhile Timer Register&0Perform Desired actionsPerform Desired ActionsEnd175 PLC I/O 结构StartIF Condition= True and Latch=FalseIF Condition= False and Latch != FalseLatch = TrueLatch = FalsePerform desired actionsPerform desired actionsEnd176 ONE-TIME 读/写 PLC I/O 状态Start in_mirror = input_wordin_mirror = old_in_mirrorNoye sold_in_mirror = in_mirrorProcess Inputs Build Output Word Perform Desired Actionsoutput_word = out_mirrorEND177 课外作业 #0Write a PLC that increments a P-variable. Use a while loop so that this program code can be used as a delay loop.Set I5=0 and Save to PMAC.178 课外作业 #1编写一个 PLC程序打开和关闭一个机床输出.179 课外作业 #2编写一个 PLC程序使用计时器功能打开和关闭一个指示 灯.使用向下递减的计时器180 课外作业 #3编写一个PLC 根据按下的不同按钮打开各种指示灯181 课外作业 #4编写一个 PLC使电机手动正转和反转运动. 另外, 无论何时电机运动,PLC可以发送SEND “” s 指令指示 jogging的运动方向.182 课外作业 #5编写一个PLC程序,读入开关1的状态,指令 HOME 运动 . 使用 SEND “”表达式通过 PLC 告诉何时回零开始何时回 零完成.183 课外作业 #6使用一次读写 PLC程序结构写一个按下按钮使电机Jog 正转和反转运动。无论何时 JOG 的PLC程序可以使用 SEND”” 表达式指 示JOG的运动方向. 可以JOG负向时打开输出点1,JOG 正向时打开输出点8。184 Final ExamYour boss wants you to program his PMAC X, Y plotter to draw the following shape. The plotter he has is fragile so you cannot move the tool tip faster that 1 inch per second. Both of the plotter motors have encoders with 500 pulses per revolution and leadscrews that give 1 inch per revolution.10 inches10 inchesHe wants the shape to be drawn whenever he pushes a button on his desk. Furthermore, he wants a light to be on while the shape is being drawn and wants the light to be 185 otherwise off. PRINT OUTS2 per page (1-9), (12-14), (17-20), (23-151), (154-187) 1 per page 10-11, 15-16, 21-22, 152,153186
PMAC培训教程中文版―汇集和整理大量word文档,专业文献,应用文书,考试资料,教学教材,办公文档,教程攻略,文档搜索下载下载,拥有海量中文文档库,关注高价值的实用信息,我们一直在努力,争取提供更多下载资源。}

我要回帖

更多关于 immediately 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信