ReadData
Reads data points from index StartIndex to StartIndex + NumberOfPoints - 1. The first valid index is 1.
Returns 0 on success or a non-zero error code.
Syntax
Definition:
METHOD ReadData : UDINT
VAR_INPUT
DestinationAddress : Pointer To MotionFunctionPoint;
NumberOfPoints : UDINT;
StartIndex : UDINT;
END_VAR
VAR_OUTPUT
NumberOfPointsRead : UDINT;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
DestinationAddress |
Pointer To MotionFunctionPoint |
Pointer to the destination buffer for the requested data points. |
|
NumberOfPoints |
UDINT |
Number of points to read. |
|
StartIndex |
UDINT |
Index of the first point to read. |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
NumberOfPointsRead |
UDINT |
The actual number of points read, which can be less than or equal to the specified NumberOfPoints. |
Return value
UDINT
Mögliche Fehlercodes
Für diesen Funktionsbaustein sind unter anderem die folgenden Werte für den Ausgang ErrorId möglich:
Fehler(Hex) | Fehler(Dez) | Fehlertyp | Beschreibung |
|---|---|---|---|
0x8120 | 33056 | Umgebung | Ungültige Objektkonfiguration (z.B. in der TwinCAT-3-Entwicklungsumgebung (XAE)). Die statische Konfiguration des Objekts (Parameter, Init-Werte, verlinkte Symbole) ist unvollständig oder unzulässig und das Objekt kann daher nicht in den Zielzustand übergehen. |
0x8198 | 33176 | Parameter | Ungültiger Index. Der angegebene Index existiert nicht oder ist ungültig. |
Eine Übersicht aller NC-Fehlercodes finden Sie hier: