Sunday, November 22, 2009
S7300 PLC Introduction
Briefly, the basic linear programming, linear programming with a simple non-branching structure: a simple block that contains all the commands the system. Linear programming is similar to hard-wired relay logic. As the name suggests, describes a linear programming implementation of a repetition of a set of instructions. All the instructions are in a block (usually the tissue block). Block is a consecutive, in each CPU scan cycle have dealt with linear programming. Its advantages and disadvantages of that? All of the instructions are in a block, this method is suitable for single-programming projects. Since only one program file, the software management capabilities was relatively simple. However, since all instructions are in a block, each scan cycle, all programs must be executed once, even if the program did not use some parts. This method is not efficient use of CPU. In addition, if there are multiple devices in the program, its commands the same, but the parameters are different, with different parameters will be only to repeat the preparation of this part of the program.
SIMATIC Manager using: SIMATIC Manager STEP 7 project, which is the main program, and also appears in the WINDOWS desktop.
LAD, STL, FBD preparation tools STEP 7 user program, the "ladder diagram (LAD)", "Statement List (STL)" and "functional block diagram (FBD)" programming language.
Using the SIMATIC Manager, you must first set the PG-PC interface. The tool used to configure the MPI network, the local contact address, transmission rate and the highest contact address.
STEP 7 basic package also includes dealing with closed-loop PID control block, select the "PID Control Parameter Assignment" block allocation for closed-loop control parameters.
Conversion S5 file: Using the S5/S7 converters can STEP5 program into the corresponding STEP 7 program.
Configuration SIMATIC: The tool provides a multi-user function of the system configuration.
Treatment failure in hardware, we often use the reset function.
CPU Memory Reset
Manual
Request
Memory
Reset
Perform
Memory
Reset
1. The mode selector on the
"STOP" position
2. The mode selector to maintain
In the "MRES" position,
Until the "STOP"
Indicator light flashes twice
(Slow)
3. Release mode selector
(Auto return to "STOP"
Location)
1. The mode selector to maintain
In the "MRES" position
(STOP indicator Fast
Flicker)
2. Release mode selector
(Auto return to "STOP"
Location)
By PG
1. The mode selector on the
"RUN-P" position
2. Menu choice:
PLC -> Operating
Mode -> Stop
3. Menu choice:
PLC -> Clear / Reset
1. Click "OK" button to confirm Memory Reset
Insert the memory card
1. The mode selector on the
"STOP" position
2. Insert a memory card
3. "STOP" lights flashing slow
1. The mode selector to maintain
In the "MRES" position
(STOP indicator Fast
Flicker)
2. Release mode selector
(Auto return to "STOP"
Location)
In the SIMATIC Manager, we can facilitate the conduct of PLC fault diagnosis. To quickly conduct of PLC hardware failure of the diagnostic work.
Take advantage of this feature, you can quickly obtain the status of PLC. For example, if a functional module with a diagnosis of a hardware failure, the use of symbols to determine which module has a fault where it is. When the double-fault module, it will show some details.
Open the tool: In the SIMATIC Manager, select the menu PLC-> Diagnose Hardware; The second method is to open in the hardware configuration tool online stations or click the toolbar icon.
Description: When you open the system diagnosis, from the CPU to read out the hardware configuration (screen left), all of the modules (including those extended chassis and distributed I / O) are displayed. If the CPU in STOP mode or module is faulty, there will be a sign marked out. Double-click the CPU or failure of the module can be more diagnostic information (see screen right), in the case, the analog module has a power supply failure.
Note: In the SIMATIC Manager, if the select menu Options -> Customize -> View and select the "Display Quick View when Diagnosing Hardware" (diagnostic hardware show Quick View) option, it only shows a list of fault blocks, rather than display all of the "Hardware Diagnostics" window.
Configuration of the possible issues
Configuration can not be compiled
In the S7-300, the configuration in the empty position
Of
Results / remedy
Because the parameters of distribution of the error, CPU into Stop mode
Analog module slot allocated to the incorrect location of
Because of an incorrect parameter distribution, analog module
Configuration error
Analog module is not the correct measurement range
Re-load configuration
Memory reset, the distribution of the same parameters
The establishment of hardware station or "Upload Station"
Can not open the hardware configuration
Open the station off
Module parameters can not be changed
Configuration can not download
Incorrect CPU (For example: is the CPU 315-2DP
Not the CPU 314)
Status Display LED SF = system error, programming error or from a fault diagnosis function templates
BATF = Battery failure: the battery voltage is insufficient or non-existent battery
DC 5V = 5V supply voltage directives
FRCE = When the enforcement of time-varying light
RUN = When the CPU starts flashing in the RUN mode, Chang-liang
STOP = STOP mode, Chang-liang, when asked when the memory reset slow
Blink, do quickly when flash memory reset.
Key switches are used to manually set the CPU operating modes
MRES = Memory reset (Reset Template)
STOP = STOP mode: non-compliance procedure
RUN-P = RUN mode: CPU execution procedures
RUN = implementation of the program, but the program can only be read, can not be rewritten.
Memory card slot memory card inserted in the slot. Memory cards can be without the battery
Permanently stored user program.
The first one under the battery cover to place lithium battery box.
MPI connection under the former built a 9-pin connector, which is between devices S7
MPI multi-point interface connection.
Implementation of the memory reset and completely re-start
RUN-P
RUN
STOP
MRES
1. The mode switch set to STOP
RUN-P
RUN
STOP
MRES
RUN-P
RUN
STOP
MRES
2. The mode switch to the MRES, and maintained until the STOP LED slow flashing
Twice. Let go, mode switch back to STOP position.
RUN-P
RUN
STOP
MRES
4. The mode switch to RUN-P position!
(From the STOP switch to RUN / RUN-P time to implement a full
Re-start)
RUN-P
RUN
STOP
MRES
3. Then mode switch to the MRES position, until the STOP LED start blinking rapidly. Let go, mode switch back to STOP position.
RUN-P
RUN
STOP
MRES
Start "Monitor / Modify Variables" tool
STEP7 programming languages and PLC programming
SIEMENS PLC system Siemens SIMATIC MAGAGER used for PLC programming to carry out state control machine tool components, it mainly consists of power supply module, CPU module, input and output module, its interface are: RS232 Interface, PROFIBUS Interface , MPI cable interfaces. Through the X122, MPI jack, so that the computer with the NCU connected PLC.
l hardware configuration
Hardware configuration: tell the PLC hardware structure of the process of
Baud Rate: MPI 187.5kbps OPI 1.5Mbps
Process: to build the project - → Jianzhan - → Configuration Hardware
* Auto-configuration: The construction of PLC and 840D cable connected to an automatic configuration of automatic identification (upload station) will be transmitted PLC computer:
PLC-→ UPLOAD-→ select MPI Address = 2, if the Address = 3, will include the PLC and the NCU
If the backup PLC, then the process is:
New Project-→ plc-→ upload station, so the hardware will be backed up.
End station building, there are two folders: hardware and cpu. CPU folder under the S7 program.
S7 program there are three directories:
(1) symbols such as I40.1 symbol table for the first 40 bytes of the first one
(2) BLOCKS function block
* Manual configuration:
Process: Open the S7-→ New File - → INSERT-→ STATION-→ SIMATIC 300 - → double-HARDWARE-→ appear Box - → INSERT-→ HARDWARE COMPONENT-→ PROFILE-→ STANDARD-→ S300-→ RACK300
Select the appropriate position (to be set bits in the table), then the corresponding module on the right side double-click on modules will be chosen, selected and then download the
l Programming
PLC programming course, the can use the following three forms:
Ladder Logic (LAD):
Statement List (STL):
Function Block Diagram (FBD):
Statement List programming instructions commonly used:
And instruction: A normally open AN NC
Or to order: O Normally open ON NC
Output instructions: =
Call instruction: CALL FCXX
FP: rising edge detection instruction
FN: falling edge detection instruction
FP: After must register with the middle
CLR: operation results, Clear
SET: set a
S: Set 1
R: Clear
l: Block
BLOCK main · STEP7 There are several commonly used: OB tissue mass, FC function blocks, FB function blocks, DB data blocks, etc.
OB: function blocks, equivalent to the main program, often are OB1 and OB100;
FC, FB: Function Block, which is equivalent subroutine
Subroutine in the compilation finished, you must call the subroutine in the main program
OB100 is a PLC after power-first execution, is executed only once; OB1 is the PLC CPU cycles implementation process. After the first implementation of the power-OB100, and then the implementation of OB1 (repeated implementation; OB100 call FB1 (Siemens, has been prepared)
FB1 is the system bus connection PCU with OPI and MCP, the control panel Definition:
(1) control panel starting address of the input address
(2) the number of control panel
(3) The control panel's output addresses starting address
Control Panel MPI Address: MCPIBUSADR = 6
· OB1 block
FC2: Basic NCK and PLC communications NCK ← → PLC
FC2 must be OB1 the beginning of FC2 ---- "gp_hp"
FC10: dealing with alarm information FC10 ---- "AL-MSG"
PLC generated alarm, passed NCK, NC to take measures, while MMC displays alarm text
Call FC10, there are two parameters must be set
TouserIF = TRUE (equivalent to 1) and FALSE (equivalent to 0)
Quit: = I3.7 (warning text). Alarm Reset button (RESET) addresses I3.7
FC19: Machine control panel main program FC19 ---- "MCP-IFM"
BAGNO (mode group number) = B # 16 # 1 (B - B hex 16-16 hex)
CHANNO (channel number) = B # 16 # 1
SPINDLEIFNO = B # 16 # 4 (spindle number)
FEEDHOLD = M100.0 (feed suspended)
SPINDLEHOLD = M100.1 (spindle stop)
· DB block
1. DB module types are:
DBB - Data Module Type
DBW - block word (16 bit)
DBD - block double word (32 bit)
2. Data Type:
DOUBLE: real or integer number, input range ± 4.19 × 10-307 ----± 1.67 × 10308
DWORD: integer number, ranging from -2.147 × 109 ---- 2.147 × 109
BOOLEAN: 0 be a
BYTE: integer, range digital -128 ---- 127
STRING: a maximum of 16-bit string
3. Common data block feature
DB2: alarm interface signals. The signal from the PLC to the NCK, in the PLC set the corresponding bit in the MMC will be able to generate a corresponding alarm number (seven at the beginning of the alarm is set for machine tool manufacturers)
DB10: Show NCU state, used to exchange NCK fast I / O interface to the state, there are a number of the state of the signal NCK
DB11: mode group signal interface
DB19: Operation panel signal interface
DB21-DB30: channel signal interface
DB31-DB61: shaft / spindle interface signals
4. Debugging a common data blocks are:
DBX6.0: feed to be able to prohibit
DBX6.1: read to be able to prohibit
DBX7.0: Start to be able to prohibit PLC → NC
DBX7.7: Channel reset
DBX194.0 --- DBX206.3 NC → PLC
DBX1.5: entry into force of a measurement system
DBX1.6: force measurement system 2
DBX2.1: Control enabled
DBX21.7: Pulse enable (if not, compared to the free end)
DBX4.3: Axis Stop PLC → NC
DBX12.0: the hard-axis negative limit
DBX12.1: the hard-axis positive limit
DBX12.7: back to zero deceleration
DBX61.7: current loop effective
DBX61.6: speed loop effective
DBX61.5: Position Loop Effective
DBX61.4: axial static
DBX83.5: spindle speed setting within the framework of
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment