ImageVerifierCode 换一换
格式:DOCX , 页数:12 ,大小:200.98KB ,
资源ID:2417867      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/2417867.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(PMAC training note.docx)为本站会员(b****1)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

PMAC training note.docx

1、PMAC training notePMAC 变量及其功能1. I-变量 (Non-Turbo 1024, Turbo 8192) 初始化和设置参数 有固定的定义 有一部分影响整个卡 有一部分只针对电机 有一部分只针对坐标系 有一部分只针对编码器I-变量类型 开关型 数值型 整型数 浮点数 地址型2. P-变量 (Non-Turbo 1024, Turbo 8192) 通用用户变量 48-bit 浮点数 全局变量P-变量:是用户在进行PMAC编程计算时通用的全局变量 48-bit 浮点数 1024 个从 P0 到 P1023用于: 1.计算 P100=P101*(sin(45) 2. 软件触发

2、 IF( M1!= 1 AND P10 = 0)3. Q-变量 (Non-Turbo 1024, Turbo 8192) 通用用户变量 48-bit 浮点数 座标系变量Q-变量是用户在进行PMAC编程计算时坐标系内部通用的变量 多坐标系时可以用 Q-变量来进行管理Q变量在不同坐标系中的物理地址是不一样的.可以用同一个Q变量访问不同的物理内存地址&1 Q0 访问地址 $1400&2 Q0 访问地址 $1600&7 Q0 访问地址 $1580&8 Q0 访问地址 $1780假设我们有8个坐标系分别运行8个运动程序, 所有的程序都可以用同一个Q变量 Q0 to Q127 而没有冗余因此不会有内存冲突

3、 我们也可以用不同的Q变量来访问相同的物理内存地址&1 Q0 访问地址 $1400&2 Q512 访问地址 $1400&7 Q640 访问地址 $1400&8 Q128 访问地址 $14004. M-变量 (Non-Turbo 1024, Turbo 8192) 提供客户有权使用内存和 I/O 用户定义地址, 偏移量, 宽度M-变量用于访问 PMAC 内存 和 I/O 点的地址指针M-变量没有预先定义. 用户必须自己定义,例如: M9-Y:$FFC2,8,8 ;JOPTO端口 输出一旦定义以后, M-变量就可以进行置位,计算,判别 M9-Y:$FFC2,8,8X: 1 to 24 bits X

4、-memory 固定点Y: 1 to 24 bits Y-memory 固定点D: 48 bits X- and Y-memory 固定点L: 48 bits X- and Y-memory 浮点DP: 32 bits (X and Y 低16位) 固定点 (使用DPRAM时)F: 32 bits (X and Y 低16位) 浮点 (使用DPRAM时)X: 地址, 偏移量, 宽度, 格式Y: 地址, 偏移量, 宽度, 格式偏移量 起始位宽度 缺省为 1; 可以是 1, 4, 8, 12, 16, 20,or 24 位宽 格式 缺省为 U (无符号); 可以是S(有符号 )PMAC1 内存地址

5、 Y :$FFC2 指向 JOPTO port: 8 inputs and 8 outputs在PMAC软件手册中推荐详细的M变量定义 M0-x:$0000,0,24 ;Point to Servo Clock M1-Y:$FFC2,8,1 ;Point to Machine Output 1 M9-Y:$FFC2,8,8 ;Point to Machine Output 1-8 M102-Y:$C003,8,16,s ;Point to DAC 1 output M197-X:$0806,0,24,s ;Point to Feedrate Override M120-Y:$C000,20,1

6、 ;Point to Home Flag Axis 1 M172-L:$082B ;Point to #1 Variable Jog M1000-* ;Self Referenced (pointing to the memory ; location of itself)M-变量使用M1=1 ;Turn on Machine Output 1M9=45 ;Turn on Machine Outputs 1,3,4,6 and turn off Machine Outputs 2,5,7,8 ;45=00101101 binaryPMAC PLC ProgramsWhat is a PLC A

7、 PMAC PLC program is a general-purpose program that runs in PMAC that can run either in background time (for PLC and PLCC) or foreground time (PLC0 and PLCC0) Scans through as fast as processor speed allows before the next servo interrupt Ideal for any task that is asynchronous to motion program seq

8、uences and for jogging and homing routines Some common uses for PLC programs:Monitoring inputs, setting outputsChanging gainsMonitoring card statusCommanding actionsSending messagesJogging motorsConfiguring hardwareStarting or stopping motion programsDifferent Types of PLCsBackground PLCs: PLC (numb

9、ered 1-31, 31 total available):Uncompiled; i.e., interpreted by PMACSlower than PLCC, but can be uploaded easily from PMACPMAC scans completely to the end of one PLC once each background cycle, or if the PLC is in a While loop presently, scans to the end of the loop once each background cycle PLCC (

10、numbered 1-31, 31 total available):Compiled; more efficient and flexible than uncompiled PLCsCan operate 10-30x faster than PLCs when programmed properlyPMAC scans through all background PLCCs (1-31) each background cycleForeground PLCs: PLC0 and PLCC0Special priority PLCs will execute top to bottom

11、 at the end of every Real Time Interrupt (RTI)Execute every real-time interrupt as long as the tasks from the previous RTI have been completedKeep these short to prevent starving background of time or tripping Watchdog timerWhat Makes a PLCC So Much Faster The faster execution of the compiled PLCs c

12、omes from two factors: From the elimination of interpretation timeFrom the capability of the compiled PLC programs to execute integer arithmeticSee “Optimization for Speed” on page 380 of the Turbo PMAC User Manual Floating-point operations in compiled PLC programs run two to three times faster than

13、 in interpreted PLC programs; integer (including Boolean) operations run 20 to 30 times faster in compiled form Can use L-Variables for fast integer arithmetic just replace your M-Variable definitions using L-Variables L- and F-Variables are pointers linked at compile time, rather than at runtime li

14、ke M-Variables areBackground PLC/PLCC Execution OrderExecution order:PLC0 and PLCC0 are at a higher priority level and can interrupt any of the background PLCsEvery PLCC scans through between each PLC scanUncompiled: PLC1, 2, 331Compiled: PLCC1, 2, 3, 431Writing and Downloading a PLC All PLCs must h

15、ave an opening statement and a closing statement, e.g.:Open PLC 1 Clear/ PLC ContentsCloseOpen PLCC 1 Clear/ PLCC ContentsClose Once written in the Editor window (from PeWin32Pro2 click FileNew File), click the “Download” button to download to PMACEnabling and Disabling a PLC Set I5 to permit the PLC types you plan to use:I5 SettingSetting Meaning0Foreground PLCs off; background PLCs off1Foreground

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1