-

Safety-related Data Type Conversion Functions

Note
Term definition: Standard = non-safety-related
The term "standard" always refers to non-safety-related items. Examples: a standard process data item is only read/written by a non-safety-related I/O device (i.e., a standard device). Standard variables/functions/FBs are non-safety-related data. The term "standard controller" designates the non-safety-related controller.

The safety-related 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 table 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 machine operation

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

Further Info
Refer to your system manual regarding information on the correct use of converters.

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
  • BYTE_TO_SAFEBYTE
  • INT_TO_SAFEINT
  • DINT_TO_SAFEDINT
  • DWORD_TO_SAFEDWORD
  • SINT_TO_SAFESINT
  • TIME_TO_SAFETIME
  • UINT_TO_SAFEUINT
  • UDINT_TO_SAFEUDINT
  • USINT_TO_SAFEUSINT
  • WORD_TO_SAFEWORD
  • SAFEBOOL_TO_BOOL
  • SAFEBYTE_TO_BYTE
  • SAFEINT_TO_INT
  • SAFEDINT_TO_DINT
  • SAFEDWORD_TO_DWORD
  • SAFESINT_TO_SINT
  • SAFETIME_TO_TIME
  • SAFEUINT_TO_UINT
  • SAFEUDINT_TO_UDINT
  • SAFEUSINT_TO_USINT
  • SAFEWORD_TO_WORD