Appendix 2 Sample Program; Motion Control Example By Motion Sfc Program - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Appendix 2
Sample programs using R32MTCPU are shown below.
The sample programs in this section are explained in the "Q series Motion compatible device assignment" device assignment
method.

Motion control example by Motion SFC program

The Motion SFC program composition example to execute motion control
This sample program example is described for every following function.
■Function list of sample program
No.
Item
1
Forced stop
2
Motion control
3
JOG mode
4
Manual pulse generator mode
5
Home position return mode
6
Programming operation mode
Sample Program
Description
When the forced stop input assigned to X0 is on, all axes turn on, and motion control is
executed. When the forced stop input turn off, servo amplifier is made to forced stop, and
motion control is suspended, and actual output (Y) turn off.
Motion control is executed according to the condition of X and X2 in each following mode.
• X2: OFF X1: OFF JOG mode
• X2: OFF X1: ON Manual pulse generator mode
• X2: ON X1: OFF Home position return mode
• X2: ON X1: ON Programming operation mode
The following JOG operation is executed when each signal of X3 to X6 is turned on.
• X3: 1 axis JOG forward rotation
• X4: 1 axis JOG reverse rotation
• X5: 2 axes JOG forward rotation
• X6: 2 axes JOG reverse rotation
The following the manual pulse generator operation is executed.
• Manual pulse generator operation of 1 axis is executed with the manual pulse generator P1.
• Manual pulse generator operation of 2 axes is executed with the manual pulse generator P1.
The following home position return is executed.
• When X3 is on, the home position return of 1 axis is executed.
• When X4 is on, the home position return of 2 axes is executed.
The following program operation is executed.
• When X3 detects OFF to ON, axis No.1 locates and 1000[ms] standing by, after the location
of axis No.2 is executed.
• When X4 turn on, axis No.1, 2 locates of the linear control and in-position check is executed,
after the location of axis No.2 is executed, the program stands by until No.1, 2 locates of the
linear control is executed at a double speed in the opposition direction and X4 turns off.
APPENDICES APPENDIX

Appendix 2 Sample Program

A
335

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents