What are devices?

Devices can be divided into bit devices and word devices.
This page explains each type of device.

Bit devices

A bit device holds 1 bit of information: either 1 (ON) or 0 (OFF).
Bit devices include X, Y, and MR.
As explained so far, X and Y are used for inputs and outputs.
MR is called an internal relay and is used like a variable that holds bit information inside the ladder.

Word devices

Each word device holds 16 bits of information (2^16 = 65,536 possible values).
In PLCs, 16 bits are called one word. By the way, one byte is 8 bits,
so one word = two bytes.

Word devices are generally used to hold numbers.
The word device provided in this simulator is DM (data memory).
A word device can hold an unsigned value from 0 to +65535 (2^16-1), or a signed value from -32768 (-2^15) to +32767 (2^15-1).
For example, when using a word device for counting or timing, no sign is needed, so using it as unsigned gives a wider range of values.
If you need negative numbers, such as for motor coordinates, you must use it as signed.

Device list

These are the devices available in this simulator.

DeviceRangeDescription
XX0〜X15Input relays. Signals from buttons and sensors
YY0〜Y15Output relays. Drive lamps and solenoid valves
MRMR0〜MR99Internal relays. Used to remember ON/OFF states inside the PLC
TT0〜T99Timers. Used with the TMR instruction and can also be read as contacts
DMDM0〜DM99Data memory (word devices). Holds a number from 0 to 65535
CR2002 / CR2003—Always ON / Always OFF. Can be used only as contacts, not with OUT, SET, or RES
CR2008—First scan ON. ON only for the first scan after RUN starts. Can be used only as a contact, not with OUT, SET, or RES

X, Y, MR, and DM are as explained above.
T is a timer device. It is used together with the TMR instruction and turns ON after the set time has elapsed. For example, you can use it when you want to move a machine a few seconds after a button is pressed.

CR is a special device that is predefined in the PLC.
This simulator is modeled on KEYENCE PLCs and provides the commonly used CR2002 (always ON), CR2003 (always OFF), and CR2008 (first scan ON).
PLCs from other manufacturers have similar special devices. For example, Mitsubishi Electric PLCs call them SM400 (always ON), SM401 (always OFF), and SM402 (first scan ON), but they are used the same way.

The device names and instruction formats on this site are modeled on KEYENCE PLCs.
That does not mean what you learn here only applies to KEYENCE. It applies just as well to PLCs from Mitsubishi Electric and other manufacturers.
The difference between PLC manufacturers is like the difference between car models: the way you drive does not change. You can drive a car model you have never driven before right away, can't you? It is the same.
Once you learn how to write ladder logic with the simulator on this site, you will be able to handle PLCs from any manufacturer.

That is it for the PLC review!
Next, let's learn how to operate the simulation!