December 2001 Commands 7 – 91
7.7.6 LOAD BYTE (LB)
Syntax: LB (LOAD BYTE)
Operands: M, I, O, T, C
Action:
Copy 8 markers, inputs, outputs, timer or counters with ascending numbering
into the word accumulator. Each operand occupies one bit in the accumulator.
The TNC saves the entered operand address in the accumulator as LSB, the
entered address +1 as LSB +1 etc. The last (8th) operand is now the MSB! If
necessary, the TNC supplements the accumulator with the correct algebraic
sign.
Example:
A pure-binary coded value is read through inputs I3 to I10 and saved in byte B8
in order to process it later.
Initial state:
Input I3 = 1 Input I7 = 0
Input I4 = 1 Input I8 = 1
Input I5 = 1 Input I9 = 1
Input I6 = 0 Input I10 = 0
Function STL Accumulator contents [bit] Operand contents [bit]
31..15 ..................... 7 ................. 0 I10.......... 3
Load inputs I3 to I10
into the accumulator
(bit 0 to bit 7).
LB I3 0 .... 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 01100111
31..15 ..................... 7 .................. 0 7 ............ 0
Assign accumulator
contents to byte 8.
= B8 0 .... 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 01100111