Specifications
Table Of Contents
- Coverpage
- Safety Instructions
- Revision History
- Contents
- Introduction
- 1 Outline
- 2 Explanation of Functions
- 3 Q-PLC Multi-CPU
- 4 Q Motion CPU
- 5 SFC Program
- 6 SV22 Servo Programs
- 6.1 Servo program
- 6.1.1 Servo program configuration
- 6.1.2 List of servo commands
- 6.1.3 Linear control
- 6.1.4 Circular interpolation control using auxiliary point designation
- 6.1.5 Circular interpolation control using radius designation
- 6.1.6 Circular interpolation control using center point designation
- 6.1.7 Fixed-dimension feed control
- 6.1.8 Speed control
- 6.1.9 Speed/position changeover control
- 6.1.10 Speed changeover control
- 6.1.11 Constant-speed control
- 6.1.12 Repeated control (for speed changeover control and uniform speed control)
- 6.1.13 Simultaneous start
- 6.1.14 Zero point return
- 6.1.15 Position follow-up control
- 6.1.16 High-speed oscillation control
- 6.1.17 Helical interpolation control with auxiliary point designated
- 6.1.18 Helical interpolation control with radius designated
- 6.1.19 Helical interpolation control with center point designated
- 6.1.20 Current value change
- 6.1 Servo program
- 7 Operation Control Program
- 8 Windows Personal Computer Operations
- 9 Basic Practice Using the SV22 Real Mode
- 10 Applied Practice with SV22 Real Mode
- 10.1 Details of practice
- 10.2 Q172CPU practice machine system configuration
- 10.3 Practice SFC programs
- 10.4 Writing to the motion CPU
- 10.5 Program for operation
- 10.5.1 JOG operation
- 10.5.2 Main routine SFC program (real mode operation)
- 10.5.3 Execution of servo program (motion control step)
- 10.5.4 Stopping
- 10.5.5 Error reset
- 10.5.6 Current value change
- 10.5.7 Speed change (CHGV)
- 10.5.8 Reading actual current value
- 10.5.9 Continuous positioning
- 10.5.10 M code function
- 10.5.11 Indirect setting of servo program address
- 10.6 Operating the practice machine
- 11 Practicing with the SV22 Virtual Mode
- 11.1 Mechanism program
- 11.2 Details of practice
- 11.3 Starting up SW3RN-CAMP and creating the cam
- 11.4 SFC program for virtual mode
- 11.5 Editing the mechanism
- 11.6 Writing to the motion CPU
- 11.7 Reading of sequence program from Q-PLC CPU
- 11.8 SFC program for practice
- 11.9 Practice machine operations
- 11.10 Exercise (Roller setting)
- Appendix

10 - 34
10.5.10 M code function
The M code No. ranges from 0 to 255, and is added to the servo program. When this
servo program is executed, the M code is set in the M code monitor register.
Since the M code is known when it is checked using the compare command in the
sequence program, pre-determined work can be executed.
(1) Example of servo program (with M code added)
Addition of M code "3"
REAL
AXIS
VELOCITY
M CODE
(2) Practice conditions
• When the M code '3' is detected, the pen is lowered.
• When the M code '0' is detected, the pen is raised.
• When the M code '4' is detected, the pen is raised/lowered repeatedly.
• The solenoid to move the pen is wired to the Y0B. (The pen is lowered when
the solenoid is excited.)
(3) SFC program
It is necessary to create a program to read the M code and to raise/lower the pen.
1) Read the M code.
SFC program No. 90
Reading of M code
M291 is turned ON with
M code '3' of axis 1
(D13) or axis 2 (D33).
M291 is turned OFF
with M code '0' of axis 1
and axis 2.
Moved
downward
with M code
'4' of axis 1.
M31
flickers at
an interval
of 0.5 sec.
G900 G902
(D13==K3)+(D33==K3) (D13==K0)*(D33==K0)
G904 G906
[Transition]
(D13==K4)*M2001*M2002 M31
F900 F901
SET M291 RST M291
F902 F903
[Operation control
step]
SET M291 RST M291










