RELATED ARTICLES :

Sunday, April 25, 2010

Operate the PLC - part 3

4.2.3.6. Advanced PLC Programming
a. Advanced instruction on Omron PLC
• INTERLOCK (IL) and INTERLOCK CLEAR (ILC)
These instructions can also be used to overcome the branching points encountered on the ladder diagrams. Instruction IL - ILC is always used together. Instruction interlock if the
execution condition is OFF (all instructions between interlock and interlock clear will not be done). To activate IL press FUN 02 and ILC press FUN 03.

Figure 4.31. Ladder & mnemonic code for IL - ILC instruction on Omron PLC



• JUMP (JMP) and JUMP END (JME)
JUMP instruction (JMP), same as the interlock instructions, coupled with the JUMP END (JME). If the execution condition and a JUMP instruction is ON, the program worked normally as if nothing JUMP instruction. However, if the condition executed and a JUMP instruction is OFF, then execution of the program directly to the JUMP END instruction without making any changes in status between JUMP and JUMP END instruction. All JUMP and JUMP END instruction was given the number 01 to 99. This number is only used once, meaning that, in the ladder diagram can not exist JUMP numbers double or more and one, except for number 00. JUMP instruction is done with a certain number, then the execution will go directly to JUMP END with the same number. To activate JUMP press FUN 04 and JUMP END press FUN 05.

Figure 4.32. Ladder & mnemonic code for JMP - JME instruction on Omron PLC


• DIFFERENTIATE UP and DIFFERENTIATE DOWN
DIFU instruction used to enable
bit operand instantaneous (only one cycle) during transition of the execution condition from OFF to ON. While DIFD instruction used for the same purpose with DIFU, only when there is a transition state of the execution from ON to OFF (reverse transition DIFU). To activate press DIFU FUN 13 and DIFD press FUN 14.


Figure 4.33. Ladder & mnemonic code for DIFU - DIFD instruction on Omron PLC

• KEEP
KEEP instruction is used to store the status of a bit operand based on two
execution conditions. For this purpose, KEEP instruction is connected to two lines of instructions. The first instruction line is used to enable a operand bit, while the second instruction line is used to disable a operand bit , it will happen if conditions on the execution of instruction line associated is ON. To activate KEEP press FUN 11.


Figure 4.34. Ladder & mnemonic code for KEEP instruction on Omron PLC


• TIMER (TIM) & HIGH SPEED TIMER (TIM H)
The function of timer to operate contacts with time delay. The time setting of timer between 0 to 999.9 seconds (0-9999 scans). High Speed Timer (Tim H), to perform high speed timing, where the timing be between 0 to 99.99 seconds (0 scans - 999.9 scans) with increase of 0.1 scans. The number of timers that can be used up to 511. Do not give the same number on timer and High Speed Timer. To operate High Speed Timer press FUN 15.

Figure 4.35. Ladder & mnemonic code for TIMER on Omron PLC



• COUNTER (CNT)
counter is used for count the setting value (SV) towards 0 when the pulse counter (CP) changes from OFF to ON. After the counter value changes to 0 then the counter output status will change from OFF to ON and will persist as long as the reset button (R) has not been pressed. When the reset button is pressed, status of the output counter will be OFF and the counter value back to the original setting value. The number of counter that can be used up to 511. Do not give the same number on counter, timer and High Speed Timer.

Figure 4.36. Ladder & mnemonic code for COUNTER on Omron PLC



• SHIFT REGISTER (SFT)
Function of Shift Registers (SFT) is to shift the data by using the clock pulse. Data which can be shifted are IR, AR, HR, LR. Shift Registers has three inputs; data input (I), clock input (P) and reset (R). Data Input is used to enter data into location of data channel. Clock input is used to enter the clock to shift the data that has been incorporated into the input data through location of data channel . Reset input have function to create the initial conditions (0) all bits in the locations of data channel. The other is the initial of data lines (St) occupied bits start bit is shifted and the final of the data channel (E) which serves as the final borders of the bits are bits that are shifted. St must be greater or equal than E and must be on the same data area. To operate SFT press FUN 10.


Figure 4.37. Ladder & mnemonic code for SHIFT REGISTER on Omron PLC


• Move (MOV)
Move instruction is a function to move or transfer or to copy data from source (S) to destination (D). To
operate MOV press FUN 21.

Figure 4.38. Ladder & mnemonic code for MOV on Omron PLC




• Compare (CMP)
Compare is an instruction to compare two pieces of data, the results can be> (greater) that will activate special relay 25505, = (equals) that will activate special relay 25506, < (smaller) that will activate special relay 25507. To operate CMP press FUN 20.


Figure 4.39. Ladder & mnemonic code for COMPARE on Omron PLC


• Clear carry / CLC (41)
Clear carry is used to reset carry (CY) that exist on the SR25504 to zero.

Figure 4.40. Ladder & mnemonic code for Clear carry on Omron PLC


• ADD (30)
have function to add three pieces of parameters: data 1 (Au), data 2 (Ad) and carry (CY), then the results are placed on data 3 (R). carry will be set to 1 if the sum is greater than 9999.


Figure 4.41. Ladder & mnemonic code for ADD on Omron PLC


• SUB (31)
have function to subtract three pieces of parameters: data 1 (Mi), data 2 (Su) and carry (CY), then the results are placed on data 3 (R). If the result is negative then carry will be set to 1.

Figure 4.42. Ladder & mnemonic code for SUBTRACT on Omron PLC

In addition to the above instructions are still many more other advanced instructions on Omron PLC, which you can learn in the operating manual for Omron PLC.




b. Advanced instruction on Siemen PLC
• JUMP
At Siemens PLC, the jump instruction beginning with JMP and ending with LBL. this is same as described in Omron PLC, the group of programs that will be controlled at between JMP at number (.n..) and LBL at number (.n..).

Figure 4.43. Ladder & mnemonic code JUMP on Siemen PLC


• Up-Down Differential
At Siemens PLC, the program instruction for Transition (Differential) is P (Positive Transition) and N (Negative Transition).
Figure 4.44. Ladder & mnemonic code Up-Down Differential on Siemen PLC


• TIMER
Timer pada PLC Siemens ada bermacam macam: TON, TOF, TONR.

Figure 4.45. Ladder & mnemonic code TIMER on Siemen PLC


• COUNTER
At Siemens PLC, the program instruction for counter is CTU, CTD, CTUD and others.


Figure 4.46S. Ladder & mnemonic code COUNTER on Siemen PLC


• MOVE and SWAP BYTES
MOVE on Siemens PLC are various kinds, among others: MOV_B, MOV_DW, MOV_W, MOV_R, and others. While SWAP BYTES used to exchange data, MSB to LSB in a Word data.

Figure 4.47. Ladder & mnemonic code MOVE and SWAP BYTES on Siemen PLC


• SHIFT REGISTER
Shift Register on Siemens PLC are various kinds, among others: SHL_B , SHL_W, SHL_DW, SHR_B, SHR_W, SHR_DW, and others.


Figure 4.47. Ladder & mnemonic code SHR_B on Siemen PLC


• COMPARE
Compare instruction at Siemens PLC have same principle with Omron PLC or another, this instruction will compare two value. Type of data being compared can be: Byte, Integer, Double Word, and real. While this type of comparison operation can be: IN1 = IN2, IN1>= IN2, IN1 <= IN2, IN1> IN2, IN1 <> IN2. Here is an example of the use of compare: value at location in VW4 compared with value at location in VW8, if VW4 >= VW8, then output state of Q0.3 will be ON.

Figure 4.47. Ladder & mnemonic code COMPARE on Siemen PLC


c. Advanced instruction on LG PLC
• interlock
At LG PLC, interlock code is MCS and MCSCLR.


Figure 4.48. Ladder & mnemonic code MCS and MCSCLRS on LG PLC


• JUMP
At LG PLC,
Jump instruction begins with JMP and ending with JME.

Figure 4.48. Ladder & mnemonic code JUMP on LG PLC

• Up-Down Differential
At LG PLC, instruction for Transition or Differential is D and D Not.
Figure 4.49. Ladder & mnemonic code Differential on LG PLC


• TIMER
Timers on LG
PLC, there are various, such as: TON, TOFF, TMR, TMON, and others.

Figure 4.50. Ladder & mnemonic code TIMER on LG PLC


• COUNTER
At LG PLC, instructions for Counter is CTU, CTD, CTUD, and CTR.


Figure 4.51. Ladder & mnemonic code COUNTER on LG PLC


• MoVe
At LG PLC, instructions for MoVe divided into several groups. For example, Move
for data are MOV, MOVP, and DMOV. Then Move for complement are CMOV and CMOVP. Move for group are GMOV, MMOV, and others.

Figure 4.52. Ladder & mnemonic code MoVe on LG PLC



• SHIFT REGISTER
At LG PLC, instructions for the Shift Register there are many kinds, among others; SR, BSFT, BSFTP, WSFT, and WSFTP.


Figure 4.53. Ladder & mnemonic code SHIFT REGISTER on LG PLC


• Compare
At LG PLC, there are many kinds instructions for Compare, among others; LOAD <, LOAD =, LOAD >, AND <, AND =, AND>, OR <, OR =, OR >, CMP, CMPP, DCMP, DCMPP, and others. At CMP consists of two data, ie, S1 & S2. S1 as comparative data and S2 is data that will be compared.

Figure 4.54. Ladder & mnemonic code Compare on LG PLC