CODESYS

Last modified by Molly on 2025/02/28 17:50

CODESYS V3

Supported Series: LX6C Series

HMI Settings

ItemsSettingsNote
ProtocolCODESYS V3 
ConnectionEthernet 
Port No.11740 
Username Need to be same as the PLC setting
Password Need to be same as the PLC setting
Information

✎Note: CODESYS V3 protocol doesn't support online simulation.

How to import the tags

  • Program PLC_PRG;

codesys2.png

  • Add Symbol Configuration: Right click the Application, add Symbol Configuration into Device list;

codesys1.png

  • Check PLC_PRG and its tags, click Build, then click Generate Code;

codesys3.png

  • After generate successfully, a xml file would be generated inside the directory of the project;

codesys4.png

  • Create the HMI project and select the CODESYS V3;

codesys5.png

  • Configure the PLC IP and port number, enable or disable the username and password according to the actual situation;

codesys6.png

  • Import the xml file;

codesys7.png

  • After import successfully, the tags would show on the Tag Manager;

codesys8.png

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)

1740736152481-994.png

1740736211615-727.png

Support Variable Type

Data TypePIStudio Data FormatRange
BOOLBit0~1 
BYTE16-bit Unsigned/Binary/BCD/Hex0~255
WORD16-bit Unsigned/Binary/BCD/Hex0~65535
DWORD32-bit Unsigned/Binary/BCD/Hex 0~4294967295
SINT16-bit Signed/Binary/BCD/Hex-128~127
USINT16-bit Unsigned/Binary/BCD/Hex0~255
INT16-bit Signed/Binary/BCD/Hex-32768~32767
UINT16-bit Unsigned/Binary/BCD/Hex0~65535
DINT32-bit Signed/Binary/BCD/Hex-2147483648~2147483647
UDINT32-bit Unsigned/Binary/BCD/Hex0~4294967295
REAL32-bit Floating-3.402823466E+38~3.402823466E+38
LREAL64-bit Double-1.7976931348623158E+308~1.79769313 48623158E+308
DATE32-bit Unsigned/Binary/BCD/Hex1970-01-01~2106-02-07
TIME32-bit Unsigned/Binary/BCD/Hex0D0H0M0S0MS~49D17H2M47S295MS
LDATE32-bit Unsigned/Binary/BCD/Hex1970-01-01~2554-07-21
LTIME32-bit Unsigned/Binary/BCD/Hex0NS~213503D23H34M33S709MS551US615NS
DATE_AND_TIME32-bit Unsigned/Binary/BCD/Hex1970-1-1-0:0:0~2106-02-07-06:28:15
TIME_OF_DAY32-bit Unsigned/Binary/BCD/Hex0:0:0~23:59:59.999
STRINGSTRING