Lenze c300 Bedienungsanleitung Seite 63

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 195
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 62
7 Programming with the »PLC Designer«
7.4 Controller c300/p300: Access to odd Controller addresses
63
Lenze · Controller | Parameter setting & programming · Reference Manual · DMS 1.5 EN · 04/2014 · TD17
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2. In the case of many functions/function blocks, a pointer is transferred to a byte array and then
the content of the byte array is for instance interpreted as DWORD. This requires manual
conversion before the data are used:
General information about the use of pointers can be found in the "Pointer" section.
PROGRAM PLC_PRG
PROGRAM PRG_Logic
VAR
mySDO_READ : CIA405.SDO_READ4;
aReadData : ARRAY [1..4] OF BYTE;
dwDword : DWORD;
END_VAR
mySDO_READ(NETWORK:= 1,
ENABLE:= TRUE,
TIMEOUT:= 10000,
CONFIRM=>,
ERROR=> ,
DEVICE:= 1001,
CHANNEL:= 1,
INDEX:= 16#5FE7,
SUBINDEX:= 0,
DATA=> aReadData,
DATALENGTH=>,
ERRORINFO=>);
// Manually create a DWORD from a Byte array
dwDword := aReadData[1]
+ 256 * aReadData[2]
+ 65536 * aReadData[3]
+ 16777216 * aReadData[4];
Seitenansicht 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 194 195

Kommentare zu diesen Handbüchern

Keine Kommentare