Wiki source code of WECON

Version 56.1 by Hunter on 2025/03/12 17:45

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