




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Welcome!21 July, 2006Trainer: Torsten He, Markus Toeberg, Markus Warnecke, Stefan WitteProduct Training: 产品培训产品培训L-force Servo Drives 9400 L-force 9400 伺服驱动伺服驱动L-force | Engineer L-force 9400 工程软件工程软件Free applications 自由应用自由应用欢迎参加学习班!欢迎参加学习班!ServoDrives 9400Own applications in the FB editorProcessin
2、g portsExternal bus nodesSeveral tasks2Create your own application 建立应用项目建立应用项目1.Select “Empty application” or a technology application 选择“空应用”或技术应用2.Activate the FB editor 激活FB编辑器3.Just as you L-ike 正如L-ike -insert blocks 插入方块-insert user codes 插入用户代码-insert variables 插入变量-insert your own ports 插入端
3、口-create connections 建立连接-use several tasks 应用若干任务 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks3Ports 端口端口Port = Group of variables which are to be transmitted via a bus system at the same time 端口一组变量通过总线系统在同一时间被发送“Simple” variable type: “
4、单”变量类型exactly one variable 正确地讲,只有一个变量“Array” variable type:” 阵列“类变量several variables of one variable type 同一变量类型的若干个变量applied in simple binary systems (e. g. terminals) 应用在简单的二进制系统中(例如,端子条)“Record” variable type:”记录“类变量several variables of different data types 不同数据类型的若干个变量common in familiar applica
5、tions with CAN 通常带CAN的熟悉应用available in the technology applications 技术应用中的变量 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks4How does the Engineer create the PDOs怎样用工程软件建立多个怎样用工程软件建立多个PDOThe compiling process can automatically 编译过程能自动完成activat
6、e PDOs in a sufficient number 足够数量的有效PDO for CAN: max. 4 transmit PDOs and 4 receipt PDOs per interface对CAN:某个接口最多有4个发送PDO和4个接收PDOcombine the ports to PDOs 组合端口到PDO for CAN: max. 8 bytes per PDO 对CAN:每个PDO最大8字节Ports with “automatic interface” must be interconnected to create PDOs为建立多个PDO,带“自动接口”的端口必
7、须相互连接PDOs with “automatic allocation” only communicate when interconnected ports want it 带“自动定位”的PDOs只有在相互连接的端口希望与其通信时才能通信PDO 1Port 1 PDO 2Port 2Port 3 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks5PDO communication with external bus nodesP
8、DO与外部总线节点的通信与外部总线节点的通信“external” = outside the Engineer project.“外部”工程项目外的部分 。 Currently, the following cannot be displayed in the Engineer: 当前,下面的装置不能在工程软件中显示。Lenze devices 8200, 9300, HMIs, 伦茨装置 8200,9300,HMIsMaster control 主控制器Devices of third-party manufacturers 第三家制造商的装置not incl. in the project
9、 no interconnected ports no PDO? 不包括在项目中无相互连接端口无PDO?How to project the PDO communication of a 9400 with external bus nodes: 怎样使9400项目PDO与外部总线节点通信Insert dummy device, interconnect ports 插入伪器件,相互连接端口Define PDO manually 手动定义PDOParameters cannot be set via codes: Mapping is missing 参数不能通过代码设置:映象丢失ready
10、next back ServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks6Variable mapping 变量映像变量映像 Why is that necessary? 为什么这是必要的为什么这是必要的requires explicitly assignment of memory addresses of the variables to PDO contents. 要求明要求明确地把变量的存储器地址分配确地把变量的存储器地址分配成为成为PDO的内容。
11、的内容。Variables that can be freely defined in the program 在程序中变量可以自由定义Free PDOs 自由PDO next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks7Defining port and PDO manually 手动定义端口和手动定义端口和PDO1.Create PDO 建立PDOa)Open the “Process data objects” tab in the
12、 project tree “CAN on board” 在项目的树形结构的“CAN on board”中打开“过程数据目标”(PDO)标签b)Create new PDO 建立新的PDOc)Set transmission parameters to manual allocation 设置发送参数到手动位置ready next back ServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks8Defining port and PDO manually手
13、动定义端口和手动定义端口和PDOready next back 2.Create port 建立端口a)Variable type with desired contents 变量类型与希望的内容一致b)Select interface 选择接口c)Select PDO 选择PDO3.Update project 更新项目ServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks9Port and external PDO must match端口与外部端口与外
14、部PDO必须匹配必须匹配Port definition and PDO data must have the same length: 端口定义和PDO数据必须有相同的长度:Sum of the element variables Bit = DLC Byte. 变量位单元的总和DLC字节。Order of the variables in the port corresponds to the one in the PDO 在端口中变量的次序与在PDO中的次序相对应Source and target port of a port interconnection must have the s
15、ame length.端口连接的“源端口”和“目的端口”必须具有相同的长度。PCAN Explorer next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks10Good to know Engineering information and codes需要熟知需要熟知工程软件的信息和代码工程软件的信息和代码Not all information in the Engineer can be directly displayed as co
16、des in the device. 并非在工程软件中的所有信息都能直接用装置的代码来显示 In general, the following applies: 通常以下规则是适用的Codes (online parameters) are marked with a “C”. 用“C”字母作为代码的标记(在线参数)Other parameters without a “C” 不带“C”字母的其它参数 are not directly represented on a device. The values set are transmittedvia “Update devices”. 不能在
17、装置中直接表示。其数值的设定要通过发送“更新装置数据”来完成。 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks11HMICAN cable in the Forum laboratory在讨论会实验室中的在讨论会实验室中的CAN电缆电缆 We create a long bus (re-arranging, resistors off) 我们建立一长总线(重新安排,终端电阻断开)OUTINPCOUTINOFFOUTINONSub-D
18、-9,maleOFFONready next back ServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks12Exercise 1: An own application with PDO练习练习 1: PDO 应用应用Scenario: The control programmer has reported:概要:控制程序员提出以下报告 : The control transmits the following CAN-PDO: 控制发送以下CAN-P
19、DO COB-ID 401 (decimal), transmitted every 100 ms, length 8 bytes,COB-ID 401(十进制数),每隔100 ms发送,长度8个字节, Bit 0-15 = control word (Word) 控制字(字) Bit 16-31 = unused 不使用 Bit 32-63 = scaled speed setpoint (32bit DINT) 标定的速度设定值(32位双整型)1.Connect the CAN bus provided by the trainer to your controller. Set the
20、CAN node address according to the instructions of the trainer. 用培训人员提供的CAN总线连接你的控制器。根据培训人员的说明设置CAN的节点地址。2.Create an own minor application which follows the setpoint received. 建立一个应用子程序,使其能接收设定值。1.Select the “empty application ” 选择“空应用”2.Create a suitable port 建立合适的端口3.Create an FB interconnection an
21、d test it. 建立FB连接并测试它们。 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks13Solution: Own application with PDO (Solution example) 解:带解:带PDO的应用(解例题)的应用(解例题)Your port could be defined as follows:可以定义端口如下:Your FB interconnection could look as follo
22、ws:(The evaluation of the control word was not required explicitly)可以参考以下进行FB的相互连接(控制字的估算不要求十分精确) next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks14Tasks 任务任务Up to three tasks can be used in the FB editor 在FB编辑器中最多可以使用3个任务ApplicationTask (fast
23、est: cyclic with 1 or 2 ms) 应用任务(最快周期1或2 ms)UserTask (cyclic with 2, 4 or 8 ms) 用户任务(周期2,4或8 ms)IdleTask 空闲任务System blocks only in Application Task (Hardware interfaces, basic drive functions) 只在应用任务中的系统方块 (硬件接口,基本驱动功能) For value transfer: Cross-task variables 用于值的转移:交错任务变量 next backServoDrives 9400
24、Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks15Task runtimes 任务实时运行任务实时运行Codes for runtime measurement 实时测量代码Meaning (example): 含义(举例)T1 = 1 ms cyclic 1ms 循环T2 = 4 ms cyclic 4ms 循环T3 = idling 空闲 next backServoDrives 9400Own applications in the FB editorProcessing p
25、ortsExternal bus nodesSeveral tasks16Exercise 2: Several tasks 练习练习 2: 多个任务多个任务 Modify your application from the previous exercise: 从上述练习中修改你的应用Transmit the port to the User Task 发送端口到用户任务Extract bit 0 from the control word, transmit it to the Application Task and enable the Speed Follower 取出控制字的0位,
26、发送到应用任务以及使能速度跟随器Change the cycle times of the cyclic tasks 改变循环任务的循环时间Apply some arithmetic operations in the Idle Task 在空闲任务中应用某些算术运算Test the application and read the resulting task runtimes 实时测试应用项目以及读结果任务 next backServoDrives 9400Own applications in the FB editorProcessing portsExternal bus nodesSeveral tasks17Good to know in conclusion 熟知的结果熟知的结果Ports are part of the application. To change them, the FB editor must be enabled. 多个端口是应用端口。为改变它们,必须使能FB编辑器。Variables and codes are written at the end of the task. Thus, the new value is only available in the
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 掌握预算编制流程试题及答案
- 角的度量(二)(教学设计)-2024-2025学年四年级数学上册北师大版
- 推动传统村落空间形态传承办法
- 2024年育婴师应试指南试题及答案
- 新冠后物流变化试题及答案剖析
- 高效工作流程的构建与优化
- 2025年份二月智能织物CAD纤维排布技术员力学性能测试协议
- 毕业生备考2024特许分析师技巧分享试题及答案
- 证券行业智能化证券交易监管科技赋能方案
- 游戏产业游戏引擎技术研发与应用推广
- FZ/T 51004-2011纤维级聚己内酰胺切片
- 2023年江苏省中学生生物学竞赛(奥赛)初赛试题和答案
- 2020年(汽车行业)汽车行业英文缩写
- 舞蹈素质测试表
- DB15T 1417-2018 胶粉改性沥青及混合料设计与施工规范
- 基于核心素养导向的初中数学试题命制策略与实例课件
- 城市环境卫生工作物资消耗定额
- 学校卫生监督课件
- 物理人教版(2019)必修第二册5.2运动的合成与分解(共19张ppt)
- 中国航信离港系统讲义
- 6000m3内浮顶油罐设计
评论
0/150
提交评论