Supported platforms: CODESYS 2.3
3000/4000 series units answer to 100Ah request is in the following format (it is possible to parse only the needed characters for application):
1.xxxxx.yyyyy.zzzzz.aaaaa.bbbbb.ccccc
xxxxx = firmware version, FW.bin
yyyyy = configuration file version, Conf.bin
zzzzz = mi (production version information, read-only)
aaaaa = boot version
bbbbb = Default application -> Always NODEF
ccccc = Main application -> Always NODEF
When updating firmware, check that you have files named FW.bin and Conf.bin. Different file names are not allowed. These files can be extracted from .srp packages found in Epec's Extranet.
|
3724 Extended Memory (EM) variants: After firmware is updated, the application needs to be re-downloaded to Control Unit. This is due to shared flash area for FW update binary and CODESYS application binary. 1. Download firmware 2. Reboot 3. Download application |
Login to the control unit: Online > Login
Reset the control unit: Online > Reset
Write FW.bin file to the control unit: Online > Write file to PLC
Write Conf.bin file to the control unit: Online > Write file to PLC
3724 Extended Memory (EM) variants: After firmware is updated, the application needs to be re-downloaded to Control Unit. This is due to shared flash area for FW update binary and CODESYS application binary. 1. Download firmware 2. Reboot 3. Download application
|
The firmware can be updated through CAN by, for example, another CANopen device.
Recommended method is to update using CODESYS 3.5 library SWDownload, function block SWD_LoadFirmware3000 (can be used with 3000 and 4000 series control units when firmware updating is done with 6000 series display). If SWDownload library is not used, then updating needs to be done with following steps.
Before updating firmware, check that FW & Conf binary files are valid. SWDownload library does this automatically.
|
1. Login to the control unit by writing an SDO message
to index 1025h sub-index 1h
data = 1
data length = 1
2. Stop the CODESYS application by writing an SDO message
to index 1025h sub-index 1h
data = 4
data length = 1
3. Download the FW binary file using SDO messages.
If the binary file is
bigger than the block size (4986 bytes) , the data needs to be sent in several blocks (see step 4).
smaller than the block size (4986 bytes), the Continue flag is set to 0 and step 4 is ignored.
Write the data with SDO message to index 1025h sub-index 1h
The first block contains the following data
|
Start byte |
Size [Bytes] |
Value |
Description |
RTS_FILE_WRITE_START |
0 |
1 |
2Fh |
Start file download command |
Continue |
1 |
1 |
0 Last block 1 Not last block |
Indicates if this is the last block |
NumOfDataBytesInBlock |
2 |
2 |
Size of defined block |
Number of data bytes in first block |
FileNameLen
|
4 |
2 |
0008h (FW.bin) 000Ah (Conf.bin) |
Length of file name (bytes) + 2 |
FileName |
6 |
n |
"FW.bin" "Conf.bin" |
Name of the file, zero-terminated string |
Reserved |
6 + n |
2 |
0000h |
3S reserved |
Data |
6 + n + 2 |
NumOfDataBytesInBlock |
- |
Content of file, first block |
4. If the binary file is bigger than the block size (4986 bytes), repeat this step until all data is transferred
Write the data with SDO message to index 1025h sub-index 1h
Set the Continue flag to 0 when transferring last block, otherwise 1
The subsequent blocks contain the following data
|
Start byte |
Size [Bytes] |
Value |
Description |
RTS_FILE_WRITE_CONT |
0 |
1 |
30h |
Continue file download command |
Continue |
1 |
1 |
0 Last block 1 Not last block |
Indicates if this is the last block |
NumOfDataBytesInBlock |
2 |
2 |
Size of defined block |
Number of data bytes in block |
Data |
4 |
NumOfDataBytesInBlock |
- |
Content of file, subsequent block |
5. Check the file download status using SDO message
Read from index 1025h sub-index 3h
Answer is 2 bytes (0000h = OK). Note that data is not checked by SWDownload.
6. Repeat steps 3-5 for Conf binary file.
Source file topic10030787.htm
Last updated 4-Nov-2021
Source file topic10030792.htm
Last updated 21-Feb-2025