General questions regarding PC control

Are PCs as reliable as PLCs?

In comparison with PLCs, PCs are now manufactured with a very much smaller number of components and connectors. PC systems feature very much larger scale integration than PLCs. The number of components detrimentally influences reliability in a linear fashion, which is measured by way of the MTBF (Mean Time Between Failures). Therefore, PCs can basically be just as reliable or even more reliable than PLCs. PC systems must be manufactured to ensure that their application areas and their ambient conditions are specified. Specified industrial PCs are now available for a very large number of environments.

Hard disk as a rotating medium - marginal conditions?

Rotating mass storage units are nowadays very reliable: the failure rate of robust models in practical use is very low. In special applications, for example in vibrating environments, use can be made of flash RAM disks. Versions of Windows NT are also available for the RAM disk. Beckhoff offers corresponding versions. Is Windows suitable for automation? Windows NT is not deterministic and, in this sense, is not suitable for automation. Nevertheless, the reliability of NT is good, and its architecture and capabilities are a good basis for applications in automation (NT's developers had experience with DEC - VMS). The GUI (Graphical User Interface), information processing and communication in automation can be processed very well with Windows NT. Based on Windows, users have a choice from the largest available software platform in the world, and applications can be tailored very swiftly on this basis. Excel, Visual Basic, C++ or Windows applications are linked to TwinCAT real time applications via OLE links.

Is Windows suitable for automation?

Windows NT is not deterministic, and in this sense not suitable for automation, its architecture and capabilities are a good basis for applications in the field of operating systems for automation. The GUI (Graphical User Interface), information processing and communication in automation can be handled very well with Windows NT.

On the Windows basis, the user can choose from the largest available software platform worldwide: applications can be tailored from it very quickly. Excel, Visual Basic, C++ or Windows programs are connected to TwinCAT real-time applications via OLE connections.

Can PC technology guarantee 10 years replacement?

The "PC standard" has already been existence for a very long time and old programs can still be used today. Contrary to conventional technology, where individual manufacturers had to guarantee 10 years delivery, and whenever manufacturers were not able to deliver, investments were lost. Users can now purchase from a whole series of sources. As the PC standard is used by many companies, not only is delivery a sure thing, but also rapid enhancement of the technology in the form of compatible devices. Function compatibility can be guaranteed. Software investments are protected in the long term. Nevertheless, users can only be sure provided they are not dependent, e.g. on a special add-on card. Only the pure single-processor solution realizes all functions in the form of software, thus ensuring that fundamentally any compatible hardware can be used.

What happens if the PLC stops?

As with every usual hardware PLC also, the I/O system used determines how the outputs behave: Beckhoff I/O features watchdogs for control of the bus nodes to ensure that they assume a failsafe state. Nevertheless, for every programmable controller involving software intervention (i.e. for PLCs just as much as for PCs), it is important to ensure that functions that are relevant to safety be safeguarded with independent facilities that conform to the usual technical specifications (emergency stop and access control).

Is NT real time-capable?

Within the meaning of "hard" real time (deterministic within the µs range): no. NT was designed for optimum performance and not for deterministic processing. The typical latency times of the NT Scheduler are real time-capable for slow processes, but not for typical automation and drive solutions (cf.: Realtime Systems with Windows NT, Technology Brief, Microsoft Developers Network, 1995)."Hard" real time capability in the µs range, which is adequate for the aforementioned applications, is achieved by means of a second scheduler. This scheduler is an extension of the kernel, with the result that TwinCAT programs are integrated fully in NT and its interfaces.

Is NT modified when TwinCAT is installed?

No: TwinCAT's architecture allows integration in the form of a kernel mode driver (.sys) without modifying NT. This is particularly advantageous because NT does not have to be modified here (patched). The latest respective version of NT can be purchased worldwide from a Microsoft sales channel and can be used throughout the world.

Why is a PLC deterministic and can a PC also achieve this?

A PLC is none other than a microprocessor system with a proprietary operating system that operates in a deterministic fashion. In any case, a PC's performance is high enough to process a deterministic "kernel" together with the operating system, and the technology lies in neat implementation.

Does a TwinCAT PC operate as reliably and deterministically as PLC?

Yes: the PLC task call by TwinCAT's NT Kernel Extension is just as deterministic as in the case of a PLC. The reliability of the system is guaranteed by stable and industrially suitable hardware.

What happens if NT is "starved" by a load?"

The processor's computing capacity is shared by TwinCAT and NT, and the limit is adjustable. Nevertheless, TwinCAT only occupies the imperatively required capacity and returns free capacity to NT: In this way, neither NT nor TwinCAT can occupy 100 % of the processor, thus forcing the other respective system to its knees.

How is the real time setting adjusted and how are load violations noticed?

In the system settings via the task bar, it is possible to set the real time load limit, and this is where the current load is also displayed. Violations of the load limit lead to a situation in which the PLC programs are not completed in good time before the next call, the result being that a cycle call is executed with a "delay", and the cycle timeout is indicated by names of a system flag, and a reaction can be programmed. A message can be generated for Windows applications. Additionally, any PLC program may need an execution time longer than the configured cycle time (see task settings): the cycles will be executed in a time cycle longer than the configured one: The missing of the scheduled cycle is indicated in the system flag memory: a reaction can be programmed, a message for windows programs may be generated.

Can the real time display and setting be deactivated?

Yes: in the Registry, there is an entry that influences the system popup menu.

When SysPopupMenuType = dword: 0000 0000 is set, the user has a restricted menu.

Can boot NT without login?

There is an entry in the registry that allows automatic login to NT when logged in as administrator with password.

Can the PC interfaces be used in TwinCAT?

Yes, but not simultaneously with the operating system.

Can existing field bus I/O be linked? How?

Existing field bus systems can be linked easily: TwinCAT is linked to the field bus system by means of a master card for the field bus in the PC. TwinCAT currently supports a whole series of field buses and master cards.

Can position control and PLC and an operator control program be operated on one CPU?

Yes, TwinCAT organizes both task processing for position control and for PLC and Windows NT processing simultaneously. The power of PC processors permits processing of all tasks in one CPU and the system load display provides an indication of CPU loading by the PLC and axis control.

Do users have to bother about task synchronization and communication?

TwinCAT organizes the exchange of data between tasks consistently and both synchronously and asynchronously. The System Manager is the tool for setting the exchange of data between tasks.

How are real time programs debugged?

The TwinCAT IEC1131-3 compiler permits a powerful analysis of programs in 5 different programming languages with sequence control and variable analysis and a data trace is also available. It is possible to integrate C functions whose I/O data can be analyzed by variable analysis and a data trace.

Are there are hardware or software incompatibilities?

No hardware incompatibility between TwinCAT and compatible single-processor boards is currently known. Nevertheless, defective kernel mode drivers that have a detrimental influence on Windows NT may also have a detrimental influence on TwinCAT, one typical example being graphics card drivers. Kernel mode drivers can only be installed by the administrator. TwinCAT also offers a jitter display to identify such drivers.

When does the PLC execute a cold start and when does it execute a warm start?

As in the case of a conventional PLC, TwinCAT can execute a cold start with variable initialization or a warm start (stop -> start) without initializing variables. When the computer is switched on, the start program is loaded and is started automatically when the "Boot" option is selected. If variables are to be backed up, they can be created as remanent data.

Are dynamic variables available?

First, local variables can be created which are only available in one instance. PLCopen is considering the introduction of dynamic variables. Variable configuration for I/O addresses that have been specified completely is available. There are (still) no pointers.

What are VAR_IN_OUT variables?

VAR_IN_OUT variables are communicated as pointers and so there is no need to recopy data into and out of an instance. Located boolean variables cannot be passed on as VAR_IN_OUT.

A 5000 x 10 array has been created. Only around 16,000 values have been indicated in the status display?

The debugger system has data analysis limits, and the monitoring buffer size has been exceeded.

Are there limits to the size of variables, e.g. arrays?

There is a restriction to 64,000 bytes per variable, but this will be dispensed with in the future.

IEC1131 does not mention pointers. Are there nevertheless pointers? If no, what are the alternatives?

There are currently still no pointers. With Release 3.0 of TwinCAT, pointers will be available in ST. With the use of pointers, no guarantee can be pro-vided for correct operation of program compilers and users bear responsibility themselves.

Is there a possibility of structuring the validity of variables ?

Local and global variables can be created.

What language can be used for what purposes?

There is no clear approach, but recommendations can be made, i.e.:·

·for example, · The typical applications for language elements depend on the common language element usage patterns.

What programming language is the fastest in execution?

Test results were:
100,000 times And combination in STL = 76ms
100,000 times And combination in ST = 74ms
1,000 times FOR loop 0 to 99 in STL = 38ms
1,000 times FOR loop 0 to 99 in ST = 40ms
ST is slightly (but only negligibly) faster than STL because no additional code needs to be generated here for sequence control. Code generation is very good and it can be expected that no faster code can be generated with C. Moreover, code written in C cannot be analysed in the PLC control. SFC and LAD are not very much slower than ST.

Can variables of the PLC be accessed via OCX? What does such an access look like?

The variables can be accessed with a diverse range of mechanisms (synchronous, asynchronous or on change etc.). A collection of examples with TwinCAT can be installed. Here, all functions are shown by way of example (visual basic only).

Is every part of the programming system accessible via OCX?

OCX provides access to variables and methods of the servers. All variables (local and global) and all types (elementary and structured) are accessed, and all of these can also be accessed symbolically or by an address.

Is there a possibility of indexed editing of direct addresses (MW)?

Bits of a word or byte can be accessed. For example, %MW1 has the bits %MX1.0 to %MX1.15.

The data trace functions as a ring buffer with pre and post triggers. What can be set?

Currently, 500 or more entries are possible for each variable (depending on the variables to be traced). The ring buffer is no longer written when a trigger event has occurred. The buffer can then be read out and can be saved as a binary or ASCII file. During recording, no new variables can be traced, but the display can be changed over at any time (up to 20 variables, including 8 in the display). The shortest sampling time is the cycle time of the task, i.e. recording is cycle-synchronous. It is possible to define what percentage of the maximum possible data before and after the trigger event is to be in the ring buffer.

FB status display: How can an FB (multiply used) be displayed in the status for a special call?

You can analyze an instance of an FB under 'Project', 'Open instance'. TO do this, the cursor must be on FB in the object directory (left window). When the instance is selected, the call hierarchy is also displayed.

After what program changes is a cold / warm start necessary? When a cold start is run, VAR_RETAIN are deleted. How can setpoints in the PLC nevertheless be saved?

A cold start with new code generation is necessary after modifications in the task configuration or following a modification in the library manager (adding or deletion of libraries). Retain data is not saved until after the TwinCAT system has been stopped and is only loaded again when Twin-CAT is started (when a boot project is run). In the event of a cold start without a restart of the TwinCAT system, the system continues working with initial data. Setpoints can be withdrawn from the PLC by means of a watch list (better: recipe list) and can be loaded back into the PLC at the push of a key.

Are there partial compilations or does the whole program always have to be compiled?

When "Rebuild all" is selected, the complete project is recompiled. If an online exchange takes place, only the modified code is generated and loaded. After Rebuild all, online exchange is no longer possible. The code must be loaded completely, and the system must be cold started.

What happens if the PLC program does not finish within the set task time?

There is a system flag area in which the status of the system is represented. Violations of the load limit lead to a situation in which the PLC programs are not completed in good time before the next call: a cycle call is executed with a "delay". The cycle timeout is indicated by a system flag and a reaction can be programmed. A message can be generated for Windows applications.

The 'additional task 's' is located under the I/O configuration.

These tasks are used by customers who want to scan fieldbus I/O without using programmable logic control.

What does a time-optimized, calculable data exchange between TwinCAT systems and two PCs look like?

Data can be exchanged between two TwinCAT systems on two PCs using TCP/IP. The exchange takes place asynchronously with respect to the cycle and depends on the network load - a local area network is advantageous for this purpose. For TCP/IP links, there are the ADSWrite and ADSRead function blocks for the exchange of data. An exchange via a field bus is also possible, in which case one PC is the master and the other is the slave.

Can NT with TwinCAT on a multiprocessor system be split up over 4 processors?

This is basically possible but is currently not supported.

What precisely happens in the event of online changes? What program is changed?

This method allows changes while the PLC is running. In the event of on-line changes, the delta code - i.e. the last changes - is generated and this code is loaded into the controller (into the run time system) after login and is stored there. If you now wish to activate the changes, the code is "appended" at the end of the currently running cycle. As the code now exists twice, the memory is reorganized during the next cycles (garbage collection).