2432 大尺寸多工步自動(dòng)推料進(jìn)給裝置及控制數(shù)據(jù)管理系統(tǒng)設(shè)計(jì)
2432 大尺寸多工步自動(dòng)推料進(jìn)給裝置及控制數(shù)據(jù)管理系統(tǒng)設(shè)計(jì),尺寸,多工步,自動(dòng),進(jìn)給,裝置,控制,節(jié)制,數(shù)據(jù)管理,系統(tǒng),設(shè)計(jì)
英文資料翻譯機(jī) 0405-33 張明旺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 DataRepresentation Byte (B)Word (W) Double Word (D)Unsigned Integer 0 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 msTip :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 double-click the Position Control Wizard icon, or select the Tools Position Control Wizard menu command.1. Select the option to configure the onboard PTO/PWM operation for the S7-200 PLC.2. Choose the
收藏