Wiki source code of 06 Matrix input

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

Show last authors
1 == **MTR/Matrix input** ==
2
3 **MTR**
4
5 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).
6
7 -[MTR (S) (D1) (D2) (N)]
8
9 **Content, range and data type**
10
11 |**Parameter**|(% style="width:654px" %)**Content**|(% style="width:457px" %)**Range**|(% style="width:101px" %)**Data type**|(% style="width:182px" %)**Data type (label)**
12 |(S)|(% style="width:654px" %)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.|(% style="width:457px" %)The lowest bit number of X can only be 0|(% style="width:101px" %)Bit|(% style="width:182px" %)ANY_BOOL
13 |(D1)|(% style="width:654px" %)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.|(% style="width:457px" %)The lowest bit number of Y can only be 0|(% style="width:101px" %)Bit|(% style="width:182px" %)ANY_BOOL
14 |(D2)|(% style="width:654px" %)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.|(% style="width:457px" %)-|(% style="width:101px" %)Bit|(% style="width:182px" %)ANY_BOOL
15 |(N)|(% style="width:654px" %)Set the number of columns in the matrix input.|(% style="width:457px" %)2 to 8|(% style="width:101px" %)Unsigned BIN 16 bit|(% style="width:182px" %)ANY16_U
16
17 **Device used**
18
19 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="7" %)**Devices**|(((
20 **Offset modification**
21 )))|(((
22 **Pulse extension**
23 )))
24 |**X**|**Y**|**M**|**S**|**SM**|**K**|**H**|**[D]**|**XXP**
25 |(% rowspan="4" %)MTR|Parameter 1|●| | | | | | | |
26 |Parameter 2| |●| | | | | | |
27 |Parameter 3| |●|●|●|●| | | |
28 |Parameter 4| | | | | |●|●| |
29
30 **Features**
31
32 (% style="text-align:center" %)
33 [[image:image-20220609092657-2.png]]
34
35 This instruction generally uses the normally ON contact SM100.
36
37 [[image:07-3 Basic instructions_html_5aa7f63950930c06.png]]
38
39 According to the example in the figure:
40
41 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
42
43 (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.
44
45 **Special device used**
46
47 |**Devices**|**Content**
48 |SM229|SM229 will turn ON after one cycle of execution is completed
49
50 (% class="box infomessage" %)
51 (((
52 ✎**Note: ** The MTR instruction can only run one instruction at the same time.
53 )))
54
55 **Error code**
56
57 |**Error code**|**Content**
58 |(% rowspan="2" %)4085H|The read address of (S) and (N) exceeds the device range
59 |(S) use the numbered device whose low bit is not 0
60 |(% rowspan="2" %)4086HA|The write address of (D1) and (D2) exceeds the device range
61 |(D2) use the numbered device whose low bit is not 0
62 |4084H|(N) is not in the range of 2 to 8
63 |4089H|Multiple MTR instructions are executed at the same time