1. Direct Addressing The S7 series PLC programming instructions support both direct and indirect addressing. Direct addressing involves specifying the exact memory address of a signal, making it applicable to all elements like I, Q, M, SM, V, L, S, T, C, AC, HC, etc. For example, using direct addressing, you can move the contents of flag memory MB10 to QB2 in one operation. This is illustrated in Figure 8-4.1. In this example, the MOV B instruction is used, which is a byte move command in S7-200 PLC. The EN input triggers the operation, IN specifies the source address, and OUT defines the target address. The constant "1" inside the PLC is represented by SMO.O. More details about this instruction can be found in the relevant sections of the PLC programming manual. 2. Indirect Addressing In indirect addressing, the operand doesn't directly point to the data but instead provides an address where the data is stored. This requires using an address pointer. An address pointer is a register that holds the memory address for indirect access. When using the S7-200 PLC, there are several important rules to follow: - Only variables V, local variables L, or accumulators AC1, AC2, and AC3 can act as address pointers. ACO is not supported. - To set up an address pointer, the memory address must be moved into the pointer in double-word format. The symbol "&" denotes the address itself, not the actual content. - When using indirect addressing with the "j" instruction, the address pointer should be prefixed with a "*". - The address pointer can access I, Q, V, M, S, timers T, and counters C, but cannot access AI/AQ, high-speed counters HC, special flags SM, or local variables L. - Indirect addressing is not suitable for binary bit signals, HC, or local variables like I0.2, Q0.2, or LW2. For instance, in Example 1, the program moves four bytes of data (12345678) from variable memory VB200 to VB203 into flag registers MB0 to MB3, using AC1 as the address pointer. The process involves moving the address VB200 into AC1, then moving the data from VB200 to MW0, incrementing the pointer, and finally transferring the remaining data from VB202 to MW2. Another example, Example 2, shows how to move data from variable memory VW determined by the offset in VD1004 to VW1900 using LD10 as the pointer. The program first loads the address VBO into LD10, then adds the offset value from VD1004 to determine the target address, and finally copies the data from that location to VW1900. If VD1004 contains 1000, the data from VW1000 will be copied to VW1900, and if it changes to 1100, the data from VW1100 will be transferred instead.
Three Phase Vfd,Ac Single Phase Gasoline Generator,220V Vfd,Ac Inverter
WuXi Spread Electrical Co.,LTD , https://www.vfdspread.com