Movicon CE
Movicon CE
Movicon CE
Reference Guide
2. GENERAL .....................................................................8
GENERAL CONCEPTS ...................................................................... 8
LICENCES .................................................................................. 8
RESTRICTIONS ...........................................................................10
PROJECT CONSTRAINTS .................................................................14
4. INSTALLATION ..........................................................20
INSTALLATION ............................................................................20
MS ACTIVESYNC AND WINDOWS MOBILE DEVICE CENTER ..........................22
Serial Connections.................................................................................................24
Serial Cable for MS ActiveSync and Windows Mobile Device Center..........................24
Network Connections ............................................................................................25
5. EDITING ....................................................................26
EDITING GENERAL INFORMATION .......................................................26
DESIGNING PROJECTS ...................................................................27
CONFIGURATION FILE....................................................................29
PROJECT UPLOAD/DOWNLOAD ..........................................................32
CREATING CUSTOM PLUGINS ...........................................................37
RAM USE ................................................................................40
8. RUNNING...................................................................64
RUNNING PROJECTS .....................................................................64
2
T A B L E O F C O N T E N T S
3
M O V I C O N C E P R O G R A M M E R G U I D E
4
1. Preface
Introduction
Movicon CE is the Movicon RunTime version for
embedded Microsoft Window CE embedded operating
systems. Movicon allows projects to be exported to
Windows CE platforms and run with the Movicon CE
Runtime module.
Movicon CE is the new generation of compact Scada/HMI for Windows CE. Thanks to
the new Movicon technology the compact version (Compact HMI) of the Movicon
supervision and control software also adopts the XML technologies and Web Services
to guarantee enhanced performances and potentiality in the world of Pocket systems
and display terminals.
Movicon CE supports the Microsoft PocketPC (Windows Mobile) and Embedded PC,
version 5.x and later (WinCE.Net), operating systems.
The Movicon CE runtime engine executes the same Movicon XML projects. Your
projects can therefore be run on your HMI device, on display terminals, on PDA,
Pocket PCs, mobile systems, Wireless... (Pocket PC and SSDK devices).
One-only project, the same file, run on different platforms, thanks to the project's XML
structure.
5
M O V I C O N C E P R O G R A M M E R G U I D E
Cost Reductions.
Movicon CE therefore permits the use of one-only software in your company
business, whether for supervision on PCs or for display terminals, saving you
money in training, personnel and maintenance. Thanks to Movicon CE's extreme
openness you will be able to reduce costs in terminals by choosing those most
suited to your needs while having the benefit of keeping and using the same
software.
Read Me First
Before starting a project for devices based on Windows
CE you should check that the used device's capacity and
carefully read the warnings below, the product
documentation and guidelines for designing projects.
IMPORTANT:
IMPORTANT:
MOVICON EDITOR IS THE SAME ONE USED FOR Win32 and WinCE
PROJECTS. EVEN THOUGH THIS IS A GREAT ADVANTAGE FOR THE
DESIGNER IT MIGHT BE RISKY WHEN USING THE SAME
POTENTIALITIES INDEPENDENTLY FROM THE TARGET DEVICE
USED.
BEFORE PROJECT DESIGNING TAKE NOTE OF THE DIFFERENCES
IN RESTRICTIONS OF SYSTEM BASED ON WINDOWS CE AND
6
P R E F A C E
WARNING:
Before designing projects for Windows CE, it would be in your
favour to create a 'new' project by Movicon choosing the
Windows CE as destination platform. Even though this is not
obligatory as the project created will however be executable in
Windows CE, it will however autoconfigure the new project by
resetting some of the general properties correctly. In addition to
this, a .ini file will be created in the project folder containing the
default constraints which will be assigned to the project in editing
mode (see relating chapter).
7
2. General
General Concepts
Movicon CE is a runtime engine for Microsoft Windows CE embedded operating systems.
The Movicon version supports Windows CE operating systems in versions 5.0 or later.
The user can use the Movicon development environment for creating supervision
applications which can be interpreted and executed on Movicon CE runtime engines. The
Movicon editor permits you to create projects built with XML files which can be run on both
Desktop PCs and CE devices.
The programmer can then work using the Desktop PC with the same Movicon platform
normally used. However, you must keep in mind that the WinCE device is not capable of
completely supporting all the potentialities offered by Movicon and typical of supervision
systems for Desktop PCs. Therefore you need to take into account the restrictions deriving
from the operating system's scarce capacity and from the device hardware when creating
projects for CE devices.
Licences
Devices using Windows CE provide a licence management in the form of a Softkey Unlock
code only.
8
G E N E R A L
There are no hardware keys of any type available. The project runtime will run in Demo
mode on the WinCE device only without a license.
Follow the step-by-step procedure in order to get and insert your softkey:
1. When purchasing the license (or purchasing a CE device already integrated with a
license to be activated), you will receive a serial number and access rights to the
Progea management website (www.progea.com or
http://support.progea.com/softkey/)
2. Startup Movicon on the CE device. Movicon will display a window to be used for
entering the license or for running Movicon CE in demo mode
3. Go to and access the Progea Website using your access code, then follow the
instructions to insert the Site Code with which the license (SoftKey) will
automatically be created
4. Jot down the Softkey license and insert it into the appropriate edit box which
appears at the Movicon Startup
5. Many devices require you to save the WinCE Registry so that data is kept
memorized permanently. In any case, the license is linked to the device and will
not change upon reinstallation
• The instructions you received along with your purchase or those from the
supplier should be respected.
The Lite version has some technical The Full version has the following
restrictions: technical restrictions:
IMPORTANT:
APART FROM THE LICENSE TYPE USED AND ITS
RESTRICTIONS, THE DESIGNER SHOULD ALSO CHECK
THE RESTRICTIONS OF THE HARDWARE DEVICE BEING
USED: THE FUNCTION RESTRICTIONS OF THE
MOVICON PRODUCT LICENSE ARE GENERIC, BUT THE
HARDWARE MAY HAVE ITS OWN DESIGNING
RESTRICTIONS INDEPENDENTLY FROM THE LICENSE
TYPE USED.
1. Using the network card's mac address. Movicon CE uses a WinCE API to get the
list of network cards installed in the device, and uses the mac address of the first
network card returned by this function.
2. If the device does not have any network card installed, the site code will then be
generated using the panel's "Device ID.
9
M O V I C O N C E P R O G R A M M E R G U I D E
3. If the "Device ID" cannot be found, the site code will be generated at random.
If you don't have a Site Key number to insert, you can still execute the project in Runtime
mode by clicking the "Demo Mode" button in the same window. The project will be run for
a limited two hours.
Once the license has been inserted and saved in the WinCE System Registry, the window
used for inserting the license will now show again when starting up Movicon CE. You can,
however, make this window show by executing Movicon CE through the WinCE command
line and specifying the "/i" o "-i" option. From the WinCE "Start - Run" menu execute:
MovCE.exe -i
This functionality may be needed in situations where the device's "Site - Code" needs to be
reviewed or to execute a license update with a new license containing different
characteristics.
• Screens = unlimited
• Alarms and Messages = unlimited
• I/O Bytes = 0
• Driver = 1
• Web Client users = 1
• All Options
Restrictions
Some functions that are not supported by the CE device should be kept under
consideration when designing applications for WinCE devices. Although the non supported
functions are appropriately "masked" when selecting WinCE as the target OS, it should
10
G E N E R A L
however be remembered that a hardware device with limited calculation capacity and
memory is being used and therefore the designer must always evaluate whether it is
compatible with the objectives they wish to achieve.
Graphics Restrictions
Alarms Restrictions
There are only restrictions in the notification and statistical analysis management.
Due to the fact that the Report Engine is not available in Windows CE, the commands for
creating statistical reports on alarms are not available in the CE device.
The alarm notification functions are managed from the Alarm Dispatcher. Only the alarm
notifications with SMS and E-mail are available in Windows CE as reported in the table
below:
11
M O V I C O N C E P R O G R A M M E R G U I D E
Voice
Fax
E-mail - via TAPI
E-mail - via SMTP
Alarm Statistics
For further information please also refer to the paragraph on "Alarm Management".
DataLogger/Recipe/Report Restrictions
The WinCE projects normally record the log files by using the IMDB technology (InMemory
DB) which, different to ODBC/ADOCE, is much lighter and higher performing due to the
XML text format used.
In situations where the ODBC has been selected in development mode (desktop) for
recording log files, this will correspond to the ADOCE on the target as Windows CE does
not support ODBC. Movicon will automatically convert the ODBC connections to ADOCE
connections. In this way the projects on the target will have an open and standard
historical log database.
The ADOCE data format is basted on Ms SQL Server CE.
Thanks to this automatic management, the project keeps the same identical characteristics
in handling the historicals, but the database format on the target will be SQL Server CE
type.
IL Logic Restrictions
The IL Logic is perfectly compatible both with WinXP and WinCE. The deterministic
features of WinCE are capable of managing logics inside the Movicon project with
12
G E N E R A L
deterministic runtimes. Unfortunately, Progea has not carried out any specific tests on this
and therefore cannot guarantee anything definite.
The "ILSleep" default value for WinCE is “50” milliseconds. But stays the same
for Win32 at 10 milliseconds. A different value will allow free more CPU
resources in projects using IL logic, especially in devices that have slow CPU.
The default reduction of this parameter may be beneficial to user interface
smoothness but IL execution may be a bit slower than before. This parameter
can be changed when necessary.
Debugger Restrictions
The CE device's Remote Debug has been introduced from this version. When using the
'Attach to Process' function as described in the "Remote Project Debugging" section in the
programmer's manual, you can "link" up to the process being run on the Target device
from the Desktop, where you will be able to use all the Debugger On Line functions as well
as for the remote device too.
Redundancy Restrictions
The Project redundancy feature is not supported in Movicon CE. This is mainly due to the
restrictions suffered by the Windows operating system compact version.
Driver Restrictions
The communication drivers used in the project are automatically installed on the device. It
is absolutely necessary to verify whether the driver used in the project being edited is
available in WinCE version.
The communication drivers for WinCE are purposely compiled for such operating system,
however you need to check their availability. It is not always true that a driver for XP is
also available in versions for WinCE. For instance, sometimes drivers use libraries of the
PLC's constructors which might not be available in WinCE. Therefore always check driver
availability before starting the project, by going through the table of drivers which is
published and updated on the Progea Web Site mainly because they are continually being
amplified, a driver which is initially unavailable may have been released or in the phase of
being also released for WinCE. If in doubt, please contact the Progea offices or your
dealer.
OPC Restrictions
Movicon CE supports the OPC technology as Client not as Server. Moreover the technology
OPC Client XML is not supported.
13
M O V I C O N C E P R O G R A M M E R G U I D E
In addition to this you need to consider that a native Web Server is available in the
devices as is with the Win32 which has a IIS (Internet Information Server) integrated. In
this case too, access to the WinCE server for one Web Client user requires you to have the
device specifications, supplied by its makers, at hand.
Access from a Web Client to a server based on Movicon CE can therefore be done in two
ways:
1. Verify the whether there is a Web Server available on the device (if not, you can
install one), configure it appropriately. In this case, access from Web Clients can
be done by using the HTTP protocol and therefore through a normal Internet
Browser
2. When there is not a web server, you can access as Web Client without using a
browser, but by using the Web Client (JAVA) applet directly. In this case you will
need to have the Web Client applet and a Java Virtual Machine installed
You can get further instructions on this by consulting the Movicon Web Client's User
Manual.
Project Constraints
In order to let the designer know about device constraints when creating projects for
Windows CE, Movicon automatically creates a file in the project folder with the default
designing constraints. These constraints are purely indicative and can be modified by
clicking on the text file as shown below. It is then the designer who must valuate whether
these constraints established for default can be modified in function with the hardware
being used.
If these limits are exceeded the following window will automatically appear:
For further information on this subject please refer to the "Project Constraints" section in
the Movicon general Help
Programming contraints
When creating a project for Windows CE you will need to take into account the operating
system's limitations as well as those mentioned below while creating the project:
Contraints for devices with less than 128 MBytes of memory or those using
Windows CE 5.0.
Memory use in devices with Windows CE is usually very limited. We strongly advice you to
read the following tips when using devices with Windows CE 5.0 or with Windows CE 6.0
which, however, has less than 128 MBytes of memory:
• We advice you against using more than 2 objects with script code per
screen and not more than 2 basic script resources in separate threads. It
would be best to not use or limit use of basic script code in designs. The
WinWrap engine does in fact require 2.5 MBytes of memory + 300 KBytes for
each object or resource containing basic script code + 700 KBytes if the basic
script resource is checked in a separate thread. This memory cannot be allocated
in extra process memory and therefore the process memory may exceed the 32
Mb limit set by the Windows CE 5.0. operating system.
Eventually, if you cannot do without using script code, you should try to use it in
one point only which could be the screen containing the objects.
• Limit basic script code in alarm thresholds to not more than 10 alarms.
14
G E N E R A L
• You should limit the use of animations that need updating graphically
every second and do not use more than 5 objects per screen (quick blink,
moviments, resizing, animations with bitmaps, etc.).
• Make more use of objects from the Movicon toolbox (Object window)
and less use of Templates from the Symbol Library which are mostly
complex and contain basic script. The reactivity of Template commands are
in fact not as fast as those in standard objects.
• Try to centralize the execution of IL Logic within your projects instead of
having code portions spread out all over the place in different screens
and symbols.
• Try avoid using Synapse logic.
• Avoid using the Windows CE panel as Server for more than 2 Web clients.
Furthermore, the Web client page sizes should not exceed the panel's
resolution.
• Avoid using the Windows Ce panel as Network Server for more than
Network Clients.
• Avoid recording data at a frequency inferior to one record a second.
• Always check that there is sufficient remaining compact flash space for
recording the total amount of historical data programmed in the project.
• Use the heap manager only when necessary, if the
"_SysVar_:MemoryAvailVirtual" system variable nears or goes below the
value of 5.242.880 bytes. When going below this value, Movicon will enter into
'low memory' condition. Please refer to relating documentation.
15
3. Hardware types
Hardware
Please be reminded that Movicon is a powerful Scada/HMI platform designed for providing
project designers just one unique and flexible designing tool for both powerful supervision
systems based on Personal Computer (ie. Windows XP/Vista) and small Touch Screen
devices based on Windows CE at the same time.
The later requires the designer to carefully consider the target device’s limitations, for
which the project should be developed keeping the constraints in function with the panel’s
capacity in mind.
This document requires the designer to have the basic know-how of Movicon.
Touch Panels based on Windows CE usually vary in features. Therefore the designer should
check whether their target device has at least the following requirements:
It is very important that the chosen hardware is suitable for the project you wish to
design. Often mistakes are made in choosing Touch Panels for their price rather than their
hardware features, which may turn out to be insufficient for project use.
16
H A R D W A R E T Y P E S
cards not in parity with the processor being used, you may find a noticeable performance
drop when refreshing displayed data or in the time it takes to change pages.
Benchmarks Performances
The below table shows the results relating to the number of graphic refreshes a second
using a Movicon test project for displaying on screen the value of variables exchanged with
the PLC (worst condition).
Considerations
The following performances are normally considered acceptable:
Movicon will allow the above performance indications to be obtained with ease providing
you design your project to match the hardware type it is to run on. Obviously, this
shouldn't be a problem in the designing phase when using powerful panels. However if the
touch panel does not have the required hardware configurations you will find yourself
having to solve problems to satisfy these constraints in order to adapt and optimize your
project to the hardware resources provided in its designing phase.
Movicon is a general-purpose software and therefore not tied just to one specific hardware
and cannot fully ensure performances under the above mentioned circumstances.
Supported Devices
Movicon CE has been created so that is can be installed on more wider range of devices
and/or operating terminals found on today's market. The automatic installation verifies the
device's processor type and installs the corresponding runtime automatically.
Many processor types are supported (x86, VIA, Eden, Arm, StrogArm, MIPS, etc.),
independently of the panel builders.
We suggest that, in any case, you verify the compatibility of the device, you intend, to use
with the Movicon product. Full compatibility is guaranteed on:
1. Processor type
2. Platform type
3. Operating system image type
17
M O V I C O N C E P R O G R A M M E R G U I D E
The below list of panel makers are those which have been tested directly by Progea.
There are many more devices on the market which function just as well, and whose
compatibility has been verified directly by the their makers or clients.
• ADS-Tech
• Advantech TPC
• Asem
• Beckhoff CX1000
• B&R PowerPanel
• Divus
• Exor
• ESA Elettronica
• Future Pad Fujitsu
• IPS
• Keba
• Mettler & Fuchs
• Pilz HMI
• Phoenix Contact
• ProFace
• ROI Computer
• System Copilot
• Sitek
• Sutron
• Techmark
• VIPA
PocketPC or palmtops:
• Compaq/HP (iPaq)
• Toshiba PDA
• Asus MyPAL
• Dell Axim X3
This list is updated on the Progea web site regularly (www.progea.com). For any further
information on the type of devices used or the necessary tests, please contact the Progea
offices or your local dealer.
18
H A R D W A R E T Y P E S
19
4. Installation
Installation
If the presence of a "MS ActiveSync" (for Windows XP) or "Windows Mobile Device Center"
(for Windows Vista systems) is found while installing Movicon on a PC with Win32, the
"MovCESetup" folder we get automatically created inside the Movicon installation folder.
In side the "MovCESetup" folder you will find the ".cab" files for installing Movicon, the
Communication Drivers, ADO and SQL Mobile Servers in WinCE devices. In addition, a
"Start-All Programs-Movicon11-MovCE" connection group will allow you to install Movicon
with all the components necessary in WinCE Devices.
The "MS ActiveSync" tool is only available for Windows XP and not for Windows Vista in
which you will find pre-installed in Vista Business the "Sync Center" as a replacement.
However this replacement, "Sync Center" is not sufficient enough for the Movicon setup
functions and therefore you will need to also install the "Windows Mobile Device Center"
(last 6.1 version) available on the Movicon CD for the following versions:
In cases in where "MS ActiveSync" or "Windows Mobile Device Center" are not already
present when Movicon is installed, the standard setup will not create the "MovCESetup"
folder. Therefore you will have to choose "Custom" mode to carry out the setup if for the
first time or if Movicon is already installed you will have to redo the set selecting "Modify"
mode and enable the "Movicon-Movicon Development-MovCE Setup" item, including the
sub features, until the "MovCESetup" folder is created containing the ".cab" files for
installing Movicon and the relevant components for WinCE. Using this method however will
not create the links in the Windows Start menu and will need you to copy and execute the
right ".cab" files to the CE device/s desired to complete the installation.
When uploading a project to a WinCE device while connect with the "MS ActiveSync"
plugin, a check will be made to see if the Movicin CE runtime engine and its components
exists. If not you will be asked to install them.
You can, nevertheless, install the Movicon CE RunTime engine on the device manually by
following the procedures explained below:
20
I N S T A L L A T I O N
All the operations are done in automatic but the user is given the possibility to decide
where the packet is to be installed: in the default folder for applications or in any other
folder. It is advised not to use the default folder in SSDK devices as its contents will be
lost when turned off because it does not store this memory.
You can select the Movicon CE installation with a "full" or "min" setup:
• MovCE PocketPC Setup: the Movicon CE runtime module is installed for Pocket
PC devices
• MovCE SSDK Setup: the Movicon CE runtime module is installed for SSDK
devices
• Optional Tools: the ADOCE and SQL Server components are installed for Pocket
PC or SSDK according to what's been chosen
• Drivers PocketPC: consents to selecting and installing one of the
Communication Drivers available for Pocket PCs
• Drivers SSDK: consents to selecting and installing one of the Communication
Drivers available for SSDKs
The Communication Drivers must be inserted in the "Drivers" folder inside the Movicon CE
installation folder. In cases where the Driver Setups should create different folders all
together in the device, you will need to manually copy the driver's dll to the "Drivers"
folder (if it does not exist you will have to create it):
..\MovCE\Drivers\
The library of the ADOCE and SQL Server Mobile components must be copied to the
Movicon CE installation folder. By doing this, these files will be copied automatically to the
"Windows" folder at the Movicon Startup, being a necessary condition in order for them to
work correctly. When installing components with create a different folder, you will have to
manually copy the files of these components to the Movicon CE folder.
1. Establish a connection between the "target" and the "desktop". This connection
can be either network or serial type
2. Determine processor type aboard the "target"
3. On the desktop select the file with the ".CAB" extension specified for that
processor from the Movicon CE installation directory,
("Programmi\Progea\Movicon11\MovCESetup") and copy it to the "target"
4. Double click on the CAB file on the "target" to run it. If an error arised opthe a
DOS session and digit the "\>WCELOAD FileName.CAB" command
5. The Movicon CE Runtime module installation should then start. The CAB file will
be cancelled automatically when the installation procedure has terminated
6. The same above described procedures should be repeated for ".cab" files of the
Communication Driver you wish to be use on the WinCE device and for the
ADOCE libraries and SQL Server Mobile if needed. You must copy the
Communication Driver files to the Movicon CE "Drivers" folder and the ADOCE
and SQL Server Mobile files to the Movicon CE installation folder
The SSDK devices (Touch Panel or similar) do not have all their
memory buffered but only a few folders. The information which is
recorded in volatile memory is therefore lost when shut off. It is
recommended to execute the "RegSave" command after Movicon
CE has been installed, otherwise the runtime module may not
work correctly.
21
M O V I C O N C E P R O G R A M M E R G U I D E
By using the "MS ActiveSync" (for Windows XP) and "Windows Mobile Device Center" (for
Windows Vista) applications, you can create a connection between the desktop PC, where
the project is developed, and the target device with WinCE.
Before carrying out any connections ensure that the "Allow connection with desktop
computer when device is attached" function on the target PC has been activated. The
function's status can be viewed by launching the Communication program icon from the
Windows CE control panel. Also double check and make sure that the "MS ActiveSync" or
"Windows Mobile Device Center" application settings have been done correctly in the
desktop PC: select the "Connection Settings" items from the application's File menu and
enable the connection type, serial or USB, then select any necessary parameters.
The in order to establish the connection you need to launch the RepLog.exe file, located in
the Windows system folder, from the target PC. The "MS ActiveSync" or "Windows Mobile
Device Center" program, on the desktop PC, will automatically establish a connection,
otherwise you can force it by launching the "Get Connected..." command from the
ActiveSync program's File menu. When opting for the USB connection you will need to
executed the "Repllog.exe" file on the WinCE device.
The desktop and target PC connection allows Movicon projects to be exported directly in
Windows CE, new program installations on the target PC or to explore the disk's contents.
The connection status can be viewed in the Windows application status bar where the
status type is indicated the color of the "MS ActiveSync" or "Windows Mobile Device
Center" icon: green means the connection is active and grey means it is disconnected.
Each time the cable is disconnected, you need to repeat the procedure described above to
reconnect.
22
I N S T A L L A T I O N
As soon as communication between the desktop on target has been established, the MS
ActiveSync or Windows Mobile Device Center will ask if you want to setup a partnership.
The partnership is needed when you wish to share and maintain syncronized data between
the desktop and target. Normally the partnership is frequently used in Pocket PC devices
but not in SSDK devices where communication is not always carried out successfully due
to the lack of adequate modules in the target device.
The SSDK devices are generally designed for in the industrial world. Different types and
sizes can be found on the market: some have communication serial ports between 232
and 485, ethernet cards, infrared ports and USB ports.
However, PocketPCs are directed at a wider public use due to their extreme simplicity and
user friendliness, and are capable of quick data sharing with the desktop such as:
phonebooks, internet addresses, files and others still.
Installing MsActiveSync
The "MS ActiveSync" and "Windows Mobile Device Center" applications are free Microsoft
software designed for managing communications between PC Win32 (desktop) and WinCE
(target) devices. The "MS ActiveSync" tool is only available for Windows XP and not for
Windows Vista. Windows Vista replaces this tool with the "Sync Center" which has been
pre-installed in Vista Business but, however, is insufficient for the Movicon Setup.
Therefore you will also need to install the "Windows Mobile Device Center" (last 6.1
version) available in the Movicon CD for the following versions:
23
M O V I C O N C E P R O G R A M M E R G U I D E
Serial Connections
Serial Communication with MsActiveSync or Windows Mobile Device Center
The serial communication works in all Windows CE devices and you only need to have a
free serial port on your PC, a standard serial cable and the Active Sync or Windows Mobile
Device Center installed on the Desktop. The communication velocity can go up to 115200
baud rate.
To get serial communication you need to carry out the following steps:
1. Install Active Sync or Windows Mobile Device Center on the Desktop. Once
installed select the COM port you want to use. Active Sync will remain active, on
hold, in wait for serial signal reception. ATTENTION: keep the serial port engaged
even when no Active Sync communications are active. To free the serial you need
to enable the connection option to the serial which is accessed from the "File-
Connections setting..” menu
2. Open the control panel on the Target device and access the "Communication"
settings
3. Enable the “Allow connection with Desktop computer when device is connected”
selection in the “PC Connection” properties
4. Always check that the connection being used is correct in the “PC Connection”
properties. You can always create new communications afterwards by accessing
“Remote Networking” folder from the Programs/Communication
5. Close the Communication Settings window with OK. Close the control Panel
6. Connect the Desktop and Target device with a standard serial cable
7. Run the executable “repllog.exe” by selecting Run item from the Windows CE
start menu accessed from the task bar
8. The communication will activate automatically
9. A window will open, on the Active Sync or Windows Mobile Device Center
Desktop, enquiring whether to activate a “Partnership”. It is not necessary to
activate a partnership of the Movicon functions
10. The serial communication is now active
By using this type of connection you can transfer files between two devices, the Desktop
and the Target. The "Mobile Device" can be displayed by using the Desktop's explorer to
which you can access for reading or writing files. In addition to this you can export
Movicon projects directly to the Target without having to "copy&paste". After having
created a Movicon project you can actually execute the "Upload Project to Device/FTP..."
from the"Commands" windows of the "Project Explorer" window. If the connection between
the Desktop and the Target has already been activated by using one of the plugins,
Movicon will directly export the project to the Target, keeping the same .movprj source file
path.
24
I N S T A L L A T I O N
Network Connections
Network communicating with Ms ActiveSync
Network communication using Ms ActiveSync is only available for MS ActiveSync versions
up to 3.5 and requires that both PCs, Desktop and Target, be supplied with a network card
and be configured adequately. This system is used for transferring files at a much higher
speed than a serial communication does with a maximum baud rate of 115.2 Kb.
Communicating in net can be established only after a partnership has been created, which
can only be established if there is a communication serial or USB port to start with.
The procedure for creating a network connection is as follows:
If the desktop PC has not been changed, all following connections can
be done directly in ethernet even when the desktop or device has been
turned off and turned on again. Otherwise when using another desktop
PC you will need to re-establish the connections via serial with the
partnership again.
25
5. Editing
• Pocket-PC
• SSDK or HPC2000
The Pocket-PC, also called palmtops, are rather small and have RAM memory storage. As
you can imagine by its name, these devices are mobile and not much bigger than a mobile
phone.
The SSDK devices (standard software development kit) are similar to operator panels and
generally used in the industrial environment. They come in different sizes according to
their display type, which can oscillate between 5.7" and 15". These devices have a RAM
memory and a Compact-Flash memory only, which carries out the tasks of the Hard-Disk.
The Operating System's image resides in the Compact-Flash and is loaded into RAM at
device startup.
Features
In order to verify some of the device's features, you can access the "System" group from
the "Control Panel" to get information on the following:
To get further information on the device please refer to the section on "Project Debug".
Connections
The CE devices are connected to the PC desktop using serial , USB or network connections.
Normally each device proposes a serial connection for default, such as ActiveSync, which
is provided for the connection. The available connections are listed in the "Network and
Dial-Up Connections", found on the "Control Panel", where you can also create new
connections. However, please keep in mind that the serial connection via ActiveSync is
normally executed on CE device's default connection (My Connection). In this case you
need to check that the connection in question is that used by the device otherwise it can
be setup through the "PC Connection" found on the "Control Panel". The window which
appears shows which is the connection currently selected, and the following item needs to
be enabled:
Where the SSDK devices are concerned, you need to use the serial or USB
connection the first time you execute a connection with the Desktop PC,
after which you can then connect in net as explained in the paragraph on
"Network Connections".
26
E D I T I N G
Registry
The device's system registry is modified by the Movicon CE installation, where all the keys
needed for making Movicon CE work are created. Therefore it is absolutely necessary that
the system registry is saved after each change has been made. However, there are
usually no problems when it comes to Pocket-PCs which stores its memory so that there
are no risks of losing data when the device is turned off. The SSDK does not store its
RAM, therefore when the device is turned on again, any system registry changes will be
lost if not saved in the device's Compact Flash before being turned off. If saved, the
system registry will be loaded along with the last changes when the device is next turned
on. The system registry commands are different from one device to another, therefore the
system registry save will have to be executed according to the device being used.
Pocket-PC devices are supplied with a battery to keep data always saved in
memory. However, when the batteries run out or get damaged all the
saved data will be lost. Therefore it would be wise to regularly do a backup
copy of the memory as a safeguard against losing data.
Project Options
You can setup the project to be run on full screen or no by means of using the project's
"Execution" settings. If you choose to activate the "Start Full Screen" option it would be
advisable to insert a command (by button or by menu) to close the project. If the CE
device does not have a keyboard, it will not be possible to startup the operating
system when run on full screen making it impossible to stop the project without having to
turn the device off.
The project's Output window can also be enabled but also in this case if the project is run
on full screen, it will be impossible to access the window without using the keyboard
(ALT+TAB keys and then select the process).
Folder Paths
Project working folders can be setup through the project's "Project Path" settings. You
must take into account that the "C:\" disk does not exist in CE devises therefore the "C":
is automatically taken away by Movicon. The working folders are used, above all, for
defining the folder images and when Dataloggers and Historical Logs are to recorded on a
compact flash which is different from the one where the Movicon installation resides.
Designing Projects
Creating New Projects for WinCE
27
M O V I C O N C E P R O G R A M M E R G U I D E
By using the Movicon Editor, you can create a new project by selecting the target device's
icon as indicated below:
Although projects created with Movicon are executable WinCE devices as well, it would be
best to create the new project by selecting the target device: this will automatically and
optimally pre-configure the project's properties for WinCE devices.
Creating a new project in Movicon for WinCE will automatically set the project's "General
properties" in the "Platform" group. However, these properties can always be changed
to set the platform type being designed with the Movicon Editor.
• The Movicon Editor will hide those functions not supported by the target
according to the platform type selected and display some graphic objects
exactly as they will be represented in the device.
To modify the project's Platform properties, select the project root with the mouse and
use the Movicon "Properties Windows".
Note: when designing for Windows CE, it's advisable to create a new
project explicitly for Windows CE to get all the default settings
configured correctly!
However, Movicon will accept more than one platform selection in the
project's properties and assumes that different platforms are to be
designed for which the editor will always be preset for the most
powerful one.
Also take into consideration that when transferring projects designed for Win32 to WinCE
devices, the Movicon CE runtime will ignore and not manage all those functions
not supported which will be notified in the Output window and in the Log upon project
transferral. Even though the project will run in the WinCE device, the designer should
check whether it does so correctly keeping a special eye on performances and memory
consumption.
Let it be known that all Movicon X projects, being based on XML files, can be run on both
Win32 and WinCE indifferently.
Before Designing
Before starting your project for embedded devices you should always remember that your
project must be created in parity with the capabilities and possibilities of your target
device.
28
E D I T I N G
Devices based on WinCE are generally compact devices with restricted calculation and
memory capacities and therefore we strongly suggest the designer to keep in mind all the
tips mentioned in this guide and in the "GuideLines for WinCE Touch Panels" manual.
Configuration File
Movicon CE does not use the Windows registry keys for reading attributes which consent
to modifying some of its working features. Instead it used the "MovCE.ini" file which must
be found in the Movicon CE installation folder. The MovCE.ini file has a XML root tag called
"Settings" in which all the Movicon sub keys with their respective values are inserted. This
file is structured as follows:
In this example you can see that two values have been inserted in the "General" key and
one value has been inserted in the "MouseCursor" key.
29
M O V I C O N C E P R O G R A M M E R G U I D E
30
E D I T I N G
31
M O V I C O N C E P R O G R A M M E R G U I D E
• Zoom In
• Zoom Out
• Zoom To
• Reset Zoom
• Refresh
Project Upload/Download
Uploading/Downloading Projects
Movicon projects can be uploaded to WinCE or Win32 devices using the "Upload" window
accessible through the "Upload Project to Device/FTP..." command found in the "Tool
Bar" or from the menu which appears right clicking on the project name in the Project
Explorer Window. This is how the Upload window will appear:
The project upload to device operation can be performed using the different protocols or
plugins: FTP, TCP and MS ActiveSync.
Projects can also be downloaded from WinCE or Win32 devices in the same way, using the
"Download" window accessible through the "Download and Open Device pro..."
32
E D I T I N G
command from the "Tool Bar" or menu activated with a right click on the project name in
the Project Explorer Window. The Download window will look like this:
The download project from device operation can be done by using the different protocols
or plugins: TCP and MS ActiveSync. The (MovCE.boot) boot file is used for performing this
operation. The project that will be taken from the device is actually the one defined in the
boot file.
The Upload/Download project window command buttons and entry fields are described
below:
33
M O V I C O N C E P R O G R A M M E R G U I D E
(which may be running). The command is aborted if the boot file is not found in a compact
flash root.
All the files included in the specified path will be deleted without
controlling file type. Therefore each time this command is invoked you
will be asked to confirm in order for this operation to proceed.
cancellation before this procedure goes ahead.
Server:
Name or IP address of the Server to be connected to.
This parameter is only available for the FTP and TCP plugins.
User Name:
User name for Server connection authentication.
This parameter is only available for the FTP and TCP plugins.
Password:
Password for Server connection authentication.
This parameter is only available for the FTP and TCP plugins.
FTP Plug-in
The FTP protocol can only be used for uploading the project to devices which have an
active FTP Server. Therefore the "Get Project from Device", "Start Device Project", "Stop
Device Project", "Attach to Process...", "Erase Device Memory card" and "Create Device
Shortcut" command are not supported. If the device does not have a FTP Server, you can
use Movicon's. The Movicon CE installation includes the "FtpSvr.exe" file inside its
installation folder which can be started up just before connecting to the device.
34
E D I T I N G
TCP Plug-in
The TCP protocol can be used for uploading and downloading projects to and from devices
with Windows CE or Windows XP/Vista. In order to use this protocol you will need to start
the "CEUploadServer.exe" application (Window CE devices) or the "TCPUploadServer.exe"
application (Windows XP/Vista devices) up on the device beforehand in addition to having
a valid Ethernet connection. These two files are installed with Movicon installation, WinCE
and Win32 versions, and are found in the same Movicon executable folder. In cases where
you use the TCP plugin, first make sure that the UploadServer application has been startup
on the device. The TCP plugin allows project uploading with slow connections as well (such
as RAS connections via modem).
The first time the plugin is loaded it will request you to specify connection speed used
("Normal Speed" for default). The other options are "Low Speed" and "Normal Speed".
Slow speed is adaptable for remote connections with low band rates, which exploit Dial-Up
type modems.
The TCP plugin will communicate to the remote server which connections to use in function
with those selected, while the timeout and buffer size parameters will be taken from the
"CETransfer.Settings" xml file.
IPAddress: Only used by the server and shows the last IP address used and expressed
with the "xxx.xxx.xxx.xxx" format. It is no longer used by the 1.1.0.1 version
(CETransfer.dll file) because this parameter is passed by the VBA code which manages
the TCP plugin.
PortToConnect: Used by client to open a socket port in listening mode and is used by the
server in order to know which socket port it must connect to (default "10651").
ServerPort: Used they the client in order to know which server socket port it must
connect to and is used by the server to open a socket port in listening mode (default
"10651").
IdleTO: Idle time expressed in microseconds for handshaking operations between the
client and server (Default "300").
35
M O V I C O N C E P R O G R A M M E R G U I D E
LowSpeedBuffer: Working Buffer size for slow connections in bytes (default "512"). The
value for using fast or normal connections is 8 KBytes.
HighSpeed: default value of the connection type to be set (slow or fast) used by the
client. The default value is "1" which indicates a fast connection. This is no longer used by
the 1.1.0.1 version (CETransfer.dll file), because this parameter is passed by the VBA
code which manages the TCP plugin.
SettingsPath: Default path where project download is performed. This is no longer used
by the 1.1.0.1 version, because this parameter is passed by the VBA code which manages
the TCP plugin.
Switch: Eventual parameters to be inserted into command line of executable file specified
in the "ExeName" (default "") parameter. For instance, the "/R" can be used.
CEExeName: Name of executable file to be started upon Start project command in the
WinCE (Default "MovCE.exe") environment.
CEBootName: Name of boot file to be created after project upload to WinCE (Default
"\\MovCE.boot").
CERegistryKey: WinCE configuration Registry path in which the keys are found for
getting the positions of the executable files to be started (Default
"SOFTWARE\\Apps\\Progea Automation MovCE").
• The "Create Shortcut Device" command creates a connection and saved it in the
PC desktop
• The boot file is created in the root of the disk used for uploading project and is
used only when retrieving the project with the "Get Device Project" command,
whereas the "Start Device Project" command runs the application with the project
uploaded to the device just before or, if nothing has been uploaded, runs the last
project which was uploaded/run on the device
MS ActiveSync
The MS ActiveSync protocol can be used for uploading projects to the device or
downloading projects from Windows CE devices. It needs an open ActiveSync connection
to the remote device (serial, USB or Ethernet).
There are a few values available for the "Platform" key which can be inserted in the
Movicon Configuration File or in the Windows registry (see section on the "Movicon
Configuration Keys) which allow you to customize some of the aspects concerning the
project "Upload/Download" management when the MS ActiveSync plugin is used:
Platform\DeviceInstallPath: Path used for searching for the "InstallDir" value in the
Windows CE configuration registry (default = 'SOFTWARE\Apps\Progea Automation
MovCE'). The "InstallDir" value contains the path in which the runtime has been installed
and is created by the project installation pack. It is used upon project Start/Stop
command.
36
E D I T I N G
These plugins must be installed in a Movcion sub folder headed "UpdMgr". Movicon will
search for all the file contents in this folder with the ".updmgr" extension and display them
in the list using the file name and any eventual <nome plugin>.ico icon.
The custom plugin file must contain the basic code with the following event definitions:
37
M O V I C O N C E P R O G R A M M E R G U I D E
OnLoading
This event is executed for the when the "Upload" command is executed for the plugin
selected. This event can be used for initializing the plugin.
OnUnloading
This event is executed at the end when the plugin is unloaded. Therefore it can be
executed for the previously used plugin when no other goes into use, or when the "upload"
dialog window is closed.
OnConnect
This event is called before initializing each command requiring a device connection. It is
actually called in the "Get Device project", "Start Device Project", "Upload Project", "Stop
Device Project" and "Erase Device Memory Card". The "ServerName", "UserName",
"Password" and "TargetFolder" parameters are filled with values set in the dialog window
("Server", "User Name", "Password"and "Device Folder"). The "bUpload" parameter is set
to "True" when the connection takes place because the "Upload Project" button has been
pressed to upload project to a device.
OnDisconnect
This event is executed when any operation requesting a connection (OnConnect) has
terminated. It is actually called when the "Get Device project", "Start Device Project",
"Upload Project", "Stop Device Project" and "Erase Device Memory Card" commands have
terminated.
OnCreateDir
This event is executed before a file is uploaded when needing to create a directory in the
target. The "DirName" parameter must contain a "\" character at the beginning otherwise
the directory may get mistaken for the name of a compact flash from a WinCE device. In
cases where the plugin is used for exporting projects to devices other than WinCE, the
plugin code must cater for this.
The "OnCreateDir" event can be executed many times with the same
"DirName" in cases where there many files in the same folder to
upload. The plugin code must be able to handle the possibility that the
directory may have already been created.
OnCopyFile
This event is executed for each file that must be copies to the target. The "Source" and
"Dest" parameters report the source and destination file path. The "Dest" parameter is
composed using the "DirName" which has been initialized in the "OnCreateDir" event. The
name of the file to be copied is added to this. The plugin code must use these two
parameters to provide a copy of the source file on the target.
OnDeleteFile
This event is executed when needing to delete a file on the target. The "DeleteFile"
parameter contains the path and file name to be deleted and is composed using the
"DirName" value initialized in the previous "OnCreateDir" event. This doesn't mean that all
files to be deleted really exist and therefore the plugin code must take this into account.
38
E D I T I N G
OnStartStop
This event is executed when the "Start Device Project", "Stop Device Project" buttons are
used in the dialog window for uploading a project. You can use the "bStart" parameter to
see of the two Start/Stop command has been executed. The "Project" parameter contains
the path and name of the project to be started or stopped. It is composed using the
"DirName" initialized by the "OnCreateDir" event which was executed before copying the
project file.
OnCreateShortcut
This event is executed when the "Create Device Shortcut" button is used in the dialog
window for uploading a project. The "Project" parameter contains the path and name of
the project to be created with a link and is composed using the "DirName" initialized by
the "OnCreateDir" event before copying the project file.
OnWinVersionInfo
This event is executed when double-clicking a plugin on the list. The plugin must
preoccupy and preload the "dwMajorVersion", "dwMinorVersion", "dwBuildNumber",
"dwPlatformId" and "szCSDVersion" parameters so that they can be displayed in the
appropriate dialog window afterwards.
OnGetFolders
This event is executed for setting the upload path in the dialog window. On the first call
the "Path" parameter is empty and the code should fill the "FolderList" parameter with the
list of all the folders, or compact flash, read from the device's root (you need to use the
"Line Feed" chars as separator for this parameter). At this point a window will display
showing the list of all the folders, where the user can choose to which file contents to
expand or not. Therefore the "OnGetFolders" event is called every time the user decides to
open a folder, and the new path in which the list of folder is to be read is set in the "Path"
parameter.
OnCleanMemoryCard
This event is called upon pressing the "Erase Device Memory Card" button. In cases where
no path has been specified in the "Upload Device Path" field in the dialog window, this
event is preceded by the "OnGetFolders" event call, so that the user can select the folder
in which files are to be deleted. The "Path" parameter contains the path to be used for
deleting all the files. The "TotalNumber" parameter must be set with the number of files
still to be deleted and is needed for managing the progress status bar. The
"OnCleanMemory" event is called until the "bContinue" and "bRet" parameters are both at
"True". The Output parameter can be used for getting the names of files which have been
deleted upon each "OnCleanMemoryCard" event call.
OnGetBootFile
This event is called on the "Get Device Project" command before starting file downloading
from the device. the plugin must search for the boot file in the connect device, read it and
retrieve the project path. The "BootFile" parameter must be set with the boot file name.
The "DevicePath" parameter must be set with the path in which the project is found in the
device (read from boot file). The "TotalNumber" parameter must be set with the total
number of files to be downloaded, and is used for managing the progress status bar.
OnDownloadFile
This event is called on "Get Device Project" command if the "OnGetBootFile" event has
successfully retrieved and read the boot file from the device. The "Path" parameter
contains the local path that has been selected in the download window. The "LastFile"
parameter must be set with the file just downloaded. The "OnDownloadFile" event is called
until the "bContinue" and "bRet" parameters are both equal to "True".
Note:
The "Output" parameter for customizing the messages which are copied in the upload
window trace at the end of each operation.
The "bRet" parameter has the task of notifying the upload manager of operation
outcomes. Setting this parameter to "False" will interrupt the execution of the next
events.
39
M O V I C O N C E P R O G R A M M E R G U I D E
TargetFolder = GetFilePath("[Select the target path]", "", CurDir, "Select the target path", 2)
If TargetFolder = "" Then
bRet = False
Else
TargetFolder = Left(TargetFolder, InStrRev(TargetFolder, "\"))
End If
Output = "OnConnect: TargetFolder->" & TargetFolder
End Sub
RAM Use
The Windows CE operating systems allows less resource usage compared to the Win32
system. It is for this reason that you should always consider the size of you wish to run on
this platform and there resources it needs. One of the big constraints in Windows CE is
that this system can only allocate 32 Mb of RAM with WinCE 5.0 and 2GBytes of RAM with
WinCE 6.0. The operating system will terminate any processes going over this
RAM use threshold.
The hardware device must have a sufficient amount of memory to cater for the applied
project. The minimum memory required is 32 MB of free RAM, but we strongly advice you
to use devices with 64 MB RAM. The project may require more RAM if programmed to use
IMDB historicals, VBA logic or other advanced functions.
Each process in WinCE can use a maximum of 32Mb for the 5.0
version and 2Gb for the 6.0 version. Movicon allows this limit to be
exceeded when needed by using its Heap Memory management
(project general properties). When this management is enabled,
Movicon CE will use the Heap memory blocks to exceed the limit set
by the WinCE operating system. This is only valid for Windows CE
5.0 or later.
Tests have been run on a device using a X86 processor to give you an idea on the
minimum amount of memory a Movicon CE application can occupy. This test was done by
creating and running a new empty project without any screens.
The results showed that the following memory was used:
40
E D I T I N G
It is quite clear that the Movicon CE process occupies as little as 11-12 Mbytes compared
to the 36 MB of occupied memory used just for the Windows CE 5.0 (PRO vers.) image.
The rest of occupied memory will depend on the project size and the use of the IMDB.
Also consider that additional memory use will be needed when using Basic Script code in
your project which can be calculated as follows:
• approximately 700 Kbytes needed for loading the basic script instruction
interpreter which is loaded only once for each execution thread
• approximately 300 Kbytes needed for each object or resource containing basic
script (screens, symbols, alarms)
To avoid projects using too much memory a Movicon registry key has been inserted to
define the minimum amount of memory that must remain free. When this limit is
exceeded, the screens will be unloaded from memory even when enabled with “DO NOT
Destroy”, and the basic script resources will not be loaded in memory. Furthermore the
page change will be managed as if set with the ‘0’ value in 'TimeDeferClosingWnd'
property. Once reentered from this status every thing will go back to working as before.
The key in question is:
The default value is 5 Mbytes. This means that once the free memory value for the
Movicon CE process (32 MByte available for 5.0 and 2GBytes for 6.0.) goes under the 5
Mbytes, Movicon will start behaving as described above.
For further information about the Windows CE memory management click the Microsoft
link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dncenet/html/advmemmgmt.asp
• When memory used by the process nears the "MaxAvailVirtual" value consented
by the operating system in use (32 Mbytes for WinCE 5.0, 2Gbytes for WinCE
6.0)
• The the total memory available for programs goes under the level set by the
"MaxAvailVirtual" value
When this condition verifies, the opening of a new screen will force the downloading from
memory of the first loaded screen. In addition executing a script, it may be denied the
same insufficient memory reason.
This condition is also traced with messages in the system log:
• "You are running on low memory condition !", is reported each time Movicon CE
acknowledges this condition.
• "Unloading Screen '\flashfisk\...\resources\screen.movscr'. The system is running
on a low memory condition", is reported each time a screen is forcefully
downloaded from memory.
• "Cannot execute the basic script '<Nom
41
M O V I C O N C E P R O G R A M M E R G U I D E
When the system unloads basic script in separate threads while in this condition, it actually
frees it from the VM, allowing the application to return back to normal. Unloading scripts in
separate threads is not automatically done by the application and must be done manually
with the appropriate command.
RAM occupation of one project
Even though it is impossible to know exactly how much memory the project will occupy
beforehand. We can, however, presume that a typical project containing approximately
200 variables, 20 screens measuring 640x480 with simple vector graphics, 200 alarms,
one communication driver should occupy from 2 to 4 MB of memory (the project is loaded
in RAM when run).
This is just purely indicative and is influenced by the graphic types used, the effective
number of screens used and by the use of any external files (.BMP or other).
• Use bitmaps images instead of jpeg. images which use up more memory because
they decompress in memory. Furthermore, when they are used in symbols they
remain in the symbols cache and therefore the occupied memory is not freed
when the screen gets unloaded
• Activate on those transports you intend to use in the networking settings. This
will save you up to 1 Mbytes
42
E D I T I N G
• In cases where many data loggers need to be managed (more than 5) it would be
best to use the IMDB format instead of the ODBC format, providing that the
maximum number of records per data logger is around a hundred.
43
6. Memory Usage with
Historicals
IMDB Engine
The IMDB engine saves and manages data directly in RAM. The memory tables are
unloaded on text files with .dat extensions.
Each historical table has its own file where data is only saved in delayed mode based on a
preset time (10 seconds for default) after the table has undergone any modifications.
These text files have two functions: they can be used for transferring data to other
supported files and are used at the project startup for preloading the tables with their
most recent values in the historicals.
The Panel RAM use is also strongly conditioned by the use of the
IMDB historicals (InMemoryDB).
The Movicon CE project’s historicals record data using the IMDB engine for default, (except
for certain different settings). As an alternative, you can use a relational database for
recording instead of the IMDB. If you do not select the IMDB settings in the project,
Movicon will use the ODBC (Open DataBase Connectivity) in the Desktop by automatically
converting to ADOCE (SQLCE) connections on the panel (WinCE does not have ODBC).
Historical data is recorded by the IMDB engine on output files in the permanent memory
(Flash compact) and loaded in RAM at each project startup. The IMDB works in RAM
(InMemoryDB) to ensure data access management, analysis, filters and queries in the
project.
Default values
When creating a project for WinCE, Movicon will set the following values for default in each
of the project’s historical recording engines:
1. Use IMDB Manager (property)
2. Shared IMDB Tables
3. Data Max.Age is 180 days (caution, we recommend you reduce this value in
panels with little memory capacity)
4. Nr. 4 MB RAM allocation for IMDB manager (MovCE.ini)
44
M E M O R Y U S A G E W I T H H I S T O R I C A L S
• The maximum historical log table age has been set with a new constraints value
(in act from build 955) called “MaxDaysAgeHistoric”. This value has been set at 7
days for WinCE projects, therefore the alarm, driver and system message tables
cannot exceed this maximum age limit in WinCE projects.
Movicon CE will therefore allocate 4MB of RAM for the projects IMDB tables for default.
This value can be changed in the MovCE.ini file. You will need to check that:
1. The device has at least 4MB of RAM available.
2. That 4MB of RAM are enough to contain the files required in the project.
3. If the “Shared Tables” setting is disabled Movicon CE will no longer allocate memory
and therefore you will need to make sure there is enough RAM to cater for the size of the
files set.
Once this preset limit has been reached (4 MB for default) the IMDB
will stop recording any further values until space has been freed
from the Historicals’ tables. A “IMDB - Internal error: Out of shared
memory” message will appear in the system Log.
The following table shows the correspondence between the types of Movicon project
variables and the data type created by the IMDB in its tables:
45
M O V I C O N C E P R O G R A M M E R G U I D E
• The .dat file has a ratio of approximately 1:17 memory occupation in respect to
that occupied by the same table. For instance, if one table occupies 1 Mbytes of
memory, it will occupy 60 kbytes when exported on text file.
• The xml file has a ratio of approx. 1.4 memory occupation in respect to that
occupied by the same table. For instance, if one table occupies 1 Mbyte of
memory, it will occupy 256 kbytes when exported on xml file.
As followed indicated on the table, you can see the number of registered records and the
related file size for .dat e .xml using the In Memory DB (IMDB). These values as indicated
just as an example with a Data Logger in a project with 10 mixed columns (Bit, Sign Byte,
Byte, Sign Word, Word, Sign Dword, Dword, Float, Double, Strings of 15 char.), using a
Suetron XScale PXA255 device.
Size of IMDB (MB) Records Nr. Size of .dat (KB) Size of .xml (KB)
1 MB 888 192 792
2 MB 2577 556 2292
3 MB 4259 916 3786
4 MB 6143 1320 5462
Note: Using a project with more than one Data Logger IMDB, it's
reccomended to set an adequate value as property that define the writing
delay time on the storage card, and if possible, different for any Data
Logger. This is due to the slow response in writing on a compact flash of
certain devices.
î It is strongly advised that you use the historicals in ADOCE (SQLCE) when
large amounts of data need filing or a big historical file (more than 30 days)
46
M E M O R Y U S A G E W I T H H I S T O R I C A L S
needs to be stored!!
“Shared Table” Tables are created in shared memory, which is a chew memory not
reserved just for Movicon CE applications but can be shared (default
value = true). As WinCE 5.0 is fixed at 32 MB the memory limit that
each process can allocate, this option allows the remaining memory to
be used in cases where the device's program memory is more than 32
MB.
“Max # This value can be used to limit the number of records existing on
Records” database. Therefore Movicon will see that the maximum number of
records in the table is maintained, as from parameter. In any case,
data which is older than the maximum age set will be deleted even
though the maximum number of records has not been reached. The "0"
default value disabled this function. This stops data from being lost
when any product updates occur. The recipes are not subject to the
max. number of records and age management even though they have
these properties.
Some options can be inserted into the “MovCE.ini” file which allow you to customize some
aspects of the IMDB.
“IMDBMaxHMemory” Maximum memory size which can be allocated in the shared area
for managing the historicals. The default value is 4 Mbytes for
WinCE and 16 Mbytes for Win32. Once this limit has been
reached the IMDB will no longer record any values until space has
been freed in the historical tables. This message will appear in
the system log: “IMDB - Internal error: Out of shared memory”.
“IMDBMaxLMemory” Maximum memory size which can be allocated in the local area for
managing historicals. This parameter has meaning only when
historicals have been set not use the shared area.
The default value is 4 Mbytes for WinCE and 64 Mbytes for Win32.
Once this limit has been reached the IMDB will no longer record
any values until space has been freed in the historical tables. This
message will appear in the system log: “IMDB - Internal error:
Out of local memory”.
• In order to make the ADOCE and SQL Server CE work correctly, you must install
their libraries in the device's "Windows" folder first.
The "cdb" (Access for CE) format is not supported due to causing to
many problems in managing big quantities of data and that only one
connection at a time can be managed.
47
M O V I C O N C E P R O G R A M M E R G U I D E
To get the recording on DataBase to work correctly, both the ADOCE and SQL Server
libraries need to be installed in the device's "Windows" folder otherwise the system will not
be able to manage them and therefore impossible for Movicon to record data in DataBase
format. The " Windows" folder is loaded in Ram upon the device's startup and the
installation of the ADOCE and SQL Server CE must be implemented in the operating
system's image by the product makers. If this is not done so, each time the device is
started up the "Windows" folder will be reloaded from the image saved in the Compact
Flash and therefore without the ADOCE and SQL Server CE libraries. In this case, if the
ADOCE and SQL Server Mobile libraries are in the Movicion CE installation folder, the
Movicion CE project will automatically copy these libraries in the Windows folder at startup.
These libraries are installed in the Movicon CE installation folder only when MovCE full
Setup has been chosen.
To get the recording on DataBase to work correctly, both the ADOCE and
SQL Server libraries need to be installed in the device's "Windows" folder.
In order to create a Movicon CE Database file use an empty file to start with. Then in the
first project startup phase the file will be copied and the necessary DataBase tables
created. This is the reason why the "Empty.sdf" file is uploaded into the Movicon CE
installation folder during the installation phase.
Database Files
The Database file is created in the project's "DLOGGERS" folder. Movicon CE creates a
Database for each Data Logger or Recipe set up with a
"ProjectName_DataLogger/ReicpeName.sdf" name. When Database files cannot be
created, an error message will appear in the Output window and in the Status Bar and
data will not be recorded in any format.
WARNING! ADOCE does not support Table column names with spaces in.
Therefore it would be a good rule of the thumb to avoid inserting spaces in
column names. Otherwise an error message will be generated in the Output
window and Status Bar when you run the project making it impossible to
record data thereafter.
It would be best, especially for Data Loggers, not to set high frequency
recording times which may slowdown device performances to the point of
causing them to crash. This problem is due to the fact that Compact Flash
read/write operations are rather slow in CE devices.
48
M E M O R Y U S A G E W I T H H I S T O R I C A L S
Memory Use
The new database engine, SQL Server Mobile, offers many advantages in memory use.
Memory uses in platforms with Intel-ARM920T-PXA270 (ARMV4I) microprocessors have
revealed:
Description Program
Memory
ADOCE + SSCE 3.0 ~ 3 MBytes
1. Databases in SQL Server Mobile (.sdf) format can be analyzed on the desktop as
well using the SQL Server 2005 "Microsoft SQL Server Management Studio". This
product has the possibility to connect to databases in SSCE 3.0 format by
selecting the "SQL Server Mobile"option in the sever connection dialog window.
This application requires you to select a SSCE 3.0 database file, after which data
can be displayed within by applying "SELECT" queries.
49
M O V I C O N C E P R O G R A M M E R G U I D E
2. Possibility to access the same database with more than one connection at the
same time.
3. Possibility to manage databases protected with passwords and data encryption.
4. Database files can hold up to 4 GB.
5. Synchronization is simpler with SQL Server 2005 through data or RDA (Remote
Data Access) replications.
6. Databases are automatically compressed during project runs. This is done with
the "Auto Shrink" to keep the database more compact where the will delete all
empty pages physically when they reach 60% of the file's occupied space.
This tool is copied to the device and is executed using the following syntax:
50
M E M O R Y U S A G E W I T H H I S T O R I C A L S
To create a RDA sytem please refer to the Miscosoft (SQL Server Mobile Books Online)
documentation.
51
7. Designing Guidelines
Variables
The number of variables in a project for Movicon CE should be proportioned to the device's
performances. Generally, you need to consider the number of variables the project has
"In use" and the type of driver being used.
Technically speaking there are no set limits in the programming phase due to the many
different factors which determine device performances.
Therefore the programmer will have to decide whether the number of variables to be
allocated and managed are adequate according to device's capacity.
It is important how retentive variables are managed as their values, which change
constantly, are recorded on the Compact Flash and therefore should be kept to a minimum
using only those thought to be indispensable.
Slow Compact Flash access in read/write is quite commonly used in CE devices. Therefore
the less it is accessed, the better the device's performances will be. This also goes for the
Variable Trace function which should be used only when necessary.
Tips:
2. Variable retentivity should not be used unless really needed. As values are
recorded on the Compact Flash, a good rule of thumb would be to keep a
minimum number of necessary variables retentive especially when these change
quite frequently. Compact Flash read/write access is quite slow in CE devices and
therefore the less the compact flash is accessed the better the device
performances will be.
3. 3. The variable Trace function should only be used when really necessary. Each
variable value variation traced is recorded on disk with the same concept as that
for the retentive variables.
4. The use of dynamic variable via OPC or Networking is onerous for WinCE system
resources. Therefore, it would be best to create variables and link them statically
using the OPC Client resource or the Tag’s Client properties.
5. A good thumb of the rule to stick to would be to map data exchanged in the Word
type variables and in the adjoining areas to optimize communications and thus
performances. The bit variables can then be addressed to graphic objects or
alarms using the name of the word followed by the bit: <name_tag>.<bit>
The Graphics
Operator panel screen pages should contain simple graphics. Don’t get too carried away
with the powerful functionalities provided by Movicon without knowing the capabilities of
your Touch Panel hardware first. Make sure that the project’s platform properties are set
52
D E S I G N I N G G U I D E L I N E S
to WinCE and go through the Windows CE graphics restrictions indicated in the manual to
get a clear picture of the situation beforehand.
Graphic resolution
We suggest you consider the CE device's video screen's resolution. Normally the devices
have a limited resolution (640x480 or 800x600) or they can even adopt screens with 1/4
of VGA (320x240).
Movicon allows you to adapt the graphics to the video screen's resolution, but if you are
drawing with resolutions much bigger than those of the device, the graphics will appear
adapted to this resolution but will lose their quality according to the difference between
the resolutions (that of the project and that of the device).
53
M O V I C O N C E P R O G R A M M E R G U I D E
Therefore it would be advised to set the video screen resolution or the project screen sizes
as near as possible to the devices actual size.
The display area on the target PC, with Windows CE, will certainly be smaller than the
desktop PC screen's and for this reason a new command has been introduced called
"Remote Device Size (WinCE)" which is used for sizing the screen window with the
characteristics of the target PC to which the project is to be exported. This command only
works when connected via Ms ActiveSync.
The command can be activated from the Layout menu from any screen.
You can also set the Screen's default settings by reading the device's resolution using the
"Get Connected Device Dimensions" command from the project's Platform properties. This
can be done every time you create a new Screen to automatically set it with the device
sizes.
1. Start by setting the sizes of the screens to match the panel screen’s resolution
(Screen General Properties). Work on how the screen should display the graphics
on the panel effectively and see exactly how many objects can be contained on
screen within reason. By aiming for better user friendliness you will get better
performances. Avoid applying graphic resolutions that are much different from
those of the device while designing. For instance, if you are designing screens
designated for a 5.7” panel screen in a PC with a 1024x768 resolution you are
bound to get poor quality graphics on the panel, with the risk of getting fonts
much smaller than foreseen. Give caution to using a ¼ of VGA (320x240),
as screen adaptation from VGA to ¼ of VGA is not possible.
2. The more graphic objects you put on screen, the more calculation capacity
will be needed to process it. Try not to use more than 30-40 graphic objects
per page unless you are a hundred per cent sure that your hardware device
graphics capacity can take it. If in doubt, setup and trial run some pages to test
how fast the graphics are on the panel before starting your project.
3. Be careful when using the Movicon symbol libraries. To get their very attractive-
to-look-at effect, many of these symbols have been built with an elevated series
of vectors. Therefore when you insert symbols from these libraries you must
always take into consideration their vector content (even though grouped
together) presented on screen. Even though static symbols do not degrade
graphic performances, you should always take into account that the page’s
performances will also depend on its object content (whether static or animated).
You can also find and use template objects (ie. Trends) specifically designed for
WinCE in the object library.
4. Streamline the use of BMP images to allow only those deemed indispensable.
High-resolution BMP images usually take up too much memory space. It would
therefore be a good idea to save the 256 color images to reduce occupied
memory. However, be warned that not all devices support GIF, JPG formats.
5. To get fast page changes, set the “Do Not Destroy in Run” property = True. By
doing this, the displayed screen will remain in memory while other screens are
being displayed. More global memory will be occupied but page change will be
much faster.
6. Avoid using logic and VBA script in screens. If you do use Script in graphic
objects (Power Template), Movicon will have to allocate more memory and
process more data, penalizing the project run. If unsure about the potential of
your hardware, use the functions provided in the object’s standard properties.
7. 8. Avoid using Color gradients, both in the screen background and in the object’s
background properties. The use of color gradients in backgrounds requires major
graphic processing capacity, which will mean a drop in performances.
54
D E S I G N I N G G U I D E L I N E S
Supported Images
Movicon CE uses Windows CE APIs for managing all image types. This consents you to
manage ".bmp" images with more than 256 colors and other image formats, other than
".bmp", even in devices which do not implement the "imgdecmp.dll" library.
Change Page
Performances to change one page over to another one may depend on different factors. In
general, the time needed to change over the screen is influenced by:
The screens are usually unloaded from memory, after a certain presettable time, after
which you have to access the relative disk to load them so that they can be displayed.
In order to get the best graphic performances it would be best to distribute information
adequately on a number of screens as required. When deemed necessary, a screen can
always be kept in memory by using the "Not Destroyable" option in its properties. This
will make changing screens faster as the screen is always kept in memory even when
not displayed but will take up further use of the device's RAM memory resources.
Nevertheless, there are some attributes to insert in the "MovCE.ini" configuration file that
allow you to configure certain parameters for managing graphics:
DontUseDecorativeFont
Using certain fonts in devices may greatly penalize device performances. For this reason
Movicon CE forces some of the registry keys before creating the font to exclude those
parts in the font creation that slowed it down when being used.
Technically speaking, the parts which are forced in WinCE are:
lfOutPrecision = OUT_RASTER_PRECIS
lfClipPrecision = CLIP_STROKE_PRECIS
lfQuality = DRAFT_QUALITY
On the graphical side the created font may seem less attractive but nevertheless is quicker
to render. The new "DontUseDecorativeFont" value, to be inserted in the "MovCE.ini"
Configuration File, restores the original font mode (DontUseDecorativeFont = False).
MaxCacheFont
The option to manage a font cache has been added for further optimization. This cache can
be used for storing fonts to be reused whenever needed in order to save Movicon CE the
job of creating them over and over again. This additional modification, together with the
one mentioned above, should make a great difference in improving performances when
many texts are being used on screen. This cache has been set with a maximum number
limit to avoid the system from being saturated with fonts when in many different types.
55
M O V I C O N C E P R O G R A M M E R G U I D E
This value can be managed by inserting the "MaxCacheFont" (default = 0) key into the
"MovCE.ini" Configuration File.
All the various project fonts are inserted in the font cache and differ in
size and type. Furthermore controls which have been set with the same
font may be produced with different sizes if the option for adapting the
text to the font size is being used.
For further optimization you can also change the system font. Try to avoid
using TrueType fonts (TrueTypes require more processing during the
scaling phase). The system font can be changed by using the below
registry key:
“KEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\BarFnt\"
Using images
Using images usually requires allocating memory resources. Therefore it would be in your
best interest to check your device's memory capacity and disposition. Big images means
more memory use and therefore just use those images which you really need.
Remember that Windows CE also supports a maximum resolution of 256 colors and would
be to your advantage to verify the graphical result by setting a resolution of analog colors
on the desktop in the programming stage. In addition to this, the Windows CE system
colors may be different or less than those of Window XP/Vista, therefore it would be
always best to use the standard colors.
Alarm Management
MocXCE completely supports the alarm management is completely supported which
however carries a few restrictions regarding notifications and statical analysis. Due to the
fact that the Report Engine is not supported in Windows CE, the commands relating to
creating statical reports on alarms is not available on the CE device.
The alarm notification functions are managed by the Alarm Dispatcher. Only alarm
notifications via SMS and E-mail are available in Windows CE as described in the chapter
on Restrictions.
Tips:
1. The alarms do not have any particular limits on the way they function and do not
require special configurations to optimize them further. However, it is always
best to keep the alarm management simple based on the capabilities of your
panel.
2. All the alarms are set with the Acknowledge and Reset management and
recording on Historical Log for default. Each alarm therefore is managed by 4
events (ON, OFF, ACK, RST): The Acknowledge and/or Reset can be disabled
when memory is low, to reduce the number of events managed (and recorded) by
the system.
3. If you think you may have too many frequent events, try to avoid recording them
in the Historical Log to ensure optimized memory and performances.
4. The Notification of alarms must only be used when deemed necessary and in
function with the panel capacity being used. Alarm notification via SMS and Email
is supported only.
AlarmDispatcher
56
D E S I G N I N G G U I D E L I N E S
In order to send SMS by means of using a GSM modem you need to manually copy the
GSM driver configuration file from the Desktop PC to the CE device. This configuration file
is found in the Alarm Dispatcher's installation folder with the default name "GsmSMS.stg":
"..\Progea\AlarmDispatcher\GsmSMS.stg"
"\Harddisk\MovCE\GsmSMS.stg"
You have to remember that the Alarm Dispatcher version for Windows CE will always
search for file called "GsmSMS.stg" only. However, this configuration file can be saved on
the Desktop version with a different name. Therefore you need to rename the file with the
"GsmSMS.stg" name before transferring it to the CE device.
Historical Log
The Movicon CE Historical Log is recorded for default in IMDB mode (In Memory DB).
When creating projects for WinCE, all the historical log settings are marked with IMDB for
default in the development environment to optimize resources by using the XML text
format.
2. All the alarms are set with the Acknowledge and Reset management and
recording on Historical Log for default. Each alarm therefore is managed by 4
events (ON, OFF, ACK, RST): The Acknowledge and/or Reset can be disabled
when memory is low, to reduce the number of events managed (and recorded) by
the system.
3. If you think you may have too many frequent events, try to avoid recording them
in the Historical Log to ensure optimized memory and performances.
4. It is essential that the Historical Log archive is sized correctly by setting its
properties appropriately in the Project properties. As it is impossible to determine
how many events can be recorded in a certain period of time, you should always
make a wise estimate based on a daily average of recorded events according to
the table below. Then, based on the device memory available, set a consistent
number of days for data filing (for all three tables).
However you can use the relational database as a data base, which is set with ODBC
(Open Database Connectivity) in the development environment. In reality, WinCE does not
support ODBC therefore all the ODBC connections are converted by Movicon to ADOCE
connections in the target. The SQL Server is set as the DataBase format for default.
In order to for the Historical Log to work in the right way you need
to install the ADOCE e SQL Server Mobile, libraries correctly as
explained in the paragraph dedicated for this matter
The Database file is created in the project's "LOGS" folder with "ProjectName_HisLog.sdf"
as its name. In cases where it is impossible to create the Historical Log in Database format
an error message will be generated in the Output window and in the Status Bar, after
which the data will be recorded in text format in the project's "LOGS" folder. These files
can then be copied and examined on a PC Destktop.
You must remember that more than one connection on one same DataBase cannot be
opened at the same time when using ADOCE. This means that when you want to access
Historical Log data by means of using the Basic Script functions, you will not be able to
create a connection to the Database because the one created by Movicon, to record data,
is already active. This restriction is due to the fact that ADOCE is not multi-threading.
57
M O V I C O N C E P R O G R A M M E R G U I D E
Tips
2. It is very important that the file archives of each Data Logger are sized correctly
by setting the Database properties of each single Data Logger appropriately.
3. To get the right archive sizes, the Data Loggers should record "on time" and not
on event or change. This will help you to determine how much memory is
occupied for the period of time set. Contrary to this, the programmer should
establish the archive time limits by taking care not to risk saturating the device's
memory when setting long time periods.
Attention: Names of tables and columns cannot contain spaces or start with
a number. Otherwise table creations, using the SQL Server CE or IMDB, will
fail generating an error in the Historical Log.
Trends
The Trends are also supported in Movicon CE. However, you must keep in mind, especially
when using Templates from the Symbols Library, that the Trends are rather complex and
heavy components for the system to manage. When you use these objects you should
always try and follow these tips:
• meet your needs by trying to use the less complex Templates among those
available
• set slower sampling times when possible
• do not insert too many pens into one only Template
• set the sampling buffer with the lowest possible value when possible
Grid
The Grid object is also fully supported on Movicon CE and therefore file contents can be
displayed in DataBase format and also in text format (text format files have to be saved as
UNICODE and not as ANSI).
58
D E S I G N I N G G U I D E L I N E S
The ODBC is not supported in WinCE for the time being and therefore the Database file
DSN link cannot be exploited and the Grid's "ODBC DSN" property has to be changed
during its configuration phase. This setting will then be different according to whether the
Grid has to be linked to a DataLogger/Recipe or to any Database file. In the first case,
Movicon will have already opened connections to the file and therefore the Grid should be
able to exploit them. In the second case, however, the Grid will have to open a new
connection to the DataBase file. As a consequence of this, the "ODBC DSN" property
should be set as follows:
Communication Drivers
The Communication Drivers supported on Movicon CE are generally Serial or Ethernet
type. This is due to fact that is difficult to find cards dedicated to communication
compatibility with the WinCE environment. For the time being only the Hilscher CIF cards
for Profibus DP or CanOpen can be found.
The list of supported drivers is continuously being added to and can be found on the
Progea web site.
Many other devices communicate by means of the OPC technology which Movicon CE
supports as OPC Client whether a specific DA or a XML DA.
The Communication Driver updates found on the Progea web site do not come in
installation files and only the updated dll can be downloaded leaving the programmer to
copy it in the appropriate folder on the CE device which will result as:
..\Movicon CE\Drivers\
Tips
1. Before designing your project make sure the driver to be used is available for the
Window CE version. Not all Movicon drivers can be used technically in Windows
CE.
2. The Movicon CE installation on device does not install drivers for reasons of
occupying space. The communication drivers used must therefore be installed
manually on the device according to the instructions in the manual.
59
M O V I C O N C E P R O G R A M M E R G U I D E
4. You can only connect as OPC Client to OPC Servers installed locally on the device
with Windows CE. You cannot have a distributed OPC Server network
6. The Movicon Client configuration is done in the project development phase and
you will need to install the same OPC Server installed on the Desktop PC, which
will then be used on the target device. Naturally, the two versions of the OPC
Server will be specifically for the two WinCE and Win32 platforms, but it is
essential that they have the same "CLSID" ID code.
7. Above all things, when creating projects for CE, it would be a good habit to create
OPC Item groups based on variable usage. For instance, variables that go in use
at the same time should be grouped together. This will go towards optimizing
performances, which is something that you must always take into account in
WinCE. It would also be beneficial to insert groups with “Update Rate” times
based on their execution priorities.
8. Before using the driver’s advanced functions (VBA or Modem), check carefully
which functions are available for the panel you are using.
OPC
Due to the fact that the devices are limited in what they can do, Movicon CE currently
supports the OPC Client technology only (OPC Server is available only on Win32
platforms). In addition to this, as the DCOM technology is not supported on WinCE,
Movicon can connect as Client only to OPC Servers installed locally on the device. It is not
possible, however, to have OPC Servers distributed on a network.
The Movicon OPC configuration is done in the project development phase, where you will
need to have the same OPC Server installed on your PC Desktop. This will then be used on
the Target device. Obviously, the two versions of the OPC Server will be specific to the
WinCE and Win32, but it is essential that they both have the same identification code
"CLSID".
A good rule of the thumb, above all when creating projects for CE, would be to always try
and create OPC item groups based on how the variables are used, or rather, to group
those which go into use at the same time. This will give way to performance optimization,
which is something you cannot ignore when it comes to WinCE. Another thing to do would
be to insert a "Update Rate" time of the groups according to their execution priorities.
60
D E S I G N I N G G U I D E L I N E S
Logics
Movicon CE has VBA (Visual Basic for Application) and IL logic languages (Instruction
List). Please take the following into account when you need to use logics in your target
device:
Tips
1. The use of the VBA script code may result onerous in panels with processor limits
and should be avoided unless absolutely necessary. The Movicon objects provide
optimal configuration, command and animation options in their properties.
2. VBA script code should not be used in symbols and screens if possible in some
cases, otherwise this may effect screen refresh and change page performances. If
needed, you can keep screen in the memory by enabling the screen’s “Do not
destroy in Run” property, even though this occupies substantial RAM space.
3. Even though Movicon CE ensures VBA language support (therefore the code
executed in desktop is the same that can be executed in the target), and with all
due reserved for users, Progea cannot guarantee full support to all the many
functions, properties, methods and events available on the desktop. Up till now,
it has been impossible to carry out tests effectively on the correct execution of
each and every instruction on all the different types of devices that exist today.
4. The use of IL Logic in screens may occupy more of the CPU, which in turn will
effect the graphical performances. If necessary, (depending on the device type
being used) you can reduce the priority level, assigned to the IL Logic by
Movicon, by using the MovCE.ini file’s “ILSleep” and IL Priority” parameters.
Networking
Movicon CE allows you use the networking management both for Client and Server
towards any other Movicon project connected in net, whether based on PC or any other
WinCE devices.
Tips
1. Only activate Network Settings with transports needed. This will save you up to 1
Mbyte.
3. Active network connections have to be in parity with the capacity of the device.
Do not exceed 128 TCP connections when unsure about the capacity of your
device.
61
M O V I C O N C E P R O G R A M M E R G U I D E
Web Client
Movicon CE allows Web Client management, where the WinCE panel can carry out the job
of Web Server towards Web Clients connected to the device in a TCP-IP network.
Tips:
1. Movicon CE supports the Web Client technology. Web client can only work when
the panel has a Web Server. Otherwise you will need to access the Web Client
through the Java applet as described in the accompanying manuals.
2. The screen's pages published on Web Client should be managed with a reduced
size, furthermore is suggested to disable the option "Fit on Window" on the
screen's properties. A good rule should be to never exceed the graphic resolution
of the device, publishing a screen on the web. Infact, as more is the size of web
screens pages, as more is the memory required on the device for the
management. When the memory exceed the limit of 32 MB, WinCE 5.0 end the
process Movicon CE.
3. When using the Web Client you must take into account those resources on your
panel which carry out Web Server tasks and process data for those clients
connected (client connection is limited to a maximum of 2).
62
D E S I G N I N G G U I D E L I N E S
63
8. Running
Running Projects
Running a project exported to Window CE can be done by creating a link to the MovCE.exe
file followed by the path and name of the project. The problem is that each device has
customized procedures for executing files upon system startup and there does not exist
any standard procedures to follow unless you intervene on the system's registry keys.
However, with Pocket-PCs you can copy the link into the "Harddisk\Windows\Startup \"
window where the project run is guaranteed at each PC target startup.
At the startup of the project on the target PC, if the software license
has not yet been installed, a proposal will be made at the introduction
or in the same window to press the "Please, Demo Mode" button to
start Movicon CE and the project in Demo modality.
Upon pressing this button the Movicon CE project will then be started by loading the preset
screen into the project.
The Exit command must be appropriately predisposed in the project to cater for when the
system's menu bar is not made visible.
PocketPC Platforms
In the Pocket PC platforms (eg. Palm PCs such as Compaq iPack, Cassiopeia, etc.) you
should only need to copy the link to the “Windows\Startup\" folder to get the project to
run at every target PC startup, needless to say this also depends on the product type
being used.
For example, when using the Compaq iPAQ you have to proceed in the following way with
the "Test_Me.Ink" example project:
Create a link with the Dos EDIT program by creating a "Test_Me.lnk" file and inserting the
line:
SSDK Platforms
In SSDK platforms (or operator panels) the operating system does not have a folder for
the startup as described above.
Also already mentioned, each device uses customized start-up procedures which are
requested from the device builders. for example, if you are using Advantech devices you
could use the following procedures:
The operating system executes a series of operations at the startup which are
programmed in the windows registry. One of these operations generally runs the
"Startup.exe" file, usually placed in the "\Storage Card\Startup\" path which interprets
the "Startup.ini" file. The flash memory folder is usually called "Storage Card", but always
check the configuration set in the hardware system being used just in case. If possible,
you should set the "CF DISK FOLDER NAME" on the "Storage Card" so that the Startup.exe
executable does not go into error.
64
R U N N I N G
File Startup.bat:
entouch OFF
\"Storage Card"\MovCE\MovCE.exe \IPSM\Me30\test.movprj
Boot File
When Movicon is run, it will search for the "MovCE.boot" file in the root of the Compact
Flash at its startup. The file specifying the path and name of the project file to be run
should be in this file. The file is in XML format and is structured as follows:
65
M O V I C O N C E P R O G R A M M E R G U I D E
The "MovCE.boot" file is automatically created in the root of the compact flash after the
project has been uploaded This happens in automatic only when using the "MS Active
Sync" option and by using a different plug-in programmed to manage this function.
After having changed the Device System's registry keys, you should
carry out a save of the Registry to avoid losing the changes made at
the device's next startup.
The SSDK devices only have some folders saved on storage memory.
The information which is recorded in RAM memory is therefore lost
after a next re-start. Therefore we suggest you execute a registry
save after the softkey code has been entered otherwise this will also
get irretrievably lost.
Projects Debug
Running a debug on WinCE devices is usually quite limited since the operating system
does not provide much information. In addition to the few details on system configuring,
as already seen in the paragraph on "Windows CE Operating System", no other
information can be got hold of. At this point, if you have a "Platform Manager"
development environment installed on your Desktop PC, you can use one of the tools
available on the software market, to link up and get more information on the device.
'Entrek ProcMan' is one recommendable tool you could use for displaying system
information on active processes, etc.:
66
R U N N I N G
Anyway, it is always best to trial run and debug the project well on the Desktop platform
first, seeing that it has the most tools available for using. When the Basic functions are
being used which are not supported on Movicon CE or are different to those of the Movicon
CE, it would be best to use the "RunningOnCE" function to change the code according to
the where the project is being run.
Lastly, you can also enable the "Output" window on the Movicon CE, by using the project's
"Show the Trace Bar" properties, so that you can consult log messages which are
generated by Movicon. In this case it would be best to disable the "Start Full Screen"
property to get easier access to the "Output" window.
67
M O V I C O N C E P R O G R A M M E R G U I D E
M O V I C O N 1 1
Movicon™ is a trademark of Progea, related to the HMI/SCADA platform entirely developed and
produced by Progea. © 2008 All Rights reserved.
No part of this document or of the program may be reproduced or transmitted in any form
without the express written permission of Progea.
Information in this document is subject to change without notice and is not binding in any way for the
company producing it.
68