Umwandlung: BOOLPermanentlink

Die Operatoren BOOL_TO_<Typ> konvertieren einen booleschen Wert in die angegebenen Datentypen und geben einen typkonvertierten Wert zurück.

Aufrufsyntax: < BOOL_TO_<Typ> ( <Operand> )

Operand

Datentyp

Beschreibung

Variabel, wörtlich

BOOL

Operatoren: BOOL_TO_<Typ>

Betreiber

Beispiel

Rückgabewert

Beschreibung

BOOL_TO___UXINT

BOOL_TO___UXINT(TRUE)

1

__UXINT, __XINT, __XWORD

BOOL_TO___XINT

BOOL_TO___XINT(TRUE)

1

__UXINT, __XINT, __XWORD

BOOL_TO___XWORD

BOOL_TO___XWINT(TRUE)

1

__UXINT, __XINT, __XWORD

BOOL_TO_BIT

BOOL_TO___BIT(TRUE)

TRUE

BIT

BOOL_TO_BYTE

BOOL_TO_BYTE(TRUE)

1

Integer

BOOL_TO_DATE

BOOL_TO_DATE(TRUE)

D#1970-1-1

Das 0-te Bit ist gesetzt, hat aber keinen Einfluss auf die Anzeige.

Datentyp: DATUM

BOOL_TO_DINT

BOOL_TO_DINT(TRUE)

1

Integer

BOOL_TO_DT

BOOL_TO_DT(TRUE)

DT#1970-01-01-0:0:1

Datentyp: DATUM

BOOL_TO_DWORD

BOOL_TO_DWORD(TRUE)

1

Integer

BOOL_TO_INT

BOOL_TO_INT(TRUE)

1

Integer

BOOL_TO_LDATE

BOOL_TO_LDATE(TRUE)

LD#1970-01-01

Das 0-te Bit ist gesetzt, hat aber keinen Einfluss auf die Anzeige.

Datentyp: DATUM

BOOL_TO_LDT

BOOL_TO_LD(TRUE)

DT#1970-01-01-0:0:1

Datentyp: DATUM

BOOL_TO_LINT

BOOL_TO_LINT(TRUE)

1

Integer

BOOL_TO_LREAL

BOOL_TO_LREAL(TRUE)

1

REAL, LREAL

BOOL_TO_LTIME

BOOL_TO_LTIME(TRUE)

LTIME#1NS

Datentyp: DATUM

BOOL_TO_LTOD

BOOL_TO_LTOD(TRUE)

LTOD#0:0:0.000000001

Datentyp: DATUM

BOOL_TO_LWORD

BOOL_TO_LWORD(TRUE)

1

Integer

BOOL_TO_REAL

BOOL_TO_REAL(TRUE)

1

REAL, LREAL

BOOL_TO_SINT

BOOL_TO_SINT(TRUE)

1

Integer

BOOL_TO_STRING

BOOL_TO_STRING(TRUE)

'WAHR'

STRING

BOOL_TO_TIME

BOOL_TO_TIME(TRUE)

T#1ms

Datentyp: DATUM

BOOL_TO_TOD

BOOL_TO_TOD(TRUE)

TOD#0:0:0.001

Datentyp: DATUM

BOOL_TO_UDINT

BOOL_TO_UDINT(TRUE)

1

Integer

BOOL_TO_UINT

BOOL_TO_UINT(TRUE)

1

Integer

BOOL_TO_ULINT

BOOL_TO_ULINT(TRUE)

1

Integer

BOOL_TO_USINT

BOOL_TO_ULSINT(TRUE)

1

Integer

BOOL_TO_WORD

BOOL_TO_WORD(TRUE)

1

Integer

BOOL_TO_WSTRING

BOOL_TO_WSTRING(TRUE)

"WAHR"

WSTRING