Herunterladen Inhalt Inhalt Diese Seite drucken

Siemens SIMOTION SCOUT Funktionshandbuch Seite 412

Vorschau ausblenden Andere Handbücher für SIMOTION SCOUT:
Inhaltsverzeichnis

Werbung

Programmierung allgemeiner Standardfunktionen
7.20 Anwendung einiger Systemfunktionen
BEGIN_SYNC(_MccSync);
(* Starte Achse lagegeregelt ('Move') *)
_MccRetDINT_1:=_move(axis:=Achse_1, velocityType:=DIRECT,
velocity:=v_blue, moveTimeOutType:=WITHOUT_TIME_LIMIT,
mergeMode:=IMMEDIATELY, nextCommand:=IMMEDIATELY,
commandId:=_MccCommand1, movingMode:=POSITION_CONTROLLED);
(* Starte Achse lagegeregelt ('Move') *)
_MccRetDINT_2:=_move(axis:=Achse_2, velocityType:=DIRECT,
velocity:=v_red, moveTimeOutType:=WITHOUT_TIME_LIMIT,
mergeMode:=IMMEDIATELY, nextCommand:=IMMEDIATELY,
ommandId:=_MccCommand2, movingMode:=POSITION_CONTROLLED);
(* Synchroner Start ('EndSync') *)
END_SYNC();
WAITFORCONDITION _MccMCC_1Condition1 DO
;
END_WAITFORCONDITION;
_MccRetDINT := _startSyncCommands(_MccSync);
// Start der UserInterruptTask
IF (_MccRetDINT <> 0) THEN
_startTask(UserInterruptTask_1);
END_IF;
_MccRetStructRetMotionCommandState := _getMotionStateOfAxisCommand
(Achse_1, _MccCommand1);
//Abfrage, ob beide Achsbefehle fertig sind
WHILE ((_MccRetStructRetMotionCommandState.functionResult = 0 )
AND (_MccRetStructRetMotionCommandState.motionCommandIdState <>
IN_CONSTANT_MOTION) AND
(_MccRetStructRetMotionCommandState.motionCommandIdState <>
NOT_EXISTENT)) DO
_MccRetDINT := _waitTime(T#0d_0h_0m_0s_0ms);
_MccRetStructRetMotionCommandState :=
_getMotionStateOfAxisCommand(Achse_1, _MccCommand1);
END_WHILE;
_MccRetStructRetMotionCommandState :=
_getMotionStateOfAxisCommand(Achse_2, _MccCommand2);
WHILE ((_MccRetStructRetMotionCommandState.functionResult = 0 )
AND (_MccRetStructRetMotionCommandState.motionCommandIdState <>
IN_CONSTANT_MOTION) AND
(_MccRetStructRetMotionCommandState.motionCommandIdState <>
NOT_EXISTENT)) DO
_MccRetDINT := _waitTime(T#0d_0h_0m_0s_0ms);
_MccRetStructRetMotionCommandState :=
_getMotionStateOfAxisCommand(Achse_2, _MccCommand2);
412
Basisfunktionen
Funktionshandbuch, 05/2009

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis