2288 變頻試驗(yàn)臺直線運(yùn)動結(jié)構(gòu)及基于S7-200速度示教系統(tǒng)控制軟件與上位監(jiān)控系統(tǒng)設(shè)計
2288 變頻試驗(yàn)臺直線運(yùn)動結(jié)構(gòu)及基于S7-200速度示教系統(tǒng)控制軟件與上位監(jiān)控系統(tǒng)設(shè)計,變頻,試驗(yàn)臺,直線運(yùn)動,結(jié)構(gòu),基于,s7,速度,系統(tǒng),控制,節(jié)制,軟件,上位,監(jiān)控,設(shè)計
Plc Introduction Programmable controller is the first in the late 1960s in the United States, then called Plc programmable logic controller (ProgrammableLogicController) is used to replace relays. For the implementation of the logical judgement, timing, sequence number, and other control functions. The concept is presented Plc General Motors Corporation. Plc and the basic design is the computer functional improvements, flexible, generic and other advantages and relay control system simple and easy to operate, such as the advantages of cheap prices combined controller hardware is standard and overall. According to the practical application of target software in order to control the content of the user procedures memory controller, the controller and connecting the accused convenient target. In the mid-1970s, the Plc has been widely used as a central processing unit microprocessor, import export module and the external circuits are used, large-scale integrated circuits even when the Plc is no longer the only logical (IC) judgement functions also have data processing, PID conditioning and data communications functions. International Electrotechnical Commission (IEC) standards promulgated programmable controller for programmable controller draft made the following definition : programmable controller is a digital electronic computers operating system, specifically for applications in the industrial design environment. It used programmable memory, used to implement logic in their internal storage operations, sequence control, timing, counting and arithmetic operations, such as operating instructions, and through digital and analog input and output, the control of various types of machinery or production processes. Programmable controller and related peripherals, and industrial control systems easily linked to form a whole, to expand its functional design. Programmable controller for the user, is a non-contact equipment, the procedures can be changed to change production processes. The programmable controller has become a powerful tool for factory automation, widely popular replication. Programmable controller is user-oriented industries dedicated control computer, with many distinctive features. First, high reliability, anti-interference capability; Second programming visual, simple; Third, adaptability good; ④ functional improvements, strong functional interface.Selecting the Communications Protocol for Your NetworkThe following information is an overview of the protocols supported by the S7-200 CPUs.- Point-to-Point Interface (PPI)- Multi-Point Interface (MPI)- PROFIBUSBased on the Open System Interconnection (OSI) seven-layer model of communicationsarchitecture, these protocols are implemented on a token ring network which conforms to thePROFIBUS standard as defined in the European Standard EN 50170. These protocols areasynchronous, character-based protocols with one start bit, eight data bits, even parity, and onestop bit. Communications frames depend upon special start and stop characters, source anddestination station addresses, frame length, and a checksum for data integrity. The protocols canrun on a network simultaneously without interfering with each other, as long as the baud rate is thesame for each protocol.Ethernet is also available for the S7-200 CPU with expansion modules CP243--1 and CP243--1 IT.Communications OptionsSiemens provides two programming options for connecting your computer to your S7-200: a directconnection with a PPI Multi-Master cable, or a Communications Processor (CP) card with an MPIcable.The PPI Multi-Master programming cable is the most common and economical method ofconnecting your computer to the S7-200. This cable connects the communications port of theS7-200 to the serial communications of your computer. The PPI Multi-Master programming cablecan also be used to connect other communications devices to the S7-200.Features of the S7-200The S7-200 provides several special features that allow you to customize how the S7-200functions to better fit your application.The S7-200 Allows Your Program to Immediately Read or Write the I/OThe S7-200 instruction set provides instructions that immediately read from or write to the physicalI/O. These immediate I/O instructions allow direct access to the actual input or output point, eventhough the image registers are normally used as either the source or the destination for I/Oaccesses.The corresponding process-image input register location is not modified when you use animmediate instruction to access an input point. The corresponding process-image output registerlocation is updated simultaneously when you use an immediate instruction to access an outputpoint.TipThe S7-200 handles reads of analog inputs as immediate data, unless you enable analog inputfiltering. When you write a value to an analog output, the output is updated immediately.It is usually advantageous to use the process-image register rather than to directly access inputsor outputs during the execution of your program. There are three reasons for using the imageregisters:- The sampling of all inputs at the start of the scan synchronizes and freezes the values ofthe inputs for the program execution phase of the scan cycle. The outputs are updated fromthe image register after the execution of the program is complete. This provides a stabilizingeffect on the system.- Your program can access the image register much more quickly than it can access I/Opoints, allowing faster execution of the program.- I/O points are bit entities and must be accessed as bits or bytes, but you can access theimage register as bits, bytes, words, or double words. Thus, the image registers provideadditional flexibility.The S7-200 Allows Your Program to Interrupt the Scan CycleIf you use interrupts, the routines associated with each interrupt event are stored as part of theprogram. The interrupt routines are not executed as part of the normal scan cycle, but areexecuted when the interrupt event occurs (which could be at any point in the scan cycle).Interrupts are serviced by the S7-200 on a first-come-first-served basis within their respectivepriority assignments. See the Interrupt instructions in Chapter 6 for more information.The S7-200 Allows You to Allocate Processing Time for Run Mode Editand Execution StatusYou can configure a percentage of the scan cycle to be dedicated for processing a run mode editcompilation or execution status. (Run mode edit and execution status are options provided bySTEP 7--Micro/WIN to make debugging your program easier.) As you increase the percentage oftime that is dedicated to these two tasks, you increase the scan time, which makes your controlprocess run more slowly.The default percentage of the scan dedicated to processing run mode edits and execution statusis set to 10%. This setting was chosen to provide a reasonable compromise for processing thecompilation and status operations while minimizing the impact to your control process. You canadjust this value by 5% increments up to a maximum of 50%. To set the scan cycle time-slice forbackground communications:1. Select the View > Component >System Block menu commandand select Background Time.2. In the Background tab, use thedrop down box to select the communications background time.3. Click OK to save your selection.4. Download the modified system block to the S7-200.Understanding the Basics of S7-200 Network CommunicationsSelecting the Communication Interface for Your NetworkThe S7-200 supports many different types of communication networks. The selection of a networkis performed within the Set PG/PC Interface property dialog. A selected network is referred to asan Interface. The different types of interfaces available to access these communication networksare:- PPI Multi-Master cables- CP communication cards- Ethernet communication cardsPPI ProtocolPPI is a master-slave protocol: the master devicessend requests to the slave devices, and the slave devices respond. Slave devices donot initiate messages, but wait until a master sendsthem a request or polls them for a response.Masters communicate to slaves by means of ashared connection which is managed by the PPIprotocol. PPI does not limit the number of mastersthat can communicate with any one slave; however,you cannot install more than 32 masters on the network.S7-200 CPUs can act as master devices while they are in RUN mode, if you enable PPI master mode in the user program. (See the description of SMB30 in Appendix D.) After enabling PPI master mode, you can use the Network Read or the Network Write instructions to read from or write to other S7-200s. While the S7-200 is acting as a PPI master, it still responds as a slave to requests from other masters.PPI Advanced allows network devices to establish a logical connection between the devices. With PPI Advanced, there are a limited number of connections supplied by each device. See for the number of connections supported by the S7-200.All S7-200 CPUs support both PPI and PPI Advanced protocols, while PPI Advanced is the only PPI protocol supported by the EM 277 module.Installing and Removing Communications InterfacesFrom the Set PG/PC Interface dialog box, you use the Installing/Uninstalling Interfaces dialog boxto install or remove communications interfaces for your computer1. In the Set PG/PC Interface dialog box, click Select to access the Installing/UninstallingInterfaces dialog box.The Selection box lists the interfaces that are available, and the Installed box displays theinterfaces that have already been installed on your computer.2. To add a communications interface: Select the communications hardware installed on yourcomputer and click Install. When you close the Installing/Uninstallling Interfaces dialog box,the Set PG/PC Interface dialog box displays the interface in the Interface ParameterAssignment Used box.3. To remove a communications interface: Select the interface to be removed and clickUninstall. When you close the Installing/Uninstallling Interfaces dialog box, the Set PG/PCInterface dialog box removes the interface from the Interface Parameter Assignment Usedbox.Building Your NetworkGeneral GuidelinesAlways install appropriate surge suppression devices for any wiring that could be subject tolightning surges.Avoid placing low-voltage signal wires and communications cables in the same wire tray with ACwires and high-energy, rapidly switched DC wires. Always route wires in pairs, with the neutral orcommon wire paired with the hot or signal-carrying wire.The communications port of the S7-200 CPU is not isolated. Consider using an RS-485 repeateror an EM 277 module to provide isolation for your network.CautionInterconnecting equipment with different reference potentials can cause unwanted currents toflow through the interconnecting cable.These unwanted currents can cause communications errors or can damage equipment.Be sure all equipment that you are about to connect with a communications cable either sharesa common circuit reference or is isolated to prevent unwanted current flows. Determining the Distances, Transmission Rate, and Cable for YourNetworkThe maximum length of a network segment is determined by two factors:isolation (using an RS-485 repeater) and baud rate.Isolation is required when you connect devices at different ground potentials. Different groundpotentials can exist when grounds are physically separated by a long distance. Even over shortdistances, load currents of heavy machinery can cause a difference in ground potential.Using Repeaters on the NetworkAn RS-485 repeater provides bias and termination for the network segment. You can use arepeater for the following purposes:- To increase the length of a network: Adding a repeater to your network allows you to extendthe network another 50 m. If you connect two repeaters with no other nodes in between, you can extend the network to the maximum cable length for thebaud rate. You can use up to 9 repeaters in series on a network, but the total length of thenetwork must not exceed 9600 m.- To add devices to a network: Each segment can have a maximum of 32 devices connectedup to 50 m at 9600 baud. Using a repeater allows you to add another segment (32 devices)to the network.- To electrically isolate different network segments: Isolating the network improves the qualityof the transmission by separating the network segments which might be at different groundpotentials.A repeater on your network counts as one of the nodes on a segment, even though it is notassigned a network address.Creating User-Defined Protocols with Freeport ModeFreeport mode allows your program to control the communications port of the S7-200 CPU. Youcan use Freeport mode to implement user-defined communications protocols to communicate withmany types of intelligent devices. Freeport mode supports both ASCII and binary protocols.To enable Freeport mode, you use special memory bytes SMB30 (for Port 0) and SMB130 (forPort 1). Your program uses the following to control the operation of the communications port:Transmit instruction (XMT) and the transmit interrupt: The Transmit instruction allows theS7-200 to transmit up to 255 characters from the COM port. The transmit interrupt notifiesyour program in the S7-200 when the transmission has been completed.Receive character interrupt: The receive character interrupt notifies the user program that acharacter has been received on the COM port. Your program can then act on that character,based on the protocol being implemented.Receive instruction (RCV): The Receive instruction receives the entire message from theCOM port and then generates an interrupt for your program when the message has beencompletely received. You use the SM memory of the S7-200 to configure the Receiveinstruction for starting and stopping the receiving of messages, based on defined conditions. The Receive instruction allows your program to start or stop a message based on specific characters or time intervals. Most protocols can be implemented with the Receive instruction.Freeport mode is active only when the S7-200 is in RUN mode. Setting the S7-200 to STOP modehalts all Freeport communications, and the communications port then reverts to the PPI protocolwith the settings which were configured in the system block of the S7-200.Using the RS-232/PPI Multi-Master Cable and Freeport Mode with RS-232 DevicesYou can use the RS-232/PPI Multi-Master cable and the Freeport communications functions to connect the S7-200 CPUs to many devices that are compatible with the RS-232 standard. Thecable must be set to PPI/Freeport mode (switch 5 = 0) for Freeport operation. Switch 6 selectseither Local mode (DCE) (switch 6 = 0), or Remote mode (DTE) (switch 6 = 1).The RS-232/PPI Multi-Master cable is in Transmit mode when data is transmitted from the RS-232 port to the RS-485 port. The cable is in Receive mode when it is idle or is transmitting data from the RS-485 port to the RS-232 port. The cable changes from Receive to Transmit modeimmediately when it detects characters on the RS-232 transmit line. The RS-232/PPI Multi-Master cable supports baud rates between 1200 baud and 115.2 kbaud. Use the DIP switches on the housing of the RS-232/PPI Multi-Master cable to configure the cable for the correct baud rate. Table 7-11 shows the baud rates and switch positions.The cable switches back to Receive mode when the RS-232 transmit line is in the idlestate for a period of time defined as the turnaround time of the cable. The baud rateselection of the cable determines the turnaround time, If you are using the RS-232/PPIMulti-Master cable in a system where Freeport communications is used, the program in the S7-200 must comprehend the turnaround time for the following situations:- The S7-200 responds to messages transmitted by the RS-232 device.After the S7-200 receives a request message from the RS-232 device, the S7-200 mustdelay the transmission of a response message for a period of time greater than or equal tothe turnaround time of the cable.- The RS-232 device responds to messages transmitted from the S7-200.After the S7-200 receives a response message from the RS-232 device, the S7-200 mustdelay the transmission of the next request message for a period of time greater than orequal to the turnaround time of the cable.In both situations, the delay allows the RS-232/PPI Multi-Master cable sufficient time to switchfrom Transmit mode to Receive mode so that data can be transmitted from the RS-485 port to theRS-232 port.
收藏