PLC addressing modes

1. direct addressing

Direct addressing is used directly in the instruction memory or registers the component name (logo) and the address number, reads or writes data directly to the specified region. Bit, byte, Word, double word addressing, as shown in Figure 2-8.

2. indirect addressing

Indirection operand does not provide direct data, but through the address pointer is used to access data in the memory. Allowed in the S7-200 pointer I, Q, m, v, s, t, and c (current values only) store of indirection.

(1) before using indirect addressing, you must first create a pointer to the location. Pointer is a double word (32 bits), the store is a memory address, only with v, l, or the AC accumulator for pointers. Generated pointer, send commands to use double words (MOVD), where the data pointer to a memory address into the unit, double word shipping instructions at the beginning of the input operands plus and symbols, represent the address of a memory, rather than within the memory value. Command output operand is pointer addresses. For example: MOVD &VB200,AC1 instruction is the address VB200 into the accumulator in AC1.

(2) pointer after establishing a good, use pointers to access the data. In instructions in the address pointer is used to access the data, operands before the "*" indicates that the operand is pointer to address. For example: MOVW *AC1 AC0//MOVW represents a transfer instruction, instruction in AC1 as the start address of a word of the data (that is, VB200,VB201 internal data) sent in AC0.

Top