欢迎图片

Changes for page 06 Basic instructions

Last modified by Iris on 2025/10/20 11:22

From version 1.4
edited by Iris
on 2025/09/16 14:12
Change comment: There is no comment for this version
To version 2.4
edited by Iris
on 2025/09/22 16:38
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4084,6 +4084,9 @@
4084 4084  
4085 4085  
4086 4086  
4087 +
4088 +
4089 +
4087 4087  **Error code**
4088 4088  
4089 4089  |=**Error code**|=**Content**
... ... @@ -6097,3 +6097,110 @@
6097 6097  **Example**
6098 6098  
6099 6099  Example 1
6103 +
6104 += **External IO instructions** =
6105 +
6106 +=== **ARWS/Arrow Switch** ===
6107 +
6108 +**ARWS**
6109 +
6110 +Use the arrow switches for digit movement and increase or decrease of digit values to input data instructions.
6111 +
6112 +-[ARWS  (s)  (d1)  (d2) (n)]
6113 +
6114 +**Content, range and data type**
6115 +
6116 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
6117 +|(s)|The start device number that input|-|BIN16 bit|ANY_BOOL
6118 +|(d1)|The word device number storing BCD conversion data|-|BIN16 bit|ANY_BOOL
6119 +|(d2)|The start bit device (Y) that connect the display of the 7-segment digital tube|0 to 9999|BIN16 bit|ANY16_S
6120 +|(n)|Specify the number of digits displayed by the 7-segment digital tube (Setting range: K0 to K3)|0 to 3|BIN16 bit|ANY16_S
6121 +
6122 +**Device used**
6123 +
6124 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
6125 +**Index**
6126 +
6127 +**modification**
6128 +)))|(((
6129 +**Pulse**
6130 +
6131 +**extension**
6132 +)))
6133 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
6134 +|(% rowspan="4" %)ARWS|Parameter 1|●|●|●|●|●| | | | |●| | | | | | | | | | | | | | |●|
6135 +|Parameter 2| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●|
6136 +|Parameter 3| |●| | | | | | | | | | | | | | | | | | | | | | |●|
6137 +|Parameter 4| | | | | | | | | | | | | | | | | | | | | |●|●| | |
6138 +
6139 +**Features**
6140 +
6141 +16-bit operation (ARWS). The 16-bit BIN value from 0 to 9999 is stored in D+1. For the sake of convenience, the following description is displayed in BCD conversion.
6142 +
6143 +When the instruction input is ON, the ARWS instruction will operate as shown below
6144 +
6145 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps3.png]][[image:1758526599000-920.png]]
6146 +
6147 +Display and operation part of the content
6148 +
6149 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps4.png]][[image:1758526656501-227.png]]
6150 +
6151 +1. The digit specification of n displayed by the 7-segment digital tube with BCD code
6152 +
6153 +A 4-digit (10^^3^^ digit) is used as an example in the following operation description, .
6154 +
6155 +The action of the digit selection switch (S+2, S+3)
6156 +
6157 +1. The action when input S+2 with reduced digits is ON.Each time the switch is pressed, the number of digits specification is changed according to 10^^3^^ →10^^2^^ →10^^1^^ →10^^0^^ →10^^3.^^
6158 +1. The action when the input S+3 with increased digits is ON. Each time the switch is pressed, the number of digits specification is changed according to 10^^3 ^^→ 10^^0 ^^→ 10^^1 ^^→ 10^^2 ^^→ 10^^3^^.
6159 +
6160 +1. The action of the LED for displaying the selected digits (D2+4 to D2+7). The specified number of digits can be displayed by LED by strobe signal D2+4 to D2+7.
6161 +1. The operation of the data change switch in units of digits (S, S+1). The data is changed for the number of digits specified by the "digit selection switch" above.
6162 +
6163 +1. Increase the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→1→2→...→8→9→0→1.
6164 +1. Reduce the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→9→8→7...1→0→9.
6165 +
6166 +These contents can be displayed in the 7-segment digital tube display.
6167 +
6168 +As shown above, through a series of operations, you can write the target value into D1 while viewing the 7-segment display.
6169 +
6170 +**✎Note:**
6171 +
6172 +* The setting of parameter n
6173 +
6174 +Please refer to the parameter setting of SEGL (FNC 74) instruction. The setting range is 0 to 3. 
6175 +
6176 +* The output format of the programmable controller, please use a transistor output type programmable controller.
6177 +* About scan time (operation cycle) and display timing
6178 +* The ARWS instruction is executed synchronously with the scan time (operation cycle) of the programmable controller.
6179 +* In order to perform a series of displays, the scan time of the programmable controller needs to exceed 10ms.
6180 +* When it is less than 10ms, please use the constant scan mode and run with a scan time longer than 10ms.
6181 +* Number of occupied points of the device
6182 +
6183 +1. The input of the device s occupies 4 points.
6184 +1. The output of the device d2 occupies 8 points.
6185 +
6186 +* Restrictions on the times of the uses of instructions
6187 +
6188 +Only one ARWS instruction can be used in the program.
6189 +
6190 +**Error code**
6191 +
6192 +|**Error code**|**Content**
6193 +|4084H|The data input in the application instruction (d1) and (d2) exceeds the specified range
6194 +|4085H|The output result of the read application instruction (s), (d1) and (d2) exceeds the device range
6195 +|4086H|The output result of the write application instruction (d1) and (d2) exceeds the device range
6196 +
6197 +**Example**
6198 +
6199 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps5.jpg]]
6200 +
6201 +The corresponding hardware wiring is shown in the figure below, and the PLC should be transistor output type:
6202 +
6203 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps6.jpg]]
6204 +
6205 +(1) The digital tube in the figure shows the value of D0. Press X10 to X13 to modify the value. The value of D0 can only be between 0 and 9999.
6206 +
6207 +(2) When X20 is ON, the cursor position is thousands. Each time the back key (X12) is pressed, the specified position is switched in the order of "thousands → hundred → ten → pieces → thousand"; if the forward key (X13) is pressed, the switching sequence is reversed; the cursor position is determined by the strobe pulse signal (YO04 to YOO7) LED indication of connection.
6208 +
6209 +(3) For the cursor position, each time you press the increment key (X11), the content of the position changes by 0 → 1→ 2→……8→9→0→1, and when you press the decrement key (X10), press 0 →9→8→7→…… 1→0→9 changes, the modified value takes effect immediately.
1758526599000-920.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Iris
Size
... ... @@ -1,0 +1,1 @@
1 +13.2 KB
Content
1758526656501-227.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Iris
Size
... ... @@ -1,0 +1,1 @@
1 +102.5 KB
Content