en
cz

MiniPLC and data recovery

The MiniPLC process stations have been with us since 2006. Although they were removed from the range and stopped being actively sold a few years ago, they are still working on several thousands of projects. After almost twenty years, however, every device is approaching the end of its life, and this PLC is no exception. Because Domat strives for maximum investment protection for its customers, we try to keep these devices running as long as possible. Let's take a closer look at the MiniPLC and see what preventive measures can be taken against data loss and what to do if a MiniPLC starts having problems.

The following text concern these types: IPLC200, IPLC300, IPLC201, IPLC301, and MXPLC. These are process stations with the Beck IPC operating system. The standard way of working used the development environment SoftPLC IDE and its Platform Config part, which is a dialog that allows detecting the PLC in the network, setting its IP address and other parameters, and uploading the application software including the definition of the menu for the LCD display, or the definition of the serial Modbus server and websites for the built-in web server. Other tools were in fact not needed for communication with the PLC.

Prevention

If the PLC is still working, it is definitely worth to get ready for a possible outage. If the source project for the SoftPLC IDE is available, this is good news. Then all what needs to be done is to check whether the project version is the one that is uploaded to the PLC. This can be seen in the window that opens after establishing a connection with the PLC:

 

In the case above, the PLC has a completely different project than the one it was connected from. The crucial field is the Identification, which displays the project GUID – a unique identifier that is created at the time the project is created. The other data is not important then, the project is different and there is no point in continuing.

When connecting to the correct project, the window looks like this:

 

The Edit save time in the left column will probably be newer than the one in the right column and the time difference will be highlighted in red. This may mean that the project was only compiled between the previous upload and the current connection and no modifications were made to it, but also that we may have a newer version of the project on the PC that is functionally different from the version in the PLC.

The next step is to retrieve the current variable values from the plant to the project on the PC. This is done with the Retrieve values ​​from SoftPLC button. After the operation is complete, the project is refreshed with the current values ​​(which the user has changed in the meantime), such as time programs, setpoints, parameters, etc. Thus, after a possible upload of the project from the IDE to the PLC, these values ​​will be preserved.

Complete download of content from the PLC

All data is stored in the Flash memory of the PLC. The memory behaves like a disk drive, so after connecting over FTP it is possible to write files to the PLC (which happens when changing the configuration and uploading the program) - but also to copy files back to the computer. We will use this to back up the complete contents of the PLC.

Using an FTP client, establish a connection to the PLC. For example, Total Commander or the FTP client in CHIPTOOL is recommended, see below. The FTP connection uses the same name and password for all PLCs: 000FB0 / F51679. (This is also the reason why the PLC should not be accessible from the Internet.)

 

After connecting, there is access to the PLC "disk", marked as A:

 

Copy the entire contents of the disk to the PC.

 

The project-specific files are those with the name of SOFTPLC. All PLC settings, such as IP address, passwords, SoftPLC Link port, etc. are in the CHIP.INI file. It is a text file and can be edited. The WEB directory contains web files for the built-in web server.

Once a backup is made, it will be possible to reconstruct the PLC functions to the moment the backup was created. Even if the source project is not available or it is old, in the event of a PLC crash the disk contents can be uploaded back via FTP (even to another PLC hardware) and after restarting the PLC will behave like the original device. If some parameters (time programs, etc.) have been changed by user and we want to back up the PLC content including these, it is necessary to wait three hours for the new parameters to be permanently written to the FLASH memory (immediately after the change, they are only in the RAM memory and the changes would be lost if the power would be turned off).

PLC cannot load the project or the project cannot be loaded

Data loss in the PLC can occur for several reasons: damage due to overvoltage, when the PLC can no longer be accessed because the processor or communication circuits are destroyed, but also just memory "fatigue" and damage to some sectors. PLCs with damaged memory are often quite easy to repair, it is just enough to format the internal disk, which marks the damaged sectors and prevents them from being used.

First, however, a less destructive method can be tried: reset the PLC to factory settings in the Platform Config, Advanced Servicing, Reset to factory defaults menu. This operation deletes the project and sets the default IP address (192.168.1.37) and other parameters. It may happen that after the PLC is then configured and the program is uploaded, the runtime starts successfully.

After a reset to factory settings, only four files remain in the PLC:

autoexec.bat (starts the splccfg.bex configuration service and the softplc.bex runtime service after the PLC is started)
CHIP.INI (contains configuration data in the default settings)
splccfg.bex (PLC configuration program, allows PLC setup via Platform Config)
softplc.bex (MiniPLC runtime – opens and runs the SOFTPLC.PRG application program, in case there is one uploaded)

Setting the default IP address may cause the PLC to be inaccessible in the network. Be careful with operations performed remotely, via mapped ports on routers, behind VPNs, etc. It could happen that the connection to the PLC will be lost. It is always better to perform such fatal interventions directly in the local network where the PLC is - also because the PLC power can be manually turned off and on if necessary.

After resetting to factory settings, the PLC can be configured normally using Platform Config and it should be possible to upload a program, website, PLC menu, or Modbus serial server definition to it.

If resetting to factory settings does not help, it can be tried to format the disk. However, formatting the disk will irreversibly destroy all data: the project and the PLC configuration. If the project is not available or we do not know the configuration details and do not even have a complete backup of the files from the PLC, it is better to avoid formatting.

So how to format the disk?

Formatting the disk in the PLC

First, prepare a backup of the PLC content - the previously backed up files mentioned above. If these are not available, use a backup from another PLC. After recovery the settings can be changed and the program loaded back. The backup from another PLC is also available for download in the attachment to this article.

Connect to the PLC using a terminal program (e.g. Hyperterminal) on TCP port 23.

 

It is also possible to use the CHIPTOOL program from the Beck IPC processor manufacturer. The program is no longer available for download from the manufacturer's website, but is available, for example, here https://beck-chiptool.software.informer.com/6.1/ . CHIPTOOL allows both PLC detection and communication using a terminal, and also includes an FTP client, so it should be enough for all the operations described here.

The name and password for the connection are fixed, tel / tel. Note that this port must not be accessible from the public network. Attacking would be a matter of minutes.

After connecting, enter the command in the terminal

format a:

and confirm with “y” when asked “Sure? (Y/N)”.

The process is indicated by increasing number of dots on the screen. After formatting is complete, a information is displayed

.................................................................................................................................................
Formatted drive A:

It may happen that the process fails due to watchdog expiration:

….WDT expired ! Reset !

Then log in again and repeat the formatting.

Caution! Now the disk is empty and after rebooting the PLC it would no longer be possible to connect to it over FTP – the CHIP.INI file is not present and the PLC would not set its IP address (unless there is a DHCP server in the network), and the FTP server would not have a defined name and password. The configuration service for Platform Config would not even start. At this point, DO NOT turn off the power, DO NOT enter the reboot command!

Next, connect to the PLC via FTP and upload the backup files back to the A: directory. After a successful upload, the PLC can be restarted (power off / on, or using the reboot command).

Revitalization of CHIP.INI

In case it happens to turn off and on the freshly formatted PLC which has no configuration file, nothing is lost:

Connect the PLC to the network which operates a DHCP server. After restarting the PLC, the PLC will receive an IP address and can be detected in Platform Config.

 

At the detected address, connect to the PLC via a terminal over TCP port 23, the name / password is as before: tel / tel.

By entering

edit

open a text editor with an empty file.

Copy the contents of the backup CHIP.INI to the clipboard and paste this content into the edited file in the terminal (in Hyperterminal, use the Edit – Paste to Host function). The clipboard has a limited number of characters, it may be necessary to copy the text in parts.

Save the file (in HyperTerminal Esc for menu, 3 = Save file as) under the name CHIP.INI

Exit the editor (in HyperTerminal Esc for menu, X = Exit editor)

Check that the file contents has been saved:

type chip.ini

(if not, reopen the editor and, if necessary, type the contents manually) and restart the PLC with the reboot command or by turning the power off and on.

Then it should be possible to connect to the PLC via FTP and upload all the above files to it. Detection in Platform Config will not be possible, or the PLC will be found, but marked with a red exclamation mark - the configuration service or runtime is not running yet. But the PLC already has an address defined in CHIP.INI and the PLC name is also visible.

 

After uploading the files and rebooting again, everything should be fine

 

and it should be able to work with the PLC normally, upload the program and connect to it from the SoftPLC IDE.

If, after starting the program, communication on the serial ports does not work, the runtime incorrectly detected the hardware platform on which it is running. There are two types of platforms, IPLC201/301 and MXPLC with integrated I/O module. The detection method is determined by setting the PLATFORM parameter in CHIP.INI in the DEVICE section:

[DEVICE]
PLATFORM=1   

The value has the following meaning:

1 – automatic detection
0 – MiniPLC (201/301)
2 - MXPLC

If automatic detection does not work, set the appropriate platform manually, save the CHIP.INI file and restart the PLC.

However, the platform could also be set from the SoftPLC IDE in the Advanced Servicing section:

 

The new value is saved to the CHIP.INI file immediately, but it will only take effect after the PLC restarts.

A few final tips

Finally, a few tips to make sure everything goes smoothly:

If there is a backup PLC available, first try the entire procedure on it, in the peace of your office. This will avoid downloading programs on site under stress.

Take the backup PLC, if it is of the same type, with you to the site. At worst, it can be left there while the original PLC is taken away.

Plan the event – ​​if possible – for a weekday and during normal working hours.

If working remotely, it is good to have a person on site who is able at least to turn the power off and on and report the LED states and other PLC behavior.

Name the backups downloaded from the PLC with the site name and backup date and store them so that they are available.

If there is no way to connect to the PLC or the PLC behaves differently than described above, contact Domat technical support.

It is also possible to arrange a date in advance with technical support, which contributes to greater peace of mind while working. The technician will then be ready to help remotely if necessary.

If you do not trust yourself at all, it is possible to order the entire intervention from the Domat service department.

A_.zip - Zipped contents of disk A: in the PLC