EasyManua.ls Logo

Omron Sysmac NY-series - Page 297

Omron Sysmac NY-series
744 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Camin_EM := TRUE; // Periodic Mode
Camin_StMode :=_eMC_START_MODE#_mcRelativePosition;
Camin_StPos := LREAL#20.0; // Master axis absolute position for start point
Camin_MStDis := LREAL#40.0; // Master axis position to start cam operation
Camin_MSc := LREAL#1.0; // Master axis scaling
Camin_SSc := LREAL#1.0; // Slave axis scaling
Camin_MO := LREAL#0.0; // Master offset
Camin_SO := LREAL#0.0; // Slave offset
Camin_RT := _eMC_REFERENCE_TYPE#_mcCommand;// Position type selection
Camin_Dir := _eMC_DIRECTION#_mcNoDirection;// Direction
// MC_MoveVelocity parameters
Vel_Vel := LREAL#1000.0;
Vel_Acc := LREAL#100000.0;
Vel_Dec := LREAL#100000.0;
Vel_Dir :=_eMC_DIRECTION#_mcPositiveDirection;
// MC_CamOut parameters
Camout_Dec := DecRate2;
// Change InitFlag to TRUE after setting the input parameters.
InitFlag := TRUE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 1 is turned
ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN
Pwr1_En:=TRUE;
ELSE
Pwr1_En:=FALSE;
END_IF;
// If StartPg is TRUE and the Servo Drive is ready, the Servo for axis 2 is turned
ON.
// If the Servo Drive is not ready, the Servo is turned OFF.
IF (StartPg=TRUE)
AND (MC_Axis001.DrvStatus.Ready=TRUE) THEN
Pwr2_En:=TRUE;
ELSE
Pwr2_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 1 or axis 2, the error handler for
the device is executed.
3 Axis Command Instructions
3-209
NY-series Motion Control Instructions Reference Manual (W561)
MC_CamIn
3
Sample Programming 1

Table of Contents

Related product manuals