Terminal Diagnostics

If terminal diagnosis has been activated, then each channel of a complex terminals is examined to see whether bit 6 in the status has changed (exceptions are the KL6001, KL6011 and KL6021, where the relevant bit is bit 3), and whether the diagnostic bit of each channel of a digital terminal with diagnostics (KL12x2 or KL22x2) has changed. If that is the case, the existence of new diagnostic data is reported to the master, and two bytes of diagnostic information starting at byte 16 of each channel for which a diagnosis is pending are inserted (see Diagnostic data).

Terminal diagnosis can be activated in the UserPrmData:

Byte

Bit

Value

Description

7

1

1bin

Terminal diagnosis is active

Digital terminal diagnosis

By default, the diagnostic bits for the digital terminals that have diagnosis (KL12x2 and KL22x2) are transmitted cyclically in the process image. These terminals occupy 4 bits each in both the input and output data. If terminal diagnosis is active, then UserPrmData can be used to specify that only the I/O data for the digital terminals with diagnosis (KL12x2: 2 bit inputs, KL22x2: 4 bit outputs) is to be included in the cyclic process image transfer:

Byte

Bit

Value

Description

7

4

1bin

Diagnostic data of digital terminals not in the cyclic process image

Real-time capacity of the diagnostic data

When making use of terminal diagnosis, it should always be borne in mind that the diagnostic data always reaches the controller at least one cycle later, and that as a rule access also takes place through different mechanisms from those used for cyclic process data. This means that process data can already be faulty, but the controller program is only informed of this in the following cycle or the one after that. If the diagnostic bits of digital terminals with diagnostics or the status of complex terminals are mapped to the process image, the control program always has a consistent state between process and diagnostic data. The appropriate setting therefore depends on the way that the diagnosis is to be used. If it is only intended for diagnostic display, transmission within the cyclic process data is unnecessary, but if on the other hand consistency between the process data and the diagnostic data is desired, then the diagnostic data should be transmitted along with the cyclic process data.

Maximum diagnosis data length

If more diagnostic terminal data are active than specified in the maximum diagnostic data length, the ExtDiagOverflow bit of the standard diagnostic data is set. Since older controllers have trouble handling the maximum diagnostic data length of 64 bytes (default setting), the maximum diagnostic data length can be limited in UserPrmData:

Byte

Bit

Description

11

3-6

Maximum length of the diagnostic data. Allowed values: 16, 24, 32, 40, 48, 56, 64

It is only possible to set the maximum diagnostic data length in text form in the extended GSD file.