7.2 Addressing
Storage areas are Inputs, Outputs, Timers, Counters, Memory (Local Variables,
Global Variables) , Data Blocks Pointers.
- Inputs
I(x, y) ---------------------- x = Byte address, y = Bit address
Bytes 0, 1, 2, ..., 255 Bits 0, 1, 2, …, 7
IBx (Input Byte) ---------- Ex.: IB0 = I0.0, I0.1, …,I0.7
IWx (Input Word) -------- Ex.: IW0 = (IB0, IB1)
= (I0.0, I0.1, …,I0.7, I1.0, I1.1,…, I1.7)
IDx (Input DWord) ------ Ex.: ID0 = (IW0, IW2) = (IB0, IB1, IB2, IB3)
= (I0.0, I0.1,…,I0.7, I1.0, I1.1,…,I1.7, I2.0, I2.1, I2.7, I3.0, I3.1, I3.7)
___________________________________________
- Outputs
Q(x, y) ---------------------- x = Byte address, y = Bit address
Bytes 0, 1, 2, ..., 255 Bits 0, 1, 2, …, 7
QBx (Output Byte) ---------- Ex.: QB0 = Q0.0, Q0.1, …,Q0.7
QWx (Output Word) -------- Ex.: QW0 = (QB0, QB1)
= (Q0.0, Q0.1, …,Q0.7, Q1.0, Q1.1,…, Q1.7)
QDx (Output DWord) ------ Ex.: QD0 = (QW0, QW2) = (QB0, QB1, QB2, QB3)
=(Q0.0, Q0.1,…,Q0.7, Q1.0, Q1.1,…,Q1.7, Q2.0, Q2.1, Q2.7, Q3.0, Q3.1, Q3.7)
_____________________________________
- Memory (M = Markers or Global Memory, L = Local Memory)
M(x, y) ---------------------- x = Byte address, y = Bit address
Bytes 0, 1, 2, ..., 255 Bits 0, 1, 2, …, 7
MBx (Memory Byte) ---------- Ex.: MB0 = M0.0, M0.1, …,M0.7
MWx (Memory Word) -------- Ex.: MW0 = (MB0, MB1)
= (M0.0, M0.1, …,M0.7, M1.0, M1.1,…, M1.7)
MDx (Memory DWord) ----- Ex.: MD0 = (MW0, MW2)= (MB0, MB1, MB2, MB3)
=(M0.0, M0.1,…,M0.7, M1.0, M1.1,…,M1.7, M2.0, M2.1, M2.7, M3.0, M3.1, M3.7)