Herunterladen Diese Seite drucken

Umwandlungsoperationen; Genormte Umwandlungsoperationen - Siemens SIMATIC S7-200 Systemhandbuch

Vorschau ausblenden Andere Handbücher für SIMATIC S7-200:

Werbung

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) wan-
deln (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) wan-
delt 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-16 Gültige Operanden für die genormten Umwandlungsoperationen
Eingänge/
Datentyp
Ausgänge
IN
BYTE
WORD, INT
DINT
REAL
OUT
BYTE
WORD, INT
DINT, REAL
Operanden
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
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
S7-200 Befehlssatz
Kapitel 6
6
93

Quicklinks ausblenden:

Werbung

loading