Herunterladen Inhalt Inhalt Diese Seite drucken

Bosch Rexroth IndraMotion MTX 09VRS Projektierungshandbuch Seite 141

Vorschau ausblenden Andere Handbücher für Rexroth IndraMotion MTX 09VRS:
Inhaltsverzeichnis

Werbung

Projektierung | Rexroth IndraMotion MTX 09VRS
Electric Drives
| Bosch Rexroth AG
139/295
and Controls
Programmbausteine
(* Aufruf des Funktionsbausteins zum Lesen der Achsposi-
tion *)
LDR_TRIG_Inst.Q
ST startGetAxPos
LD startGetAxPos
ST GetAxesPos.Start
LD AxesPos
ADR
ST GetAxesPos.DestAddr
LD AxesPos
SIZEOF
ST GetAxesPos.Size
CAL GetAxesPos(Chan=Channel)
(* Merker setzen, dass die Funktion gestartet wurde *)
LD GetAxesPos.Active
ST activeGetAxPos
(* Return, solange die Funktion aktiv ist *)
RETC
(* Return, wenn die Funktion nicht gestartet wurde *)
LD activeGetAxPos
RETCN
R activeGetAxPos ( * Merker zu rücksetzen *)
(* Fehlerbehandlung, falls fehlerhaft *)
LD GetAxesPos.Error
JMPC error
(* Positionen fehlerfrei gelesen *)
(* Übernahme der 1. Achsposition *)
LD AxesPos[0]
ST AxPos_X
(* Übernahme der 3. Achsposition *)
LD AxesPos[3]
ST AxPos_Z
RET
Error:
(* Fehlerbehandlung *)
RET
Beispiel:
in Strukturierter Text (ST)
(* Steigende Flanke -> startGetAxPos *)
R_TRIG_Inst(CLK :=%IX40.2);
StartGetAxPos:=R_TRIG_Inst.Q;
(* Aufruf von GetAxesPos *)

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis