Devices can be divided into bit devices and word devices.
This page explains each type of device.
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.
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.
These are the devices available in this simulator.
| Device | Range | Description |
|---|---|---|
X | X0〜X15 | Input relays. Signals from buttons and sensors |
Y | Y0〜Y15 | Output relays. Drive lamps and solenoid valves |
MR | MR0〜MR99 | Internal relays. Used to remember ON/OFF states inside the PLC |
T | T0〜T99 | Timers. Used with the TMR instruction and can also be read as contacts |
DM | DM0〜DM99 | Data 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.
That is it for the PLC review!
Next, let's learn how to operate the simulation!