Abstract: Rockwell AB programmable logic controller (PLC) programming method (ladder diagram, structured text, sequential function chart, etc.), command systems and programming tools (programming software and programming equipment).
Keywords: programmable logic controller; instruction; programming software
Rockwell AB of the PLC as support for multiple programming methods, with a rich programming instructions, with each have a corresponding series of PLC programming software, simulation software debugging, so automation has been more and more widely.
1, programmatically all the AB PLC (Micrologix1000, SLC500, PLC-5 and Controllogix) support the ladder diagram programming approach, while most of the PLC-5 family of processors (more than enhanced series) also supports the structure of text and sequential function chart two kinds of programming.
1, ladder ladder is one of the most typical way is the most basic programming, which uses graphic language, followed the relay s contacts, coils, series and parallel so terminology and graphical symbols, and add some contacts Control Relay no symbols. Ladder image, intuitive way for people familiar with the relay that is very easy to accept, without the need to learn a deeper knowledge of computers. This is one of the most extensive programming approach for sequential logic control, discrete control, timer / counter control operation.
Ladder generally composed of several different steps, each step can also enter the command by one or more component and an output instruction. Output instructions should appear in the far right ladder, and enter the command will appear in the output command to the left, shown in Figure 1.
Figure 1
2, ???????? text text structure is similar to BASIC programming, use it can be easy to create, edit and implement complex algorithms, Tebie in data processing, HPC storage, making judgments, You Hua algorithm Sheji multiple data types of variables described in the application very effective. PLC-5 processor architecture for the text to support the following structure.
Assignment: an integer or floating point value assigned to a data unit of non-maintained type bit assignment: a binary number assigned to a digital unit, when the processor mode from programming mode to run mode or when the Sequential Function Chart (SFC) of step After being scanned, the bit is cleared.
Maintain the type bit assignment: a binary number assigned to a digital unit, when the processor mode from programming mode to run mode or when the SFC step is scanned, these bits are not cleared.
IF-THEN-ELSE: the implementation of a conditional program FOR-NEXT: Repeat a program WHILE: Just enter the expression for the true implementation of a program to repeat REPEAT: Repeat the process until an input expression is a true EXIT: in dealing with before the device reaches the normal end of the exit condition loop structure (REPEAT, FOR, or WHILE)
CASE: According to a mathematical expression or manipulate the data section of the value of conditional execution procedures;;: the equivalent of a no-operation instruction NOP
Ladder Function: call any of the ladder program or instruction.
Here are some examples of using structured text programming:
IF (T4: 0.DN) THEN
TON (T4: 0,0.01,100,0)
ELSE RES (T4: 0)
END-IF
3, Sequential Function Chart SFC
SFC is a sequence control language, this language can be a control process control, and display the process status. For user applications, can be logically divided into manageable steps and conversion to replace the long ladder diagram or structured text. SFC in each step corresponds to a control task (in fact a control task in order to complete a certain procedure, the program can ladder diagram, structured text, SFC of any form), with a box that step and the steps between a conversion condition (also a process), through the detection of the condition to determine when the processor can begin the next step, said conversion conditions with a horizontal line. And conversion by showing the conditions of these steps, you can process any time to see the state of a machine. SFC program simple example,Shown in Figure 2.
Figure 2
Second, instruction
AB PLC has a rich instruction set (some more than 110 instructions), although the different series of PLC types can support differentiated instruction, but some basic instructions are all shared, the following introduces the PLC-5 Series programmed controller instruction type.
1, relay instructions relay commands used to monitor the state of data in the table spaces, such as input control word bit or bit timer, relay-type instructions include:
Check the links (XIC); check off (XIO);
Export incentives (OTE); output latch (OTL);
Output unlock (OTU); immediate input (IIN);
Immediate output (IOT).
2, timer / counter instruction timer and counter instructions to control the time and event count based operations, including:
Through delay timer (TON); off delay timer (TOF);
Maintain the type timer (RTO); plus count (CTU);
By counting (CTD); timer / counter reset (RES).
3, compare instructions compare instructions compare the expression for more instructions or a designated value, which includes:
Comparison (CMP); equal to (EQU);
Greater than or equal (GEQ); greater than (GRT);
Less than or equal (LEQ); less than (LES);
Limit Test (LIM); shield equal comparison (MEQ);
Not equal (NEQ).
4, calculation instructions calculating expressions or instructions used to calculate the arithmetic instructions with the specified arithmetic operations, which include:
Calculation (CPT); multiplication (MUL);
Negation (NEG); sine (SIN);
Square root (SQR); Sort (SRT);
Subtraction (SUB); tangent (TAN);
Arcsine (ASN); inverse cosine (ACS);
Logarithmic (LOG); the natural logarithm (LN);
Division (DIV); cosine (COS);
Clear (CLR); average (AVE);
Tangent (ATN); addition (ADD);
Standard deviation (STD); X of Y times the power (XPY).
5, the logical order logic instructions for logical operations, including:
And operation (AND); non-operation (NOT);
Or operation (OR); exclusive or operation (XOR).
6, the conversion instructions convert an integer and BCD instructions for converting between degrees and radians and convert between, including:
Integer into a BCD code (TOD);
Convert from BCD code integer (FRD);
Radians into degrees (DEG);
Degrees into radians (RAD).
7-bit processing and transmission of digital processing and transmission of command instructions for position adjustment and bit transmission, including:
Bit allocation (BTD); word transfer (MOV);
Shielded transmission (MVM).
8, the file command file directive for file data and file data comparison operations, including:
File arithmetic and logic instructions (FAL);
Document retrieval and comparison instructions (FSC);
File Copy (COP);
File Fill (FLL).
9, the shift command shift command for the analog parts and the movement or flow of information, including:
Left shift (BSL); bit shifted to the right (BSR);
FIFO Load (FFL); first in first out unloading (FFU)
After first-out load (LFL); discharged after first-out (LFU).
10, programmed instruction programmed instruction can change the direction of ladder program execution, including:
Jump (JMP); prohibit users from interrupt (UID);
Constant false instruction (AFI); label (LBL);
Allows the user to interrupt (UIE); temporary end (TND);
Suspension (BRK); loop (FOR, NXT);
SFC Reset (SFR); subroutine (SBR);
Jump to subroutine (JSR); return (RET);
Master Reset (MCR); conversion end (EOT).
11, I / O instructions for information transmission of information, including local or remote I / O framework for the block transfer module to read and write, and transfer of information between processors.
Block transfer write (BTW); block transfer read (BTR);
Information instruction (MSG).
There is also used to control the operational characteristics of a continuous and repetitive sequence of automated devices on the command line (such as order input SQI, the order of output SQO, in order to mount the SQL), for process control of PID instruction; used to detect diagnosis of user program instructions and directives, etc. ASC ?????. A large number of instructions to the user in the development process, you can select the appropriate instructions, which greatly reduces development time.
Third, the programming software and programming equipment
Rockwell AB PLC for each series have the appropriate programming software and simulation software. Table 1 shows the series is widely used in the corresponding number of PLC programming software.
Table 1 PLC programming software
PLC Series PLC-5 SLC-500 or Micrologix100
Programming software for PLC-5 AI Series SLC500 AI Series
RSLogix5 RSLogix500
Simulation software RSEmulute5 RSEmulate500
AI series programming software which is MS-DOS-based package, can the corresponding series of AB PLC processor to achieve the offline and online development, documentation and reporting capabilities, as AI software menu and function keys, etc., so early scholars, easy to use, its powerful editing and diagnostic tools will also develop and fault detection for the ladder to save a lot of time. Help system can help users familiar with the software s features, and to provide more information on PLC instruction set.
RSLogix5 and RSLogix500 is based on Microsoft 32 bit under the Windows95 or Windows NT package. It provides each user the desired functions, such as the full window of friendly interface, flexible and easy to use editor, points - click way into the input and output configuration, powerful database editor, diagnostic and troubleshooting tools and reliable communications. Therefore RSLogix programming program product suitable for any level developer. Most importantly, RSLogix products are also fully compatible with previous MS-DOS-based programming software generated Rockwell procedures, so that cross-platform program is easy to convert and maintain. Therefore RSLogix products more suitable for modern programming. And running before the start of the series of procedures for testing and debugging is necessary, RSEmulate series of simulation software can be used to simulate one or more running SLC500 or PLC-5 processor (RSEmulate500 simulation SLC500, RSEmulate5 Simulation PLC-5). RSEmulate series of simulation software is Microsoft Windows-based package, which in addition to simulation SLC500, PLC-5 can be used in addition to fault detection, ladder scan option, serial device simulation, very convenient to use.
For each series, Rockwell AB PLC, we can through various means of communication, using different programming device for programming. Common programming devices have a personal computer (386 or above) and AB dedicated programmer. We can be the serial port programmer for one to one AB PLC programming, you can also use the network on a number of PLC programming: for example, DH-line programming of the PLC-5, Figure 3 shows, in the DH-485 on-line on SLC500 programming, such as in Figure 4 show. For SLC500 or Micrologix1000, we can also use the handheld programmer (HHT) programming.
Figure 3
4, Conclusion In summary, AB produced the series PLC, as support for multiple programming languages with rich and advanced instruction, with codeCheng software variety, strong function, easy to learn, so it is easy for the majority of designers, users are familiar with, and very easy to achieve, such as Gao Su sequence control, motion control and drive control, ??????¤, AB PLC in automation Ying Yong prospect is very extensive.