06 Matrix input

Last modified by Wecon on 2025/09/03 21:03

MTR/Matrix input

MTR

The instruction to read the input signal (switch) of 8 points multiply by n columns in the time division method of 8 input and (N) output (transistor).

-[MTR (S) (D1) (D2) (N)]

Content, range and data type

ParameterContentRangeData typeData type (label)
(S)The start device (X) number X000, X010, X020 of the row signal input of the matrix is up to the final input X number. 8 consecutively occupied.The lowest bit number of X can only be 0BitANY_BOOL
(D1)The starting device (Y) number of the column signal output of the matrix is Y000, Y010, Y020... to the final output Y number. 8 consecutively occupied.The lowest bit number of Y can only be 0BitANY_BOOL
(D2)The start device (Y, M, S) number of the ON output destination address is Y000, Y010, Y020..., M000, M010, M020..., S000, S010, S020... until the final Y, M, S number. Y occupies 8*(N) continuously, and the others occupy 10*(N) continuously.-BitANY_BOOL
(N)Set the number of columns in the matrix input.2 to 8Unsigned BIN 16 bitANY16_U

Device used

InstructionParameterDevices

Offset modification

Pulse extension

XYMSSMKH[D]XXP
MTRParameter 1        
Parameter 2        
Parameter 3     
Parameter 4       

Features

image-20220609092657-2.png

This instruction generally uses the normally ON contact SM100.

07-3 Basic instructions_html_5aa7f63950930c06.png

According to the example in the figure:

M10 will turn ON when Y30 and X30 are connected, M14 will be ON when Y30 and X34 are connected, M26 will be ON when Y31 and X36 are connected

(D2) is recommended to use a minimum of 0, mainly when using an address such as M4, the first start is M4, and then it will continue to occupy M11, which is inconvenient to calculate and view, so it is recommended to use a software with a minimum of 0 element.

Special device used

DevicesContent
SM229SM229 will turn ON after one cycle of execution is completed

Note:  The MTR instruction can only run one instruction at the same time.

Error code

Error codeContent
4085HThe read address of (S) and (N) exceeds the device range
(S) use the numbered device whose low bit is not 0
4086HAThe write address of (D1) and (D2) exceeds the device range
(D2) use the numbered device whose low bit is not 0
4084H(N) is not in the range of 2 to 8
4089HMultiple MTR instructions are executed at the same time