AP Series PLC Programming Manual V02.4
Total Page:16
File Type:pdf, Size:1020Kb
AP Series PLC Programming Manual V02.4 Chapter 1 PLC Component Table of Contents Chapter 1 PLC Component .................................................................................... 1-1 1 Product Summary and Corresponding Programming Language ........................................ 1-1 2 Device Overview ................................................................................................................ 1-3 3 Program Memory and Parameter Structure ........................................................................ 1-6 4 Notes(Input and output processing, response lagging, dual-coil) ...................................... 1-9 1-0 Chapter 1 PLC Component Summary Chapter 1 PLC Component 1 Product Summary and Corresponding Programming Language Product summary ■ AP100 Type :10/14 points Built-in Flash memory(4000 steps), RS485 communication. ■ AP100 Type :20 points Built-in Flash memory(4000 steps), RS485 communication. Support expansion card such as RTC card. ■ AP100 Type :30 points Built-in Flash memory(4000 steps), RS485 communication. Support expansion card such as RTC card. With an external power supply, the digital I/O could be expanded to 128 points. Can expand 56-channel analog input, 8-channel analog output. ■ AP200 Type :24/32/40/60 points Built-in Flash memory(8000 steps), RS485 communication. Support expansion card. With an external power supply, the digital I/O could be expanded to 256 points. Can expand 56-channel analog input, 8-channel analog output. ■ AP300 Type :24/32/40/60 points Built-in Flash memory(24000 steps), RS485 communication. Support expansion card. With an external power supply, the digital I/O could be expanded to 384 points. Can expand 56-channel analog input, 8-channel analog output. Programming Method <<Instruction list (IL) programming>> It refers to the sequential control instruction input with LD, AND, OUT, etc. For example: Step No. Instruction Device 0 LD X000 1 OR Y005 2 ANI X001 3 OUT Y005 1-1 Chapter 1 PLC Component Summary <<Ladder Logic (LD) programming>> The ladder Logic programming employs sequential control signals and device numbers, and draws sequential control circuit on the drawing. Such method represents sequential control loop with contact symbol and coil symbol, which is more intuitive than the programming in the command table. Thus, so it is easy to understand the content. Meanwhile, the state displayed by the loop can be used to monitor action of PLC. <<Sequential function chart (SFC) programming>> SFC programming is the input method for sequential control design according to the flow of mechanical actions. In the peripheral equipment with personal computer and other graphics, the chart below can be used to determine flow of the sequential control. S 0 Initial state Transfer Start condition S 20 Rise Upper limit State(Working procedure) S 21 Fall Lower limit S 22 Rise Upper limit Return S0 The above three programmed sequential control programs are all stored in memory of PLC in instruction list (content of the instruction list). Therefore, representation and edition of the program based on any programming method can be exchanged (even if it is instruction list program, it could represent the program based on instruction by the software corresponding to SFC chart according to SFC conversion rule), as shown in the figure below. Instruction List Ladder logic SFC 1-2 Chapter 1 PLC Component Devices for PLC 2 Device Overview The PLC software design requires various logic components and computing components, to finish such functions as logic computation, timing and counting assigned by the program. These components have similar functions like the hardware relay, which are called PLC devices. There are so many relays, counters and timers in PLC, and they have many normally open contacts (contact a) and normally close contacts (contact b). These contacts and coils are linked to make up sequential control loop(as shown in the figure below). The arrow represents signal transfer. In addition, there is memory device used to store data in PLC——data register (D, W). Input terminal or input connector Input relay :X Interface for receiving external switching signal of PLC is input relay . Symbol of the device is X PLC is installed with input relay with corresponding number of points. Counter :C Auxiliary Relay: M PLC has PLC has several auxiliary many counters, relays. Timer : T Symbol of device Output relay: Y device ,Device In PLC Is C PLC Symbol is M many timers , interface for driving external load Symbol of device is output relay Is T device ,Device Symbol is Y. Status:S In PLC In PLC there are several output relays there are many status components, device. Quantity Symbol Is S External output contact of the output relay(contact1 A) PLC is installed with output relay with corresponding number of points. Output terminal or output connector 1-3 Chapter 1 PLC Component Devices for PLC Interpretation for Various Devices: Input/Output Relays(X, Y) Address numbers of input relay in basic units are distributed as per X000~X007, X010~X017, etc. in octal code. The coil status of output relay is driven by the program. The address numbers of the output relays are also in octal code, such as Y000~Y007, Y010~Y017, etc. As for the input/output extension module, the address numbers are also in octal code based on X and Y, which follow the order of address number of the basic units. For example, if AP-130BR-A is installed with a 8EYR extension module, the number of extension module is Y020~Y027. Except for relay X and Y which are numbered in octal code, all other devices are numbered in decimal code. Auxiliary Relay(M) The auxiliary relay is the relay in PLC, which provide normally open and normally closed contacts in internal programming. The auxiliary relay is different from input and output relays, which can not obtain external input and can be used in program. Some holding relays can hold ON/OFF state in case of power failure for PLC. Status Relay(S) Status relay S is an important component to form step ladder or SFC. It is the relay used as working step number represented by step ladder or SFC. When it is not used as working step number, as the auxiliary relay, it can be programmed as common contact or coil.In addition, it can be used as signal alarm for diagnosing external failure. Timer(T) There are three timing type for the timers in PLC, namely, 1ms, 10ms, and 100ms. In the program, the timer always works with a setting value. When timing based on clock pulse accumulation, it adds the clock pulses of 1ms, 10ms and 100ms respectively. When specified setting value is reached, the output contact(normally open or closed) acts. The timer based on clock pulse can be used to detect 0.001-3276.7 seconds. Counter(C) The counters are divided into the following types based on different applications: <<Internal counting>> General use/Holding for power failure 16-bit counter: for counting up, range of counting: 1~32,767. 32-bit counter: for counting up/down, range of counting: -2,147,483,648~+2,147,483,647. These counters can be used as internal signal of PLC, with response speed less than 10Hz (0.1s). 1-4 Chapter 1 PLC Component Devices for PLC <<High-speed counting>> Holding for power failure 32-bit counter: for counting up/down, range of counting: -2,147,483,648~+2,147,483,647. The counters are divided into single-phase and single counting, single-phase and double-counting, double-phase and double counting based on different counting up/down methods. The high-speed counters are distributed to specific input relays. The high-speed counter can perform 20KHz(AP100)/100KHz(AP200) /200KHz(AP300)counting, which has nothing to do with scan cycle of PLC. Data registers(D& W), (V), (Z) The data register is the device for storing data. Data register of PLC is 16-bit (the highest bit is the symbol mark), with the range of data: -32768~32767. Combine the two registers to store 32-bit data (the highest bit is symbol mark). Range of data: -2,147,483,648~+2,147,483,647. -2,147,483,648~+2,147,483,647. Like other soft devices, the data register is classified for general use and holding in case of power failure. Z and V registers among the data registers are for indexing (address indexing). The index registers are used to change the address number(index) of the device. Z and V registers work with other devices, with the device number +V[ ] or Z[ ], for example: If V0=3,Z0=5, D100V0 is D103; C20Z0 is C25. The data register and index register can be used for indirect specifying and applied instruction of the timer and counter. Constants (K), (H) Of values used by PLC, K represents values of decimal system, H represents values of hexadecimal system. They are used as setting values of timer and counter or operand of applied instructions. Pointers (P), (I) The pointer is divided into branching pointer(P) and interruption pointer(I). The pointer P for branching is used to specify F00(CJ) conditional jump or F01(CALL) sub-program jump. The pointer I for interruption is used to specify input interruption, timing interruption and interruption program of counter. 1-5 Chapter 1 PLC Component Memory and Parameters 3 Program Memory and Parameter Structure Memory Structure The PLC memory structure is as shown in the Figure. In addition, the memory devices are divided into A, B and C according to content of initialization. ●Data Register ●Index Register System ROM CPU C: For general use B:V register A: For holding in case of power failure B:Z register A: For file use B: For special use A: Time data ●Current value register of timer A: Parameter C: For 100ms use A: For accumulative 100ms use C: For 10ms use A: For 1Ms use ●Current value register of counter C: 16-bit and 32-bit for general use A: 16-bit and 32-bit for holding in case of power failure Content of built-in A: For use of high-speed counter A:PLC Program storage device is held via battery or flash memory Via Built-in storage device of bit-device storage device parameter If expanded storage settings device is loaded, the ●Memory corresponding to the built-in storage device is contact A:Annotation OFF and one side of the C: Input relay storage box will act in C: Auxiliary relay for general use 4,000 ~ A: File register priority.