Robust FlexPendant applications Introduction |
Developing an application for a device with limited resources, such as memory and process power, can be quite demanding. Moreover, to have an application executing around the clock will reveal weaknesses in design and implementation that may cause slow performance or FlexPendant hangings.
At worst, your application will drain the FlexPendant of all memory during production, and cause an out-of-memory crash. It can even slow down the performance of the robot controller due to excessive use of controller resources.
This chapter describes how to design and implement reliable and well performing applications for the FlexPendant. It presents some good practices to utilize, as well as some pitfalls that should be avoided.
Technical overview of the FlexPendant deviceThe FlexPendant device consists of both hardware and software and is a complete computer in itself, with its own memory, file system, operating system and processor.
It is an integral part of IRC5, connected to the controller by an integrated cable and connector. Using the hot plug button option, however, you can disconnect the FlexPendant in automatic mode and continue running without it.
There are ways to restart the FlexPendant without having to restart the controller (For more information, see Restart the FlexPendant ). At a FlexPendant restart the assemblies and resources of FlexPendant SDK applications are downloaded to the FlexPendant file system from the robot controller.
FlexPendant applications run on Windows CE, a scalable embedded operating system, and the .NET Compact Framework, which is Microsoft’s lightweight version of the .NET Framework, intended for small devices.
This is the size of the FlexPendant touch screen:
FlexPendant Screen | Size |
---|---|
Total display | 640 * 480 pixels |
FlexPendant SDK Application display | 640 * 390 pixels |
The FlexPendant uses these kinds of memory:
Memory type | Function |
---|---|
Flash - 16 MB | Stores the FlexPendant standard software, the Windows CE operating system in compressed format and the registry. |
RAM - 64 MB | At boot time the compressed image is copied to RAM. All execution of code uses RAM. |
E2EPROM | Stores touch screen calibration values, joystick calibration values and so on. Only used internally. |
You may wonder about the maximum size of your custom application. There is no exact answer to that question, as there are many variables to take into account. For a rough estimation the following table can be used. As you see, the operating system uses about 8 MB and the ABB base software about 25 MB. This means that half of the available RAM memory is already used once the FlexPendant has started up. The standard applications of the ABB menu and the FlexPendant SDK applications will all share the memory that is left. As a rule of thumb, about 20 MB should be available for custom applications.
FlexPendant memory resources
RAM | 128 MB |
Operating system | 8 MB |
ABB base software | 25 MB |
Custom applications | ~20 MB |
This is some advice to help you make sure your application does not exceed the memory limitation:
Do not allow more than ONE instance by setting the TpsViewType parameter of the TpsView attribute to Static. For more information, see Application type.
Avoid excessive use of images. Do not use bigger images than necessary. Check the size of the images your application will use.
Use fpcmd “-memShow” to check the amount of memory in use when your application is active. Open a couple of Program Editors and start RAPID execution. For more information, see Discover memory leaks .
Avoid static data and methods.
Release memory for objects that are not used by calling their Dispose method.