Changes for page 02 Devices

Last modified by Mora Zhou on 2023/11/22 14:13

From version 15.1
edited by Stone Wu
on 2022/09/23 17:04
Change comment: There is no comment for this version
To version 21.2
edited by Jim
on 2023/08/08 09:45
Change comment: Deleted object

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Stone
1 +XWiki.Jim
Content
... ... @@ -141,7 +141,8 @@
141 141  
142 142  Registers are used for data calculation and storage, such as the calculation and calculation of timers, counters, and analog parameters. The width of each register is 16 bits. If 32bit instructions are used, the adjacent registers are automatically formed into 32bit registers for use, the lower address is the low byte, and the higher address is the high byte.
143 143  
144 -The address range of D register: D0 to D7999; the address range of R register: R0 to R29999.
144 +* The address range of D register: D0 to D7999;
145 +* The address range of R register: R0 to R29999.
145 145  
146 146  The data involved in operations in most of our series PLC instructions are processed as signed numbers. For 16-bit registers, bit15 is the sign bit (0 represents a positive number, 1 represents a negative number); for a 32-bit register, the high byte bit15 It is the sign bit, and the value range is -32768 to 32767.
147 147  
... ... @@ -149,19 +149,19 @@
149 149  
150 150  = System device =
151 151  
152 -== Special Relay (SM) ==
153 +== Special relay (SM) ==
153 153  
154 154  The special relay SM is an internal relay with a certain specification inside the programmable controller, so it cannot be used in the program like ordinary internal relays. It can be turned ON/OFF as needed to control the PLC.
155 155  
156 -For details, please refer to [[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)__Special relays (SM) list__>>path:https://docs.we-con.com.cn/bin/view/PLC%20Editor2/15/#HAppendix1SpecialRelay28SM29]](%%).
157 +For details, please refer to [[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)__Special relays (SM) list__>>path:https://docs.we-con.com.cn/bin/view/PLC%20Editor2/15/#HAppendix1SpecialRelay28SM29]](%%).
157 157  
158 -== Special Register (SD) ==
159 +== Special register (SD) ==
159 159  
160 160  The special register SD is an internal register whose specifications are determined within the programmable controller, so it cannot be used in the program like a normal internal register, and the corresponding data can be written as needed to control the PLC.
161 161  
162 -For details, please refer to [[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)__Special register (SD) list__>>path:https://docs.we-con.com.cn/bin/view/PLC%20Editor2/15/#HAppendix2SpecialRegister28SD29]](%%).
163 +For details, please refer to [[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)__Special register (SD) list__>>path:https://docs.we-con.com.cn/bin/view/PLC%20Editor2/15/#HAppendix2SpecialRegister28SD29]](%%).
163 163  
164 -= Index Register =
165 += Index register =
165 165  
166 166  == Index register ([D]) ==
167 167  
... ... @@ -172,16 +172,12 @@
172 172  
173 173  The supported soft components for index modification are as follows:
174 174  
175 -Constant K, H plus index modification, such as D0 = 10, K10[D0] result = 10 + 10 = 20.
176 +* Constant K, H plus index modification, such as D0 = 10, K10[D0] result = 10 + 10 = 20.
177 +* Constant E and character strings do not support index modification.
178 +* Add index modification to the data device, such as D0 = 10, the result of D10[D0] is the value of D20. Even if D10[D0] is used in a double word instruction, the double word value is the value of D20 (low word) and D21 (high word).
179 +* Bit device plus index modification, such as D0 = 10, the result of M0[D0] is the value of M10.
180 +* Bits are combined into words with index modification. For example, D0 = 10, K4M10[D0] first takes M10 offset by 10 addresses, and then combines them. The result is equivalent to K4M10.
176 176  
177 -Constant E and character strings do not support index modification.
178 -
179 -Add index modification to the data device, such as D0 = 10, the result of D10[D0] is the value of D20. Even if D10[D0] is used in a double word instruction, the double word value is the value of D20 (low word) and D21 (high word).
180 -
181 -Bit device plus index modification, such as D0 = 10, the result of M0[D0] is the value of M10.
182 -
183 -Bits are combined into words with index modification. For example, D0 = 10, K4M10[D0] first takes M10 offset by 10 addresses, and then combines them. The result is equivalent to K4M10.
184 -
185 185  Whether the index modification can be used depends on whether each instruction supports the format, you can check the "offset modification" in the description of the available device for each instruction.
186 186  
187 187  = Nesting =
... ... @@ -195,7 +195,7 @@
195 195  
196 196  *1 is an instruction used to create an efficient ladder switching program by opening and closing the common bus of the Circuit program.
197 197  
198 -= pointer =
195 += Pointer =
199 199  
200 200  == Pointer (P) ==
201 201  
... ... @@ -209,7 +209,7 @@
209 209  
210 210  == Decimal constant (K) ==
211 211  
212 -“K” is a Sign that represents a decimal integer and is specified by K£ (for example: K123). It is mainly used to designate the set value of a timer or counter or the value in the operand of an application instruction. In 16bit instructions, the value range of constant K is -32768 to 32767; in 32bit instructions, the value range of constant K is -247483648 to 2147483647.
209 +“K” is a Sign that represents a decimal integer and is specified by K£ (for example: K123). It is mainly used to designate the set value of a timer or counter or the value in the operand of an application instruction. In 16bit instructions, the value range of constant K is -32768 to 32767; in 32bit instructions, the value range of constant K is -2147483648 to 2147483647.
213 213  
214 214  == Hexadecimal constant (H) ==
215 215  
... ... @@ -222,11 +222,11 @@
222 222  (% style="text-align:center" %)
223 223  [[image:02(1)_html_8a090037e802011b.png||class="img-thumbnail"]]
224 224  
225 - (The address occupies D1 and D0)
222 + The address occupies D1 and D0.
226 226  
227 227  == String constant ==
228 228  
229 -The character string constant is the device that specifies the character string, and only supports the ASCII code character set, and any character string ends with a NULL character (00H). To use string devices, you must use double eye marks to modify the characters, as follows to convert the string to ASCII characters and fill in the device starting with D0:
226 +The character string constant is the device that specifies the character string, and only supports the ASCII code character set, and any character string ends with a NULL character (00H). To use string devices, you must use double quotation marks to modify the characters, as follows to convert the string to ASCII characters and fill in the device starting with D0:
230 230  
231 231  (% style="text-align:center" %)
232 232  [[image:02(1)_html_61bdd1807e91322f.png||class="img-thumbnail"]]
... ... @@ -233,43 +233,51 @@
233 233  
234 234  = Power-down retention setting =
235 235  
236 -The user can freely configure the power-off storage range within the range of the Devices. The constant configuration is located in: “Project Management”→”Parameters”→”PLC Parameters”→”Device Latch”.
233 +The user can freely configure the power-off storage range within the range of the Devices.
237 237  
235 +The constant configuration is located in: “Project Management”→”Parameters”→”PLC Parameters”→”Device Latch”.
236 +
238 238  (% style="text-align:center" %)
239 239  [[image:02(1)_html_6ba62f454f76a539.png||class="img-thumbnail"]]
240 240  
240 +(% class="box infomessage" %)
241 +(((
241 241  **✎Note: **The X and Y registers do not support the power-down save function.
243 +)))
242 242  
243 243  = Special use of device =
244 244  
245 -**(1) Use bits to form words**
247 +**Use bits to form words**
246 246  
247 247  Format: KnB
248 248  
249 -K is a fixed character.
251 +* K is a fixed character.
252 +* The value of n is 1 to 8, which means that (n * 4) bits are combined into a word, such as K4M0 is a combination of M0 to M15.
253 +* B is the bit device number.
250 250  
251 -The value of n is 1 to 8, which means that (n * 4) bits are combined into a word, such as K4M0 is a combination of M0 to M15.
252 -
253 -B is the bit device number.
254 -
255 255  Example: Set a total of 32 bits M0 to M31 at the same time.
256 256  
257 257  (% style="text-align:center" %)
258 258  [[image:02(1)_html_93f997406ac1572a.png||class="img-thumbnail"]]
259 259  
260 +(% class="box infomessage" %)
261 +(((
260 260  **✎Note: **KnB type can also support index modification.
263 +)))
261 261  
262 -**(2) Take the bit in the word**
265 +**Take the bit in the word**
263 263  
264 264  Format: D.b
265 265  
266 -D is the number of data device D (R is not available).
269 +* D is the number of data device D (R is not available).
270 +* b is the bit number that needs to be taken, hexadecimal, and the value range is 0 to F.
267 267  
268 -b is the bit number that needs to be taken, hexadecimal, and the value range is 0 to F.
269 -
270 270  Example: bit14 in D2000 is set and Y0 is output
271 271  
272 272  (% style="text-align:center" %)
273 273  [[image:02(1)_html_8908a96754754a6.png||class="img-thumbnail"]]
274 274  
277 +(% class="box infomessage" %)
278 +(((
275 275  **✎Note: **D.b type can also support index modification.
280 +)))