變頻試驗臺直線運動結(jié)構(gòu)及基于S7-200速度示教系統(tǒng)控制軟件與上位監(jiān)控系統(tǒng)設(shè)計【說明書+CAD】
變頻試驗臺直線運動結(jié)構(gòu)及基于S7-200速度示教系統(tǒng)控制軟件與上位監(jiān)控系統(tǒng)設(shè)計【說明書+CAD】,說明書+CAD,變頻試驗臺直線運動結(jié)構(gòu)及基于S7-200速度示教系統(tǒng)控制軟件與上位監(jiān)控系統(tǒng)設(shè)計【說明書+CAD】,變頻,試驗臺,直線運動,結(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 Network
The following information is an overview of the protocols supported by the S7-200 CPUs.
- Point-to-Point Interface (PPI)
- Multi-Point Interface (MPI)
- PROFIBUS
Based on the Open System Interconnection (OSI) seven-layer model of communications
architecture, these protocols are implemented on a token ring network which conforms to the
PROFIBUS standard as defined in the European Standard EN 50170. These protocols are
asynchronous, character-based protocols with one start bit, eight data bits, even parity, and one
stop bit. Communications frames depend upon special start and stop characters, source and
destination station addresses, frame length, and a checksum for data integrity. The protocols can
run on a network simultaneously without interfering with each other, as long as the baud rate is the
same for each protocol.
Ethernet is also available for the S7-200 CPU with expansion modules CP243--1 and CP243--1 IT.
Communications Options
Siemens provides two programming options for connecting your computer to your S7-200: a direct
connection with a PPI Multi-Master cable, or a Communications Processor (CP) card with an MPI
cable.
The PPI Multi-Master programming cable is the most common and economical method of
connecting your computer to the S7-200. This cable connects the communications port of the
S7-200 to the serial communications of your computer. The PPI Multi-Master programming cable
can also be used to connect other communications devices to the S7-200.
Features of the S7-200
The S7-200 provides several special features that allow you to customize how the S7-200
functions to better fit your application.
The S7-200 Allows Your Program to Immediately Read or Write the I/O
The S7-200 instruction set provides instructions that immediately read from or write to the physical
I/O. These immediate I/O instructions allow direct access to the actual input or output point, even
though the image registers are normally used as either the source or the destination for I/O
accesses.
The corresponding process-image input register location is not modified when you use an
immediate instruction to access an input point. The corresponding process-image output register
location is updated simultaneously when you use an immediate instruction to access an output
point.
Tip
The S7-200 handles reads of analog inputs as immediate data, unless you enable analog input
filtering. 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 inputs
or outputs during the execution of your program. There are three reasons for using the image
registers:
- The sampling of all inputs at the start of the scan synchronizes and freezes the values of
the inputs for the program execution phase of the scan cycle. The outputs are updated from
the image register after the execution of the program is complete. This provides a stabilizing
effect on the system.
- Your program can access the image register much more quickly than it can access I/O
points, allowing faster execution of the program.
- I/O points are bit entities and must be accessed as bits or bytes, but you can access the
image register as bits, bytes, words, or double words. Thus, the image registers provide
additional flexibility.
The S7-200 Allows Your Program to Interrupt the Scan Cycle
If you use interrupts, the routines associated with each interrupt event are stored as part of the
program. The interrupt routines are not executed as part of the normal scan cycle, but are
executed 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 respective
priority assignments. See the Interrupt instructions in Chapter 6 for more information.
The S7-200 Allows You to Allocate Processing Time for Run Mode Edit
and Execution Status
You can configure a percentage of the scan cycle to be dedicated for processing a run mode edit
compilation or execution status. (Run mode edit and execution status are options provided by
STEP 7--Micro/WIN to make debugging your program easier.) As you increase the percentage of
time that is dedicated to these two tasks, you increase the scan time, which makes your control
process run more slowly.
The default percentage of the scan dedicated to processing run mode edits and execution status
is set to 10%. This setting was chosen to provide a reasonable compromise for processing the
compilation and status operations while minimizing the impact to your control process. You can
adjust this value by 5% increments up to a maximum of 50%. To set the scan cycle time-slice for
background 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 Communications
Selecting the Communication Interface for Your Network
The S7-200 supports many different types of communication networks. The selection of a network
is performed within the Set PG/PC Interface property dialog. A selected network is referred to as
an Interface. The different types of interfaces available to access these communication networks
are:
- PPI Multi-Master cables
- CP communication cards
- Ethernet communication cards
PPI Protocol
PPI 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 a
shared connection which is managed by the PPIprotocol. PPI does not limit the number of masters
that 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 Interfaces
From the Set PG/PC Interface dialog box, you use the Installing/Uninstalling Interfaces dialog box
to install or remove communications interfaces for your computer
1. In the Set PG/PC Interface dialog box, click Select to access the Installing/Uninstalling
Interfaces dialog box.
The Selection box lists the interfaces that are available, and the Installed box displays the
interfaces that have already been installed on your computer.
2. To add a communications interface: Select the communications hardware installed on your
computer 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 Parameter
Assignment Used box.
3. To remove a communications interface: Select the interface to be removed and click
Uninstall. When you close the Installing/Uninstallling Interfaces dialog box, the Set PG/PC
Interface dialog box removes the interface from the Interface Parameter Assignment Used
box.
Building Your Network
General Guidelines
Always install appropriate surge suppression devices for any wiring that could be subject to
lightning surges.
Avoid placing low-voltage signal wires and communications cables in the same wire tray with AC
wires and high-energy, rapidly switched DC wires. Always route wires in pairs, with the neutral or
common 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 repeater
or an EM 277 module to provide isolation for your network.
Caution
Interconnecting equipment with different reference potentials can cause unwanted currents to
flow 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 shares
a common circuit reference or is isolated to prevent unwanted current flows.
Determining the Distances, Transmission Rate, and Cable for Your
Network
The 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 ground
potentials can exist when grounds are physically separated by a long distance. Even over short
distances, load currents of heavy machinery can cause a difference in ground potential.
Using Repeaters on the Network
An RS-485 repeater provides bias and termination for the network segment. You can use a
repeater for the following purposes:
- To increase the length of a network: Adding a repeater to your network allows you to extend
the 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 the
baud rate. You can use up to 9 repeaters in series on a network, but the total length of the
network must not exceed 9600 m.
- To add devices to a network: Each segment can have a maximum of 32 devices connected
up 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 quality
of the transmission by separating the network segments which might be at different ground
potentials.
A repeater on your network counts as one of the nodes on a segment, even though it is not
assigned a network address.
Creating User-Defined Protocols with Freeport Mode
Freeport mode allows your program to control the communications port of the S7-200 CPU. You
can use Freeport mode to implement user-defined communications protocols to communicate with
many 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 (for
Port 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 the
S7-200 to transmit up to 255 characters from the COM port. The transmit interrupt notifies
your program in the S7-200 when the transmission has been completed.
Receive character interrupt: The receive character interrupt notifies the user program that a
character 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 the
COM port and then generates an interrupt for your program when the message has been
completely received. You use the SM memory of the S7-200 to configure the Receive
instruction 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 mode
halts all Freeport communications, and the communications port then reverts to the PPI protocol
with 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 Devices
You 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. The
cable must be set to PPI/Freeport mode (switch 5 = 0) for Freeport operation. Switch 6 selects
either 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 mode
immediately 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 idle
state for a period of time defined as the turnaround time of the cable. The baud rate
selection of the cable determines the turnaround time, If you are using the RS-232/PPI
Multi-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 must
delay the transmission of a response message for a period of time greater than or equal to
the 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 must
delay the transmission of the next request message for a period of time greater than or
equal to the turnaround time of the cable.
In both situations, the delay allows the RS-232/PPI Multi-Master cable sufficient time to switch
from Transmit mode to Receive mode so that data can be transmitted from the RS-485 port to the
RS-232 port.
收藏