【机械类毕业论文中英文对照文献翻译】S7--200系列小型PLC【word英文3491字10页word中文翻译5470字9页】
【机械类毕业论文中英文对照文献翻译】S7-200系列小型PLC【word英文3491字10页word中文翻译5470字9页】,机械类毕业论文中英文对照文献翻译,word英文3491字10页,word中文翻译5470字9页,机械类,毕业论文,中英文,对照,对比,比照,文献,翻译,s7,系列,小型,plc,word,英文,10,中文翻译
英文资料翻译S7-200系列小型PLC(Micro PLC)可应用于各种自动化系统。紧凑的结构、低廉的成本以及功能强大的指令集使得S7-200 PLC成为各种小型控制任务理想的解决方案。S7-200产品的多样化以及基于Windows的编程工具,使您能够更加灵活地完成自动化任务。S7-200系列是一种可编程序逻辑控制器(Micro PLC)。它能够控制各种设备以满足自动化控制需求。S7-200的用户程序中包括了位逻辑、计数器、定时器、复杂数学运算以及与其它智能模块通讯等指令内容,从而使它能够监视输入状态,改变输出状态以达到控制目的。紧凑的结构、灵活的配置和强大的指令集使S7-200成为各种控制应用的理想解决方案。S7-200将信息存于不同的存储器单元,每个单元都有唯一的地址。您可以明确指出要存取的存储器地址。这就允许用户程序直接存取这个信息。表4-1列出了不同长度的数据所能表示的数值范围。 表41 不同长度的数据表示的十进制和十六进制数范围数制)字节(B)字(W)双字(D无符号整数0到2550到FF0到65,5350到FFFF0到4,294,967,2950到FFFF FFFF符号整数-128到12780到7F-32,768到+32,7678000到7FFF-2,147,483,648到+2,147,483,6478000 0000到7FFF FFFF实数IEEE 32位浮点数不用不用+1.175495E-38到+3.402823E+38(正数)-1.175495E-38到-3.402823E+38(负数)若要存取存储区的某一位,则必须指定地址,包括存储器标识符、字节地址和位号。图4-3是一个位寻址的例子(也称为“字节.位”寻址)。在这个例子中,存储器区、字节地址(I代表输入,3代表字节3)和位地址(第4位) 之间用点号(“.”)相隔开。 使用这种字节寻址方式,可以按照字节、字或双字来存取许多存储区(V、I、Q、M、S、L及SM)中的数据。若要存取CPU中的一个字节、字或双字数据,则必须以类似位寻址的方式给出地址, 包括存储器标识符、数据大小以及该字节、字或双字的起始字节地址,如图4-4所示。其它CPU存储区(如T,C,HC和累加器)中存取数据使用的地址格式包括区域标识符和设备号。存储区数据的存取输入过程映象寄存器:I在每次扫描周期的开始,CPU对物理输入点进行采样,并将采样值写入输入过程映象寄存器中。可以按位、字节、字或双字来存取输入过程映象寄存器中的数据:位: I字节地址.位地址 I0.1字节、字或双字: I长度起始字节地址 IB4输出过程映象寄存器:Q在每次扫描周期的结尾,CPU将输出过程映象寄存器中的数值复制到物理输出点上。可以按位、字节、字或双字来存取输出过程映象寄存器:位: Q字节地址.位地址 Q1.1字节、字或双字: Q长度起始字节地址 QB5变量存储区:V您可以用V存储器存储程序执行过程中控制逻辑操作的中间结果, 也可以用它来保存与工序或任务相关的其它数据。并且可以按位、字节、字或双字来存取V存储区中的数据:位: V字节地址.位地址 V10.2字节、字或双字: V长度起始字节地址 V W100位存储区:M可以用位存储区作为控制继电器来存储中间操作状态和控制信息。并且可以按位、字节、字或双字来存取位存储区:位: M字节地址.位地址 M26.7字节、字或双字: M长度起始字节地址 MD20定时器存储区:TS7-200 CPU中,定时器可用于时间累计,其分辨率(时基增量)分为1ms、10ms和100ms三种。定时器有两个变量:当前值:16位有符号整数,存储定时器所累计的时间。定时器位:按照当前值和预置值的比较结果置位或者复位。预置值是定时器指令的一部分。可以用定时器地址(T定时器号)来存取这两种形式的定时器数据。究竟使用哪种形式取决于所使用的指令: 如果使用位操作指令则是存取定时器位;如果使用字操作指令,则是存取定时器当前值。如图4-5中所示,常开触点指令是存取定时器位;而字移动指令则是存取定时器的当前值。格式: T定时器号 T24计数器存储区:C在S7-200 CPU中,计数器可以用于累计其输入端脉冲电平由低到高的次数。CPU提供了三种类型的计数器:一种只能增计数;一种只能减计数;另外一种既可以增计数,又可以减计数。计数器有两种形式:当前值:16位有符号整数,存储累计值。计数器位:按照当前值和预置值的比较结果置位或者复位。预置值是计数器指令的一部分。可以用计数器地址(C计数器号)来存取这两种形式的计数器数据。究竟使用哪种形式取决于所使用的指令:如果使用位操作指令则是存取计数器位;如果使用字操作指令,则是存取计数器当前值。如图4-6中所示,常开触点指令是存取计数器位;而字移动指令则是存取计数器的当前值。格式: C 计数器号 C24累加器:AC累加器是可以象存储器一样使用的读写设备。例如,可以用它来向子程序传递参数,也可以从子程序返回参数,以及用来存储计算的中间结果。S7-200提供4个32位累加器(AC0,AC1,AC2和AC3)。并且您可以按字节、字或双字的形式来存取累加器中的数值。被访问的数据长度取决于存取累加器时所使用的指令。如图4-7所示,当以字节或者字的形式存取累加器时,使用的是数值的低8位或低16位。当以双字的形式存取累加器时,使用全部32位。格式: AC累加器号 AC0特殊存储器:SMSM位为CPU与用户程序之间传递信息提供了一种手段。可以用这些位选择和控制S7-200 CPU的一些特殊功能。例如:首次扫描标志位、按照固定频率开关的标志位或者显示数学运算或操作指令状态的标志位。(有关SM位的详细信息参见附录B)。并且可以按位、字节、字或双字来存取SM位:位: SM字节地址.位地址 SM0.1字节、字或者双字: SM长度起始字节地址 SMB86局部存储器:LS7-200有64个字节的局部存储器,其中60个可以用作临时存储器或者给子程序传递参数。提示:如果用梯形图或功能方块图编程,STEP7-Micro/WIN保留这些局部存储器的最后四个字节。局部存储器和变量存储器很相似,但只有一处区别。变量存储器是全局有效的,而局部存储器只在局部有效。全局是指同一个存储器可以被任何程序存取(包括主程序、子程序和中断服务程序)。局部是指存储器区和特定的程序相关联。S7-200给主程序分配64个局部存储器;给每一级子程序嵌套分配64个字节局部存储器;同样给中断服务程序分配64个字节局部存储器。子程序或者中断服务程序不能访问分配给主程序的局部存储器。子程序不能访问分配给主程序、中断服务程序或者其它子程序的局部存储器。同样的,中断服务程序也不能访问分配给主程序或子程序的局部存储器。S7-200 PLC根据需要分配局部存储器。也就是说,当主程序执行时,分配给子程序或中断服务程序的局部存储器是不存在的。当发生中断或者调用一个子程序时,需要分配局部存储器。新的局部存储器地址可能会覆盖另一个子程序或中断服务程序的局部存储器地址。局部存储器在分配时PLC不进行初始化,初值可能是任意的。当在子程序调用中传递参数时,在被调用子程序的局部存储器中,由CPU替换其被传递的参数的值。局部存储器在参数传递过程中不传递值,在分配时不被初始化,可能包含任意数值。位: L字节地址.位地址 L0.0字节、字或双字: L长度 起始字节地址 LB33用指针对S7-200存储区间接寻址间接寻址是指用指针来访问存储区数据。指针以双字的形式存储其它存储区的地址。只能用V存储器、L存储器或者累加器寄存器(AC1、AC2、AC3)作为指针。要建立一个指针,必须以双字的形式,将需要间接寻址的存储器地址移动到指针中。指针也可以作为参数传递到子程序中。S7-200允许指针访问以下存储区: I、Q、V、M、S、AI、AQ、SMT(仅限于当前值)和C(仅限于当前值)。您无法用间接寻址的方式访问单独的位,也不能访问HC或者L存储区。要使用间接寻址,您应该用“&”符号加上要访问的存储区地址来建立一个指针。指令的输入操作数应该以“&”符号开头来表明是存储区的地址,而不是其内容将移动到指令的输出操作数(指针)中。当指令中的操作数是指针时,应该在操作数前面加上“”号。如图4-11所示,输入*AC1指定AC1是一个指针,MOVW指令决定了指针指向的是一个字长的数据。在本例中,存储在VB200和VB201中的数值被移动到累加器AC0中。脉冲输出指令脉冲输出指令(PLS)用于在高速输出(Q0.0和Q0.1)上控制脉冲串输出(PTO)和脉宽调制(PWM)功能。改进的位控向导可以创建为您的应用程序定制的指令,这可以简化您的编程任务并充分利用S7-200 CPU的特有特性。可以继续使用旧的PLS指令创建您自己的运动应用,但是只有改进的位控向导创建的指令才支持PTO上的线性斜坡。PTO可以输出一串脉冲(占空比50%),用户可以控制脉冲的周期和个数。PWM可以输出连续的、占空比可调的脉冲串,用户可以控制脉冲的周期和脉宽。S7-200有两个PTO/PWM发生器,它们可以产生一个高速脉冲串或者一个脉宽调制波形。一个发生器是数字输出点Q0.0,另一个发生器是数字输出点Q0.1。一个指定的特殊寄存器(SM)位置为每个发生器存储下列数据:一个控制字节(8位),一个计数值(32位无符号数)和一个周期或脉宽值(16位无符号数)。PTO/PWM发生器与过程映像寄存器共用Q0.0和Q0.1。当在Q0.0或Q0.1上激活PTO或PWM功能时,PTO/PWM发生器对输出拥有控制权,同时普通输出点功能被禁止。输出波形不受过程映象区状态、输出点强制值或者立即输出指令执行的影响。当不使用PTO/PWM发生器功能时,对输出点的控制权交回到过程映象寄存器。过程映象寄存器决定输出波形的起始和结束状态,以高低电平产生波形的启动和结束。提示:在使能PTO或者PWM操作之前,将Q0.0和Q0.1过程映象寄存器清0。所有控制位、周期、脉宽和脉冲计数值的缺省值均为0。PTO/PWM的输出负载至少为10的额定负载,才能提供陡直的上升沿和下降沿开环位控用于步进电机或伺服电机的基本信息内置于S7-200 PLC的PTO和EM253位控模块都使用一个脉冲串输出用于步进电机或伺服电机的速度和位置控制。使用PTO或模块用于开环位置控制需要运动控制领域的专业技术。本章内容并不用于培训。而是,提供基础信息以帮助您使用位控向导为您的应用程序组态PTO或模块。最大速度和启动/停止速度向导将提示您应用程序的最大速度(MAX_SPEED)和启动/停止速(SS_SPEED)。如图9-3。 MAX_SPEED:该数值是您的应用中操作速度的最大值,它应在电机力矩能力的范围内。驱动负载所需的力矩由摩擦力、惯性以及加速/减速时间决定。位控向导根据指定的MAX_SPEED,计算并显示位控模块所能控制的最小速度。对于PTO输出,您必须指定期望的启动/停止速度。由于启动/停止速度在每次运动指令执行时至少会产生一次,所以启动/停止速度的周期应小于加速/减速时间。SS_SPEED:输入该数值满足您的电机在低速时驱动负载的能力,如果SS_SPEED的数值过低,电机和负载在运动的开始和结束时可能会摇摆或颤动。如果SS_SPEED的数值过高,电机会在启动时丢失脉冲,并且负载在试图停止时会使电机超速。在电机的数据单中,对于电机和给定负载,有不同的方式定义启动/停止(或拉入/拉出)速度。通常,SS_SPEED值是MAX_SPEED值的5%至15%。请参考电机的数据单,为您的应用选择正确的速度。图9-4所示为典型的电机力矩/速度曲线。输入加速和减速时间作为组态内容的一部分,要设置加速和减速时间。加速时间和减速时间的缺省设置都是1秒。通常,电机可在小于1秒的时间内工作。参见图9-5。您要以毫秒为单位进行时间设定:ACCEL_TIME:电机从SS_SPEED速度加速到MAX_SPEED速度所需的时间。缺省值=1000ms。DECEL_TIME:电机从MAX_SPEED速度减速到SS_SPEED速度所需要的时间。缺省值=1000ms。提示:电机的加速和减速时间要经过测试来确定。开始时,您应输入一个较大的值。逐渐减少这个时间值直至电机开始失速,从而优化您应用中的这些设置。组态移动包络一个包络是一个预先定义的移动描述,它包括一个或多个速度,影响着从起点到终点的移动。即使不定义包络也可以使用PTO或模块,位控向导为您提供了指令以用于控制移动而无需运行一个包络。一个包络由多段组成,每段包含一个达到目标速度的加速/减速过程和以目标速度匀速运行的一串固定数量的脉冲。如果是单段运动控制或者是多段运动控制中的最后一段,还应该包括一个由目标速度到停止的减速过程。PTO和模块支持最多25个包络。定义移动包络位控向导提供移动包络定义,在这里,您可以为您的应用程序定义每一个移动包络。对每一个包络,您可以选择操作模式并为每个包络的各步定义指标。位控向导中可以为每个移动包络定义一个符号名,其做法是您在定义包络时输入一个符号名即可。选择包络的操作模式您要按照操作模式组态包络。PTO支持相对位置和单一速度的连续转动。而位控模块支持绝对位置、相对位置、单一速度连续转动和以两种速度连续转动。图9-6所示为不同的操作模式。创建包络中的步一个步是工件运动的一个固定距离,包括加速和减速时间内的距离。PTO每一包络最大允许29个步,而模块的每一包络最大允许4个步。您要为每一步指定目标速度和结束位置或脉冲数目,且每次输入一步。图9-7所示为一步、两步、三步和四步包络。注意一步包络只有一个匀速段,两步包络有两个匀速段,依次类推。步的数目与包络中匀速段的数目一致。使用PTO输出PTO提供一个指定脉冲数目的方波输出(50%占空比)每一脉冲的频率或周期随着加速和减速时的频率线形变化,而在移动的常频率段部分保持不变。一旦产生完指定数目的脉冲,PTO输出变为低电平,并且直到装载一个新的指定值时才产生脉冲。参见图9-8。组态PTO输出使用位控向导,为PTO操作组态一个内置输出。启动位控向导,可以点击操作栏中的工具图标,然后双击位控向导图标,或者选择菜单命令Tools Position Control Wizard。1. 为S7-200 PLC选择选项组态板载PTO/PWM操作。2. 选择Q0.0或Q0.1,组态作为PTO的输出。3. 从下拉对话框中选择线性脉冲串输出(PTO)。4. 若您想监视PTO产生的脉冲数目,点击复选框选择使用高速计数器。5. 在对应的编辑框中输入MAX_SPEED和SS_SPEED速度值。6. 在对应的编辑框中输入加速和减速时间。7. 在移动包络定义界面,点击新包络按钮允许定义包络。选择所需的操作模式。对于相对位置包络:输入目标速度和脉冲数。然后,您可以点击绘制步按钮,查看移动的图形描述。若需要多个步,点击新建步按钮并按要求输入步信息。对于单速连续转动:在编辑框中输入单速值。若您想终止单速连续转动,点击子程序编程复选框,并输入停止事件后的移动脉冲数。8. 根据移动的需要,您可以定义多个包络和多个步。9. 选择完成结束向导。英文资料翻译The S7-200 series is a line of micro-programmable logic controllers (Micro PLC) that can control a variety of automation applications. Compact design, low cost, and a powerful instruction set make the S7-200 a perfect solution for controlling small applications. The wide variety of S7-200 models and the Windows-based programming tool give you the flexibility you need to solve your automation problems.The S7-200 series of micro-programmable logic controllers (Micro PLC) can control a wide variety of devices to support your automation needs. The S7-200 monitors inputs and changes outputs as controlled by the user program, which can include Boolean logic, counting, timing, complex math operations, and communications with other intelligent devices. The compact design, flexible configuration, and powerful instruction set combine to make the S7-200 a perfect solution for controlling a wide variety of applications.The S7-200 stores information in different memory locations that have unique addresses. You can explicitly identify the memory address that you want to access. This allows your program to have direct access to the information. Table 4-1 shows the range of integer values that can be represented by the different sizes of data.Table 4-1 Decimal and Hexadecimal Ranges for the Different Sizes of DataRepresentationByte (B)Word (W)Double Word (D)Unsigned Integer0 to 2550 to FF0 to 65,5350 to FFFF0 to 4,294,967,2950 to FFFF FFFFSigned Integer-128 to +12780 to 7F-32,768 to +32,7678000 to 7FFF-2,147,483,648 to +2,147,483,6478000 0000 to 7FFF FFFFReal IEEE 32-bitFloating PointNot applicableNot applicable+1.175495E-38 to +3.402823E+38 (positive)-1.175495E-38 to -3.402823E+38 (negative)To access a bit in a memory area, you specify the address, which includes the memory area identifier, the byte address, and the bit number. Figure 4-3 shows an example of accessing a bit (which is also called “byte.bit” addressing). In this example, the memory area and byte address (I = input, and 3 = byte 3) are followed by a period (“.”) to separate the bit address (bit 4).You can access data in most memory areas (V, I, Q, M, S, L, and SM) as bytes, words, or double words by using the byte-address format. To access a byte, word, or double word of data in the memory, you must specify the address in a way similar to specifying the address for a bit. This includes an area identifier, data size designation, and the starting byte address of the byte, word, or double-word value, as shown in Figure 4-4.Data in other memory areas (such as T, C, HC, and the accumulators) are accessed by using an address format that includes an area identifier and a device number.Accessing Data in the Memory AreasProcess-Image Input Register: IThe S7-200 samples the physical input points at the beginning of each scan cycle and writes these values to the process-image input register. You can access the process-image input register in bits, bytes, words, or double words:Bit: Ibyte address.bit address I0.1Byte, Word, or Double Word: Isizestarting byte address IB4Process-Image Output Register: QAt the end of the scan cycle, the S7-200 copies the values stored in the process-image output register to the physical output points. You can access the process-image output register in bits, bytes, words, or double words:Bit: Qbyte address.bit address Q1.1Byte, Word, or Double Word: Qsizestarting byte address QB5Variable Memory Area: VYou can use V memory to store intermediate results of operations being performed by the control logic in your program. You can also use V memory to store other data pertaining to your process or task. You can access the V memory area in bits, bytes, words, or double words:Bit: Vbyte address.bit address V10.2Byte, Word, or Double Word: Vsizestarting byte address VW100Bit Memory Area: MYou can use the bit memory area (M memory) as control relays to store the intermediate status of an operation or other control information. You can access the bit memory area in bits, bytes, words, or double words:Bit: Mbyte address.bit address M26.7Byte, Word, or Double Word: Msizestarting byte address MD20Timer Memory Area: TThe S7-200 provides timers that count increments of time in resolutions (time-base increments) of 1 ms, 10 ms, or 100 ms. Two variables are associated with a timer:- Current value: this 16-bit signed integer stores the amount of time counted by the timer.- Timer bit: this bit is set or cleared as a result of comparing the current and the preset value. The preset value is entered as part of the timer instruction.You access both of these variables by using the timer address (T + timer number). Access to either the timer bit or the current value is dependent on the instruction used: instructions with bit operands access the timer bit, while instructions with word operands access the current value. As shown in Figure 4-5, the Normally Open Contact instruction accesses the timer bit, while the Move Word instruction accesses the current value of the timer.Format: T timer number T24Counter Memory Area: CThe S7-200 provides three types of counters that count each low-to-high transition event on the counter input(s): one type counts up only, one type counts down only, and one type counts both up and down. Two variables are associated with a counter:- Current value: this 16-bit signed integer stores the accumulated count.- Counter bit: this bit is set or cleared as a result of comparing the current and the preset value. The preset value is entered as part of the counter instruction.You access both of these variables by using the counter address (C + counter number). Access to either the counter bit or the current value is dependent on the instruction used: instructions with bit operands access the counter bit, while instructions with word operands access the current value. As shown in Figure 4-6, the Normally Open Contact instruction accesses the counter bit, while the Move Word instruction accesses the current value of the counter.Format: C counter number C24Accumulators: ACThe accumulators are read/write devices that can be used like memory. For example, you can use accumulators to pass parameters to and from subroutines and to store intermediate values used in a calculation. The S7-200 provides four 32-bit accumulators (AC0, AC1, AC2, and AC3). You can access the data in the accumulators as bytes, words, or double words. The size of the data being accessed is determined by the instruction that is used to access the accumulator. As shown in Figure 4-7, you use the least significant 8 or 16 bits of the value that is stored in the accumulator to access the accumulator as bytes or words. To access the accumulator as a double word, you use all 32 bits.Format: AC accumulator number AC0Special Memory: SMThe SM bits provide a means for communicating information between the CPU and your program. You can use these bits to select and control some of the special functions of the S7-200 CPU, such as: a bit that turns on for the first scan cycle, a bit that toggles at a fixed rate, or a bit that shows the status of math or operational instructions. (For more information about the SM bits, see Appendix D.) You can access the SM bits as bits, bytes, words, or double words:Bit: SM byte address.bit address SM0.1Byte, Word, or Double Word: SM sizestarting byte address SMB86Local Memory Area: LThe S7-200 provides 64 bytes of local memory of which 60 can be used as scratchpad memory or for passing formal parameters to subroutines.Tip:If you are programming in either LAD or FBD, STEP 7-Micro/WIN reserves the last four bytes of local memory for its own use.Local memory is similar to V memory with one major exception. V memory has a global scope while L memory has a local scope. The term global scope means that the same memory location can be accessed from any program entity (main program, subroutines, or interrupt routines). The term local scope means that the memory allocation is associated with a particular program entity. The S7-200 allocates 64 bytes of L memory for the main program, 64 bytes for each subroutine nesting level, and 64 bytes for interrupt routines.The allocation of L memory for the main program cannot be accessed from subroutines or from interrupt routines. A subroutine cannot access the L memory allocation of the main program, an interrupt routine, or another subroutine. Likewise, an interrupt routine cannot access the L memory allocation of the main program or of a subroutine.The allocation of L memory is made by the S7-200 on an as-needed basis. This means that while the main portion of the program is being executed, the L memory allocations for subroutines and interrupt routines do not exist. At the time that an interrupt occurs or a subroutine is called, local memory is allocated as required. The new allocation of L memory might reuse the same L memory locations of a different subroutine or interrupt routine.The L memory is not initialized by the S7-200 at the time of allocation and might contain any value. When you pass formal parameters in a subroutine call, the values of the parameters being passed are placed by the S7-200 in the appropriate L memory locations of the called subroutine. L memory locations, which do not receive a value as a result of the formal parameter passing step, will not be initialized and might contain any value at the time of allocation.Bit: L byte address .bit address L0.0Byte, Word, or Double Word: Lsize starting byte address LB33Using Pointers for Indirect Addressing of the S7-200 Memory AreasIndirect addressing uses a pointer to access the data in memory. Pointers are double word memory locations that contain the address of another memory location. You can only use V memory locations, L memory locations, or accumulator registers (AC1, AC2, AC3) as pointers. To create a pointer, you must use the Move Double Word instruction to move the address of the indirectly addressed memory location to the pointer location. Pointers can also be passed to a subroutine as a parameter.The S7-200 allows pointers to access the following memory areas: I, Q, V, M, S, AI, AQ, SM, T (current value only), and C (current value only). You cannot use indirect addressing to access an individual bit or to access HC or L memory areas.To indirectly access the data in a memory address, you create a pointer to that location by entering an ampersand (&) and the memory location to be addressed. The input operand of the instruction must be preceded with an ampersand (&) to signify that the address of a memory location, instead of its contents, is to be moved into the location identified in the output operand of the instruction (the pointer).Entering an asterisk (*) in front of an operand for an instruction specifies that the operand is a pointer. As shown in Figure 4-11, entering *AC1 specifies that AC1 is a pointer to the word-length value being referenced by the Move Word (MOVW) instruction. In this example, the values stored in both VB200 and VB201 are moved to accumulator AC0.Pulse Output InstructionThe Pulse Output instruction (PLS) is used to control the Pulse Train Output (PTO) and Pulse Width Modulation (PWM) functions available on the high-speed outputs (Q0.0 and Q0.1).The improved Position Control Wizard creates instructions customized to your application that simplify your programming tasks and take advantage of the extra features of the S7-200 CPUs. You can continue to use the old PLS instruction to create your own motion application, but the linear ramp on the PTO is only supported by instructions created by the improved Position Control Wizard.PTO provides a square wave (50% duty cycle) output with user control of the cycle time and the number of pulses.PWM provides a continuous, variable duty cycle output with user control of the cycle time and the pulse width.The S7-200 has two PTO/PWM generators that create either a high-speed pulse train or a pulse width modulated waveform. One generator is assigned to digital output point Q0.0, and the other generator is assigned to digital output point Q0.1. A designated special memory (SM) location stores the following data for each generator: a control byte (8-bit value), a pulse count value (an unsigned 32-bit value), and a cycle time and pulse width value (an unsigned 16-bit value). The PTO/PWM generators and the process-image register share the use of Q0.0 and Q0.1. When a PTO or PWM function is active on Q0.0 or Q0.1, the PTO/PWM generator has control of the output, and normal use of the output point is inhibited. The output waveform is not affected by the state of the process-image register, the forced value of the point, or the execution of immediate output instructions. When the PTO/PWM generator is inactive, control of the output reverts to the process-image register. The process-image register determines the initial and final state of the output waveform, causing the waveform to start and end at a high or low level.Tip: Before enabling PTO or PWM operation, set the value of the process-image register for Q0.0 and Q0.1 to 0.Default values for all control bits, cycle time, pulse width, and pulse count values are 0. The PTO/PWM outputs must have a minimum load of at least 10% of rated load to provide crisp transitions from off to on, and from on to off.Basic Information for Open Loop Position Control UsingSteppers or ServosBoth the PTO built-in to the S7-200 PLC and the EM 253 Position Module use a pulse train output to control both the speed and position of a stepper motor or a servo motor.Using the PTO or the module for open loop position control requires expertise in the field of motion control. This chapter is not meant to educate the novice in this subject. However, it provides fundamental information that will help as you use the Position Control wizard to configure the PTO or module for your application.Maximum and Start/Stop SpeedsThe wizard will prompt you for the maximum speed (MAX_SPEED) and Start/Stop Speed (SS_SPEED) for your application. See Figure 9-3.- MAX_SPEED: Enter the value for the optimum operating speed of your application within the torque capability of your motor. The torque required to drive the load is determined by friction, inertia, and the acceleration/deceleration times.- The Position Control wizard calculates and displays the minimum speed that can be controlled by the Position module based on the MAX_SPEED you specify.- For the PTO output you must specify the desired start/stop speed. Since at least one cycle at the start/stop speed is generated each time a move is executed, use a start/stop speed whose period is less than the acceleration/deceleration time.- SS_SPEED: Enter a value within the capability of your motor to drive your load at low speeds. If theSS_SPEED value is too low, the motor and load could vibrate or move in short jumps at the beginning and end of travel. If the SS_SPEED value is too high, the motor could lose pulses on start up and the load could overdrive the motor when attempting to stop.Motor data sheets have different ways of specifying the start/stop (or pull-in/pull-out ) speed for a motor and given load. Typically, a useful SS_SPEED value is 5% to 15% of the MAX_SPEED value. To help you select the correct speeds for your application, refer to the data sheet for your motor. Figure 9-4 shows a typical motor torque/speed curve.Entering the Acceleration and Deceleration TimesAs part of the configuration, you set the acceleration and deceleration times. The default setting for both the acceleration time and the deceleration time is 1 second. Typically, motors can work with less than 1 second. See Figure 9-5. You specify the following times in milliseconds:- ACCEL_TIME: Time required for the motor to accelerate from SS_SPEED to MAX_SPEED. Default = 1000 ms- DECEL_TIME: Time required for the motor to decelerate from MAX_SPEED to SS_SPEED. Default = 1000 ms Tip :Motor acceleration and deceleration times are determined by trial and error. You should start by entering a large value. Optimize these settings for the application by gradually reducing the times until the motor starts to stall.Configuring the Motion ProfilesA profile is a pre-defined motion description consisting of one or more speeds of movement that effect a change in position from a starting point to an ending point. You do not have to define a profile in order to use the PTO or the module. The Position Control wizard provides instructions for you to use to control moves without running a profile.A profile is programmed in steps consisting of an acceleration/deceleration to a target speed followed by a fixed number of pulses at the target speed. In the case of single step moves or the last step in a move there is also a deceleration from the target speed (last target speed) to stop. The PTO and module support a maximum of 25 profiles.Defining the Motion ProfileThe Position Control wizard guides you through a Motion Profile Definition where you define each motion profile for your application. For each profile, you select the operating mode and define the specifics of each individual step for the profile. The Position Control wizard also allows you to define a symbolic name for each profile by simply entering the symbol name as you define the profile.Selecting the Mode of Operation for the ProfileYou configure the profile according the the mode of operation desired. The PTO supports relative position and single speed continuous rotation. The Position module supports absolute position, relative position, single-speed continuous rotation, and two-speed continuous rotation. Figure 9-6 shows the different modes of operation.Creating the Steps for the ProfileA step is a fixed distance that a tool moves, including the distance covered during acceleration and deceleration times. In the case of the PTO a maximum of 29 steps are allowed in each profile. The module supports a maximum of 4 steps in each profile.You specify the target speed and ending position or number of pulses for each step. Additional steps are entered one at a time. Figure 9-7 illustrates a one-step, two-step, three-step and a four-step profile.Notice that a one-step profile has one constant speed segment, a two-step profile has two constant speed segments, and so on. The number of steps in the profile matches the number of constant speed segments of the profile.Using the PTO OutputPTO provides a square wave output (50% duty cycle) for a specified number of pulses. Thefrequency or cycle time of each pulse changes linearly with frequency during acceleration and deceleration and remains fixed during the constant frequency portions of a movement. Once the specified number of pulses have been generated, the PTO output turns off and no further pulses are generated until a new specification is loaded. See Figure 9-8.Configuring the PTO OutputTo configure one of the built in outputs for PTO operation use the Position Control wizard. To start the Position Control wizard, either click the Tools icon in the navigation bar and then dou
收藏