Changes for page 02 Devices

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

From version 13.1
edited by Stone Wu
on 2022/09/23 16:50
Change comment: There is no comment for this version
To version 22.1
edited by Jim
on 2023/08/08 09:46
Change comment: Added annotation on "below"

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -02 Registers
1 +02 Devices
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Stone
1 +XWiki.Jim
Content
... ... @@ -62,7 +62,6 @@
62 62  
63 63  When the timer coil (OUT T instruction) is executed, the timer coil is turned on/off, the current value is updated, and the contact is turned on/off.
64 64  
65 -
66 66  |=Registers|=Timer
67 67  |=T0 to T191|100ms timer
68 68  |=T192 to T199|100ms subroutine timer (used in the subroutine, even if the subroutine is not called, it will still be updated)
... ... @@ -72,21 +72,27 @@
72 72  |=T256 to T383|1ms timer
73 73  |=T384 to T511|0.1ms timer
74 74  
75 -**(1) General-purpose timer (T0 to T245)**
74 +**General-purpose timer (T0 to T245)**
76 76  
77 77  (% style="text-align:center" %)
78 -[[image:02(1)_html_b1b48247f79e373c.gif||height="214" width="800" class="img-thumbnail"]]
77 +[[image:02(1)_html_b1b48247f79e373c.gif||height="165" width="598" class="img-thumbnail"]]
79 79  
80 -As shown in the figure above: when the normally open contact of X0 is turned on, the current value counter of T200 starts timing from zero and counts up the 10ms clock pulse. When the current value is equal to the set value 223, the timer's normally open contact is turned on and the normally closed contact is turned off, that is, the output contact of T200 will act after its coil is driven for 2.23s. After the normally open contact of X0 is disconnected, T200 is reset because the coil is de-energized. After reset, its normally open contact is disconnected, and the normally closed contact is connected, and the current value returns to zero.
79 +As shown in the figure above: when the normally open contact of X0 is turned on, the current value counter of T200 starts timing from zero and counts up the 10ms clock pulse.
81 81  
82 -**(2) Accumulative timer (T246 to T255)**
81 +When the current value is equal to the set value 223, the timer's normally open contact is turned on and the normally closed contact is turned off, that is, the output contact of T200 will act after its coil is driven for 2.23s. After the normally open contact of X0 is disconnected, T200 is reset because the coil is de-energized. After reset, its normally open contact is disconnected, and the normally closed contact is connected, and the current value returns to zero.
83 83  
83 +**Accumulative timer (T246 to T255)**
84 +
84 84  (% style="text-align:center" %)
85 -[[image:02(1)_html_ad4dcbfaa1b0c0af.gif||height="305" width="800" class="img-thumbnail"]]
86 +[[image:02(1)_html_ad4dcbfaa1b0c0af.gif||height="228" width="598" class="img-thumbnail"]]
86 86  
87 -When the X1 normally open contact in Figure b is turned on, the current value counter of T250 accumulates the 10ms clock pulse. When the normally open contact of X1 is disconnected or stopped, the counting stops, and the current value remains unchanged. When the normally open contact of X1 is turned on again, counting continues. When the accumulated time t1+t2 is 4.2s, the current value is equal to the set value of 420, the normally open contact of T250 is turned on and the normally closed contact is turned off. When the normally open contact of X2 is turned on, T250 will reset (because the coil of the accumulative timer will not reset when the power is off, you need to use the normally open contact of X2 and the reset instruction to force T250 to reset).
88 +* When the X1 normally open contact in Figure b is turned on, the current value counter of T250 accumulates the 10ms clock pulse.
89 +* When the normally open contact of X1 is disconnected or stopped, the counting stops, and the current value remains unchanged.
90 +* When the normally open contact of X1 is turned on again, counting continues.
91 +* When the accumulated time t1+t2 is 4.2s, the current value is equal to the set value of 420, the normally open contact of T250 is turned on and the normally closed contact is turned off.
92 +* When the normally open contact of X2 is turned on, T250 will reset (because the coil of the accumulative timer will not reset when the power is off, you need to use the normally open contact of X2 and the reset instruction to force T250 to reset).
88 88  
89 -**(3) Setting value**
94 +**Setting value**
90 90  
91 91  The timer time can use the constants (K, H) in the program memory as the set value, or can be specified indirectly by the content of the data register (D).
92 92  
... ... @@ -97,19 +97,25 @@
97 97  
98 98  == Counter (C) ==
99 99  
100 -The counter is used to complete the counting function. Each counter contains a coil, a contact, and a timer value register. Whenever the driving signal of the counter coil changes from OFF to ON, the counter reading value increases by 1, if the timer value reaches the preset time value, Its contact action, a contact (NO contact) is closed, b contact (NC contact) is opened; if the timing value is cleared, the output a contact will be opened, and b contact (NC contact) will be closed. Some timers have features such as power-down retention, accumulation, etc., and maintain the value before power-down after power-on again.
105 +The counter is used to complete the counting function. Each counter contains a coil, a contact, and a timer value register. Whenever the driving signal of the counter coil changes from OFF to ON, the counter reading value increases by 1.
101 101  
107 +If the timer value reaches the preset time value, its contact action, a contact (NO contact) is closed, b contact (NC contact) is opened;
108 +
109 +If the timing value is cleared, the output a contact will be opened, and b contact (NC contact) will be closed. Some timers have features such as power-down retention, accumulation, etc., and maintain the value before power-down after power-on again.
110 +
102 102  The counters are identified by C0, C1,..., C255, and the order is numbered in decimal.
103 103  
104 104  The counter (C) is a 16-bit counter.
105 105  
106 106  (% style="text-align:center" %)
107 -[[image:02(1)_html_740e6ef971b9c6de.gif||height="234" width="800" class="img-thumbnail"]]
116 +[[image:02(1)_html_740e6ef971b9c6de.gif||height="175" width="598" class="img-thumbnail"]]
108 108  
109 -The setting value of the 16-bit up counter is 1 to 32767. As shown in the working process of the up counter in Figure c, after the normally open contact of X1 in the figure is turned on, C0 is reset, its corresponding bit storage unit is set to 0, the normally open contact of C0 is disconnected, and the normally closed contact Point is turned on, and its current counter value is set to 0 at the same time. X2 provides a counting input signal. When the reset input circuit of the counter is disconnected and the counting input circuit changes from disconnected to connected (that is, the rising edge of the counting pulse), the current value of counter C0 is increased by 1. After 10 count pulses, the current value of C0 is equal to the set value of 10, and its corresponding bit storage unit is set to 1, and the Y0 contact is turned on at this time. When counting pulses again, the current value does not change until the reset input signal is turned on, and the current value of the counter is set to 0.
118 +The setting value of the 16-bit up counter is 1 to 32767. As shown in the working process of the up counter in Figure c, after the normally open contact of X1 in the figure is turned on, C0 is reset, its corresponding bit storage unit is set to 0, the normally open contact of C0 is disconnected, and the normally closed contact Point is turned on, and its current counter value is set to 0 at the same time.
110 110  
111 -== Long Counter (LC) ==
120 +X2 provides a counting input signal. When the reset input circuit of the counter is disconnected and the counting input circuit changes from disconnected to connected (that is, the rising edge of the counting pulse), the current value of counter C0 is increased by 1. After 10 count pulses, the current value of C0 is equal to the set value of 10, and its corresponding bit storage unit is set to 1, and the Y0 contact is turned on at this time. When counting pulses again, the current value does not change until the reset input signal is turned on, and the current value of the counter is set to 0.
112 112  
122 +== Long counter (LC) ==
123 +
113 113  The long counter (LC) is basically the same as the counter (C), but compared to the counter (C), the long counter (LC) is a 32-bit register, and the range of values that can be counted is larger.
114 114  
115 115  The long counter is identified by LC0, LC1,...,LC255, and the sequence is numbered in decimal.
... ... @@ -116,7 +116,7 @@
116 116  
117 117  == High-speed counter (HSC) ==
118 118  
119 - High-speed counter (HSC) is a device used for counting through external input of high-speed pulse signals. HSC is a 32-bit register.
130 +High-speed counter (HSC) is a device used for counting through external input of high-speed pulse signals. HSC is a 32-bit register.
120 120  
121 121  The corresponding parameter configuration can be configured through: “project management” -> “parameters” -> “high-speed counter configuration”:
122 122  
... ... @@ -126,33 +126,32 @@
126 126  (% style="text-align:center" %)
127 127  [[image:02(1)_html_a2d0f82f3579adff.png||class="img-thumbnail"]]
128 128  
140 +== Data register (D&R) ==
129 129  
130 -
131 -== Data Register (D&R) ==
132 -
133 133  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.
134 134  
135 -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.
136 136  
137 137  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.
138 138  
139 -When 32-bit data needs to be processed, the two adjacent D registers can be formed into a 32-bit double word. For example, when accessing D100 in 32-bit format, use the high address D101 register as the high word and the high byte bit 15 as The sign bit of a double word can handle values from -2147483648 to 2 147483647.
149 +When 32-bit data needs to be processed, the two adjacent D registers can be formed into a 32-bit double word. For example, when accessing D100 in 32-bit format, use the high address D101 register as the high word and the high byte bit 15 as The sign bit of a double word can handle values from -2147483648 to 2147483647.
140 140  
141 141  = System device =
142 142  
143 -== Special Relay (SM) ==
153 +== Special relay (SM) ==
144 144  
145 145  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.
146 146  
147 -For details, please refer to [[(% class="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]](%%).
148 148  
149 -== Special Register (SD) ==
159 +== Special register (SD) ==
150 150  
151 151  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.
152 152  
153 -For details, please refer to [[(% class="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]](%%).
154 154  
155 -= Index Register =
165 += Index register =
156 156  
157 157  == Index register ([D]) ==
158 158  
... ... @@ -163,16 +163,12 @@
163 163  
164 164  The supported soft components for index modification are as follows:
165 165  
166 -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.
167 167  
168 -Constant E and character strings do not support index modification.
169 -
170 -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).
171 -
172 -Bit device plus index modification, such as D0 = 10, the result of M0[D0] is the value of M10.
173 -
174 -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.
175 -
176 176  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.
177 177  
178 178  = Nesting =
... ... @@ -186,7 +186,7 @@
186 186  
187 187  *1 is an instruction used to create an efficient ladder switching program by opening and closing the common bus of the Circuit program.
188 188  
189 -= pointer =
195 += Pointer =
190 190  
191 191  == Pointer (P) ==
192 192  
... ... @@ -200,7 +200,7 @@
200 200  
201 201  == Decimal constant (K) ==
202 202  
203 -“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.
204 204  
205 205  == Hexadecimal constant (H) ==
206 206  
... ... @@ -213,11 +213,11 @@
213 213  (% style="text-align:center" %)
214 214  [[image:02(1)_html_8a090037e802011b.png||class="img-thumbnail"]]
215 215  
216 - (The address occupies D1 and D0)
222 + The address occupies D1 and D0.
217 217  
218 218  == String constant ==
219 219  
220 -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:
221 221  
222 222  (% style="text-align:center" %)
223 223  [[image:02(1)_html_61bdd1807e91322f.png||class="img-thumbnail"]]
... ... @@ -224,43 +224,51 @@
224 224  
225 225  = Power-down retention setting =
226 226  
227 -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.
228 228  
235 +The constant configuration is located in: “Project Management”→”Parameters”→”PLC Parameters”→”Device Latch”.
236 +
229 229  (% style="text-align:center" %)
230 230  [[image:02(1)_html_6ba62f454f76a539.png||class="img-thumbnail"]]
231 231  
240 +(% class="box infomessage" %)
241 +(((
232 232  **✎Note: **The X and Y registers do not support the power-down save function.
243 +)))
233 233  
234 234  = Special use of device =
235 235  
236 -**(1) Use bits to form words**
247 +**Use bits to form words**
237 237  
238 238  Format: KnB
239 239  
240 -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.
241 241  
242 -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.
243 -
244 -B is the bit device number.
245 -
246 246  Example: Set a total of 32 bits M0 to M31 at the same time.
247 247  
248 248  (% style="text-align:center" %)
249 249  [[image:02(1)_html_93f997406ac1572a.png||class="img-thumbnail"]]
250 250  
260 +(% class="box infomessage" %)
261 +(((
251 251  **✎Note: **KnB type can also support index modification.
263 +)))
252 252  
253 -**(2) Take the bit in the word**
265 +**Take the bit in the word**
254 254  
255 255  Format: D.b
256 256  
257 -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.
258 258  
259 -b is the bit number that needs to be taken, hexadecimal, and the value range is 0 to F.
260 -
261 261  Example: bit14 in D2000 is set and Y0 is output
262 262  
263 263  (% style="text-align:center" %)
264 264  [[image:02(1)_html_8908a96754754a6.png||class="img-thumbnail"]]
265 265  
277 +(% class="box infomessage" %)
278 +(((
266 266  **✎Note: **D.b type can also support index modification.
280 +)))
XWiki.XWikiComments[0]
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.Jim
Comment
... ... @@ -1,0 +1,1 @@
1 +test
Date
... ... @@ -1,0 +1,1 @@
1 +2023-08-08 09:46:31.670
Selection
... ... @@ -1,0 +1,1 @@
1 +below
State
... ... @@ -1,0 +1,1 @@
1 +SAFE
Target
... ... @@ -1,0 +1,1 @@
1 +PLC Editor2.02 Registers.WebHome