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 module分配轴到伺服驱动器 Configure motion group配置运动组属性 Configure axes配置轴的属性 Perform ho
2、okup test and tune axes执行测试和整定轴 Write logic to perform motion写执行运动的逻辑程序.1.Enable Time Synchronization使能时间同步使能时间同步2.Creating the Motion Group创建运动组创建运动组3.Configure the Motion Group配置运动组配置运动组4.Motion Control Tags运动控制标签运动控制标签.+In all ControlLogix chassis(single and multiple controllers),one of the contr
3、ollers 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 the master”.+在所有的ControlLogix机架上(
4、单个或多个控制器),控制器中的其中一个需要设定参考时钟,这将使所有的运动模块同步,其他机架上的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 be the time master.You cant have mor
5、e than one time master for the chassis.In a ControlLogix motion application,you must define a controller as the time master.技术事实:如果机架上你有超过1个控制器的,选择其中一个为主时钟,在机架上你不能有超过1个的主时钟,在ControlLogix运动应用中,你必须定义一个控制器作主时钟.+Coordinated System Time(CST)Master 协调系统主时钟 RSLogix5000 v17 and earlier.RSLogix5000 v17 版本及之前
6、 When there is a CST master in the chassis,all of the motion modules,I/O modules,and controllers in that chassis can keep their CST clocks synchronized.当机架上有协调系统主时钟时,所有机架上的的运动模块,I/O模块,和控制器能够保持时钟同步。+Precision Time Protocol(PTP)Grandmaster Clock精度时间协议(PTP)RSLogix5000 v18 and later RSLogix5000 v18 版本及以
7、后版本 The Grandmaster Clock is used to synchronize motion modules,I/O modules,communication modules,and controllers within 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 i
8、t is not already set+从V17版本开始,如果没有被设定,在下载对话框里可以选择设定CST主/使能时间同步+Time Synchronization is required for motion to operate properly!+运动的正常操作必须要时间同步.+For RSLogix5000 v17 and earlier,the following procedure is used to set the Coordinated System Time Master:RSLogix5000+v17 和早期版本,设定协调系统主时钟如下步骤 In the Control
9、ler 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或者右键选择属性.+Setting the master coordinated system time:设定主协调系统时间 Click on the Date/Time tab of the Controlle
10、r Properties dialog box.点击控制器属性对话箱的“日期/时间”标签Click here.+Setting the Master Coordinated System Time设定主协调系统时间 After selecting the Master controller,click OK to complete the operation 在设定主控制器后,点击OK完成操作Techno Fact:A motion module can be owned by a ControlLogix controller even though the controller is no
11、t 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.技术事实:一个运动模块可以拥有一个ControlLogix 控制器,即使控制器没有主协调时间。因为机架其他控制器是CST主(在运动引用中必须有一个主),当下载和
12、程序核实CST主时你将收到警告Click.+Enable Time Synchronization使能时间同步 Click OK to complete the operation点击“OK”完成操作Click.1.Enable Time Synchronization使能时间同步使能时间同步2.Creating the Motion Group创建运动组创建运动组3.Configure the Motion Group配置运动组配置运动组4.Motion Control Tags运动控制标签运动控制标签.Creating a Motion Group:创建运动组创建运动组All used a
13、xes must be part of the motion group所有轴必须是运动组的一部分Only one motion group is allowed per ControlLogix processor ControlLogix处理器只能运行一个运动组A Motion Group is a collection of axes that can be controlled by a single group instruction.There are five motion group instructions.一个运动组是一个轴的集合,能被单独的组指令控制,这里有5个运动组指令
14、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 motion group.技术要点:只有一个运动组标签允许在每个ControlLogix控制器中,所有的轴必须被分配至运动组中。.+Right-click on the Motion Groups folder in the Control
15、ler Organizer+在控制器组织中Motion Groups文件夹上右键点击+Select New Motion Group 选择“新运动组”+Give the motion group a name 给运动组取个名字.1.Enable Time Synchronization使能时间同步使能时间同步2.Creating the Motion Group创建运动组创建运动组3.Configure the Motion Group配置运动组配置运动组4.Motion Control Tags运动控制标签运动控制标签.Configuring Motion Group Properties:
16、配置运动组属性Right-click on the Motion Group folder右键点击运动组文件夹Select Properties选择“属性”Select Properties.Configuring Motion Group Properties:配置运动组属性+Axis Assignment Tab轴分配标签 Add or Remove axes from the Motion Group as necessary 根据需要从运动组中添加或移除轴.Configuring Motion Group Properties:配置运动组属性+Attribute Tab属性标签 Set
17、 the Coarse Update Period 设置大致更新周期 Enable or Disable 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.+Coarse Update Period伺服更新周期
18、 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 executing motion instructions.选择运动规划执行的周期,执行运动指令时,计算伺服命令被发送到模拟运动模块,SERCOS的驱动器,或CIP驱动器的位置和速度信息 If t
19、he 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 the coarse update period.项目中轴的数量的设定低于更新周期限制.+Coarse Update Period伺服更新周期 Range of values:0.5msec 3
20、2msec 值范围:0.5毫秒 32毫秒 General“rule of thumb:”1.0msec per axis 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
21、per axis(only available through v16)1.5毫秒每轴1756-L6x: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一旦配置好后,运动规划的扫描时间应与正在运行的应用程序进行监测,
22、并根据需要进行修改 If the cycle time is 2 ms,set the coarse update period to 8 ms,10 ms,12 ms,and so on.1.Enable Time Synchronization使能时间同步使能时间同步2.Creating the Motion Group创建运动组创建运动组3.Configure the Motion Group配置运动组配置运动组4.Motion Control Tags运动控制标签运动控制标签.+A Motion Control tag must be defined for each motion i
23、nstruction used+一个运动控制标签必须定义每一个使用的运动指令 Data-type:MOTION_INSTRUCTION数据类型:MOTION_INSTRUCTION Tag stores status information about the instruction 标签存储关于指令的状态信息+Each motion instruction must use a unique control tag+每一个运动指令必须使用唯一的控制标签+Examples.Motion Axis Types:运动轴类型:运动轴类型:Axis_Servo:a physical axis whic
24、h 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-HYD02)。这些轴能有电机和反馈设备或仅仅反馈设备(只反馈)Axis_Servo_Drive:a physical axis which is c
25、onnected 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 connected to a CIP Drive.This axis can consist of a motor and feedback device(Servo)o
26、r 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 with a virtual axis.虚轴:一个存在于ControlLogix处理器中的理想轴,没有硬件关联一个虚轴.Motion Axis Types:运动轴类型运动轴类型Axis_C
27、onsumed:a physical or virtual axis which is owned by another ControlLogix 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 ControlLogi
28、x processors轴消费者:一个物理或虚拟轴被其他在同一个机架里的ControlLogix处理器拥有。一个ControlLogix处理器产生轴信息被其他处理器所消费。轴的生产者和消费者被用来在多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.,D
29、riveLogix or 1756-DM).轴_通用:一个通用的轴对象代表一个完整的运动规划功能轴,但是不关联任何需要运动配置支持的设备Axis_Generic_Drive:Third party SERCOS drive;i.e.Indramat,Bosch,etc.轴_通用_驱动:三方SERCOS驱动;如,Indramat,博士等等.CIP Axis CIP 轴轴+Use this dialog to configure the axis properties for an axis of data type AXIS_CIP_DRIVE:+使用这个对话框配置数据类型是AXIS_CIP_D
30、RIVE的轴属性+CIP axes have the following“Categories”:CIP轴如下“类别”General常规Motor(Sub Model)电机(替代模式)Motor Feedback电机反馈Scaling 比例Hookup Tests连接测试Polarity极性Autotune自整定Load(Subs BacklashCompliance,Friction)负载(替代间隙,统一,对立)Position Loop位置闭环Velocity Loop速度闭环Acceleration Loop加速闭环Torque/Current Loop力矩/电流闭环Planner规划H
31、oming回零Actions激活Drive Parameters驱动参数Status状态Faults and Alarms故障和报警Tag标签CIP Axis.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:除了上页中得到的参数外,在组里参数页面显示所有的驱动参数CIP Axis.(Confident
32、ial 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)Copyright 2010 Rockwell Automation,Inc.All rights reserved.An imaginary axis w
33、hich 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 velocity,acceleration,or deceleration.没有速度,加没有
34、速度,加速度,或减速度限制速度,或减速度限制Virtual axes do not require tuning or hookup tests.虚轴不要求自整定或虚轴不要求自整定或hookup测试测试Virtual axes do not fault.虚轴没有错误虚轴没有错误26.(Confidential For Internal Use Only)Copyright 2010 Rockwell Automation,Inc.All rights reserved.1.What is a Virtual Axis什么是虚轴什么是虚轴2.Configuring a Virtual Axis配
35、置虚轴配置虚轴3.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配置虚轴配置虚轴3.Using a Virtual Axis使用虚轴使用虚轴.+Programming for a virtual axis is the same as for any physical ax
36、is.+设计一个虚轴是和物理轴一样的 Does not require MSO,MSF,or MAFR 不需要MSO,MSF或MAFR+A virtual axis counts toward the maximum axis count for your processor.+一个虚轴的数量占用处理器的轴数量+When using a virtual axis,you need to consider it when specifying the motion group update rate.当使用虚轴时,你需要考虑指定运动组更新率 As a starting point,a good
37、rule of thumb is 1 msec per virtual axis作为一个起点,一个好的经验法则是每虚拟轴1毫秒+When following a virtual axis(gear or cam)there is no difference in specifying“actual”or“command”for the Master Reference.+当一个虚拟轴(齿轮或凸轮)没有指定主参考“实际”或“命令”的区别.1.Motion Instruction Overview 运动指令概述运动指令概述2.Motion Instruction Errors 运动指令错误运动指令
38、错误3.Motion State Instructions 运动状态指令运动状态指令4.Fault Handling Instructions 故障处理指令故障处理指令.+As of RSLogix5000 v16,there are 40 motion instructions+从RSLogix5000 v16起,总共有40个运动指令 Only 36 motion instructions available for CompactLogix仅36个运动指令对CompactLogix有效 1 new instruction in v19 is for the PowerFlex755 on
39、CIP only 在v19 中有1个新指令仅对CIP上的PowerFlex755 有效+The motion instruction set consists of six groups of instructions:运动指令集包含6组指令1)Motion state instructions运动状态指令2)Motion move instructions运动位移指令3)Motion group instructions*运动组指令4)Motion event instructions*运动事件指令5)Motion configuration instructions*运动配置指令6)Mot
40、ion coordinated instruction*协调运动指令.MSO(Motion Servo On)MSO(运动伺服使能)Directly activates the drive and enables the configured servo loops associated with a physical servo axis直接激活驱动,并使配置伺服回路与一个物理伺服轴联结Most common use of this instruction is to activate the servo loop for the specified axis in its current
41、position in preparation for commanding motion该指令最常见的用途是在备用于指挥运动的当前位置为指定轴激活伺服回路。Look for bit Axis.ServoActionStatus to indicate the servo loops were successfully查找位元Axis.ServoActionStatus,显示伺服回路ServoActionStatus成功启用.MSO(Motion Servo On)MSO(运动伺服使能).MSF(Motion Servo Off)MSF(运动伺服关闭使能)Directly and immedi
42、ately turns off drive output and disables the servo loop on any physical servo axis.直接即时关闭驱动输出,禁止任何物理伺服轴上的伺服回路Disables any motion planners that may be active at the time of execution禁止任何可能在执行时活动的运行规划Position continues to be tracked when axis is disabled当轴被禁用时位置继续进行跟踪Axis stopping behavior(if axis is
43、 in motion when MSF is executed)depends on type of drive.MSF(Motion Servo Off)(关闭伺服使能关闭伺服使能)TechnoFact:If you execute an MSF instruction while the axis is moving,the axis can coast to an uncontrolled stop.This instruction is not recommended for normal stopping.Use the Motion Axis Stop(MAS)instructio
44、n for that purpose.当轴在运动中执行关闭伺服指令,轴将不受控的停止,这条指令不建议作为通常停止指令,使用运动轴停止停止指令.1.Motion Instruction Overview运动指令概述运动指令概述2.Motion Instruction Errors运动指令错误运动指令错误3.Motion State Instructions运动状态指令运动状态指令4.Fault Handling Instructions故障处理指令故障处理指令.MAFR(Motion Axis Fault Reset运动故障复位运动故障复位)+Use the MAFR instruction t
45、o clear all motion faults for an axis+使用MAFR指令清除轴的所有故障+Removes the fault status排除所有故障状态+Does NOT perform any other recovery,such as enabling servo action不要执行重启,比如激活伺服使能+Usually part of a fault handling program出错处理程序+If the condition that caused the fault still exists when the MAFR instruction is exe
46、cuted,the axis immediately faults again当运动故障复位时,仍然错误存在错误,轴将在次报错 This scenario gives the impression that the fault was never cleared这个方法感觉故障从来没被清除 Example:Axis hits a hardware over travel sensor and faults.An MAFR command is executed without moving the axis.Axis immediately faults again due to the ha
47、rdware over travel condition.例如:轴的硬件采样超过了传感器行程引起错误,MAFR指令不能移动轴,轴又立刻报错因为硬件超过了行程条件.MAFR(Motion Axis Fault Reset运动轴故障复位运动轴故障复位).Manually Clearing Axis Faults手动清除轴故障手动清除轴故障+Axis faults can be clearly manually when online with the controller+控制器在线时,能够手动清除轴故障 Right-click on the axis listed in the Motion G
48、roup folder 运动组文件夹里的轴清单处点击右键 Select Clear Axis Faults选择“清除轴错误”+This method is only recommended while troubleshooting and debugging an application program这种方法只在调试项目和维修时推荐使用Right-click on the faulted axis,select Clear Axis Faults.MASR(Motion Axis Shutdown Reset轴关闭复位轴关闭复位)+Use the MASR Instruction to t
49、ransition an axis from an existing Shutdown state to an Axis Ready state+使用MASR指令使轴从关闭状态到轴准备状态+Any faults associated with the specified axis are automatically cleared+一个指定的轴采用自动清除故障是错误的 This was not true for initial releases of RSLogix5000 这可能没被RSLogix5000所正式发布+If the module supports an OK contact a
50、nd no other module axis is in the Shutdown state,the OK relay contact is closed OK+如果模块支持OK接触器且没有其他轴模块在关闭状态,中间接触器闭合+No recovery actions are taken,such as enabling the servo loops+没有恢复激活,比如伺服环处于使能.MASR(Motion Axis Shutdown Reset轴关闭复位轴关闭复位).MASR(Motion Axis Shutdown Reset轴关闭复位轴关闭复位)+Changes to axis st