Discrete I/O Bit Numbering
(Original Document)
Introduction
The numbering of channels of an I/O module usually starts with 1 and counts up to the maximum number of supported channels. The software however starts numbering with a 0 for the least significant bit in a word (LSB). The Quantum I/O modules have their lowest channel mapped to the most significant bit (MSB).
The following figure shows the mapping of I/O channels related to the bits in a word:.
Word Addressing Versus Bit Addressing
Mainly discrete I/O modules can be configured to deliver their I/O data either in word format or in bit format. This can be selected during configuration by selecting either %IW (%MW) or %I (%M). If you need to access a single bit from an I/O module configured to use an I/O word, you can use the syntax %word.bit. The following table gives you the connection between I/O point number and the associated I/O address in bit and word addressing.
The table shows a 32-point input module in the main rack, slot 4 configured with starting address %I1 or %IW1:
I/O channel
Bit address
(flat addressing)
Bit address
(topological addressing)
Bit address
extracted from word
(flat addressing)
Bit address
extracted from word
(topological addressing)
1
%I1
%I1.4.1[.0]
%IW1.15
%IW1.4.1.1.15
2
%I2
%I1.4.2[.0]
%IW1.14
%IW1.4.1.1.14
3
%I3
%I1.4.3[.0]
%IW1.13
%IW1.4.1.1.13
• • •
15
%I15
%I1.4.15[.0]
%IW1.1
%IW1.4.1.1.1
16
%I16
%I1.4.16[.0]
%IW1.0
%IW1.4.1.1.0
17
%I17
%I1.4.17[.0]
%IW2.15
%IW1.4.1.2.15
18
%I18
%I1.4.18[.0]
%IW2.14
%IW1.4.1.2.14
• • •
31
%I31
%I1.4.31[.0]
%IW2.1
%IW1.4.1.2.1
32
%I32
%I1.4.32[.0]
%IW2.0
%IW1.4.1.2.0