Basic Instructions for delta plc program Delta WPLSoft
LD Load A contact
X, Y, M, S, T, C
Explanations:
The LD instruction is used on the A contact that has its start from the left BUS or the A contact that is the start of a contact circuit. Function of the instruction is to save present contents, and at the same time, save the acquired contact status into the accumulative register.
LDI Load B contact
X, Y, M, S, T, C
Explanations:
The LDI instruction is used on the B contact that has its start from the left BUS or the B contact that is the start of a contact circuit. Function of the instruction is to save present contents, and at the same time, save the acquired contact status into the accumulative register.
AND Series connection- A contact
X, Y, M, S, T, C
Explanations:
The AND instruction is used in the series connection of A contact. The function of the instruction is to readout the status of present specific series connection contacts first, and then to perform the “AND” calculation with the logic calculation result before the contacts, thereafter, saving the result into the accumulative register.
ANI Series connection- B contact
X, Y, M, S, T, C
Explanations:
The ANI instruction is used in the series connection of B contact. The function of the instruction is to readout the status of present specific series connection contacts first, and then to perform the “AND” calculation with the logic calculation result before the contacts, thereafter, saving the result into the accumulative register.
OR Parallel connection- A contact
X, Y, M, S, T, C
Explanations:
The OR instruction is used in the parallel connection of A contact. The function of the instruction is to readout the status of present specific series connection contacts, and then to perform the “OR” calculation with the logic calculation result before the contacts, thereafter, saving the result into the accumulative register.
ORI Parallel connection- B contact
X, Y, M, S, T, C
Explanations:
The ORI instruction is used in the parallel connection of B contact. The function of the instruction is to readout the status of present specific series connection contacts, and then to perform the “OR” calculation with the logic calculation result before the contacts, thereafter, saving the result into the accumulative register.
ANB Series connection (Multiple Circuits)
Operand:
Explanations:
To perform the “AND” calculation between the previous reserved logic results and contents of the accumulative register.
ORB Parallel connection (Multiple Circuits)
Operand:
–
Explanations:
To perform the “OR” calculation between the previous reserved logic results and contents of the accumulative register.
MPS Store the current result of the internal PLC operations
Operand:
–
Explanations:
To save contents of the accumulative register into the operation result. (the result operation pointer pulses 1)
MRD Reads the current result of the internal PLC operations
Operand:
–
Explanations:
Reading content of the operation result to the accumulative register. (the pointer of operation result doesn’t move)
MPP Pops (recalls and removes) the currently result
Operand:
–
Explanations:
To retrieve the previous reserved logic calculation result from the operation result and save it into the accumulative register. (the pointer of result operation minus 1)
OUT Output coil
Y, M, S
Explanations:
Output the logic calculation result before the OUT instruction to specific device.
Motion of coil contact:
Operation result | OUT instruction | ||
Coil | Contact | ||
A contact (normally open) | B contact (normally close) | ||
FALSE | OFF | Non-continuity | Continuity |
TRUE | ON | Continuity | Non-continuity |
SET Latch (ON)
| S : Set device |
S : Y, M, S
Explanations:
When the SET instruction is driven, its specific device is set to be “ON” which will keep “ON” whether the SET instruction is still driven. You can use the RST instruction to set the device to “OFF”.
RST Clear the contacts or the registers
| S : Reset device |
S : Y, M, S, T, C, D, E, F
Explanations:
When the RST instruction is driven, motion of its specific device is as follows, If the RST instruction is not executed, status of specific device will not be changed.
Device | Status |
S, Y, M | Coil and contact will be set to “OFF”. |
T, C | Present values of the timer or counter will be set to 0, and the coil and contact will be set to “OFF.” |
D, E, F | The content value will be set to 0. |
API 96 TMR 16-bit timer
| S1 : Timer number S2 : Set value |
S1 : T S2 : K, D |
Explanations:
When TMR instruction is executed, the specific coil of timer is ON and timer will start to count. When the setting value of timer is attained (counting value >= setting value), the contact will be as following:
NO(Normally Open) contact | Continuity |
NC(Normally Closed) contact | Non-continuity |
API 258 ATMR 16-bit contact type timer
| S1 : Timer number S2 : Set value |
S1 : T S2 : K, D |
Explanation:
ATMR is the combination of AND and TMR. When the contact preceding ATMR is ON, the timer specified measures time. If the value of the timer is the same as the set value (timer value>=set value), the AND contact is ON. If the contact preceding ATMR is not ON, the value of the timer is cleared.
API 258 ATMR 16-bit contact type timer
| S1 : Timer number S2 : Set value |
S1 : T S2 : K, D |
Explanation:
ATMR is the combination of AND and TMR. When the contact preceding ATMR is ON, the timer specified measures time. If the value of the timer is the same as the set value (timer value>=set value), the AND contact is ON. If the contact preceding ATMR is not ON, the value of the timer is cleared.
API 97 CNT 16-bit counter
| S1 : 16 bit counter number S2 : Set value |
S1 : C S2 : K, D |
Explanations:
1. | When the CNT instruction is executed from OFF to ON, which means that the counter coil is driven, and should thus be added to the counter’s value; when the counter achieved specific set value (value of counter = the setting value), motion of the contact is as follows:
| |||||
2. | If there is counting pulse input after counting is attained, the contacts and the counting values will be un unchanged. To re-count or to conduct the CLEAR motion, please use the RST instruction. |
API 97 DCNT 32-bit counter
| S1 : 32 bit counter number S2 : Set value |
S1 : C S2 : K, D |
Explanations:
1. | DCNT instruction enables the 32-bit high-speed counters C200 ~ C255. |
2. | For general purpose addition/subtraction counters C200~C234. When DCNT instruction is set from “Off” to “On”, the present value in the counter will count up (plus 1) or count down (minus 1) according to the modes set in special M1200 ~ M1234. |
3. | For high-speed addition/subtraction counters C235 ~ C255. When the high-speed counter pulses go from “OFF” to “ON”, the counter is executed. High-speed counter pulse input device: X0 ~ X17 Counting actions: Counting up (present value plus “1”); counting down (present value minus “1”) |
4. | When DCNT instruction goes “OFF”, the counter stops counting, but the present value will not be cleared. RST C2XX instruction is for clearing the present values and contacts. High-speed addition/subtraction counters C235 ~ C254 can use assigned external input terminals to clear the present value and contacts. |
MC/MCR Master control Start/Reset
| S: Master control loop |
S : N
Explanations:
1. | MC is the main-control start instruction. When the MC instruction is executed, the execution of instructions between MC and MCR will not be interrupted. When MC instruction is OFF, the motion of the instructions that between MC and MCR is described as follows:
| |||||||||||||
2. | MCR is the main-control ending instruction that is placed at the end of the main-control program and there should not be any contact instructions prior to the MCR instruction. |
API 90 LDP Rising-edge detection operation
API 91 LDF Falling-edge detection operation
API 92 ANDP Rising-edge series connection
API 94 ORP Rising-edge parallel connection
API 95 ORF Falling-edge parallel connection
API 89 PLS Rising-edge output
| S: Rising pulse output device |
S : Y, M
Explanations:
When rising-edge trigger, PLS instruction will be executed and M0 will send the pulse of one time, which the width is a scan time.
API 99 PLF Falling-edge output
| S: Failling pulse output device |
S : Y, M
Explanations:
When falling-edge trigger, PLF will be executed and M0 will send the pulse of one time, which the width is the time for, scan one time.
END Program End
END |
Operand:
Explanations:
It needs to add the END instruction at the end of ladder diagram program or instruction program. PLC will scan from address o to END instruction, after executing it will return to address 0 to scan again.
NOP No operation
NOP |
Operand:
Explanations:
1. | NOP instruction does not perform any operation in the program; therefore, the original results of logic operation will be retained after the execution | |
2. | When to use NOP: When the user wants to delete a certain instruction without changing the program length, NOP can be used to replance the instruction |
API 98 INV Inverting Operation
P Pointer
Operand:
Explanations:
Pointer P is used in jump instructions (API 00 CJ) and subroutine call instruction API 01 CALL. It is not necessary to use the pointer from No. 0 but the same No. cannot be use repeatedly; otherwise, unexpected errors may occur.
I Interrupt program marker (I)
Operand:
Explanations:
Interruption pointer (I_ _ _) has to be inserted in the start device. To end the interruption, use application instruction API 03 IRET and return to the original status. Interruptions have to be used together with application instructions API 03 IRET, API 04 EI, and API 05 DI.
NP Negative contact to Positive contact
PN Positive contact to Negative contact
STL Step Transition Ladder Start Command
S:S
Explanations:
The step ladder instruction, STL Sn, constitutes a stepping point, and when STL instruction appears in the program, the program enters the step ladder diagram status which is controlled by step procedure. The initial status has to start from S0 to S9. Step ladder instruction RET represents the end of step ladder diagram from S0 to S9 and returns to a instruction of general ladder diagram. SFC diagram uses the step ladder diagram composed of STL/RET to finish the circuit action. The No. of step points S cannot be repeated.
RET Step Transition Ladder Return Command
RET |
Operand:
–
Explanations:
RET instruction is used for ending a step procedure. RET instruction has to exist in the end of a serial step points. A PLC program can write in maximum 10 step procedures in S0 ~ S9 and there has to be RET instruction in the end of every step procedure.
Device Range Table
Device | Range | Type | Applicable to | ||||
ES/EX/SS | SA/SX/SC | EH/SV | EH3/SV2 | ||||
P | 0 ~ 255 | – | 0 ~ 63 | 0 ~ 255 | 0 ~ 255 | 0 ~ 255 | |
N | 0 ~ 7 | – | 0 ~ 7 | 0 ~ 7 | 0 ~ 7 | 0 ~ 7 | |
I | 0 ~ 899 | – | I001, I101, I201, I301 / I6□□(10~99) / | I001, I101, I201, I301, I401, I501 / I6□□,I7□□(1~99) / I010, I020, I030, I040, I050, I060 / I150 | I00□ (X0), I10□ (X1), I20□ (X2), I30□ (X3), I40□ (X4), I50□ (X5) / I6□□, I7□□, I8□□, (1~99) / I010, I020, I030, I040, I050, I060 / I110, I120, I130, I140 / I150, I160, I170 / I180 | I00□ (X0), I10□ (X1), I20□ (X2), I30□ (X3), I40□ (X4), I50□ (X5) / I6□□, I7□□, I8□□, (1~99) / I010, I020, I030, I040, I050, I060 / I110, I120, I130, I140 / I150, I160, I170 / I180 | |
S | 0 ~ 1023 | Bit | 0 ~ 127 | 0 ~ 1024 | 0 ~ 1024 | 0 ~ 1024 | |
X | 0 ~ 377 (Octal) | Bit | 0 ~ 177 | 0 ~ 177 | 0 ~ 377 | 0 ~ 377 | |
Y | 0 ~ 377 (Octal) | Bit | 0 ~ 177 | 0 ~ 177 | 0 ~ 377 | 0 ~ 377 | |
T | 0 ~ 255 | Bit/Word | 0 ~ 127 | 0 ~ 255 | 0 ~ 255 | 0 ~ 255 | |
M | 0 ~ 4095 | Bit | 0 ~ 1279 | 0 ~ 4095 | 0 ~ 4095 | 0 ~ 4095 | |
C | 0 ~ 199 | 16-bit | Bit/Word | 0 ~ 127 | 0 ~ 199 | 0 ~ 199 | 0 ~ 199 |
200 ~ 255 | 32-bit | Bit/Dword | 235 ~ 255 | 200 ~ 255 | 200 ~ 255 | 200 ~ 255 | |
D | 0 ~ 9999 | Word | 0 ~ 1311 | 0 ~ 4999 | 0 ~ 9999 | 0 ~ 11999 | |
E | 0 ~ 7 | Word | 0 | 0 ~ 3 | 0 ~ 7 | 0 ~ 7 | |
F | 0 ~ 7 | Word | 0 | 0 ~ 3 | 0 ~ 7 | 0 ~ 7 |
- NB Designer OMRON HMI Youtube Tutorial Videos
- DOPSOFT DELTA HMI Youtube Tutorial Videos
- Wonderware Intouch Youtube Tutorial Videos
- GT Designer MITSUBISHI HMI Youtube Tutorial Videos
- WinCC Siemens HMI Youtube Tutorial Videos
- FACTORY TALK VIEW Youtube Tutorial Videos
Also Read:-
- Delta Tutorials
- Downloads Softwares
- HMI Demo examples
- PLC Tutorials
- Rockwell Tutorials
- WinCC Siemens Tutorials
- Wonderware Intouch Tutorials
Even though this is a very basic tutorial on delta plc programming. These are some of the most common instructions you will be using in your programs. So it is good to have them in your tool box now whether you are a beginner or a more advanced plc programmer. If you liked this tutorial please support us by checking out some of the products and plc starter kits on the site which can help you improve your plc programming skills more in general