Wiki source code of WECON

Version 54.1 by Devin Chen on 2024/12/19 17:27

Hide last authors
Hunter 2.1 1 = {{id name="HWECON"/}}WECON =
2
3 == {{id name="HLX3Series"/}}**LX3 Series** ==
4
5 Supported series: WECON LX2V/ LX2E/ LX3V/LX3VP/LX3VE/LX3VM
6
7 **HMI Settings**
8
9 |=**Item**|=**Settings**|=**Note**
10 |=Protocol|WECON LX2V/ LX2E/ LX3V/LX3VP/LX3VE/LX3VM|
11 |=Connection|RS422/RS485|
12 |=Baud rate|9600|
13 |=Data bit|7|
14 |=Parity|EVEN|
15 |=Stop bit|1|
16 |=PLC station No.|1|
17
18 **Address List**
19
20 |=**Type**|=**Device registers**|=**HMI registers**|=**Format**|=**Range**|=**Note**
21 |=Bit|=X|X|Xo|0~~303237|
22 |=Y|Y|Y o|0~~303237|
23 |=M|M|M d|0~~99999|
24 |=T|T|T d|0~~99999|
25 |=C|C|C d|0~~99999|
26 |=S|S|S d|0~~99999|
27 |=Word|=X|X|Xo|0~~303237|
28 |=Y|Y|Y o|0~~303237|
29 |=M|M|M d|0~~99999|
30 |=T|T|T d|0~~99999|
31 |=C|C|C d|0~~199|
32 |=D|D|D d|0~~7999|
33 |=S|S|S d|0~~99999|
34 |=SD|SD|SD d|8000~~9999|
35
36 **Cable Wiring**
37
38 * **RS485**
39
40 {{id name="I12.PLCProtocol_html_1897d92be6948d58.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_c6d16b5adff76549.png||alt="12.PLC Protocol_html_1897d92be6948d58.png" height="223" width="393"]]
41
42 * **RS422**
43
44 {{id name="I12.PLCProtocol_html_5c7fca9a70da2ee8.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_59ce051d2c5e70e0.png||alt="12.PLC Protocol_html_5c7fca9a70da2ee8.png" height="247" width="389"]]
45
46 **✎Note:**
47
48 * HMI COM3 is available in PI8000 series and COM3 is in COM2(hardware PIN 7 and PIN 8) .
49 * If PLC <= 20 points,such as LX3V-1208/LX3V-0806 PLC,PLC RS485A and RS485B mean PLC COM2 RS485+ and RS485- .PLC COM2 can support modbus. Please refer to PLC COM2 setting manual.
50
51 [[https:~~/~~/drive.google.com/drive/folders/13rgso7oUlatZQN_SNEcJCcN4toEdDPoP?usp=sharing>>url:https://drive.google.com/drive/folders/13rgso7oUlatZQN_SNEcJCcN4toEdDPoP?usp=sharing]]
52
Jett 38.3 53 **{{id name="HHMIsettings"/}}HMI settings**
Hunter 2.1 54
55 **Download PIStudio Software**
56
57 Please visit the link below to get the latest version PIstudio for HMI programming:
58
59 * [[Download link>>url:https://docs.we-con.com.cn/bin/view/PIStudio/Download/3%20Software/]]
60
61 **Create a new HMI project connect with PLC**
62
63 Check the link below for the video to show you how to get started with a new project
64
65 * [[Video>>url:https://youtu.be/0FpmDZe_8U8]]
66
67 For more videos, please visit our Youtube channel: [[http:~~/~~/www.youtube.com/user/Wecon2004/videos>>url:http://www.youtube.com/user/Wecon2004/videos]]
68
69 **General**
70
71 HMI could communicate with PLC and support many PLC protocols.  It is easy to operate and set communication parameters. This demo shows how to make a communication with PLC device, use WECON LX3V Series PLC as an example.
72
73 **Protocol settings**
74
75 The communication between two devices requires a protocol. The following contents show the steps of protocol settings.
76
77 Please select the protocol, when creating a new project.
78
79 1. Select the COM port for communication;
80 1. PLC type: It means PLC brand, like WECON;
81 1. PLC model: It shows the model of PLC, such as LX3V;
82
83 {{id name="Iimage-20220819093729-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_271ccf1461ff2285.png||alt="image-20220819093729-1.png" height="236" width="464"]]
84
85 If you want to change the protocol for existing project, please click [Program] → [Communication] to open the [Communication] windows, shown as the following figure.
86
87 {{id name="Iimage-20220819093729-2.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_9089051384ca99de.png||alt="image-20220819093729-2.png" height="138" width="702"]]
88
89 The steps to change the protocol for project are as follows.
90
91 1. Click [Setting] to open the [Communication device] window;
92 1. Select communication port, such as COM1;
93 1. Select Serial port for communication, such as RS422;
94 1. Select device type (device brand), such as WECON;
95 1. Select the protocol for communication, such as WECON LX3V;
96
97 {{id name="Iimage-20220819093729-3.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_33df6370c17ebfa9.png||alt="image-20220819093729-3.png" height="674" width="875"]]
98
99 **Parameter settings**
100
101 The parameters settings are in [Communication] window, shown as following below.
102
103 1. Click [Setting] to open the [COM port setting] window;
104 1. Set the parameters such as [connection], [Baud rate] and so on;
105
106 {{id name="Iimage-20220819093729-4.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_891cd58628495097.png||alt="image-20220819093729-4.png" height="636" width="818"]]
107
108 1. Click [Setting] to open [Timeout] setting window, you could set the parameters according your requirements, or just use the default value.
109
110 {{id name="Iimage-20220819093729-5.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_b80c1a7329ce3f5f.png||alt="image-20220819093729-5.png" height="296" width="349"]]
111
112 **Set PLC address in HMI screen**
113
114 1. Place the objects to HMI screen;
115 1. Double-click the object to open the setting window;
116 1. Click “Edit” to open the address setting windows;
117 1. Connection: select the serial port in HMI;
118 1. Address type: All the PLC address types will be display in this list, such as M;
119 1. Address No.: Please input the number of this address, such as 0;
120
121 {{id name="Iimage-20220819093729-6.jpeg"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_c233137c112020bf.jpg||alt="image-20220819093729-6.jpeg" height="817" width="1593"]]
122
123 **HMI Compilation Download**
124
125 {{id name="Iimage-20220902171247-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_49085bc4fc23af93.png||alt="image-20220902171247-1.png" height="1078" width="1262"]]
126
127 **Communication cable**
128
129 In order to ensure the stability of communication, please use the twisted-pair communication cable with good grounding. The following figure shows the pin out definition.
130
131 {{id name="Iimage-20220819093729-7.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_e18a02a8b5c24f4a.png||alt="image-20220819093729-7.png" height="256" width="414"]]
132
133 **HMI communication PLC use Modbus **
134
135 * HMI setting: [[https:~~/~~/docs.we-con.com.cn/bin/view/PIStudio/12.PLC%20protocols/>>url:https://docs.we-con.com.cn/bin/view/PIStudio/12.PLC%20protocols/]]
136 * PLC setting: [[https:~~/~~/docs.we-con.com.cn/bin/view/PLC%20Editor/8.1.%09Communication/>>url:https://docs.we-con.com.cn/bin/view/PLC%20Editor/8.1.%09Communication/]]
137
Jett 38.3 138 **{{id name="HPLCsettings"/}}PLC settings**
Hunter 2.1 139
140 **Download PLC Software**
141
142 Please visit below link to get the latest version PLC Editor for HMI programming
143
144 * LX3V:[[Download link>>url:https://docs.we-con.com.cn/bin/view/PLC%20Editor/10%20Hardware%20/Software/]]
145 * LX5V:[[Download link>>url:https://docs.we-con.com.cn/bin/view/PLC%20Editor2/Download/03%20Software/]]
146
147 **Start a new PLC project**
148
149 Start a new PLC project by clicking “New” on the left top corner of screen, select the PLC mode from the drop-down list.
150
151 {{id name="Iimage-20220819101447-3.jpeg"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d5d194db9d1d33d0.jpg||alt="image-20220819101447-3.jpeg" height="411" width="726"]]
152
153 **Add a new instruction **
154
155 Double click on the ladder, select the ladder symbol (instruction) from the drop-down list, then enter the address for this symbol.
156
157 {{id name="Iimage-20220819105530-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_6e59dd6d3eba4d.png||alt="image-20220819105530-1.png" height="387" width="698"]]
158
159 You could also select the ladder symbol from the menu bar directly.
160
161 {{id name="Iimage-20220819093729-12.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_db5a3ad72966c00e.png||alt="image-20220819093729-12.png" height="1040" width="1920"]]
162
163 **Add comment to PLC program**
164
165 {{id name="Iimage-20220819105630-3.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_50fcec6a5d6ac220.png||alt="image-20220819105630-3.png" height="413" width="698"]]
166
167 **Add the statement to PLC program**
168
169 Add the statement by single click on “Statement”, when finished, single click on “Statement” again to go back to Ladder edit.
170
171 {{id name="Iimage-20220819105644-4.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d44e5ea0b00e2e14.png||alt="image-20220819105644-4.png" height="345" width="698"]]
172
173 **Compile **
174
175 You need to compile the PLC program before downloading or running Off-line simulator. The background color will be changed from purple to white when there is no error.
176
177 {{id name="Iimage-20220819093729-15.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_e2d51171f234946a.png||alt="image-20220819093729-15.png" height="356" width="1912"]]
178
179 **Download setting **
180
181 Click on “Transfer Setup” to select download mode.
182
183 {{id name="Iimage-20220820150853-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_98b1686a16c575ea.png||alt="image-20220820150853-1.png" height="713" width="1509"]] **Download PLC program to PLC**
184
185 Quick select the parameters and main program of PLC program, then download to PLC, “Yes”-”Yes”-”OK”
186
187 {{id name="Iimage-20220819093729-17.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_575b66f5b3d8cac5.png||alt="image-20220819093729-17.png" height="808" width="1920"]]
188
189 **Upload PLC program from PLC**
190
191 Read the PLC program from PLC to computer.
192
193 {{id name="Iimage-20220819093729-18.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_66ea9f304121cf6d.png||alt="image-20220819093729-18.png" height="762" width="1920"]]
194
195 **Device monitor**
196
197 Monitor the value of certain address in PLC, double click “Current value” to change the value in this address.
198
199 {{id name="Iimage-20220819093730-19.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_ee6125099c14cb2b.png||alt="image-20220819093730-19.png" height="781" width="1920"]]
200
201 **Online monitor**
202
203 Monitor the each address in PLC by online monitor. Changing the state or value in PLC is also allowd.
204
205 {{id name="Iimage-20220819093730-20.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_21923412853b2626.png||alt="image-20220819093730-20.png" height="564" width="1607"]]
206
207 **Monitor edit**
208
209 In this mode, you could edit the PLC program during PLC is running. 
210
211 {{id name="Iimage-20220819105928-9.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_9c0519bed3567723.png||alt="image-20220819105928-9.png" height="229" width="669"]]
212
213 == {{id name="HLX5VA0Series"/}}**LX5V Series** ==
214
215 This example introduces the establishment of serial port communication between Wecon HMI and LX5V, including three parts: PLC software configuration, HMI software configuration, and hardware wiring.
216
217 **Software configuration of PLC**
218
219 PLC programming software
220
221 {{id name="Iimage-20220810164710-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_7599c2849074f02b.png||alt="image-20220810164710-1.png" height="326" width="424"]]
222
223 **New PLC project**
224
225 Click "New Project" and select the PLC model.
226
227 {{id name="Iimage-20220810172412-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d6bc182897bb2201.png||alt="image-20220810172412-1.png" height="898" width="1672"]]
228
229
230
231 **HMI software configuration**
232
233 HMI programming software
234
235 {{id name="Iimage-20220810171237-4.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d127b46be5bf7497.png||alt="image-20220810171237-4.png" height="419" width="673"]]
236
237 **New HMI project**
238
239 Click New Project and select the HMI model.
240
241 {{id name="Iimage-20220810172010-5.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_e73d0d6216dbf983.png||alt="image-20220810172010-5.png" height="912" width="1697"]]
242
243 Set communication port parameters
244
245 Click the communication configuration button on the left to find the communication protocol with LX5V. After selecting the protocol, configure the communication parameters of the COM port.
246
247 * Baud rate:115200
248 * Data bit:8
249 * Stop bit:1
250 * Parity:No verification
251
252 {{id name="Iimage-20220811104012-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_dac87f79e1471c71.png||alt="image-20220811104012-1.png" height="965" width="1383"]]
253
254 **hardware connection**
255
256 Hardware wiring diagram
257
258 This example introduces WeconHMI with LX5V PLC to establish communication through serial port. The connection diagram is as follows:
259
260 {{id name="Iimage-20220811103005-4.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_dab0150e5cf17042.png||alt="image-20220811103005-4.png" height="150" width="681"]]
261
262 {{id name="Iimage-20220811103227-7.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d72bd5e65a0f052c.png||alt="image-20220811103227-7.png" height="209" width="342"]]
263
264 The above are all the steps for establishing serial port communication between Wecon HMI with LX5V PLC.
265
266 == {{id name="HLX5V-NEthernet"/}}**LX5V-N Ethernet** ==
267
268 {{id name="cke_bm_147709S"/}} This example introduces the establishment of Ethernet communication between Wecon HMI and LX5V, including three parts: PLC software configuration, HMI software configuration, and hardware wiring.
269
270 **Software configuration of PLC**
271
272 **PLC programming software**
273
274 {{id name="Iimage-20220810164710-1.png-1"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_7599c2849074f02b.png||alt="image-20220810164710-1.png" height="326" width="424"]]
275
276 **New PLC project**
277
278 Click New Project and select the PLC model.
279
280 {{id name="Iimage-20220811115454-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_ff2c1cc959b53fdd.png||alt="image-20220811115454-1.png" height="930" width="1699"]]
281
282 **Set Ethernet port parameters**
283
284 Follow the steps below to configure Ethernet parameters
285
286 * PLC IP address:192.168.39.200
287 * default gateway:192.168.39.1
288 * subnet mask:255.255.255.0
289
290 {{id name="Iimage-20220811140530-2.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_60404ed3c7204071.png||alt="image-20220811140530-2.png" height="1031" width="1920"]]
291
292 **Registers list**
293
294 {{id name="Iimage-20220811102219-3.png-1"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_eb0d8d9280761af1.png||alt="image-20220811102219-3.png" height="658" width="1226"]]
295
296 **HMI software configuration**
297
298 HMI programming software
299
300 {{id name="Iimage-20220810171237-4.png-1"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_d127b46be5bf7497.png||alt="image-20220810171237-4.png" height="419" width="673"]]
301
302 **New HMI project**
303
304 Click New Project and select the HMI model.
305
306 {{id name="Iimage-20220810172010-5.png-1"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_e73d0d6216dbf983.png||alt="image-20220810172010-5.png" height="912" width="1697"]]
307
308 **Set communication port parameters**
309
310 Click the project setting button on the left to configure the IP address of the HMI machine to ensure that the HMI and PLC IP remain in a local area network.
311
312 * HMI IP address:192.168.39.201
313 * Default gateway:192.168.39.1
314 * Subnet mask:255.255.255.0
315
316 {{id name="Iimage-20220811170753-2.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_94717717b08e9074.png||alt="image-20220811170753-2.png" height="1008" width="1920"]]
317
318 Next, click Communication Settings to configure the IP of the HMI communication object.
319
320 {{id name="Iimage-20220811163047-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_291564bcc9db7b1b.png||alt="image-20220811163047-1.png" height="1030" width="1920"]]
321
322 **Hardware connection**
323
324 This example introduces WeconHMI with LX5V-N PLC to establish communication through ethernet. The connection diagram is as follows:
325
326 {{id name="Iimage-20220811170248-1.png"/}}[[image:xwiki_PIStudio_12.PLC+protocols_WebHome_dcab5cd2ecf22982.png||alt="image-20220811170248-1.png" height="199" width="779"]]
327
328 The above are all the steps for establishing ethernet communication between Wecon HMI with LX5V PLC.
Jett 38.3 329
Jett 42.1 330 == **LX6V Ethernet** ==
331
Jett 45.1 332 **HMI Setting**
333
334 |=**Items**|=**Settings**
Jett 49.1 335 |Protocol|WECON LX6V EtherNet/IP
Jett 45.1 336 |Connection|Ethernet
Jett 46.1 337 |Port No.|33818
338 |Device No.|1
Jett 45.1 339 |HMI No.|0
340
Jett 51.1 341 **Support Variable Type**
Jett 47.1 342
343 |=Data Type|=PIStudio Data Format
344 |=BOOL|Bit
345 |=BYTE|16-bit Unsigned/Binary/BCD/Hex
346 |=WORD|16-bit Unsigned/Binary/BCD/Hex
347 |=DWORD|32-bit Unsigned/Binary/BCD/Hex
348 |=LWORD|64-bit Signed/Binary/BCD/Hex
349 |=SINT|16-bit Signed/Binary/BCD/Hex
350 |=USINT|16-bit Unsigned/Binary/BCD/Hex
351 |=INT|16-bit Signed/Binary/BCD/Hex
352 |=UINT|16-bit Unsigned/Binary/BCD/Hex
353 |=DINT|32-bit Signed/Binary/BCD/Hex
354 |=UDINT|32-bit Unsigned/Binary/BCD/Hex
355 |=LINT|64-bit Signed/Binary/BCD/Hex
356 |=REAL|32-bit Float
357 |=LREAL|64-bit Float
358
Jett 43.1 359 **PLC Setting**
Jett 42.1 360
361 PLC programmer software
362
363 (% style="text-align:center" %)
364 [[image:1726822663840-435.png]]
365
366 Create and Export the Freetags
367
Jett 43.1 368 **①**[Program]→[Global variable]→[GVL]→Create the Freetags you need,notice the Category and Type of data
369
370 (% class="box infomessage" %)
371 (((
372 **✎**Note: Only global variables can be exported normally
373 )))
374
375 (% style="text-align:center" %)
Jett 52.1 376 [[image:图片2.png]]
Jett 43.1 377
Jett 48.1 378 **②**[File]→[Export label]
Jett 43.1 379
380 (% style="text-align:center" %)
Jett 52.1 381 [[image:图片3.png]]
Jett 43.1 382
Jett 48.1 383 **③**Set the Name and Type→[Save]→[OK]
Jett 43.1 384
385 (% style="text-align:center" %)
Jett 52.1 386 [[image:图片4.png]]
Jett 43.1 387
388 **HMI Setting **
Jett 47.1 389
Jett 50.1 390 Tags import
Jett 47.1 391
392 [Labels manage]→[Import Tags From File]→Choose the .CSV file you need→[Open]→[Save]→[OK]
393
394 (% style="text-align:center" %)
Jett 52.1 395 [[image:图片1.png]]