24. Programming languages Statement list Function block Ladder diagram The instructions are represented by graphic symbols: Contacts, Coils & Boxes The ladder diagram is the most popular programming language
25. Instructions Standard instructions: They are used in most programs. Examples: timer, counter, math, logical, incr., decr. and move High speed instructions: They allow for events and interrupts to occur independently of the PLC scan time. Examples: High speed counters and interrupts Special instructions: They are used to manipulate data Shift, table, conversion, real time instruction .
26. Bit Logic instruction Normally Open contact Normally Open Immediate contact Normally Closed contact Not contact Normally Closed Immediate contact Positive Transition contact Negative Transition contact Input Instructions
36. On-Delay & Retentive On-Delay timers They count time when the enabling input (IN) is ON. When the current value (Txxx) is > the preset time (PT), the timer bit is ON. The On-Delay timer current value is cleared when (IN) is OFF, while the current value of the Retentive On-Delay Timer is maintained. You can use the Retentive On-Delay Timer to accumulate time for multiple periods of the input ON.
37. Off-Delay timer The Off-Delay Timer is used to delay turning an output OFF for a fixed period of time after the input turns OFF. When (IN) turns ON, the timer bit turns ON immediately, and the current value is set to 0. When (IN) turns OFF, the timer counts till PT and the timer bit turns OFF and the current value stops counting. If the input is OFF for a time shorter than PT, the timer bit remains ON.
38. Timers numbers & resolutions Note You cannot share the same timer numbers for TOF and TON. For example, you cannot have both a TON T32 and a TOF T32.
44. Counter instructions Up counter Up/down counter Down counter A bottling machine, for example, may use a counter to count bottles into groups of six for packaging.
45.
46. Up/Down counter It counts up on rising edges of the Count Up (CU) input. It counts down on the rising edges of the Count Down (CD) input. When the current value (Cxxx) > (PV), the counter bit (Cxxx) turns on. The counter is reset when the Reset (R) input turns on.
47. Down counter It counts down from the PV on the rising edges of the (CD) input . When the current value is equal to zero, the counter bit (Cxxx) turns on. The counter resets the counter bit (Cxxx) and loads the current value with the (PV) when the load input (LD) turns on.
50. Counter example A counter might be used to keep track of the number of vehicles in a parking lot. As vehicles enter the lot through an entrance gate, the counter counts up. As vehicles exit the lot through an exit gate, the counter counts down. When the lot is full a sign at the entrance gate turns on indicating the lot is full.
53. Accessing a Bit of Data in the CPU Memory (Byte.bit Addressing) Memory addressing
54. Memory addressing You can access data in many CPU memory areas (V, I, Q, M, S, L, and SM) as: bytes, words, or double words by using the byte-address format.
55.
56.
57.
58.
59.
60. Move instructions The Move Byte instruction moves the input byte (IN) to the output byte (OUT). The input byte is not altered by the move. The Move Word instruction moves the input word (IN) to the output word (OUT). The input word is not altered by the move. The Move Double Word instruction moves the input double word (IN) to the output double word (OUT). The input double word is not altered by the move. The Move Real instruction moves a 32-bit, real input double word (IN) to the output double word (OUT). The input double word is not altered by the move.
61.
62. Move byte immediate instructions The Move Byte Immediate Write instruction reads from location IN and writes to physical output OUT. The Move Byte Immediate Read instruction reads physical input IN and writes the result in OUT.
63. Analogue I/O = Typical analogue signals from 0-10 VDC or 4-20 mA = They are used to represent changing values such as speed, temperature, weight and level =The expansion module converts the standard voltage and current values to 12-bit digital representation. These digital values are transferred to the PLC for use in its program