Safety-related Type Converter Functions

 

NOTE:

Term definition: Standard = non-safety-related

The term "standard" always refers to non-safety-related items. Exam­ples: a standard process data item is only read/written by a non-safety-related I/O device (i.e., a standard device). Standard vari­ables/functions/FBs are non-safety-related data. The term "standard controller" designates the non-safety-related controller.

Type conversion functions convert a safety-related input value into a standard output value of the corresponding data type or vice versa.

NOTE:

If a standard signal is connected to a physical input, the data type of the corresponding global variable must be modified from safety-related to standard (e.g. from SAFEBOOL to BOOL) to rule out an incorrect use of the signal in the code. The same applies if a safety-related signal is used only as standard signal in the code. Modifying the data type can either be done in the appropriate variables worksheet or using the type converter functions.

The use of a "standard to safety-related" converter can result in an non-safety-related application if the converter is used at an incorrect code position.

WARNING

UNINTENDED EQUIPMENT OPERATION

Verify that the "standard to safety-related" converter is used correctly in the code.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

The name of a type conversion function implies the data types that have to be connected at the input and output of the function.

Example: a Boolean variable must be connected at the input of BOOL­_TO_SAFEBOOL. A SAFEBOOL data type is required at its output.

The following data type converters are available:

Direction: standard >> safety-related

Direction: safety-related >> standard

  • BOOL_TO_SAFEBOOL

  • SAFEBOOL_TO_BOOL

  • SAFEBYTE_TO_BYTE

  • SAFEINT_TO_INT

  • SAFEDINT_TO_DINT

  • SAFEDWORD_TO_D­WORD

  • SAFETIME_TO_TIME

  • SAFEWORD_TO_WORD