Wiki source code of CODESYS

Last modified by Joe on 2026/03/19 10:07

Hide last authors
Joe 2.1 1 = CODESYS V3/WECON LX6C =
Wecon 1.1 2
Joe 2.1 3 Supported Series: LX6C Series, AC60 Series
Wecon 1.1 4
5 **HMI Settings**
6
7 |**Items**|(% style="width:426px" %)**Settings**|(% style="width:488px" %)**Note**
Joe 2.1 8 |Protocol|(% style="width:426px" %)CODESYS V3/ WECON LX6C|(% style="width:488px" %)
Wecon 1.1 9 |Connection|(% style="width:426px" %)Ethernet|(% style="width:488px" %)
10 |Port No.|(% style="width:426px" %)11740|(% style="width:488px" %)
11 |Username|(% style="width:426px" %) |(% style="width:488px" %)Need to be same as the PLC setting
12 |Password|(% style="width:426px" %) |(% style="width:488px" %)Need to be same as the PLC setting
13
14 {{info}}
15 ✎Note: CODESYS V3 protocol doesn't support online simulation.
16 {{/info}}
17
Joe 3.1 18 **How to select protocols**
19
20 |=PIStudio Version|=(% colspan="2" %)PI10.0|=(% colspan="3" %)PI9.0|=(% colspan="3" %)PI8.0
21 |=Protocol|CODESYS V3|WECON LX6C|CODESYS V3|(% colspan="2" rowspan="1" %)WECON LX6C|(% colspan="2" rowspan="1" %)CODESYS V3|WECON LX6C
22 |=PI3000is Series|**N/A**|YES|**YES**|(% colspan="2" rowspan="1" %)N/A|(% colspan="2" rowspan="1" %)YES|N/A
23 |=PI8000ig Series|YES|YES|N/A|(% colspan="2" rowspan="1" %)N/A|(% colspan="2" rowspan="1" %)YES|N/A
24 |=(((
25 RH/RE/RL Series
26 )))|YES|YES|YES**(Only RH-WIFI)**|(% colspan="2" rowspan="1" %)N/A|(% colspan="2" rowspan="1" %)N/A|N/A
27
Wecon 1.1 28 **How to import the tags**
29
30 * Program PLC_PRG;
31
32 (% style="text-align:center" %)
33 [[image:codesys2.png]]
34
35 * Add Symbol Configuration: Right click the Application, add Symbol Configuration into Device list;
36
37 (% style="text-align:center" %)
38 [[image:codesys1.png]]
39
40 * Check PLC_PRG and its tags, click Build, then click Generate Code;
41
42 (% style="text-align:center" %)
43 [[image:codesys3.png]]
44
45 * After generate successfully, a xml file would be generated inside the directory of the project;
46
47 (% style="text-align:center" %)
48 [[image:codesys4.png]]
49
Joe 2.1 50 * Create the HMI project and select the CODESYS V3~/~/WECON LX6C;
Wecon 1.1 51
52 (% style="text-align:center" %)
53 [[image:codesys5.png]]
54
Joe 2.1 55 (% style="text-align:center" %)
56 [[image:WECON LX6C.png]]
57
58
Wecon 1.1 59 * Configure the PLC IP and port number, enable or disable the username and password according to the actual situation;
60
61 (% style="text-align:center" %)
62 [[image:codesys6.png]]
63
64 * Import the xml file;
65
66 (% style="text-align:center" %)
67 [[image:codesys7.png]]
68
69 * After import successfully, the tags would show on the Tag Manager;
70
71 (% style="text-align:center" %)
72 [[image:codesys8.png]]
73
74 **Note:** If using the string data type, the length of the manipulation character in the PI software is the length of the string in the codesys software plus one.(The maximum length is 81)
75
76 (% style="text-align:center" %)
77 [[image:1740736152481-994.png]]
78
79 (% style="text-align:center" %)
80 [[image:1740736211615-727.png]]
81
82 **Support Variable Type**
83
84 |=Data Type|=(% style="width: 289px;" %)PIStudio Data Format|=(% style="width: 650px;" %)Range
85 |=BOOL|(% style="width:289px" %)Bit|(% style="width:650px" %)0~~1
86 |=BYTE|(% style="width:289px" %)16-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0~~255
87 |=WORD|(% style="width:289px" %)16-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0~~65535
88 |=DWORD|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex |(% style="width:650px" %)0~~4294967295
89 |=SINT|(% style="width:289px" %)16-bit Signed/Binary/BCD/Hex|(% style="width:650px" %)-128~~127
90 |=USINT|(% style="width:289px" %)16-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0~~255
91 |=INT|(% style="width:289px" %)16-bit Signed/Binary/BCD/Hex|(% style="width:650px" %)-32768~~32767
92 |=UINT|(% style="width:289px" %)16-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0~~65535
93 |=DINT|(% style="width:289px" %)32-bit Signed/Binary/BCD/Hex|(% style="width:650px" %)-2147483648~~2147483647
94 |=UDINT|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0~~4294967295
95 |=REAL|(% style="width:289px" %)32-bit Floating|(% style="width:650px" %)-3.402823466E+38~~3.402823466E+38
96 |=LREAL|(% style="width:289px" %)64-bit Double|(% style="width:650px" %)-1.7976931348623158E+308~~1.79769313 48623158E+308
97 |=DATE|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)1970-01-01~~2106-02-07
98 |=TIME|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0D0H0M0S0MS~~49D17H2M47S295MS
99 |=LDATE|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)1970-01-01~~2554-07-21
100 |=LTIME|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0NS~~213503D23H34M33S709MS551US615NS
101 |=DATE_AND_TIME|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)1970-1-1-0:0:0~~2106-02-07-06:28:15
102 |=TIME_OF_DAY|(% style="width:289px" %)32-bit Unsigned/Binary/BCD/Hex|(% style="width:650px" %)0:0:0~~23:59:59.999
103 |=STRING|(% style="width:289px" %)STRING|(% style="width:650px" %)