Siemens 6ES7 222-1HF22-0XA0 EM 222 Digital Output Module 6ES7 222-1HF22-0XA0 User Manual

Product codes
6ES7 222-1HF22-0XA0
Page of 538
S7-200 Befehlssatz
Kapitel 6
101
Umwandlungsoperationen
Genormte Umwandlungsoperationen
Numerische Umwandlungen
Die Operationen Byte in ganze Zahl wandeln (BTI), Ganze
Zahl in Byte wandeln (ITB), Ganze Zahl (16 Bit) in ganze
Zahl (32 Bit) wandeln (ITD), Ganze Zahl (32 Bit) in ganze
Zahl (16 Bit) wandeln (DTI), Ganze Zahl (32 Bit) in Realzahl
wandeln (DTR), BCD in ganze Zahl wandeln (BCDI) und
Ganze Zahl in BCD wandeln (IBCD) wandeln einen
Eingangswert IN in das angegebene Format um und
speichern den Ausgangswert in der von OUT angegebenen
Adresse im Speicher. Sie können beispielsweise eine
ganze Zahl (32 Bit) in eine Realzahl wandeln. Sie können
auch Ganzzahlen- und BCD-Formate umwandeln.
Zahl runden und Realzahl in ganze Zahl (32 Bit)
wandeln
Die Operation Zahl runden (ROUND) wandelt eine Realzahl
(IN) in einen ganzzahligen Wert (32 Bit) um und lädt das
gerundete Ergebnis in die von OUT angegebene Variable.
Die Operation Realzahl in ganze Zahl (32 Bit) wandeln
(TRUNC) wandelt eine Realzahl (IN) in einen ganzzahligen
Wert (32 Bit) um und lädt den ganzzahligen Teil des
Ergebnisses in die von OUT angegebene Variable.
Bitmuster für Sieben-Segment-Anzeige erzeugen
Mit der Operation Bitmuster für Sieben-Segment-Anzeige
erzeugen (SEG) können Sie ein Bitmuster erzeugen, das
die Segmente einer siebenteiligen Anzeige beleuchtet.
Tabelle 6-17 Gültige Operanden für die genormten Umwandlungsoperationen
Eingänge /
Ausgänge
Datentyp
Operanden
IN
BYTE
WORD, INT
DINT
REAL
EB, AB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Konstante
EW, AW, VW, MW, SMW, SW, T, Z, LW, AEW, AC, *VD, *LD, *AC,
Konstante
ED, AD, VD, MD, SMD, SD, LD, HC, AC, *VD, *LD, *AC, Konstante
ED, AD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Konstante
OUT
BYTE
WORD, INT
DINT, REAL
EB, AB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
EW, AW, VW, MW, SMW, SW, T, Z, LW, AC, *VD, *LD, *AC
ED, AD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC