Mitsubishi programs name their data by device type and number: X for inputs, Y for outputs, M for internal relays and so on. The same letters appear in the ladder editor, the instruction list and the manuals. Device numbering and ranges differ between the FX, Q and iQ families, so this sheet gives the device types and the conventions that hold across them.
| Item | Syntax | Meaning |
|---|---|---|
| Input relay | X0 | A physical input point. |
| Output relay | Y0 | A physical output point. |
| Internal relay | M0 | A general-purpose bit with no terminal. |
| Timer | T0 | A timer device: a coil starts it and its contact reports it done. |
| Counter | C0 | A counter device: a coil counts and its contact reports it reached the set value. |
| Data register | D0 | A word of data, usually 16 bits. |
| Item | Syntax | Meaning |
|---|---|---|
| Decimal constant | K1200 | The number 1200. |
| Hexadecimal constant | H00FF | The hexadecimal number 00FF. |
| Item | Syntax | Meaning |
|---|---|---|
| Start a rung | LD X0 LDI X0 | Normally open or normally closed first contact. |
| Series contacts | AND X1 ANI X1 | Normally open or normally closed contact in series. |
| Parallel contacts | OR X2 ORI X2 | Normally open or normally closed contact in parallel. |
| Block join | ANB ORB | Join two contact blocks in series or in parallel. |
| Output, set, reset | OUT Y0 SET Y0 RST Y0 | Follow the rung, latch on, latch off. |
| Timer and counter coils | OUT T0 K30 OUT C0 K5 RST C0 | Start a timer with a set value, count with a set value, reset a counter. |
| Pulse outputs | PLS M0 PLF M0 | One scan on a rising or a falling edge of the rung. |
| Edge contacts | LDP X0 LDF X0 | A contact that passes for one scan on a rising or falling edge. |
| Move and compare | MOV K1200 D0 CMP K50 D0 M0 | Copy a value, and compare two values into three result bits. |
| End of program | END | Marks the end of the main program. |
| Item | Syntax | Meaning |
|---|---|---|
| RUN monitor | M8000 | On while the CPU is running. |
| Initial pulse | M8002 | On for the first scan after the CPU goes to run. |
| One-second clock | M8013 | A clock pulse with a period of one second. |
| Item | Syntax | Meaning |
|---|---|---|
| X and Y numbering | X0 to X7, X8 to X15 | Decimal here (byte and bit are n divided by 8 and n modulo 8). Real FX controllers number X and Y in octal and Q and iQ-R controllers in hexadecimal. |
| Timer unit | OUT T0 K30 | Always 100 ms per K, so K30 is three seconds. |
| Memory and data | M0 D0 | M0 maps to the bit %M0.0 and D0 to the word %MW0. |
Always confirm addresses and ranges against the manual for your exact controller and software version. Want to see these addresses used in logic? Read the Mitsubishi instruction reference.
Not on real controllers. The numbering base differs between families, octal on the FX series and hexadecimal on the Q and iQ platforms, so X8 does not exist on an FX and the point after X7 is X10. The browser editor uses plain decimal numbers for simplicity.
K marks a decimal constant, so K1200 is the number 1200. H marks a hexadecimal constant, so H00FF is 255.
On the FX family M8000 is on while the CPU is running and M8002 is on for the first scan after it goes to run, which is how programs run start-up logic once.
Training material. Follow your site procedures, local electrical code and the manufacturer's instructions. Lockout/tagout and a qualified person are required for real equipment.