All projects MUST be recompiled after the installation of this Service Pack.

Failure to do will result in conflicting database size messages. Ensure that the Incremental Compile menu option is not checked, or edit the Citect.ini file and set [CTEDIT] INCREMENTALCOMPILE=0


The following files have been updated by this Service Pack.

























This Service Pack fixes the following problems:




* NCR 11609 - Page origin gets corrupted

When running with [Page]DynamicSizing = 0 if a page is scrolled and then moved the page origin is corrupted.

* NCR 11680 - Minimised Window Display errors.

When a Citect window is minimised and the project run, the Citect window displays incorrectly.

* NCR 12550 - DspAnFree() causes crash.

Citect will crash when DspAnFree(An) is called on a Cicode object that has something continuously displayed on it using DspText(An, Font, Text). DspText() now checks if the Animation point has been freed.

* NCR 12784 - Text object displays Japanese characters incorrectly

Projects created or modified under a Japanese Operating System will have problems displaying Japanese characters within text objects.

* NCR 12988 - Copy/Paste problem in Project Editor.

Variable Tag records cannot be copied and pasted. This does not affect other forms.

* NCR 13174 - Upgrading project problem.

When upgrading a project, from ver 4.xx to 5.20 or 5.21, if the project has a genie using a substitution called %Page% or %An% then once it's upgraded it will have problems. When you paste this genie onto a page or it has been pasted previously, the name of the current page is automatically substituted into the field, and the property can not be modified. For the %An% the an number will be automatically substituted into the field.

To overcome this during the upgrade, set [CTEDIT] UpdateAnPage = 1 and set [CTEDIT] SubtPageValue and [CTEDIT] SubtAnValue to whatever name you would like to change it to. The default values for SubtPageValue and SubtAnValue are PageSubt and AnSubt respectively.

* NCR 13296 - Multiple Internet Display Clients.

It is now possible to run multiple Internet Display Clients on a single computer.

* NCR 13488 - Remote I/O Devices.

Automatic cache refreshing can now be enabled or disabled explicitly using the new [Dial]CacheRefresh parameter. Allowable values are 0 to disable cache refreshes, or 1 to enable. The default value is 1.

* NCR 13489 - Remote I/O Devices and IODeviceInfo() type 18.

IODeviceInfo() type 18 erroneously reports a unit as connected if the unit is offline. IODeviceInfo() type 18 has been enhanced to more accurately report the state of the unit.

* NCR 13551 - Cannot scroll back into history using an event based SPC Trend Chart

When pressing the historical scroll back button on an event based SPC trend chart, the chart jumps back to display the realtime data immediately, rather than displaying the historical data.

* NCR 13557 - New PageFileInfo() function.

A new cicode function PageFileInfo() has been added to return the width and the height of a page without the page having to be displayed at the time. PageFileInfo(sPageName, nMode) returns the page width or height of sPageName depending on the value of nMode. Mode 0 returns the page width, and mode 1 returns the height of the page.

* NCR 13565 - Dialback modems.

Citect stops monitoring a dialback modem for incoming calls if the modem is turned off and turned on again. Citect should restart monitoring when the modem is turned back on.

* NCR 13585 - Calling DspInfo() may cause Citect to crash.

When calling DspInfo() with type 3, Citect may crash. This happens after 5.21 Service Pack A is installed.

* NCR 13614 - AssChainPopup() problem.

AssChainPopup() failed to open the same Super Genie with different tag associations.

* NCR 13659 - KeySetSeq() fails to work.

The Cicode function KeySetSeq() fails to work when an AN is specified. It only works when you specify an AN of 0 which causes it set a page key sequence.

* NCR 13661 - Runtime performance enhancements.

The performance of Citect runtime has been enhanced in the area of loading pages.

* NCR 13665 - Rectangle and Circle fill runtime problem.

When a rectangle and circle object (that has fill property) is moved, the fill will not be shown correctly during runtime, unless the page is refreshed.

* NCR 13667 - Incorrect project names on Japanese Citect.

When a new project with a Japanese name is created under a Japanese operating system, Citect changes the first character to an invalid character.

* NCR 13668 - Text displays incorrectly on Japanese Citect.

Palette text in the Graphics Builder is too small to read and text in the New Project box in the Citect Explorer does not show correctly.

* NCR 13669 - Copyright Character on Japanese Citect.

Copyright Character © does not display correctly on Japanese Citect.

* NCR 13719 – Hardware key checking.

Hardware key failures occur because Citect does not correctly retry the key.

* NCR 13799 – Minimum page sizes.

If a page is smaller than a minimum width then it may appear corrupted. The minimum page width arises from the Windows limitation that all windows must have a minimum width of 132 pixels. The minimum page width is therefore equal to 132 - 2 * <border width>. where <border width> depends on the window mode being used. The table below gives minimum page widths for all window modes.

WinNewAt mode Border Size Minimum Page Width

0 = Normal window 4 124

4 = No resize 3 126

8 = No icons 3 126

16 = No caption 1 130

If the page is smaller than this minimum size it will now display correctly with the page left aligned and the unused area on the right side of the window will be covered with a thin black strip.

Note that all new pages should be made wider than these minimum widths.



This Service Pack also contains the fixes for previous Version 5.21r0 Service Packs. These were:

Service Pack A:

*NCR 7963 – DspInfo() with datatype of ‘3’

DspInfo(hInfo,3,nOffsetTag) returns the tag name without the array index of the variable.

*NCR 8994 - PageInfo() enhancements

PageInfo() now accepts types 21 and 22 to return the width and height of the current page.

*NCR 11557 – "Cancel" button added to broken link dialog box.

A "Cancel" button has been added to the broken library link dialog box which may come up during the updating of pages in the graphics builder. Pressing the button will cancel the entire process.

*NCR 11683 - Clear and Backspace buttons in FormNumPad() mode 32 don't work.

When a value is entered into the combobox in FormNumPad() mode 32, and the 'Clr' (Clear) button is pressed, the combobox text field does not clear. Also the '<-' (backspace) button will not clear the last character.

*NCR 11698 – Update Pages does not update the modified template properties.

Template properties, like size, colour, and keyboard commands, do not get modified on linked pages during update pages. This has now been fixed. To enable the fix set the ini parameter:



Once set you will no longer be able to modify these properties on linked pages.

*NCR 11784 – Enhancement to broken library link dialog.

"Yes To All" and "No To All" buttons have been added to the broken library link dialog in the graphics builder.

*NCR 11929 - A tick on the Access Tab(General Tab) is missing in Graphics Builder.

A tick should be displayed when the description field, tooltip field or log device field is filled, or when the area box or privilege is not checked.

*NCR 12301 – Internet Display Client crashes.

The Internet Display Client crashes when the Cancel button of the file transfer dialog is selected.


*NCR 12475 – File extension "v52" for symbol and genie library files.

If CtDraw32 crashes during a pack libraries it leaves the name of the libraries with an extension "V52" regardless of whether it was a Symbol or Genie being packed at the time of the crash. Attempting to repack the libraries again can not differentiate between a symbol and genie library files. This has been changed to "l52" for libraries and "g52" for genies.

Note: "v52" will be "v51" in Citect version 5.1

*NCR 12533 – AssInfo() function.

The AssInfo() function does not return the array index with the tag name.

*NCR 12631 - RTF report files will not roll over.

If you have a report device which outputs data in RTF file format, and configure history files, then they will not roll over correctly. Citect will simply keep writing to the same RTF file the whole time and will not create any history files when they are due.

*NCR 12652 - Backup Path Failure may cause Citect to shut down.

If a RUN and BACKUP path are both set, but the BACKUP path fails, and an attempt is made to display a non-existent page (eg. using PageDisplay() ), Citect displays the message "Cannot display page" and then shuts down.

*NCR 12770 - SPC Subgroup size of 1.

Citect SPC now supports a subgroup size of 1 - Contact Citect Support for more information.

*NCR 12827 – Centering of Startup Page

Citect can now be configured to open the startup page in the center of the screen. This is done by setting the ini parameter:



*NCR 12829 - Scrollbars for page in Graphics Builder.

If you adjust the page size in the graphics builder to be larger than the screen, then scrollbars do not automatically appear.

*NCR 12913 - Character sequences not recognised.

Character sequences CTRL+0 (0x2030) to CTRL+9 (0x2039) and CTRL+SHIFT+0 (0x3030) to CTRL+SHIFT+9 (0x3039) are not recognised. Also character sequences CTRL+ALT+0 (0x6031) and CTRL+ALT+1 (0x6032) are incorrectly recognised as CTRL+ALT+P (0x6050) and CTRL+ALT+Q (0x6051). PRINT SCREEN will now be recognised as KEY_SNAPSHOT (0x012C) when it is released.

*NCR 12942 - STRING substitution error on genie.

Associating a STRING variable to an untyped super genie substitution, eg. ?1? causes an error dialog to pop up. The dialog cannot be dismissed. Changing pages while the dialog is up causes a GP in Citect runtime.

The Error dialog popped up as follows:

File (E:\v521\source\display\CT_EXEC.C) Line (2243)

Error Invalid Load Variable Type.

*NCR 12970 – New TimeInfo() and DateInfo() functions

Two new Cicode functions TimeInfo(INT nInfo) and DateInfo(INT nInfo, INT nExtra) have been added to Citect. These two functions return the Time and Date formats in effect on the Citect Server. Contact Citect Support for more information.

*NCR 12971 – Deleting a project causes an incorrect error message.

Deleting a project that has a file open in another application causes an incorrect error message with a line number in the code to appear.

*NCR 13030 – Data Path not suitable for trend files

Running Citect when the data/history directory is a sub directory of the project directory results in the error "Path : '[data]:cpu' not suitable for trend files". Citect can now be configured to ignore this restriction on data directory location by setting the ini parameter:



*NCR 13046 - RTF report files don't display correctly after being removed.

When RTF report files are created and written to many times, the RTF file is readable and all writes to the file are visible. However, when the RTF file is deleted or removed, or even if a DevZap() function is performed on the report device, then subsequent writes to the RTF file are not be readable in RTF format.

*NCR 13073 – Incorrect text on the windows menu.

The text for closing the window on the system menu for child windows should be "Close" instead of "Shutdown".

*NCR 13113 - Cicode function IODeviceInfo() crashes Citect.

Calling IODeviceInfo("<any valid I/O device>", 22 or 23) will crash a Citect workstation if it is not an I/O server. This has been fixed so that calling IODeviceInfo() with 22 or 23 will only return valid values on I/O servers, otherwise it will raise a hardware alarm of "Cicode Invalid argument passed".

*NCR 13114 - SELECT CASE compile error.

Compiling a function using the SELECT CASE statements may not work correctly.

*NCR 13152 - Incorrect bitmap object size at runtime.

Citect may display bitmap objects at an incorrect size at runtime.

*NCR 13162 - Wrong IODevice Hardware alarm.

When you have more than 512 IODevices in a Citect database then a hardware alarm for an IODevice may be reported as being for another IODevice. Also ErrSetHw()/ErrGetHw() will not work correctly when there are more than 511 IODevices in the database. To correct this the mask for IODevices passed into this function (ie. the number added to the IODevice number) has been changed from 512 to 8192. The old mask of 512 can still be used by setting [Code]BackwardCompatibleErrHw=1 in your configuration file. However with backward compatible mode you will only be able to have ErrSetHw()/ErrGetHw() work correctly with 511 IODevices or less in your database.

*NCR 13185 - Enumeration of DESIGO INSIGHT tags within the OPC server

The OEM tag extension for Staefa now supports enumeration functions for tags. An OPC client displaying a list of tags will now show Citect and DESIGO INSIGHT tags.

*NCR 13186 - Write to devices fails.

Citect is unable to write to a database file if a previous write attempt was made while the file was locked by another application.


*NCR 13192 – Parent Page Activation

When a child page is closed at runtime, the parent page should be activated (not the top parent page).

*NCR 13196 – Staefa Tag Support

Staefa ODC tags are now supported by CTAPI. Both the Citect Server and Client must be have Version 5.21 Service Pack A installed.

*NCR 13217 - WinCopy() and WinFile() enhancements

WinCopy() and WinFile() have been enhanced to take the specified x/y scales and palette. These functions now have arguments as follows - WinCopy(xScale, yScale, sPalette) and WinFile(Filename, xScale, yScale, sPalette).

Note: When using both scaling and a different palette you may not get desired results. This is because a pixel averaging algortihm is used when scaling down. This may choose colours near the colour you are mapping and thus will not be mapped by a single colour map. You can adjust the palette to include these colours or turn pixel averaging off by setting [Animator]UsePixelAveraging=0.

*NCR 13265 - DspInfo() problem on Super Genies.

When you use an association without a type on a Super Genie (eg. ?1?) then DspInfo() will not be able to give any information for the substituted tag if that tag is a DIGITAL.

Service Pack B:

* NCR 12745 - FileRichTextPrint() error return.

FileRichTextPrint() now checks if the file can be printed and will return error 367 'File cannot be printed' or error 261 'File does not exist' if unsuccessful.

* NCR 13022 - Keyboard commands are 'eaten'.

After a page is displayed the cursor focus may not be set correctly, leading to pagewide and global keyboard commands being 'eaten' when the cursor is subsequently set on the first key press.

* NCR 13146 - FileFind() doesn't close file handles.

FileFind() fails to close opened file handles when finding just one file, or if a recursive call fails to finish finding all specified files. A new function FileFindClose() is introduced to let users close opened FileFind() handles which aren't needed any more. Note: FileFindClose() does not take any parameters.

* NCR 13231 - DDK function "Debug" output display problem.

This is a problem in the DDK where driver debug function (*Debug)(ASCIIZ, CHAR*, SHORT) cannot display more than 432 bytes of user data in Citect Kernel Window. It is supposed to support 2048 bytes by design. This has now been fixed so that it can display 2048 bytes of user data and truncates the data with "DATA TOO LONG BEING CUT OFF", if data is more than 2048 bytes.

* NCR 13246 - Runtime crash with DspText().

Citect will sometimes crash at runtime when displaying a page or activating a Super Genie. When examining the page or Super Genie that caused the crash in the Graphics Builder, you will see that one of the animation points on the page calls Cicode that writes text to itself or another animation point that is not a pure animation point. The Cicode calls the DspText() Cicode built in function, or calls a Cicode function which in turn calls DspText() such as TrendDspCursorValue(). The crash may result from the use of the DspText function where the animation point parameter refers to an animation point which is not a pure animation point. The fix is has been to prevent Citect crashing in this situation, and to provide a hardware alarm indicating this error condition. The hardware alarm has the following message "Wrong type for text display AnXX" where XX refers to the An number being written to. If this error is found, then the problem should be rectified by ensuring text is configured to be written only to pure animation points. Configure these points using the Citect Graphics Builder 3.4 / 4.2 tools.

* NCR 13266 - "Driver Is Not Responding" error.

Citect will sometimes show the "Driver Is Not Responding" error in the kernel. When examining the settings for the protocol driver having the problem, you will see (Retry + 1) * TimeOut (seconds) > Watchtime. With the settings (Retry + 1) * TimeOut (seconds) > Watchtime, then under a timeout condition, the IO Server may time out the request before the driver can time out the request. This situation results in the "Driver Is Not Responding" error occuring in the kernel. Users using the default values for a driver should normally not be affected by this problem, as the default values for a driver should satisfy the above equation. The change prevents the IO Server from timing out a request for a default period of 5 minutes. This should always allow a driver to timeout a request before the IO Server. The new IO Server timeout parameter introduced by this change is [IOSERVER] CancelTimeout, and is measured in seconds. The default is 300 seconds (5 minutes). This parameter should not normally need to be modified.

* NCR 13295 - Internet Display Client Startup

It is now possible to run IDC without typing the IPAddress and Password at startup.

Simply set

[Internet] ShowSetupDlg = 0

[Internet] IPAddress

[Internet] Password

in the IDC's Citect.ini file. Both IPAddress and Password need to be set otherwise the dialog will come up as before. If ShowSetupDlg is set to 1, a setup dialog will show as usual.

* NCR 13296 - Multiple Internet Display Clients

It is now possible to run multiple Internet Display Clients on a single computer.

* NCR 13298 - Internet Display Client downloads files unnecessarily.

When the Internet Display Client requests a file which has been downloaded previously, it will download it again if the file can not be found inside the Internet cache.

* NCR 13300 - Dial up on a dial back modem.

Dial back may fail if a dial up is being attempted at the same time on the same modem. Citect should give priority to the dial back in this case.

* NCR 13331 - "Out of memory" error when compiling a large number of events.

An "Out of memory" Citect compiler error occurs with a context message of "Allocating Wrt Table". The error happens when compiling a large project for which there were greater than or equal to 32500 event tags, each writing to a different tag address.

* NCR 13333 - Citect Error Handling.

The exception address should be written by Citect into the Dr Watson log header.

* NCR 13334 - "Page RDB" crash.

Attempting a "Page RDB" command in the kernel on a project with a large number of groups may cause Citect to crash.

* NCR 13337 - Dial up on a dial back modem.

Dial up may fail on a dial back modem. Citect should allow dial up to proceed on a dial back modem if no dial up modems are available.

* NCR 13395 - Memory Leaks.

Use of CtApi may lead to memory leaks.

* NCR 13405 - Accessing arrays with scaling may fail.

Using a tag as an index to an array with engineering scale will permit values outside the engineering range to be set.

* NCR 13407- Crash when using PageInfo().

Calling PageInfo() during startup may cause Citect to crash.

* NCR 13435 - Remote dialup occurs on non - I/O servers.

If you have a setup with an I/O Server and a non - I/O Server running a project that executes dialouts, and the non - I/O server is connected to a modem, then a crash could occur because the non - I/O server dials out using the dialout cicode in the project.

* NCR 13441 - New Time Stamped Alarm types.

Three new Time Stamped alarm types have been added. They all allow the time stamp to be a negative offset from midnight of the next day (or midnight of the current day depending on how this is viewed). The actual offset is always positive when specified but is treated as a full negative offset. The new types are (8) Negative BCD offset stored as hex, (9) Negative BCD offset stored as decimal and (10) Negative millisecond offset. Total history from midnight of next day available to be specified for each type is (8) 4 days, (9) 178 days and (10) 49 days.

* NCR 13446 – AlarmSetInfo().

Using AlarmSetInfo() with a type of 2 does not work when the value (alarm category number) is higher than 31.


* NCR 13449 - TrnInfo() function problem with mode 6.

The TrnInfo() function does not correctly return values greater than 32767 when using mode 6. This causes a problem when using this function and mode when there are more than 32767 events, as the number turns negative.

* NCR 13454 - Transparent PlotOpen() modes.

Transparent PlotOpen() modes 65 and 129 make do not have any affect. Using PlotGrid() with nFillCol = No_Change will not result in a history of plots like in Version 3.4/4.2.

* NCR 13472 - Duplicate dialog Hotkeys in the graphics builder.

The "Guidelines Setup" dialog box in the graphics builder has duplicate hotkeys with 3 controls all having the same 'C' keyboard shortcut.

* NCR 13475 - Numeric format display in Graphics Builder is incorrect.

When a new numeric object is added and a new numeric format selected for it, all existing numeric objects will then display with the chosen format. Existing objects should continue to display with their own numeric format.

* NCR 13482 - Remote I/O Device cache timeout.

The cache timeout for a remote I/O device is not being updated when the connection schedule is modified using the IODeviceControl() function with type 13 or type 15.