Chapter 6 Applied Instructions Symbol S : First input device in the matrix scan D 1 : First output device in the matrix scan D 2 : First corresponding device in the matrix scan 6_ n : Number of rows to scan Explanation 1. This instruction scans and stores the states of eight sequential input devices. S specifies the first input device in the matrix scan. 2. D 1 specifies the transistor output device Y as the first device in the matrix scan. When the conditional contact is OFF, the states of the n devices starting from D 1 are OFF. 3. One row of inputs is refreshed every scan cycle. There are 16 inputs in a row, and the scan starts from the first row and goes to the n th row. 4.
The eight input devices starting from the device specified by S are connected to the n output devices starting from the device specified by D 1 to form the n rows of switches. The matrix scan reads the states of the n rows of switches, and stores the states in the devices starting from the device specified by D 2 . 5. You can connect up to 8 rows of input switches in parallel to get 64 inputs (8Ч8=64). 6.
The interval between executions of this instruction should be longer than the time it takes for the states of the I/O 6-189 API Instruction code Operand Function 0704 MTR S, D1, D2, n Matrix input Device X Y M S T C HC D FR SM SR E K 16# “$” F S D1 D2 n BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D1 D2 n Pulse instruction 16-Bit instruction 32-Bit instruction - ES3 -