Bird
Raised Fist0
PLC Programmingscripting~20 mins

Internal relay (memory bit) addressing in PLC Programming - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Internal Relay Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Output of Internal Relay Addressing in Ladder Logic
Given the following ladder logic snippet using internal relay M bits, what is the state of M10 after the rung executes?

Inputs:
- X0 = ON
- X1 = OFF

Rung:
--| X0 |----|/ X1 |----( M10 )

Assuming M10 was OFF before execution, what will be its state after?
AM10 will be ON (true)
BM10 will be OFF (false)
CM10 will toggle its previous state
DM10 state remains unchanged
Attempts:
2 left
💡 Hint
Remember that |/ X1| means NOT X1, so the contact is closed when X1 is OFF.
🧠 Conceptual
intermediate
1:30remaining
Purpose of Internal Relay (Memory Bit) in PLC Programming
What is the main purpose of using internal relay (memory bit) addressing in PLC programs?
ATo directly control physical outputs like motors and lights
BTo replace all physical inputs with virtual ones
CTo store intermediate logic states without physical input/output devices
DTo reset the PLC program automatically
Attempts:
2 left
💡 Hint
Think about how PLCs handle logic internally before activating outputs.
🔧 Debug
advanced
2:00remaining
Identify the Error in Internal Relay Addressing
Consider this ladder logic snippet:

--| M5 |----| M10 |----( M5 )

What issue will this cause when the PLC runs?
AIt causes a latch loop, potentially making M5 always ON
BIt causes a syntax error in the PLC program
CIt will never turn M5 ON because M10 is not set
DIt causes a hardware fault in the PLC
Attempts:
2 left
💡 Hint
Look at how M5 is used both as input and output in the same rung.
🚀 Application
advanced
2:30remaining
Using Internal Relays for Sequential Control
You want to create a simple sequence where:
1. M0 turns ON when X0 is pressed.
2. M1 turns ON only after M0 is ON.
3. M2 turns ON only after M1 is ON.

Which of the following ladder logic snippets correctly implements this sequence?
A--| X0 |----( M2 )<br>--| M2 |----( M1 )<br>--| M1 |----( M0 )
B--| X0 |----( M0 )<br>--| M0 |----( M1 )<br>--| M1 |----( M2 )
C--| X0 |----( M0 )<br>--| M1 |----( M0 )<br>--| M2 |----( M1 )
D--| M0 |----( X0 )<br>--| M1 |----( M0 )<br>--| M2 |----( M1 )
Attempts:
2 left
💡 Hint
Think about the order of activation and how each memory bit depends on the previous one.
🧠 Conceptual
expert
3:00remaining
Memory Bit Addressing Range and Usage
In a typical PLC, what is the common range of internal relay (memory bit) addresses available, and why is this range important?
AM0 to M31; small range to reduce programming complexity
BM0 to M255; limited range to prevent memory overflow
CM1000 to M1999; reserved only for special functions
DM0 to M9999; it provides enough bits for complex logic without physical I/O
Attempts:
2 left
💡 Hint
Think about how many internal bits are typically needed for industrial automation.

Practice

(1/5)
1. What is the main purpose of an internal relay (memory bit) in PLC programming?
easy
A. To store ON/OFF states inside the PLC without controlling physical devices
B. To directly control motors and actuators
C. To provide power to sensors
D. To display output on the PLC screen

Solution

  1. Step 1: Understand internal relay function

    Internal relays store ON/OFF states inside the PLC memory but do not control physical devices.
  2. Step 2: Compare options

    Only To store ON/OFF states inside the PLC without controlling physical devices correctly describes this purpose; others mention controlling devices or power, which is incorrect.
  3. Final Answer:

    To store ON/OFF states inside the PLC without controlling physical devices -> Option A
  4. Quick Check:

    Internal relay = memory bit for logic [OK]
Hint: Internal relays remember states, not control devices [OK]
Common Mistakes:
  • Confusing internal relays with output devices
  • Thinking internal relays supply power
  • Assuming internal relays display information
2. Which of the following is the correct syntax to address an internal relay (memory bit) named M10 in a PLC program?
easy
A. D10
B. X10
C. Y10
D. M10

Solution

  1. Step 1: Identify internal relay address format

    Internal relays are commonly addressed with the letter 'M' followed by a number, e.g., M10.
  2. Step 2: Match options to address format

    M10 uses 'M10', which is correct. Other options use letters for inputs (X), outputs (Y), or data registers (D).
  3. Final Answer:

    M10 -> Option D
  4. Quick Check:

    Internal relay = M + number [OK]
Hint: Internal relays start with 'M' in address [OK]
Common Mistakes:
  • Using input (X) or output (Y) addresses for internal relays
  • Confusing data registers (D) with memory bits
  • Omitting the letter prefix
3. Given the following ladder logic snippet, what is the state of internal relay M5 after the rung executes?
--[ ]--[ ]--(M5)\n   I1   I2

Inputs: I1 = ON, I2 = OFF
medium
A. ON
B. OFF
C. Toggle
D. Undefined

Solution

  1. Step 1: Analyze input conditions

    The rung has two contacts in series: I1 and I2. I1 is ON, I2 is OFF.
  2. Step 2: Determine relay output state

    Both inputs must be ON for M5 to energize. Since I2 is OFF, M5 remains OFF.
  3. Final Answer:

    OFF -> Option B
  4. Quick Check:

    Series contacts require all ON for output ON [OK]
Hint: Series contacts need all ON to energize relay [OK]
Common Mistakes:
  • Assuming relay toggles automatically
  • Ignoring OFF input in series
  • Confusing parallel and series logic
4. In the following PLC code snippet, there is an error in addressing the internal relay. Identify the error:
LD X0\nAND M1\nOUT M2

What is the error?
medium
A. Using M1 as input in AND instruction is invalid
B. Incorrect internal relay address M2 in OUT instruction
C. No error, code is correct
D. Using input address X0 instead of internal relay

Solution

  1. Step 1: Review each instruction

    LD X0 loads input X0 state, AND M1 uses internal relay M1 as condition, OUT M2 sets internal relay M2.
  2. Step 2: Check addressing validity

    Inputs (X) and internal relays (M) are correctly used. M1 and M2 are valid internal relay addresses.
  3. Final Answer:

    No error, code is correct -> Option C
  4. Quick Check:

    Input and internal relay addresses used properly [OK]
Hint: Inputs use X, internal relays use M; both valid here [OK]
Common Mistakes:
  • Thinking internal relays can't be inputs
  • Assuming OUT can't target internal relays
  • Confusing input and output addresses
5. You want to use internal relays M10 and M11 to remember if two sensors S1 and S2 were ON at any time during a process. Which ladder logic sequence correctly sets M10 and M11 to ON when their respective sensors turn ON, and keeps them ON until reset?
hard
A. --[S1]--(M10)\n--[M10]--(M10)\n--[S2]--(M11)\n--[M11]--(M11)\n--[Reset]--(/M10)\n--[Reset]--(/M11)
B. --[S1]--(M10)\n--[S2]--(M11)\n--[Reset]--(/M10)\n--[Reset]--(/M11)
C. --[S1]--(M10)\n--[S2]--(M11)\n--[Reset]--(M10)\n--[Reset]--(M11)
D. --[S1]--(M10)\n--[S2]--(M11)\n--[Reset]--(M10)\n--[Reset]--(/M11)

Solution

  1. Step 1: Understand latch logic for memory bits

    To keep M10 and M11 ON after sensors turn ON, latch logic uses the internal relay itself in parallel with the sensor input.
  2. Step 2: Analyze options for latch and reset

    --[S1]--(M10)\n--[M10]--(M10)\n--[S2]--(M11)\n--[M11]--(M11)\n--[Reset]--(/M10)\n--[Reset]--(/M11) shows M10 and M11 set by sensors and latched by themselves, with reset contacts to turn them OFF. Others lack latching or proper reset.
  3. Final Answer:

    --[S1]--(M10)\n--[M10]--(M10)\n--[S2]--(M11)\n--[M11]--(M11)\n--[Reset]--(/M10)\n--[Reset]--(/M11) -> Option A
  4. Quick Check:

    Latching uses self-holding contact + reset to clear [OK]
Hint: Latch with self-contact to hold ON until reset [OK]
Common Mistakes:
  • Not using latch (self-holding) contacts
  • Resetting only one relay
  • Using reset coil instead of reset contact
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard