1、南区GOTC(全球OEM技术顾问)李金贤 139 2889 2963 ,Motion Basic Training 伺服编程(1)-基础课,伺服运动基础编程,10 Steps to Developing ControlLogix Motion: 伺服运动基础编程包含以下10个步骤Create new program创建一个新程序 Enable time synchronization使能时间同步 Create motion group tag创建运动组标签 Create Axis tag创建轴标签 Add motion module添加伺服驱动器 Assign axes to motion m
2、odule分配轴到伺服驱动器 Configure motion group配置运动组属性 Configure axes配置轴的属性 Perform hookup test and tune axes执行测试和整定轴 Write logic to perform motion写执行运动的逻辑程序,2,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,(Confidential For Internal Use Only) Copyright 2011
3、 Rockwell Automation, Inc. All rights reserved.,3,1.Creating a Project 1.创建一个项目程序,1. Enable Time Synchronization使能时间同步,2. Creating the Motion Group创建运动组,3. Configure the Motion Group配置运动组,4. Motion Control Tags运动控制标签,Creating a Project Time Master,In all ControlLogix chassis (single and multiple con
4、trollers), one of the controllers needs to be set as the reference clock. This will synchronise all the motion modules, other Logix controllers and I/O cards in the chassis to a single master clock. The process of setting up a controller to be the reference clock is called “Making this controller th
5、e master”. 在所有的ControlLogix机架上(单个或多个控制器),控制器中的其中一个需要设定参考时钟,这将使所有的运动模块同步,其他机架上的Logix控制器和I/O卡使用单独的主时钟,设定控制器参考时钟的过程被称为“确定主控制” Note: There can only be one master controller per chassis. 注意:每个机架上只能有一个主控制器,Techno Fact : If you have more than one controller in the chassis, choose one of the controllers to
6、be the time master. You cant have more than one time master for the chassis. In a ControlLogix motion application, you must define a controller as the time master. 技术事实:如果机架上你有超过1个控制器的,选择其中一个为主时钟,在机架上你不能有超过1个的主时钟,在ControlLogix运动应用中,你必须定义一个控制器作主时钟,4,(Confidential For Internal Use Only) Copyright 2011
7、 Rockwell Automation, Inc. All rights reserved.,Creating a Project CST & PTP,Coordinated System Time (CST) Master 协调系统主时钟 RSLogix5000 v17 and earlier. RSLogix5000 v17 版本及之前 When there is a CST master in the chassis, all of the motion modules, I/O modules, and controllers in that chassis can keep the
8、ir CST clocks synchronized. 当机架上有协调系统主时钟时,所有机架上的的运动模块,I/O模块,和控制器能够保持时钟同步。 Precision Time Protocol (PTP) Grandmaster Clock精度时间协议(PTP) RSLogix5000 v18 and later RSLogix5000 v18 版本及以后版本 The Grandmaster Clock is used to synchronize motion modules, I/O modules, communication modules, and controllers with
9、in a ControlLogix chassis. 顶级时钟被用在ControlLogix机架上的运动模块,I/O模块,通讯模块,和控制器 Starting in v17, there is an option to set the CST Master/Enable Time Synchronization in the download dialog if it is not already set 从V17版本开始,如果没有被设定,在下载对话框里可以选择设定CST主/使能时间同步 Time Synchronization is required for motion to operat
10、e properly! 运动的正常操作必须要时间同步,5,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Setting the CST Master, v17 and earlier,For RSLogix5000 v17 and earlier, the following procedure is used to set the Coordinated System Time Master: RSLog
11、ix5000 v17 和早期版本,设定协调系统主时钟如下步骤 In the Controller Organizer window, right click on the controller folder and select Properties OR click on the controller icon在控制器组织窗口中,点控制器文件夹右键选择“属性”或者点击控制器符号,Click here点这里,Or right-click and select Properties 或者右键选择属性,6,(Confidential For Internal Use Only) Copyright
12、 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Setting the CST Master, v17 and earlier,Setting the master coordinated system time:设定主协调系统时间 Click on the Date/Time tab of the Controller Properties dialog box.点击控制器属性对话箱的“日期/时间”标签,Click here,7,(Confidential For Internal Use Onl
13、y) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Setting the CST Master, v17 and earlier,Setting the Master Coordinated System Time设定主协调系统时间After selecting the Master controller, click OK to complete the operation 在设定主控制器后,点击OK完成操作,Techno Fact : A motion module can
14、 be owned by a ControlLogix controller even though the controller is not the CST master. Since another controller in the chassis is the CST master (must have a master in a motion application) you will receive a warning while downloading and during program verification regarding the CST master. 技术事实:
15、一个运动模块可以拥有一个ControlLogix 控制器,即使控制器没有主协调时间。因为机架其他控制器是CST主(在运动引用中必须有一个主),当下载和程序核实CST主时你将收到警告,Click,8,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Enable Time Synchronization, v18 and later,Enable Time Synchronization使能时间同步Click O
16、K to complete the operation点击“OK”完成操作,Click,9,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,10,Creating a Project Creating the Motion Group,1. Enable Time Synchronization使能时间同步,2. Creating the Motion Group创建运动组,3. Configure the Motion Group配置运动组,4
17、. Motion Control Tags运动控制标签,Creating a Project Creating a Motion Group,Creating a Motion Group:创建运动组 All used axes must be part of the motion group所有轴必须是运动组的一部分 Only one motion group is allowed per ControlLogix processorControlLogix处理器只能运行一个运动组 A Motion Group is a collection of axes that can be cont
18、rolled by a single group instruction. There are five motion group instructions. 一个运动组是一个轴的集合,能被单独的组指令控制,这里有5个运动组指令 There are multiple ways to create a new motion group. 这里有多种方法创建一个新运动组,TechnoFact : Only one motion group tag is allowed per ControlLogix controller. All used axes must be assigned to a
19、motion group. 技术要点:只有一个运动组标签允许在每个ControlLogix控制器中,所有的轴必须被分配至运动组中。,11,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Creating a Motion Group,Right-click on the Motion Groups folder in the Controller Organizer 在控制器组织中Motion Groups文
20、件夹上右键点击 Select New Motion Group 选择“新运动组” Give the motion group a name 给运动组取个名字,12,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,13,Creating a Projec
21、t Configure the Motion Group,1. Enable Time Synchronization使能时间同步,2. Creating the Motion Group创建运动组,3. Configure the Motion Group配置运动组,4. Motion Control Tags运动控制标签,Creating a Project Configure the Motion Group,Configuring Motion Group Properties:配置运动组属性 Right-click on the Motion Group folder 右键点击运动组
22、文件夹 Select Properties 选择“属性”,Select Properties,14,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Configure the Motion Group,Configuring Motion Group Properties:配置运动组属性 Axis Assignment Tab轴分配标签 Add or Remove axes from the Motion G
23、roup as necessary 根据需要从运动组中添加或移除轴,15,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Configure the Motion Group,Configuring Motion Group Properties: 配置运动组属性 Attribute Tab属性标签 Set the Coarse Update Period 设置大致更新周期 Enable or Disable
24、 Auto Tag Update, as desired根据需要激活或禁止自动更新标签 Enabled by default, this is OK for the majority of applications默认是激活,对大多数应用是OK的 View Motion Planner Scan Times 查看运动规划扫描时间(read Only) Scan time must be less than the CUP扫描时间必须小于CUP,16,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation,
25、Inc. All rights reserved.,Creating a Project Coarse Update Period,Coarse Update Period伺服更新周期 Selects the periodic rate at which the motion planner executes to compute the servo commanded position and velocity information to be sent to the analog motion modules, SERCOS drives, or CIP drives when exec
26、uting motion instructions. 选择运动规划执行的周期,执行运动指令时,计算伺服命令被发送到模拟运动模块,SERCOS的驱动器,或CIP驱动器的位置和速度信息 If the coarse update period is too small, the controller may not have time to execute non-motion related ladder logic. 如果伺服更新周期太小,控制器可能没时间执行运动和梯形逻辑的关联 The number of axes in the project sets the lower limit on
27、the coarse update period. 项目中轴的数量的设定低于更新周期限制,17,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Creating a Project Coarse Update Period,Coarse Update Period伺服更新周期 Range of values: 0.5msec 32msec 值范围: 0.5毫秒 32毫秒 General “rule of thumb:” 1.0msec per a
28、xis as a starting point 常用的“经验法”:1毫秒每轴为出发点 Less than 11 axes Set the coarse update period to 10 ms. 11 axes or more Set the coarse update period to 1 ms per axis. Minimum recommendations based on Logix processor: Logix处理器为基础的最低建议 1756-L55: 1.5msec per axis (only available through v16) 1.5毫秒每轴 1756-L
29、6x: 0.25msec per axis 0.25毫秒每轴 1768-L4x: 0.25msec per axis 0.25毫秒每轴 1756-L7x: 0.125msec per axis 0.125毫秒每轴 Once configured, the motion planner scan times should be monitored with the application running and modified as needed一旦配置好后,运动规划的扫描时间应与正在运行的应用程序进行监测,并根据需要进行修改 If the cycle time is 2 ms, set th
30、e coarse update period to 8 ms, 10 ms, 12 ms, and so on.,18,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,19,Creating a Project Motion Control Tags,
31、1. Enable Time Synchronization使能时间同步,2. Creating the Motion Group创建运动组,3. Configure the Motion Group配置运动组,4. Motion Control Tags运动控制标签,Creating a Project Motion Control Tags,A Motion Control tag must be defined for each motion instruction used 一个运动控制标签必须定义每一个使用的运动指令 Data-type: MOTION_INSTRUCTION数据类型
32、: MOTION_INSTRUCTION Tag stores status information about the instruction 标签存储关于指令的状态信息 Each motion instruction must use a unique control tag 每一个运动指令必须使用唯一的控制标签Examples,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,20,Motion Modules & Axis Tags Axi
33、s Tags,Motion Axis Types:运动轴类型: Axis_Servo: a physical axis which is connected to an Analog motion module (1756-M02AE, 1756-M02AS, or 1756-HYD02). This axis can consist of a motor and feedback device (Servo) or simply a feedback device (Feedback Only). 连接到拟运动模块的一个物理轴( 1756-M02AE, 1756-M02AS, or 1756
34、-HYD02 )。这些轴能有电机和反馈设备或仅仅反馈设备(只反馈) Axis_Servo_Drive: a physical axis which is connected to a SERCOS Drive. This axis can consist of a motor and feedback device (Servo) or simply a feedback device (Feedback Only). 轴伺服驱动:连接到SERCOS驱动的物理轴,这些轴能有电机和反馈装置或仅仅反馈设备(只反馈) Axis_CIP_Drive: a physical axis which is
35、connected to a CIP Drive. This axis can consist of a motor and feedback device (Servo) or simply a feedback device (Feedback Only). 轴CIP驱动:连接到CIP驱动的物理轴。这个轴能有电机和反馈设备或仅仅反馈设备(只反馈) Axis_Virtual: a theoretical (imaginary) axis which is exists in the ControlLogix processor. There is no hardware associated
36、 with a virtual axis. 虚轴:一个存在于ControlLogix处理器中的理想轴,没有硬件关联一个虚轴,21,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Motion Modules & Axis Tags Axis Tags,Motion Axis Types:运动轴类型 Axis_Consumed: a physical or virtual axis which is owned by another Control
37、Logix processor within the same rack. One ControlLogix processor produces the axis information to be consumed by other ControlLogix processors. Produced and consumed axis are used to share axis information between multiple ControlLogix processors 轴消费者:一个物理或虚拟轴被其他在同一个机架里的ControlLogix处理器拥有。一个ControlLo
38、gix处理器产生轴信息被其他处理器所消费。轴的生产者和消费者被用来在多ControlLogix处理器及之间共享轴信息 Axis_Generic: a generic axis object represents an axis with full motion planner functionality, but not associated with any device that requires motion configuration support (e.g., DriveLogix or 1756-DM).轴_通用: 一个通用的轴对象代表一个完整的运动规划功能轴,但是不关联任何需要
39、运动配置支持的设备 Axis_Generic_Drive: Third party SERCOS drive; i.e. Indramat, Bosch, etc. 轴_通用_驱动:三方SERCOS驱动;如, Indramat,博士等等,22,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,Axis Properties CIP Axis Dialog,CIP Axis CIP 轴 Use this dialog to configure the
40、 axis properties for an axis of data type AXIS_CIP_DRIVE: 使用这个对话框配置数据类型是AXIS_CIP_DRIVE的轴属性CIP axes have the following “Categories”:CIP轴如下“类别” General常规 Motor (Sub Model)电机(替代模式) Motor Feedback电机反馈 Scaling 比例 Hookup Tests连接测试 Polarity极性 Autotune自整定 Load (Subs Backlash Compliance, Friction)负载(替代间隙,统一,
41、对立) Position Loop位置闭环 Velocity Loop速度闭环 Acceleration Loop加速闭环 Torque/Current Loop力矩/电流闭环 Planner规划 Homing回零 Actions激活 Drive Parameters驱动参数 Status状态 Faults and Alarms故障和报警 Tag标签,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All rights reserved.,23,CIP Axis,Axis Propert
42、ies CIP Axis Dialog,CIP Axis Parameter Page CIP 轴参数页面 In addition to the parameters that are accessible on the Category page, the parameters page shows all drive parameters within the group:除了上页中得到的参数外,在组里参数页面显示所有的驱动参数,(Confidential For Internal Use Only) Copyright 2011 Rockwell Automation, Inc. All
43、 rights reserved.,24,CIP Axis,Virtual Axes What you will learn:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,1. What is a Virtual Axis什么是虚轴,2. Configuring a Virtual Axis配置虚轴,3. Using a Virtual Axis使用虚轴,(Confidential For Internal Use Only) Copyrig
44、ht 2010 Rockwell Automation, Inc. All rights reserved.,An imaginary axis which resides in the controller.在控制器中一个虚构的轴 Provides command position update capability without requiring a physical axis. 提供命令位置更新能力不依赖于物理轴 Actual position tracks the command exactly.命令没有实际位置轨迹 No limits with respect to veloci
45、ty, acceleration, or deceleration.没有速度,加速度,或减速度限制 Virtual axes do not require tuning or hookup tests.虚轴不要求自整定或hookup测试 Virtual axes do not fault.虚轴没有错误,Virtual Axes What is a Virtual Axis:,26,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automa
46、tion, Inc. All rights reserved.,1. What is a Virtual Axis什么是虚轴,2. Configuring a Virtual Axis配置虚轴,3. Using a Virtual Axis使用虚轴,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual
47、Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual Axis:,(Confidential
48、For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Onl
49、y) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Configuring a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,Virtual Axes Using a Virtual Axis:,(Confidential For Internal Use Only) Copyright 2010 Rockwell Automation, Inc. All rights reserved.,1. What is a Virtual Axis什么是虚轴,2. Configuring a Virtual Axis配置虚轴,