Overview

The TwinCAT system is the connecting element between Windows NT and TwinCAT. For example, the TwinCAT system carries out the TwinCAT start during the system start-up of Windows NT, or TwinCAT is safely stopped when Windows NT is shut down. Also, all accesses of the TwinCAT server to Windows NT services are executed by the TwinCAT system. The TwinCAT system consists of the TwinCAT System Service and the TwinCAT System Control.

Definitions:

TwinCAT - Total Windows Control and Automation Technology

ADS - Automation Device Specification

AMS - Automation Message Specification

TwinCAT System Service

TwinCAT System Control

TwinCAT System Service

The TwinCAT System Service operates as Windows NT service in the local system account. In this way, the TwinCAT System Service is started by Windows NT before a user has logged on. As an activity symbol, the TwinCAT System Service incorporates its icon into the task bar of the desktop. In addition, the colour of the icon indicates the state of the TwinCAT system.

Colour of the icons:

Red:

TwinCAT is stopped.

Blue:

TwinCAT is in Config mode

Yellow:

TwinCAT is being started.

Green:

TwinCAT is started.

The TwinCAT System Service is primarily responsible for starting and stopping the TwinCAT run time system. It loads all configured servers and initialises them during the TwinCAT system start.

The context menu of the System Service is displayed with a mouse click (left or right) on the icon or the key combination <ALT-+>.

TwinCAT System Control

The TwinCAT run time system is parameterised with the TwinCAT System Control.

The following settings can be made:

  • Adding TwinCAT servers
  • Parameterising the TwinCAT system start
  • Configuring remote connections
  • Parameterising the message router
  • Parameterising the PLC run time systems


TwinCAT and Windows NT

Management of TwinCAT task execution und Windows process execution time

The following diagram illustrates an example of execution times of Windows NT based operating systems (Windows NT, Windows 2000, Windows XP,...)

The execution time for NT starts when task execution has finished, but at the latest halfway through the available period (50%). If execution of the task needs more time than the 50% that has been set, it is interrupted to give time to Windows NT, and completed in the following cycle. If no task is being run in any particular cycle, Windows NT can use 100% of the available computing time.

Management of TwinCAT task execution und Windows process execution time with various priorities

The following diagram illustrates an example of execution times with various priorities:

Task 1, which has higher priority, is run in every cycle. The remaining time available for task execution is used by Task 2 (which has lower priority). The execution time for Windows NT remains a constant 50% in each cycle.


Overview

The TwinCAT System Service is displayed as an icon in the Windows NT task bar.

Status of the system:

The main colour of the icon indicates the current state of the system.

Red: TwinCAT stopped.

Yellow: TwinCAT started.

Green: TwinCAT running.

TwinCAT 2.9 has got a new system state, the TwinCAT config mode

Blue: TwinCAT Config mode is enabled

Real-time setting:

In addition, the current real-time setting is displayed via a tooltip when the system is running. In the example shown, the TwinCAT real-time system has a maximum of 50 % of the processor capacity available, but requires only 0 % of the processor capacity.

Context menu:

Clicking the mouse (left or right) on the TwinCAT system icon opens a context menu, via which the user can control the TwinCAT system. The listed functions can be selected via the mouse or keyboard.

The menu functions will be explained on the following pages.

TwinCAT System User intrface shortcut keys:

It is possible to call the TwinCAT System user intrface by pressing the keys: Alt and ( [NUM] + ). The navigation in the menu succeeds with the cursor buttions. the selected menu items cann be activated with the return button.


Menu of the TwinCAT System Service

The menu functions in detail:

About TwinCAT…:

A description of the installed TwinCAT version is called up with the menu line "About TwinCAT...". This information is needed by the user when, for example, contacting the TwinCAT Hotline.

Event display:

The event display is a programm to moniotor the events in the system. The event logging service starts automatically, if you execute Windows NT.

System Manager:

The TwinCAT System Manager is started by selecting "System Manager".

PLC Control:

The TwinCAT PLC Control is started by selecting "PLC Control".

Real-time:

The TwinCAT real-time system can also be configured via the context menu. However, this only applies to classification of the processor output.

Processor time can be assigned to the TwinCAT real-time system via the linear regulator in the figure above. A time basis of one millisecond is cur-rently defined for this purpose. In the example shown, TwinCAT is as-signed a maximum of 30 % of the computer time. On a time basis of 1 ms, this means that TwinCAT has a maximum of 300 µs available each milli-second. Conversely, it means that at least 700 µs are available to Windows NT. When the TwinCAT real-time system switches to its idle task, the processor is returned to Windows NT. The bar in the linear regulator dis-plays the current utilisation level of the real-time system. The display is averaged over 256 cycles (ms).

System latency time:

In this case, the current and maximum latency times in the real-time sys-tem are shown. The time by which the central system tick arrives too late is measured. The maximum time is saved until the linear regulator is actuated or until the dialog is exited. The latency time is, of course, also measured if the above dialog is not opened

Message in the case of:

If the set maximum time is exceeded, a once-only message is output in the window and a logbook entry is generated. Calling up the above dialog en-ables the message to be reset, so that a message is again output the next time the time is exceeded.

Time basis:

Time basis for calculating the percentage classification. At present, a time basis of 1 millisecond is permanently set.

Router:

The TwinCAT Message Router can represent its internal memory admini-stration and port administration for diagnosis. This service can be called up via the context menu.

Info

User memory:

The displayed user memory is required in the TwinCAT system for AMS messages and for memory administration of the TwinCAT real-time envi-ronment. The entire memory is requested with Windows NT when the TwinCAT system is started. The memory size can be configured in the TwinCAT System Control. The user memory required by TwinCAT cannot be relocated.

Total user memory:

The user memory which was available at the system start of TwinCAT.

Available user memory:

The user memory which is currently available for TwinCAT.

Log-ons

All users of the TwinCAT Message System (AMS) must register with the router. TwinCAT servers have fixed port numbers (e.g. TwinCAT NC: 500, TwinCAT PLC LZS1: 801, …). TwinCAT clients are assigned a port num-ber by the Message Router.

Ports

Number of registered ports

Server

Ports which are occupied by the TwinCAT servers

Transports

Internal only

Mail debugging

In conjunction with the TwinCAT Maildebugger, it is possible to record the entire TwinCAT message traffic. In this case, it must be noted that the message traffic is slowed down by the additional messages. The Mailde-bugger is not part of the TwinCAT standard scope of delivery.

Cleanup

Ports in the router which originate from no longer functional programs are released again with the "Cleanup" function of the router. This function is particularly appropriate in the development phase of the applications.

System:

If the TwinCAT system is not configured for an automatic start, the start can also be performed manually via the context menu. The configuration of the automatic start is carried out with the TwinCAT System Control. Only the functions which are appropriate in the current operating state are released in the context menu. In the example, the TwinCAT system is in the Stop state, which means that only Start is possible.

The functions in detail:

Start:

The TwinCAT system is started. All entered TwinCAT servers are loaded and initialised. The TwinCAT I/O subsystem is parameterised by the Twin-CAT I/O Manager in accordance with the configuration. All entered run time systems of the PLC subsystem are initialised. If a boot project is entered for a run time system, this is loaded and the PLC program is started. The remaining (retain) data is also loaded in accordance with the configuration. The boot project is generated with the TwinCAT PLC Control. The start behaviour (boot project, data remanence) of the PLC run time system can be configured via the TwinCAT System Control.

Stop:

The TwinCAT system is stopped. All entered TwinCAT servers are shut down and unloaded. After the TwinCAT system stops, there is only the TwinCAT Message Router still in the memory. The TwinCAT system can now be restarted via the "System -> Start".

Restart:

The TwinCAT system is first stopped and is then restarted. This function is useful in the event of changes to the system configuration, because in this way the configuration is again loaded by the restart.

The TwinCAT Message Router can represent its internal memory admini-stration and port administration for diagnosis. This service can be called up via the context menu.

IO:

The TwinCAT I/O subsystem can be reset via the TwinCAT System Ser-vice. For this, the corresponding function must be selected in the context menu. The reset applies to all connected field bus systems. For details, also refer to the documentation of the TwinCAT I/O Manager.

PLC:

A submenu for starting, stopping and resetting a (the) PLC run time sys-tem(s) is opened via PLC. Depending on the number of configured PLC run time systems, another submenu is opened for selecting the run time system.

In this case, the 4 PLC run time systems are configured for the TwinCAT system. Each run time system can be controlled separately.

Properties:

The TwinCAT System Control is started by selecting "Properties".


TwinCAT System Control

The TwinCAT System Control is a dialog-based application with a separate side for each supported system area.

The tabs:

  • General
  • System
  • AMS Router
  • PLC
  • Registeration

"General" tab:

On the first side, the user can find general information on the installed TwinCAT version. Whenever contacting TwinCAT Hotline, please always state the data entered here.

"System" tab:

This page shows the basic configuration of the TwinCAT system. Here, TwinCAT servers can be added and removed, and the automatic system start can be activated.

Enable Auto Logon:

Here you select 'Enable Auto Logon' and enter your user name and your password. Windows NT accepts this setting once you confirm with 'OK'. If you do not enter a password at this stage, the automatic login will only function once (this is a property of Windows NT).

Cancelling automatic logging in:

In order to stop automatic logging in although the setting has been made, it is necessary to hold the shift key pressed during the login. This interrupts the Auto Logon, and you can then log into Windows NT in the usual way.

TwinCAT can be extended by additional servers. These can be cam switch mechanisms, linear pass controls or other software units. The modularity of TwinCAT now enables this server to be loaded into the TwinCAT system by simple configuration. However, a condition is that the server was compiled with the TwinCAT Server Framework. For Windows NT, TwinCAT servers can be used as unit drivers, thereby enabling the operating state of the TwinCAT server to also be checked in the Windows NT units list.

Important:

Changes on the system side should only be carried out by experienced TwinCAT users or in accordance with the instructions from the TwinCAT Support.

Add TwinCAT servers

This function is necessary when a TwinCAT server is not reported with the system by the standard installation. This can be the case with application-specific TwinCAT servers.

Name

This is the Windows NT unit name. This name addresses the TwinCAT server of Windows NT. In the case of TwinCAT servers, the unit name corresponds to the file name of the TwinCAT server.

Display name

Only used for displaying the Windows NT system, and can be freely issued.

File path

Path to the binary file of the TwinCAT server.

Type

At present, only Windows NT drivers can function as TwinCAT servers. "DriverType" must therefore be entered here. In future, Win32 services will also be able to operate as TwinCAT servers.

Start mode

TwinCAT servers are started by the TwinCAT System Service. The standard setting is therefore "manual" in this case. A start via Windows NT could be necessary for special TwinCAT servers, which means that the start mode can be changed here.

Remove TwinCAT Server:

When this dialog is acknowledged with OK, the TwinCAT server is removed from the TwinCAT system and from Windows NT. The binary file of the TwinCAT server is, however, not deleted from the hard disk.

Properties of a TwinCAT server

Double clicking on the server name in the server list or pressing the "Properties" button opens the above dialog.

In this dialog, the properties of a TwinCAT server (e.g. the path) can be adapted later.

"AMS Router" tab:

The local machine address, the reserved memory and the connections to other TwinCAT systems are defined in the settings for the AMS Message Router.

AMS Net Id

This is the address of the local computer in the TwinCAT network. The "AMS Net Id" consists of 6 bytes and is represented in a point notation. The "Net Ids" must be issued by the project supervisor and must not be re-peated in the TwinCAT network. A standard + "1.1" is generated from the installation of an AMS Net Id from the IP address of the system (if present). If no IP address can be determined during installation. the AMS Net Id ".1.1.1.1.1.1" is generated.

Remote Computer

List of TwinCAT systems which can be reached in the TwinCAT network.

Add remote connection

New connections to other TwinCAT systems can be configured with the aid of this dialog.

Browse:

It is possible to search for the remote computer via this dialog. After selecting the remote computer, the IP address is fetched and the AMS Net Id is automatically generated. This Net Id corresponds to the standard Net Id following installation.

Name

Symbolic name of the TwinCAT system removed. This name can be freely issued.

AMS Net Id

Address of the removed TwinCAT system.

Address

System address referred to the relevant transport shift. In the above example, TCP/IP is used as the transport shift, whereby the address is interpreted as the IP address.

Transport

The transport shift with which the AMS messages are carried. At present, only TCP/IP is supported as the transport shift.

Reamote a system from the remote list

After acknowledgement of the dialog, "Machine" is irrevocably removed from the remote list.

Properties of the remote connection

A remote connection can be subsequently adapted with this dialog.

Further information of the remote connection are descirbed in the dokumentation TwinCAT Remote Access Service .

"PLC" tab:

The PLC subsystem is configured with the PLC side of the TwinCAT System Control.

Number of run-time systems

The TwinCAT PLC subsystem supports up to 4 run-time systems. The number of run-time systems is set via the above control element.

Boot project path

A separate boot project can be generated for each PLC run-time system. the path from which the boot project should be loaded must be configured here.

Search

To support the user, the boot project path can also be entered via this dialog

Boot project

The loading of a boot project can be activated separately for each run-time system. The boot project of a run-time system is activated or deactivated by a mouse click on the corresponding line. To generate a boot project, start the TwinCAT PLC Control. In the Online menu you will find the selec-tion "Generate a boot project".

Load/store of the retain data

If a boot project is selected for a run-time system, remanent data can also be loaded or written for this run-time system. This option can be selected and deselected via the adjacent selection box.

"TwinCAT registration":

TwinCAT Version

Existing product version

System Id

Unambiguous identification of the local system. State this combination of numbers when registering TwinCAT.

Registration

The registration key which matches the TwinCAT version and the defined system ID. This key is obtained when TwinCAT is registered.

Online

Currently not supported.

Fon

Call number for registering TwinCAT