Tag Archives: PLC programming

Normally closed contact Input signal Processing circuit and PLC ladder diagram

In these input signals can only be provided by a normally closed contact, Figure 1a is to control the motor run relay circuit, SB1 and SB2 start button and stop button, respectively, if they are normally open contacts connected to PLC input, type contacts in the ladder diagram with exactly the same figure 1a. If access PLC of is SB2 of often closed touch points, by Xia Figure 1B in the of SB2, its often closed touch points disconnect, X1 into OFF, it of often open touch points disconnect, apparently in trapezoidal figure in the should will X1 of often open touch points and Y0 of coil series (see figure 1c), but then in trapezoidal figure in the by with of X1 of touch points type and PLC add-ins SB2 of often open touch points Shi just instead, and following electrical circuit diagram in the of habits is instead of. Proposed as normally open for PLC input signal.


     If some signals can only be normally closed contact input, you can enter all designed for normally open to, and then in the ladder diagram knowledge input contacts of the relay contacts to the opposite, that is normally open to normally closed contact, normally closed contact normally open contacts instead.

FX2 series PLC stepping sequential control instruction

FX series PLC 2 step instructions there are two: stepping contact instructions step and STL RET return instructions.

1, STL: stepping contact instructions Ladder diagram symbols
Significance of STL instructions to activate a State. Reflected in the ladder diagram from the bus status led on points. STL function of instruction established a bus, so that the State of all the child on the bus. Step contact instructions in the ladder diagram is shown in Figure 5 below.



2,Step return instructions Ladder diagram
RET instruction is used to return to the main bus bars. When completion of stepsequencer, non-State programs completed in the main bus, to avoid logic errors. Transfer the RET instruction must be used at the end of the program.




PLC differential circuit

Rise differential differential circuit and the falling edge of differential pulse circuit, discussed below.

Rose along differential pulse circuit, PLC is to cycle scan way work of, in PLC first times scan Shi, entered X0 by OFF into ON Shi, M100, and M101 coil connected, but in first line of M101 of often open touch points still connected, because the line has scan had has, until PLC second times scan Shi, M101 of touch points only disconnect, Y0 coil disconnect. Y0 is the ontime for a scan cycle, as shown in Figure 8.

Next introduce the falling edge of differential pulse circuit, as shown in Figure 9, when X0 from ON to OFF is connected a scan cycle M100, Y0 is a scanning pulse output, specific works, please themselves.

Using PLC to realize any of the input signal frequency


Using PLC to realize any of the input signal frequency





Frequency pulse signal applied on the X0 side, in the first pulse arrives, a scanning cycle pulse M100, M100 normally open camp, closed a scanning cycle. Determine the condition that Y0 Y0 State set to 0, M100 set to 1.
Y0 in the conditions of work in two branches, 1th slip roads connecting, disconnect 2nd branch, Y0 reset 1.


First pulse comes after a scan cycle, M100 for 0, Y0 reset 1, Y0 in such conditions, the second slip road keep Y0 reset 1.


When the second pulse arrives, a single scan cycle pulse M100, Y0 reset 1, M100 is set to 1, this makes Y0 changed its status from 1 both set to 0.


Second pulse comes after a scan cycle, 0 and M100 Y0 reset set to 0 until the third when it comes to scanning Y0 and M100 and exactly the same when it comes to first pulse, Y0 will repeat the procedure discussed in front of state changes.


Through the above analysis, the X0 sent two pulses, Y0 produces a pulse, complete the input signal frequency

PLC Timer delay time extension

Timer has a maximum time of the time, such as 100ms timer maximum timer time is 32767.7s. As in the project delay time is greater than the value that you want to do, one of the most simple method is to use a timer relay, that is to start a timer time, time time to time, with a first timer normally open start second timer, and then use the second timer starts the third one, and so on. Remember to use a timer contact to control final control objects can be. The ladder diagram in Figure 4-5 is one such example.
 
Above using the timer timer time the long delay. In addition also can use of timer with registers with the long delay, as shown in Figure 6. Normally open X1 is in the working condition of this circuit, when X1 connected circuit.
 
The timer T1 timer T1 in the coil circuit normally closed contact, it makes the timer T1 every 10s through time, the ontime for a scan cycle. Every time the timer T1 C1 to remember one number connected to remember. And when you remember to register value and make its working object Y0, and begins from the X1 connected point set the delay time for the timer value registers on the set value. X2 registers the reset condition C1.

Mitsubishi FX series PLC multiple output directives (MPS and the MRD, and MPP)


Precautions for use:
 
(1) the MPS order multiple circuit or circuits of electric shock can be stored up to back multiple branches out.
 
(2) the 1th MPS stack instruction before the branch, multiple branches using MRD stack before the branch instruction in the middle and last branch of multiple circuits using MPP out of the warehouse instruction.
 
(3) finally slip MPP instruction must be used, and MPS with MPP‘s use without much 11 times, and occur in pairs.

Reverse, Non processing and END PLC instructions

INV (Inverse) instruction in the ladder diagram with a 45 ° short slashes to represent, it will perform the calculation result be negated before the instruction, and the result is 0 it becomes 1, and the result was 1 becomes 0. In the following diagram, if X0 and X1 both ON, Y0 is OFF; otherwise, Y0 is ON. INV instructions can also be used for pulse LDP,LDF,ANDP contact instructions.


Handheld programmer type INV command, first by NOP keys, and then press the P/I key.


NOP (Non processing) for no operation, and the sequence for air operations. When you do finish clear user memory user memory contents become no operation.


END (End) to end the directive, will be forced to end the current scanning implementation process. If not END command, from the user‘s first step to the last step of the program memory; END end of Instruction in a program, perform the first step to END this program in one step, use the END command scan period can be shortened.


When in the debugger, you can insert the END directive in the wake of the program, starting from the first paragraph sub-paragraph debugging, debugging must be deleted after the program END in the middle of instructions, errorchecking program in this way is also very useful.

PLC set and reset commands usage

1 SET instructions
 
SET command called reset instructions. Its function is to: driving coil, making it with locking function, maintain the on State. In Figure 1, when the movable contact X0 closed, SET instruction is executed, Y0 coil connected. After first X0, Y0 coils to keep the on State to Y0 coil power, you must use the RST reset instructions.
Reset instructions operating elements for the output relay y s m, auxiliary relays and relay.
 
2 RST directive
 
RST command called reset instructions. Its function is to reset the coils. In Figure 1, when the movable contact X1 closed, RST instruction is executed, Y0 reset coils. After first X1, Y0 coils remain a disconnected state.
Reset instructions operating elements for the output relays, auxiliary relays y m t, s, integrating state relay timer, counter, c. It is also zero out the word element d, v, z.
 
 

What PLC programming

Simply put, PLC is a programmable logic controller, the most used, the simplest way of programming is the ladder diagram, so even if you don’t have a program that can be. PLC function can replace traditional relay realize automatic control. More knowledge, I suggest you look at this Web site, you will be rewarding.

The steps and principles of PLC programming summary

1. The General steps for PLC programming
 
(1) if the PLC with program, should learn more about the program features and level of satisfaction of needs and modifiability. Using PLC comes with program as far as possible.
(2) all PLC related to the input signal (button, switch, speed, and temperature sensor), the output signal (contactors, solenoid valves, lights, etc) list respectively, and PLC interface within range determined for each signal is assigned a number.
(3) detailed knowledge of production process and equipment requirements for control systems. Draw the various functions of the system of work circulating diagram or flow chart, functional diagrams and related signal timing diagram.
(4) in accordance with the requirements of PLC programming language design ladder diagram or writing programs. Ladder diagram symbols should be on scene signal with CRT PLC internal interface provides annotations.
 
2. General principles of PLC programming
(1) ensure the safety of persons and equipment design is never superfluous.
(2) Safety design of PLC program, doesn’t mean the hardware protection can be omitted.
(3) understanding characteristics of the PLC.
(4) design transfer pilot is easy to debug.
(5) a modular design.
(6) to minimize the program.
(7) comprehensive comments, easy to repair.

Ladder diagram programming principle and PLC programming method

(1) input/output relays, auxiliary relays, timers, counters, the contacts of the device can be used repeatedly without complex programs to reduce the number of contacts.
(2) the ladder each row from left buses start coil terminate in the right bus. Contacts should not be placed right of the coil
(3) in addition to stepping outside of any coil, timers, counters, advanced directives cannot be directly connected to the bus left.
(4) in the program, do not allow the same number of coil output twice (double coil output).
(5) the bridge circuit is not allowed.
(6) the program sequence should be top down, written from left to right. In order to reduce the number of program execution steps, procedures should be left to the right small large small.


(7) input devices with normally open contact
(8) experience in PLC programming design method
In the traditional relaycontactor control and PLC on the basis of typical control circuit, based on accumulated experience to translate, modify and improve, and get the final program.
(9) the common PLC typical control circuit

Mitsubishi FX series PLC programming of work process

Most PLC using batch input/output cycle work scan, running as user programs one by one in the order. A complete cycle can be divided into three stages:


(A) enter the refresh phase


Programs at the start of monitoring program the machine to scan input each signal on all input ports, and in turn into the corresponding input mapping registers.


(B) the processing stage


All input ports sampled after the logical operation begins, based on user input controls, starting from the first article, article-by-article implementation and the corresponding logical result, deposit corresponding to the intermediate element and output element mapping registers, when finally a program‘s execution has been completed, becomes the output refresh processing.


(C) output refresh phase


Output the contents of element mapping registers, starting from the first output port, to the last end, read in turn corresponds to the output latch, which will drive the output devices to form actual output may be programmed.


In General, the PLC scanning cycle is about 10ms, in addition, programmable logic controller input/output and response lag (about 10ms input filter), relays mechanical delay of about 10ms, so a signal from input to output, the lag of approximately 20–30ms.


Effective width should be greater than 1 cycle of the input signal +10ms.

PLC programming language types

According to programmable applications, programming languages can be used in combination, commonly used programming languages:
Ladder diagram programming language
Boolean mnemonic programming language (STL)
Function diagram of programming languages
Function block diagram programming language
Structure statement describes the programming language
Ladder diagram and structure statement describes the programming language
Function diagram and Boolean mnemonic programming language
Boolean mnemonics and structured statement describing programming languages


1, ladder (Ladder Diagram) programming language
Ladder diagram programming languages are ladder diagram symbols to describe a programming language to program. Ladder diagram programming language used, the program takes the form of ladder diagram description. This programming language conditions of causation is used to describe events and results. Each step is a causal relationship. In cascade, and describes the conditions that the event occurred on the left, behind the incident results in.
Ladder diagram programming language is the most commonly used programming languages. It comes from a relay logic control system description. In the field of industrial process control, electrical technicians are familiar with relay logic control technology is, therefore, by this logic control technology development of ladder were welcome, and a wide range of applications.


Ladder diagram programming language features:
(1) corresponding to the electric schematic, intuitive and correspondence;
(2) consistent with the original relay logic control technology, electrical technology, easy to grasp and learn;
(3) with the original relay logic control technology of difference is, energy flow in the ladder diagram (Power FLow) is not a useful current, relays are not within the actual relay, so when needed the original relay logic control technology concepts to be treated;
(4) one by one with the Boolean mnemonic programming language relationship, facilitate mutual conversions and process checks.


2, Boolean mnemonics (Boolean Mnemonic) programming language
Boolean mnemonic programming languages are using Boolean mnemonic to describe a programming language to program. Boolean mnemonic Assembly language is very similar to programming languages and computer, used to express Boolean mnemonic function.
Boolean mnemonic programming language has the following characteristics:
(1) is represented by a mnemonic character manipulation functions, is easy to remember and easy to grasp features;
(2) making up a thread on the keyboard that is represented by a mnemonic, has the characteristic of easy operation, in computer programmingfree design;
(3) corresponding to the ladder one by one. Its basic characteristics and ladder diagram language is similar.


3, the function diagram (Sepuential Function Chart) programming language
“Δ PI core at qiaoqi JI sash constricta scoops pumeiyun timid mold δ PI core at qiaoqi offering defects Fang grow permanent teeth sash flies SAC restored colonization sash constricta scoops Park americium bath k  wall  Yun beat ⒄ method Hu blow SAC restored colonization sash constricta scoops Park americium bath 2 take mold δ PI core at qiaoqi envy took Fang Zhi  Li Portuguese low ring rule  outfitting screen limulus unitary low often  Yong δ amaranth Oboro Zheng  melon low car moutong sacral Shen Xin charm returned twilight  Dan when 构词成分。 recalled scoops forced cough baking tube boy charm cough bi scoops bashing flail system Tomb low ǎ when 构词成分。 Lei sash flies Sam check ど scoops ping figure they resembled ripples Palmetto token bath 9 δ PI core at qiaoqi JI sash constricta scoops Park americium margin milk di Kang led? BR> (1) to function for mainline, structured clear, Ease of understanding and communication of program operations;
(2) for large programs, Division of design, a more flexible program structures, to save programming time and debugging time;
(3) commonly used in large scale school system, the program more complex situations;
(4) only performed step commands and actions are, scan conversion to the active step, thus, the entire program to scan other programs program scanning time significantly shorter.
Function diagram from Petri, Laurentius (Petri) network, because of its graphical expression, can be relatively simple and clear description of concurrent systems all phenomena and complex systems, and system deadlocks, insecurity and other anomalous phenomena analysis and modeling, models can be programmed directly on the basis of, so, get pan application. In recent years, the introduction of programmable controllers and small distributed control system also provides the function diagram is used to describe programming language software. Petri, Laurentius (Petri) some basic concepts of network, when I will have the opportunity to introduce to members to help further understanding of the function diagram.


4, function block diagram (Function Block) programming language
Function block diagram programming language is using function module to module has the function, different functional modules with different functions. It has several inputs and outputs, by way of flexible connections, connected to the other Terminal required, complete the necessary control operations or control functions. Function modules can be divided into different types, in the same type, may also be different for function parameters to functions or applications differ, for example, input the number, the type of input signal, such as the use of different make it different. Because of how soft the function module and function modules and connection to an external terminal, control changes, signal connections replace operation can be easily achieved. Function block diagram programming language features are:
(1) to function as a unit, start from the control function, makes it easier to control analysis and understanding of the programme;
(2) functional module is a graphical method of describing function, it greatly facilitates the design, intuitive staff programming and configuration, better ease of operation;
(3) control larger, controlled a copying system, owing to the control function can be expressed more clearly, therefore, programming and configuration time can be shortened, can also reduce debugging time;
(4) because each function module requires a certain amount of program memory, perform on the function module requires a certain amount of time, so the design language in large and medium sized programmable controller and distributed control system has been introduced only in the programming and configuration.


5, structured statements (Structured Text) describes the programming language
Describes the programming language is a structured statement using a structured description of the phrase to describe a programming language to program. It is a programming language similar to the high-level language. Large programmable logic controller systems, structured statements describing the programming language is often used to describe the relationship between variables in the control system. It is also used for programming and configuration of distributed control systems.
Description of structured statements describe computer programming language statements to describe the system in a variety of various operations relationships between variables, function or operation that you want to complete. Most manufacturers use the statement describing the programming language BASIC language, high-level languages such as PASCAL or c language is similar, but for ease of application, in the statement expression and statement types are simplified.
Structured programming language has the following characteristics:
(1) using high-level programming languages, you can complete some of the more complex control operations;
(2) the need to have some computer programming skills and knowledge of a high-level programming language, the programmer‘s high skill requirements, General Electric technician could not be completed.
(3) poor performance such as intuitive and easy operation;
(4) often used in both modules, some of the other languages, such as implementation of the control functions.
Part of the programmable controller‘s manufacturer provides a simple structured programming languages, like a mnemonic programming language for the program, certain restrictions on the number, at the same time, provides the programmable logic controller interface or presentation of the communication connector and provides extension for user‘s application.

Mitsubishi PLC programming cable set method of communication ports

1, the programming cable into the computer’s USB port
2, on the desktop, the mouse on the “My Computer” icon, then click the right mouse
3, in the pop-up menu, select “Device Manager”
4, find your programming cable port number in the “Port” overview. Mouse on the port number, click the right mouse button in the pop-up menu, select “Properties”
5,In the Properties window, you can change the port number, the port number was revised to the same number on it. Mitsubishi PLC programming port and port computer software should be set, under normal circumstances, the default desktop computer is COM1,After the software is also changed to COM1 to restart the software