Bird
Raised Fist0
PLC Programmingscripting~10 mins

Input addressing scheme in PLC Programming - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to read the input from address %I0.0.

PLC Programming
input_value := [1];
Drag options to blanks, or click blank then click option'
A%DB1.DBX0.0
B%Q0.0
C%I0.0
D%M0.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using output address %Q0.0 instead of input %I0.0.
Using memory address %M0.0 which is not an input.
Using data block address %DB1.DBX0.0 which is for data blocks.
2fill in blank
medium

Complete the code to check if input at address %I1.3 is ON (true).

PLC Programming
IF [1] THEN
  // input is ON
END_IF;
Drag options to blanks, or click blank then click option'
A%I1.3
B%Q1.3
C%M1.3
D%DB1.DBX1.3
Attempts:
3 left
💡 Hint
Common Mistakes
Using output address %Q1.3 instead of input %I1.3.
Using memory address %M1.3 which is not input.
Using data block address %DB1.DBX1.3 which is not input.
3fill in blank
hard

Fix the error in the input address to read bit 5 of input byte 2.

PLC Programming
input_bit := [1];
Drag options to blanks, or click blank then click option'
A%I2.5
B%M2.5
C%Q2.5
D%I2.6
Attempts:
3 left
💡 Hint
Common Mistakes
Using output address %Q2.5 instead of input.
Using memory address %M2.5 instead of input.
Using wrong bit number like %I2.6.
4fill in blank
hard

Fill both blanks to create a mask that reads bits 0 to 3 of input byte 4.

PLC Programming
mask := [1] AND [2];
Drag options to blanks, or click blank then click option'
A%IW4
B%IB4
C0x0F
D0xF0
Attempts:
3 left
💡 Hint
Common Mistakes
Using %IW4 which reads a word (2 bytes) instead of a byte.
Using mask 0xF0 which keeps bits 4 to 7 instead of 0 to 3.
5fill in blank
hard

Fill all three blanks to read bit 7 of input byte 3 and store it as a boolean.

PLC Programming
bit_value := ([1] AND [2]) [3] 0;
Drag options to blanks, or click blank then click option'
A%IB3
B0x80
C!=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong mask like 0x08 instead of 0x80.
Using equality == 0 instead of inequality != 0.
Using word input %IW3 instead of byte %IB3.

Practice

(1/5)
1. What does the input addressing scheme I1.3 mean in a PLC program?
easy
A. Internal memory at byte 1, bit 3
B. Output at byte 1, bit 3
C. Input at byte 3, bit 1
D. Input at byte 1, bit 3

Solution

  1. Step 1: Understand the input address format

    The format I<byte>.<bit> means input at specified byte and bit.
  2. Step 2: Interpret I1.3

    This means input at byte 1, bit 3.
  3. Final Answer:

    Input at byte 1, bit 3 -> Option D
  4. Quick Check:

    Input address = I1.3 means byte 1, bit 3 [OK]
Hint: I means input, number before dot is byte, after dot is bit [OK]
Common Mistakes:
  • Confusing input with output addresses
  • Mixing up byte and bit positions
  • Assuming bit number comes before byte
2. Which of the following is the correct syntax for addressing input bit 5 in byte 2?
easy
A. I2.5
B. I5.2
C. O2.5
D. I2-5

Solution

  1. Step 1: Recall input address syntax

    The correct format is I<byte>.<bit>.
  2. Step 2: Match byte 2 and bit 5

    So input bit 5 in byte 2 is I2.5.
  3. Final Answer:

    I2.5 -> Option A
  4. Quick Check:

    Correct input syntax = I2.5 [OK]
Hint: Use dot between byte and bit, start with I for input [OK]
Common Mistakes:
  • Swapping byte and bit numbers
  • Using O instead of I for input
  • Using dash instead of dot
3. Given the PLC input address I0.7 is ON and all others OFF, what is the binary value of byte 0?
medium
A. 00000001
B. 10000000
C. 11111111
D. 00000000

Solution

  1. Step 1: Understand bit numbering in a byte

    Bit 0 is the least significant bit (rightmost), bit 7 is the most significant (leftmost).
  2. Step 2: Set bit 7 ON and others OFF

    Bit 7 ON means the leftmost bit is 1, others 0, so binary is 10000000.
  3. Final Answer:

    10000000 -> Option B
  4. Quick Check:

    I0.7 ON means bit 7 = 1, binary = 10000000 [OK]
Hint: Bit 7 is leftmost bit in byte, so 10000000 [OK]
Common Mistakes:
  • Assuming bit 7 is rightmost bit
  • Confusing bit numbering direction
  • Setting wrong bit ON
4. A PLC program uses the input address I3.8. What is wrong with this address?
medium
A. Bit number 8 does not exist in a byte
B. Byte number 3 is invalid
C. Input addresses cannot have dots
D. I should be lowercase

Solution

  1. Step 1: Recall bit numbering limits

    A byte has bits numbered 0 to 7 only, so bit 8 is invalid.
  2. Step 2: Check address I3.8

    Bit 8 is outside valid range, so address is incorrect.
  3. Final Answer:

    Bit number 8 does not exist in a byte -> Option A
  4. Quick Check:

    Bits 0-7 valid, 8 invalid [OK]
Hint: Bits go 0 to 7 only, no bit 8 in a byte [OK]
Common Mistakes:
  • Thinking bits go 1 to 8
  • Ignoring dot separator
  • Assuming case sensitivity matters
5. You want to read inputs from byte 4 bits 0 to 3 and combine them into a 4-bit number in your PLC program. Which input addresses should you use?
hard
A. I4.4, I4.5, I4.6, I4.7
B. I0.4, I1.4, I2.4, I3.4
C. I4.0, I4.1, I4.2, I4.3
D. I3.0, I3.1, I3.2, I3.3

Solution

  1. Step 1: Identify byte and bit range

    You want bits 0 to 3 in byte 4, so bits 0,1,2,3 of byte 4.
  2. Step 2: Write input addresses for these bits

    These are I4.0, I4.1, I4.2, I4.3.
  3. Final Answer:

    I4.0, I4.1, I4.2, I4.3 -> Option C
  4. Quick Check:

    Bits 0-3 in byte 4 = I4.0 to I4.3 [OK]
Hint: Bits 0-3 in byte 4 are I4.0 to I4.3 [OK]
Common Mistakes:
  • Mixing bits from different bytes
  • Using bits 4-7 instead of 0-3
  • Confusing byte numbers
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