Mitsubishi Electric Melsec Q Series Programming Manual

Mitsubishi Electric Melsec Q Series Programming Manual

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

Q173D(S)CPU/Q172D(S)CPU
Motion Controller (SV13/SV22)
Programming Manual (Motion SFC)
-Q172DCPU
-Q173DCPU
-Q172DCPU-S1
-Q173DCPU-S1
-Q172DSCPU
-Q173DSCPU

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric Melsec Q Series

  • Page 1 Q173D(S)CPU/Q172D(S)CPU Motion Controller (SV13/SV22) Programming Manual (Motion SFC) -Q172DCPU -Q173DCPU -Q172DCPU-S1 -Q173DCPU-S1 -Q172DSCPU -Q173DSCPU...
  • Page 2: Safety Precautions

    SAFETY PRECAUTIONS (Please read these instructions before using this equipment.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly. These precautions apply only to this product. Refer to the Q173D(S)CPU/Q172D(S)CPU Users manual for a description of the Motion controller safety precautions.
  • Page 3 For Safe Operations 1. Prevention of electric shocks DANGER Never open the front case or terminal covers while the power is ON or the unit is running, as this may lead to electric shocks. Never run the unit with the front case or terminal cover removed. The high voltage terminal and charged sections will be exposed and may lead to electric shocks.
  • Page 4 3. For injury prevention CAUTION Do not apply a voltage other than that specified in the instruction manual on any terminal. Doing so may lead to destruction or damage. Do not mistake the terminal connections, as this may lead to destruction or damage. Do not mistake the polarity ( + / - ), as this may lead to destruction or damage.
  • Page 5 CAUTION The dynamic brakes must be used only on errors that cause the forced stop, emergency stop, or servo OFF. These brakes must not be used for normal braking. The brakes (electromagnetic brakes) assembled into the servo motor are for holding applications, and must not be used for normal braking.
  • Page 6 CAUTION Set the servo amplifier capacity and type parameters to values that are compatible with the system application. The protective functions may not function if the settings are incorrect. Use the program commands for the program with the conditions specified in the instruction manual.
  • Page 7 CAUTION The Motion controller, servo amplifier and servo motor are precision machines, so do not drop or apply strong impacts on them. Securely fix the Motion controller, servo amplifier and servo motor to the machine according to the instruction manual. If the fixing is insufficient, these may come off during operation. Always install the servo motor with reduction gears in the designated direction.
  • Page 8 (4) Wiring CAUTION Correctly and securely wire the wires. Reconfirm the connections for mistakes and the terminal screws for tightness after wiring. Failing to do so may lead to run away of the servo motor. After wiring, install the protective covers such as the terminal covers to the original positions. Do not install a phase advancing capacitor, surge absorber or radio noise filter (option FR-BIF) on the output side of the servo amplifier.
  • Page 9 (6) Usage methods CAUTION Immediately turn OFF the power if smoke, abnormal sounds or odors are emitted from the Motion controller, servo amplifier or servo motor. Always execute a test operation before starting actual operations after the program or parameters have been changed or after maintenance and inspection. Do not attempt to disassemble and repair the units excluding a qualified technician whom our company recognized.
  • Page 10 (8) Maintenance, inspection and part replacement CAUTION Perform the daily and periodic inspections according to the instruction manual. Perform maintenance and inspection after backing up the program and parameters for the Motion controller and servo amplifier. Do not place fingers or hands in the clearance when opening or closing any opening. Periodically replace consumable parts such as batteries according to the instruction manual.
  • Page 11 When considering this product for operation in special applications such as machinery or systems used in passenger transportation, medical, aerospace, atomic power, electric power, or submarine repeating applications, please contact your nearest Mitsubishi Electric sales representative. Although this product was manufactured under conditions of strict quality control, you are strongly advised to install safety devices to forestall serious accidents when it is used in facilities where a breakdown in the product is likely to cause a serious accident.
  • Page 12: Revisions

    REVISIONS The manual number is given on the bottom left of the back cover. Print Date Manual Number Revision Sep., 2007 IB(NA)-0300135-A First edition Nov., 2009 IB(NA)-0300135-B [Additional model] MR-J3W- B, MR-J3- B-RJ080W, MR-J3- BS [Additional correction/partial correction] Safety precautions, About Manuals, Restrictions by the software's version or serial number, Advanced S-curve acceleration/deceleration, Error code list, Warranty Sep., 2011...
  • Page 13 This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 14: Table Of Contents

    INTRODUCTION Thank you for choosing the Mitsubishi Electric Motion controller Q173D(S)CPU/Q172D(S)CPU. Before using the equipment, please read this manual carefully to develop full familiarity with the functions and performance of the Motion controller you have purchased, so as to ensure correct use.
  • Page 15 3.2.7 Torque limit value change request instruction from the PLC CPU to the Motion CPU: D(P).CHGT (PLC instruction: D(P).CHGT ) .................. 3-45 3.2.8 Torque limit value individual change request instruction from the PLC CPU to the Motion CPU: D(P).CHGT2 (PLC instruction: D(P).CHGT2 ) ................3-50 3.2.9 Write device data of the self CPU to the device of other CPU: D(P).DDWR (PLC instruction: D(P).DDWR ) ................
  • Page 16 5.5.3 Bit logical OR : | ..........................5-22 5.5.4 Bit exclusive logical OR : ^ ........................ 5-23 5.5.5 Bit right shift : >> ..........................5-24 5.5.6 Bit left shift : << ..........................5-25 5.5.7 Sign inversion (Complement of 2) : ....................
  • Page 17 5.11.5 More than : > ........................... 5-70 5.11.6 More than or equal to : >= ....................... 5-71 5.12 Motion-Dedicated Functions ........................5-72 5.12.1 Speed change request : CHGV ...................... 5-72 5.12.2 Command generation axis speed change request : CHGVS (SV22 advanced synchronous control only) .................. 5-78 5.12.3 Torque limit value change request : CHGT ..................
  • Page 18 6. TRANSITION PROGRAMS 6- 1 to 6- 2 6.1 Transition Programs ..........................6- 1 7. MOTION CONTROL PROGRAMS 7- 1 to 7-22 7.1 Servo Instruction List ..........................7- 1 7.2 Servo Motor/Virtual Servo Motor Shaft/Command Generation Axis Current Value Change ....7-14 7.3 Synchronous Encoder Shaft Current Value Change Control (SV22 virtual mode only) .......
  • Page 19 12. ERROR CODE LISTS 12- 1 to 12-24 12.1 Confirming Error Code ......................... 12- 1 12.2 Motion Error Related Devices ......................12- 2 12.3 Motion SFC Error Code List ........................ 12- 7 12.4 Motion SFC Parameter Errors ......................12-22 12.5 Vision System Errors ........................... 12-23 APPENDICES APP- 1 to APP-62 APPENDIX 1 Processing Times .......................
  • Page 20: About Manuals

    About Manuals The following manuals are also related to this product. When necessary, order them by quoting the details in the tables below. Related Manuals (1) Motion controller Manual Number Manual Name (Model Code) Q173D(S)CPU/Q172D(S)CPU Motion controller User's Manual This manual explains specifications of the Motion CPU modules, Q172DLX Servo external signal interface IB-0300133 module, Q172DEX Synchronous encoder interface module, Q173DPX Manual pulse generator interface (1XB927)
  • Page 21 (2) PLC Manual Number Manual Name (Model Code) QCPU User's Manual (Hardware Design, Maintenance and Inspection) This manual explains the specifications of the QCPU modules, power supply modules, base units, SH-080483ENG (13JR73) extension cables, memory card battery, and the maintenance/inspection for the system, trouble shooting, error codes and others.
  • Page 22 (3) Servo amplifier Manual Number Manual Name (Model Code) SSCNET /H Interface AC Servo MR-J4-_B_(-RJ) Servo amplifier Instruction Manual SH-030106 This manual explains the I/O signals, parts names, parameters, start-up procedure and others for AC (1CW805) Servo MR-J4-_B_(-RJ) Servo amplifier. SSCNET /H Interface Multi-axis AC Servo MR-J4W2-_B/MR-J4W3-_B/MR-J4W2-0303B6 Servo amplifier Instruction Manual SH-030105...
  • Page 23 MEMO A - 22...
  • Page 24: Overview

    1 OVERVIEW 1. OVERVIEW 1.1 Overview This programming manual describes the Motion SFC program of the operating system software "SW8DNC-SV13Q ", "SW8DNC-SV22Q " for Motion CPU module (Q173D(S)CPU/Q172D(S)CPU). In this manual, the following abbreviations are used. Generic term/Abbreviation Description Q173D(S)CPU/Q172D(S)CPU or Q173DSCPU/Q172DSCPU/Q173DCPU/Q172DCPU/Q173DCPU-S1/ Motion CPU (module) Q172DCPU-S1 Motion CPU module...
  • Page 25 1 OVERVIEW Generic term/Abbreviation Description (Note-3) SSCNET (/H) General name for SSCNET /H, SSCNET General name for "system using the servo motor and servo amplifier for absolute Absolute position system position" Battery holder unit Battery holder unit (Q170DBATC) General name for module that has a function other than input or output such as Intelligent function module A/D converter module and D/A converter module.
  • Page 26: Features

    1 OVERVIEW 1.2 Features The Motion CPU and Motion SFC program have the following features. 1.2.1 Features of Motion SFC programs (1) Since a program intelligible for anyone can be created in flow chart form by making a sequence of machine operation correspond to each operation step, maintenance nature improves.
  • Page 27: Performance Specifications

    1 OVERVIEW 1.2.2 Performance specifications (1) Basic specifications of Q173DCPU/Q172DCPU (a) Motion control specifications Item Q173DSCPU Q172DSCPU Q173DCPU(-S1) Q172DCPU(-S1) Number of control axes Up to 32 axes Up to 16 axes Up to 32 axes Up to 8 axes 0.22ms/ 1 to 4 axes 0.22ms/ 1 to 4 axes 0.44ms/ 1 to 6 axes 0.44ms/ 5 to 10 axes...
  • Page 28 1 OVERVIEW Motion control specifications (continued) Item Q173DSCPU Q172DSCPU Q173DCPU(-S1) Q172DCPU(-S1) Number of output points 32 points SV13 Watch data: Motion control data/Word device Virtual mode switching method: Limit switch output Number of output points 32 points function Advanced synchronous control method: Number of output points 32 points SV22 Number of output points 64 points ...
  • Page 29 1 OVERVIEW Motion control specifications (continued) Item Q173DSCPU Q172DSCPU Q173DCPU(-S1) Q172DCPU(-S1) Q172DLX 4 modules usable 2 modules usable 4 modules usable 1 module usable Number of Q172DEX 6 modules usable 4 modules usable Motion related 3 modules usable (Note-11) modules 4 modules usable Q173DPX (Note-11)
  • Page 30 1 OVERVIEW (b) Motion SFC Performance Specifications Item Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) Code total (Motion SFC chart + Operation control + 652k bytes 543k bytes Motion SFC program Transition) capacity Text total 668k bytes 484k bytes (Operation control + Transition) Number of Motion SFC programs 256 (No.0 to 255) Motion SFC chart size/program Up to 64k bytes (Included Motion SFC chart comments)
  • Page 31: Operation Control/Transition Control Specifications

    1 OVERVIEW 1.2.3 Operation control/transition control specifications (1) Table of the operation control/transition control specifications Item Specifications Remark Returns a numeric result. Calculation expression Expressions for calculating indirectly specified data using constants and D100+1,SIN(D100), etc. word devices. Bit conditional Returns a true or false result. M0, !M0, M1*M0, Expression expression...
  • Page 32 1 OVERVIEW Table of the operation control/transition control specification (continued) Item Specifications Remark 16-bit integer type (signed) -32768 to 32767 (None) K10, D100, etc. 16-bit integer type (unsigned) 0 to 65535 32-bit integer type (signed) -2147483648 to 2147483647 Data type 2000000000, W100L, etc.
  • Page 33 1 OVERVIEW (2) Table of the operation control/transition instruction Usable step transition's Section of Classification Symbol Function Format Basic steps conditional reference F/FS expression Substitution (D)=(S) — 5.4.1 Addition (S1)+(S2) — 5.4.2 Subtraction (S1)-(S2) — 5.4.3 Binary operation Multiplication (S1)*(S2) —...
  • Page 34 1 OVERVIEW Table of the operation control/transition instruction (continued) Usable step transition's Section of Classification Symbol Function Format Basic steps F/FS conditional reference expression (None) Logical acknowledgment (Conditional expression) 5.10.1 Logical negation !(Conditional expression) 5.10.2 (Conditional expression) * Logical operation Logical AND 5.10.3 (conditional expression)
  • Page 35 1 OVERVIEW Table of the operation control/transition instruction (continued) Usable step transition's Section of Classification Symbol Function Format Basic steps F/FS conditional reference expression IF(S) IF - ELSE - Conditional branch control ELSE ELSE : 3 — 5.17.1 IEND IEND : 1 IEND SELECT CASE(S1)
  • Page 36: Positioning Dedicated Devices

    1 OVERVIEW 1.2.4 Positioning dedicated devices (1) Positioning dedicated devices The following section describes the positioning dedicated devices. The following device range is valid in the Motion. Item Q173DSCPU Q172DSCPU Q173DCPU(-S1) Q172DCPU(-S1) Number of control axes 32 axes 16 axes 32 axes 8 axes Refer to the "Q173D(S)CPU/Q172D(S)CPU Motion controller (SV13/SV22)
  • Page 37 1 OVERVIEW • Overall configuration (Continued) SV13 SV22 Virtual mode switching method Advanced synchronous control method Device Purpose Device Device Purpose Purpose (Note-1) M4688 M4688 Unusable M4688 (112 points) M4800 Virtual servo motor axis command (Note-1,2) signal (20 points 32 axes) User device (Mechanical system setting axis User device...
  • Page 38 1 OVERVIEW • Overall configuration (Continued) SV13 SV22 Virtual mode switching method Advanced synchronous control method Device Purpose Device Device Purpose Purpose M12064 M12064 M12064 System area System area Unusable (224 points) (224 points) (224 points) M12287 M12287 M12287 (Note-1): It can be used as a user device in the SV22 real mode only. (Note-2): Do not set the M4000 to M5487 as a latch range in the virtual mode.
  • Page 39 1 OVERVIEW 1) Table of the axis statuses (SV13/SV22) Device No. Signal name Device No. Signal name M2400 M2720 Axis 1 status Axis 17 status M2419 M2739 M2420 M2740 Axis 2 status Axis 18 status M2439 M2759 M2440 M2760 Axis 3 status Axis 19 status M2459 M2779...
  • Page 40 1 OVERVIEW • Details of each axis Device No. Signal name M2400+20n Positioning start complete M2401+20n Positioning complete M2402+20n In-position M2403+20n Command in-position M2404+20n Speed controlling M2405+20n Speed/position switching latch M2406+20n Zero pass M2407+20n Error detection M2408+20n Servo error detection M2409+20n Home position return request M2410+20n...
  • Page 41 1 OVERVIEW 2) Table of the axis command signals (SV13/SV22) Device No. Signal name Device No. Signal name M3200 M3520 Axis 1 command signal Axis 17 command signal M3219 M3539 M3220 M3540 Axis 2 command signal Axis 18 command signal M3239 M3559 M3240...
  • Page 42 1 OVERVIEW • Details of each axis Device No. SV13 SV22 M3200+20n Stop command Stop command M3201+20n Rapid stop command Rapid stop command M3202+20n Forward rotation JOG start command Forward rotation JOG start command M3203+20n Reverse rotation JOG start command Reverse rotation JOG start command M3204+20n Complete signal OFF command...
  • Page 43 1 OVERVIEW 3) Table of the virtual servo motor axis statuses (SV22 virtual mode only) Device No. Signal name Device No. Signal name M4000 M4320 Axis 1 status Axis 17 status M4019 M4339 M4020 M4340 Axis 2 status Axis 18 status M4039 M4359 M4040...
  • Page 44 1 OVERVIEW • Details of each axis Device No. Signal name M4000+20n Positioning start complete M4001+20n Positioning complete M4002+20n Unusable M4003+20n Command in-position M4004+20n Speed controlling M4005+20n Unusable M4006+20n M4007+20n Error detection M4008+20n M4009+20n M4010+20n M4011+20n M4012+20n M4013+20n Unusable M4014+20n M4015+20n M4016+20n M4017+20n...
  • Page 45 1 OVERVIEW 4) Table of the virtual servo motor axis command signals (SV22 virtual mode only) Device No. Signal name Device No. Signal name M4800 M5120 Axis 1 command signal Axis 17 command signal M4819 M5139 M4820 M5140 Axis 2 command signal Axis 18 command signal M4839 M5159...
  • Page 46 1 OVERVIEW • Details of each axis Device No. Signal name M4800+20n Stop command M4801+20n Rapid stop command M4802+20n Forward rotation JOG start command M4803+20n Reverse rotation JOG start command M4804+20n Complete signal OFF command M4805+20n Unusable M4806+20n M4807+20n Error reset command M4808+20n Unusable M4809+20n...
  • Page 47 1 OVERVIEW 5) Table of the synchronous encoder axis statuses (SV22 virtual mode only) Device No. Signal name Device No. Signal name M4640 Error detection M4664 Error detection M4641 External signal TREN M4665 External signal TREN Axis 1 Virtual mode continuation Axis 7 Virtual mode continuation M4642...
  • Page 48 1 OVERVIEW 6) Table of the synchronous encoder axis command signals (SV22 virtual mode only) Device No. Signal name Device No. Signal name M5440 Error reset M5464 Error reset M5441 M5465 Axis 1 Axis 7 M5442 Unusable M5466 Unusable M5443 M5467 M5444 Error reset...
  • Page 49 1 OVERVIEW 7) Table of the command generation axis statuses Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name M9800 M10120 Axis 1 status Axis 17 status M9819 M10139 M9820 M10140 Axis 2 status Axis 18 status M9839 M10159 M9840...
  • Page 50 1 OVERVIEW • Details of each axis Device No. Symbol Signal name M9800+20n St.340 Command generation axis positioning start complete M9801+20n St.341 Command generation axis positioning complete M9802+20n — Unusable M9803+20n St.342 Command generation axis command in-position M9804+20n St.343 Command generation axis speed controlling M9805+20n —...
  • Page 51 1 OVERVIEW 8) Table of the command generation axis command signals Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name M10960 M11280 Axis 1 command signal Axis 17 command signal M10979 M11299 M10980 M11300 Axis 2 command signal Axis 18 command signal M10999 M11319...
  • Page 52 1 OVERVIEW • Details of each axis Device No. Symbol Signal name M10960+20n Rq.341 Command generation axis stop command M10961+20n Rq.342 Command generation axis rapid stop command Command generation axis forward rotation JOG start M10962+20n Rq.343 command Command generation axis reverse rotation JOG start M10963+20n Rq.344 command...
  • Page 53 1 OVERVIEW 9) Table of the synchronous encoder axis statuses Ver.! (SV22 advanced synchronous control only) Device No. Signal name M10440 Axis 1 status M10449 M10450 Axis 2 status M10459 M10460 Axis 3 status M10469 M10470 Axis 4 status M10479 M10480 Axis 5 status M10489...
  • Page 54 1 OVERVIEW • Details of each axis Device No. Symbol Signal name M10440+10n St.320 Synchronous encoder axis setting valid flag M10441+10n St.321 Synchronous encoder axis connecting valid flag M10442+10n St.322 Synchronous encoder axis counter enable flag Synchronous encoder axis current value setting request M10443+10n St.323 flag...
  • Page 55 1 OVERVIEW 10) Table of the synchronous encoder axis command signal Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name Device No. Symbol Signal name Synchronous encoder axis error Synchronous encoder axis error M11600 Rq.323 M11624 Rq.323 reset reset Synchronous encoder axis Synchronous encoder axis...
  • Page 56 1 OVERVIEW MEMO 1 - 33...
  • Page 57 1 OVERVIEW 11) Table of the output axis statuses Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name M10560 M10720 Axis 1 status Axis 17 status M10569 M10729 M10570 M10730 Axis 2 status Axis 18 status M10579 M10739 M10580...
  • Page 58 1 OVERVIEW • Details of each axis Device No. Symbol Signal name M10560+10n St.420 Main shaft clutch ON/OFF status M10561+10n St.421 Main shaft clutch smoothing status M10562+10n St.423 Auxiliary shaft clutch ON/OFF status M10563+10n St.424 Auxiliary shaft clutch smoothing status M10564+10n —...
  • Page 59 1 OVERVIEW 12) Table of the output axis command signals Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name M11680 M11840 Axis 1 command signal Axis 17 command signal M11689 M11849 M11690 M11850 Axis 2 command signal Axis 18 command signal M11699 M11859...
  • Page 60 1 OVERVIEW • Details of each axis Device No. Symbol Signal name M11680+10n Rq.400 Main shaft clutch command M11681+10n Rq.401 Main shaft clutch control invalid command M11682+10n Rq.402 Main shaft clutch forced OFF command M11683+10n — Unusable M11684+10n Rq.403 Auxiliary shaft clutch command M11685+10n Rq.404 Auxiliary shaft clutch control invalid command...
  • Page 61 1 OVERVIEW 13) Table of the synchronous control signals Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name M10880 Axis 1 M10881 Axis 2 M10882 Axis 3 M10883 Axis 4 M10884 Axis 5 M10885 Axis 6 M10886 Axis 7 M10887 Axis 8 M10888...
  • Page 62 1 OVERVIEW 14) Table of the synchronous analysis complete signals Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name M10912 Axis 1 M10913 Axis 2 M10914 Axis 3 M10915 Axis 4 M10916 Axis 5 M10917 Axis 6 M10918 Axis 7 M10919 Axis 8...
  • Page 63 1 OVERVIEW 15) Table of the synchronous control start signals Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name M12000 Axis 1 M12001 Axis 2 M12002 Axis 3 M12003 Axis 4 M12004 Axis 5 M12005 Axis 6 M12006 Axis 7 M12007 Axis 8...
  • Page 64 1 OVERVIEW 16) Table of the synchronous analysis request signals Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name M12032 Axis 1 M12033 Axis 2 M12034 Axis 3 M12035 Axis 4 M12036 Axis 5 M12037 Axis 6 M12038 Axis 7 M12039 Axis 8...
  • Page 65 1 OVERVIEW 17) Table of the common devices (SV13/SV22) SV13 SV22 Refresh Fetch Signal Remark (Note-7) cycle cycle direction Device No. Signal name Device No. Signal name Command Main cycle M3072 M2000 PLC ready flag M2000 PLC ready flag signal M2001 Axis1 M2001...
  • Page 66 1 OVERVIEW Table of the common devices (SV13/SV22) (continued) SV13 SV22 Refresh Fetch Signal Remark (Note-7) cycle cycle direction Device No. Signal name Device No. Signal name M2093 M2093 Unusable — — — (8 points) M2100 Synchronous M2101 Axis 1 encoder current Status signal Unusable...
  • Page 67 1 OVERVIEW 18) Table of the common devices (Command signal) (SV13/SV22) Remark Device No. Signal name Refresh cycle Fetch cycle Signal direction (Note-1), (Note-2) Main cycle M3072 PLC ready flag M2000 M3073 Speed switching point specified flag At start M2040 Operation cycle M3074 All axes servo ON command...
  • Page 68 1 OVERVIEW MEMO 1 - 45...
  • Page 69 1 OVERVIEW (b) Table of the data registers • Overall configuration SV13 SV22 Virtual mode switching method Advanced synchronous control method Device Purpose Device Device Purpose Purpose Axis monitor device Axis monitor device (20 points 32 axes) Axis monitor device (20 points 32 axes) Real mode : Each axis (20 points 32 axes)
  • Page 70 1 OVERVIEW • Overall configuration (Continued) SV13 SV22 Virtual mode switching method Advanced synchronous control method Device Purpose Device Device Purpose Purpose D14600 Servo input axis control device Ver.! (2 points 32 axes) D14664 Unusable Ver.! (16 points) D14680 Command generation axis control device Ver.! (4 points 32 axes)
  • Page 71 1 OVERVIEW 1) Table of each axis monitor devices (SV13/SV22) Device No. Signal name Device No. Signal name D320 Axis 1 monitor device Axis 17 monitor device D339 D340 Axis 2 monitor device Axis 18 monitor device D359 D360 Axis 3 monitor device Axis 19 monitor device D379 D380...
  • Page 72 1 OVERVIEW • Details of each axis Signal name SV13/SV22 real mode/ Device No. Signal direction SV22 advanced synchronous SV22 virtual mode control D0+20n Feed current value/roller cycle Feed current value D1+20n speed D2+20n Real current value Real current value D3+20n D4+20n Deviation counter value...
  • Page 73 1 OVERVIEW 2) Table of the control change registers (SV13/SV22) Device No. Signal name Device No. Signal name D640 Axis 1 JOG speed setting D672 Axis 17 JOG speed setting D641 register D673 register D642 Axis 2 JOG speed setting D674 Axis 18 JOG speed setting D643...
  • Page 74 1 OVERVIEW MEMO 1 - 51...
  • Page 75 1 OVERVIEW 3) Table of the virtual servo motor axis monitor devices (SV22 virtual mode only) Device No. Signal name Device No. Signal name D800 D960 Axis 1 monitor device Axis 17 monitor device D809 D969 D810 D970 Axis 2 monitor device Axis 18 monitor device D819 D979...
  • Page 76 1 OVERVIEW • Details of each axis Device No. Signal name D800+10n Feed current value D801+10n D802+10n Minor error code D803+10n Major error code D804+10n Execute program No. D805+10n M-code D806+10n Current value after virtual servo motor axis main shaft's D807+10n differential gear D808+10n...
  • Page 77 1 OVERVIEW 4) Table of the synchronous encoder axis monitor devices (SV22 virtual mode only) Device No. Signal name D1120 Axis 1 monitor device D1129 D1130 Axis 2 monitor device D1139 D1140 Axis 3 monitor device D1149 D1150 Axis 4 monitor device D1159 D1160 Axis 5 monitor device...
  • Page 78 1 OVERVIEW • Details of each axis Device No. Signal name D1120+10n Current value D1121+10n D1122+10n Minor error code D1123+10n Major error code D1124+10n Unusable D1125+10n D1126+10n Current value after synchronous encoder axis main D1127+10n shaft's differential gear D1128+10n Error search output axis No. D1129+10n Unusable POINT...
  • Page 79 1 OVERVIEW 5) Table of the cam axis monitor devices (SV22 virtual mode only) Device No. Signal name Device No. Signal name D1240 D1400 Axis 1 monitor device Axis 17 monitor device D1249 D1409 D1250 D1410 Axis 2 monitor device Axis 18 monitor device D1259 D1419...
  • Page 80 1 OVERVIEW • Details of each axis Device No. Signal name D1240+10n Unusable D1241+10n Execute cam No. D1242+10n Execute stroke amount D1243+10n D1244+10n Current value within 1 cam shaft revolution D1245+10n D1246+10n D1247+10n Unusable D1248+10n D1249+10n POINT (1) "n" in the above device No. shows the numerical value which correspond to axis No.
  • Page 81 1 OVERVIEW 6) Table of the servo input axis monitor devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name D12280 D12440 Axis 1 monitor device Axis 17 monitor device D12289 D12449 D12290 D12450 Axis 2 monitor device Axis 18 monitor device D12299 D12459...
  • Page 82 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D12280+10n Md.300 Servo input axis current value D12281+10n D12282+10n Md.301 Servo input axis speed D12283+10n D12284+10n Md.302 Servo input axis phase compensation amount D12285+10n D12286+10n Md.303 Servo input axis rotation direction restriction amount D12287+10n D12288+10n —...
  • Page 83 1 OVERVIEW 7) Table of the servo input axis control devices Ver.! (SV22 advanced synchronous control only) Device No. Symbol Signal name Device No. Symbol Signal name D14600 Axis 1 servo input axis phase D14632 Axis 17 servo input axis phase D14601 compensation advance time D14633...
  • Page 84 1 OVERVIEW MEMO 1 - 61...
  • Page 85 1 OVERVIEW 8) Table of the command generation axis monitor devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name D12600 D12920 Axis 1 monitor device Axis 17 monitor device D12619 D12939 D12620 D12940 Axis 2 monitor device Axis 18 monitor device D12639 D12959...
  • Page 86 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D12600+20n Md.340 Command generation axis feed current value D12601+20n D12602+20n Md.341 Command generation axis minor error code D12603+20n Md.342 Command generation axis major error code D12604+20n Md.343 Command generation axis execute program No. D12605+20n Md.344 Command generation axis M-code...
  • Page 87 1 OVERVIEW 9) Table of the command generation axis control devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name D14680 D14744 Axis 1 control device Axis 17 control device D14683 D14747 D14684 D14748 Axis 2 control device Axis 18 control device D14687 D14751...
  • Page 88 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D14680+4n Cd.340 Command generation axis JOG speed setting D14681+4n Command generation axis JOG operation parameter D14682+4n Pr.348 block setting D14683+4n — Unusable POINT (1) "n" in the above device No. shows the numerical value which correspond to axis •...
  • Page 89 1 OVERVIEW 10) Table of the synchronous encoder axis monitor devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name D13240 Axis 1 monitor device D13259 D13260 Axis 2 monitor device D13279 D13280 Axis 3 monitor device D13299 D13300 Axis 4 monitor device D13319 D13320...
  • Page 90 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D13240+20n Md.320 Synchronous encoder axis current value D13241+20n D13242+20n Md.321 Synchronous encoder axis current value per cycle D13243+20n D13244+20n Md.322 Synchronous encoder axis speed D13245+20n D13246+20n Synchronous encoder axis phase compensation Md.323 D13247+20n amount...
  • Page 91 1 OVERVIEW 11) Table of the synchronous encoder axis control devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name D14820 Axis 1 control device D14829 D14830 Axis 2 control device D14839 D14840 Axis 3 control device D14849 D14850 Axis 4 control device D14859 D14860...
  • Page 92 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D14820+10n Synchronous encoder axis phase compensation Pr.326 D14821+10n advance time D14822+10n Cd.320 Synchronous encoder axis control start condition D14823+10n Cd.321 Synchronous encoder axis control method D14824+10n Synchronous encoder axis current value setting Cd.322 D14825+10n address...
  • Page 93 1 OVERVIEW 12) Table of the output axis monitor devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name D13600 D14080 Axis 1 monitor device Axis 17 monitor device D13629 D14109 D13630 D14110 Axis 2 monitor device Axis 18 monitor device D13659 D14139...
  • Page 94 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D13600+30n Md.400 Current value after composite main shaft gear D13601+30n D13602+30n Md.401 Current value per cycle after main shaft gear D13603+30n D13604+30n Md.402 Current value per cycle after auxiliary shaft gear D13605+30n D13606+30n Md.422...
  • Page 95 1 OVERVIEW 13) Table of the command generation axis control devices Ver.! (SV22 advanced synchronous control only) Device No. Signal name Device No. Signal name D15000 D17400 Axis 1 control device Axis 17 control device D15149 D17549 D15150 D17550 Axis 2 control device Axis 18 control device D15299 D17699...
  • Page 96 1 OVERVIEW • Details of each axis Device No. Symbol Signal name D15000+150n Pr.400 Main input axis No. D15001+150n Pr.401 Sub input axis No. D15002+150n Pr.402 Composite main shaft gear D15003+150n — Unusable D15004+150n Pr.403 Main shaft gear: Numerator D15005+150n D15006+150n Pr.404 Main shaft gear: Denominator...
  • Page 97 1 OVERVIEW • Details of each axis (Continued) Device No. Symbol Signal name D15050+150n Pr.437 Speed change ratio 1: Denominator D15051+150n D15052+150n Pr.490 Speed change gear 2 D15053+150n Pr.491 Speed change gear 2 smoothing time constant D15054+150n Pr.492 Speed change ratio 2: Numerator D15055+150n D15056+150n Pr.493...
  • Page 98 1 OVERVIEW • Details of each axis (Continued) Device No. Symbol Signal name Setting method of current value per cycle after main D15100+150n Pr.460 shaft gear Setting method of current value per cycle after auxiliary D15101+150n Pr.461 shaft gear D15102+150n Pr.462 Cam axis position restoration object D15103+150n...
  • Page 99 1 OVERVIEW • Details of each axis (Continued) Device No. Symbol Signal name D15147+150n D15148+150n — Unusable D15149+150n POINT (1) "n" in the above device No. shows the numerical value which correspond to axis • Q173DSCPU: Axis No.1 to 32 (n=0 to 31) •...
  • Page 100 1 OVERVIEW 14) Table of the common devices (SV13/SV22) Signal Signal Device No. Signal name Device No. Signal name direction direction D704 PLC ready flag request D740 Axis 21 Speed switching point specified flag D705 D741 Axis 22 request D706 All axes servo ON command request Command D742...
  • Page 101: Restrictions By The Software's Version

    1 OVERVIEW 1.3 Restrictions by the Software's Version There are restrictions in the function that can be used by the version of the operating system software and programming software. The combination of each version and a function is shown in Table1.1. Table 1.1 Restrictions by the Software's Version (Note-1), (Note-2) Operating system software version...
  • Page 102 1 OVERVIEW Programming software version MELSOFT MT Works2 (MT Developer2) Section of reference MR Configurator2 MR Configurator Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) — — — — (Note-2) 1.39R 1.06G — — (Note-3) 1.39R 1.06G 1.01B — — — — (Note-3), (Note-4) 1.39R 1.06G —...
  • Page 103 1 OVERVIEW Table 1.1 Restrictions by the Software's Version (continued) (Note-1), (Note-2) Operating system software version Function Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) — Vision system dedicated function (MVOUT) Motion SFC operation control instruction — Program control (IF - ELSE - IEND, SELECT -CASE - SEND, FOR -NEXT, BREAK) Display format depending on the error setting data —...
  • Page 104 1 OVERVIEW Programming software version MELSOFT MT Works2 (MT Developer2) Section of reference MR Configurator2 MR Configurator Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) Section 5.15.6 1.39R 1.39R — — APPENDIX 3 1.39R 1.39R — — Section 5.17 — — — — Section 12.2 — —...
  • Page 105 1 OVERVIEW Table 1.1 Restrictions by the Software's Version (continued) (Note-1), (Note-2) Operating system software version Function Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) Improvement of absolute positioning operation for servo driver VC /VPH series manufactured by CKD Nikki Denso Not support Co., Ltd., and stepping motor module AlphaStep/5-phase manufactured by ORIENTAL MOTOR Co., Ltd.
  • Page 106 1 OVERVIEW Programming software version MELSOFT MT Works2 (MT Developer2) Section of reference MR Configurator2 MR Configurator Q173DSCPU/Q172DSCPU Q173DCPU(-S1)/Q172DCPU(-S1) Not support (Note-3) — — — —: There is no restriction by the version. (Note-1): SV13/SV22 is the completely same version. (Note-2): The operating system software version can be confirmed in the operating system software (CD-ROM), MT Developer2 or GX Works2/GX Developer.
  • Page 107: Programming Software Version

    1 OVERVIEW 1.4 Programming Software Version The programming software versions that support Motion CPU are shown below. MELSOFT MT Works2 (MT Developer2) Motion CPU MR Configurator2 MR Configurator SV13/SV22 SV43 (Note-1) 1.39R Q173DSCPU 1.10L Not support (Note-1) Q172DSCPU 1.39R 1.10L Not support (Note-2) (Note-3)
  • Page 108: Structure Of The Motion Cpu Program

    2 STRUCTURE OF THE MOTION CPU PROGRAM 2. STRUCTURE OF THE MOTION CPU PROGRAM (1) Motion CPU programs are created in the Motion SFC of flowchart format. The motion control of servo motors is performed using the real-mode servo programs specified by motion-control steps in a Motion SFC program in SV13/SV22 real mode.
  • Page 109: Motion Control In Sv13/Sv22 Real Mode

    2 STRUCTURE OF THE MOTION CPU PROGRAM 2.1 Motion Control in SV13/SV22 Real Mode (1) System with servo motor is controlled directly using the servo program in (SV13/SV22) real mode. (2) Setting of the positioning parameter and creation of the servo program/ Motion SFC program are required.
  • Page 110: Motion Control In Sv22 Virtual Mode

    2 STRUCTURE OF THE MOTION CPU PROGRAM 2.2 Motion Control in SV22 Virtual Mode (1) Software-based synchronous control is performed using the mechanical system program constructed by virtual main shaft and mechanical module in (SV22) virtual mode. (2) Mechanical system programs is required in addition to the positioning parameter, servo program/Motion SFC program used in real mode.
  • Page 111: Motion Control In Sv22 Advanced Synchronous Control

    2 STRUCTURE OF THE MOTION CPU PROGRAM 2.3 Motion Control in SV22 Advanced Synchronous Control (1) Advanced synchronous control can be achieved using software instead of controlling mechanically with gear, shaft, speed change gear or cam etc. (2) The synchronous control parameter is required in addition to the positioning parameter, servo program/Motion SFC program used in real mode.
  • Page 112: Motion Dedicated Plc Instruction

    3 MOTION DEDICATED PLC INSTRUCTION 3. MOTION DEDICATED PLC INSTRUCTION 3.1 Outline of Motion Dedicated PLC Instruction Motion dedicated PLC instruction is used to access the device data and start-up program of Motion CPU from PLC CPU. Motion dedicated PLC instruction is transmitted through the CPU dedicated instruction transmission area set up in system area on the shared memory at the Multiple CPU high speed transmission.
  • Page 113 3 MOTION DEDICATED PLC INSTRUCTION 3.2 Motion Dedicated PLC Instruction The Motion dedicated PLC instruction that can be executed toward the Motion CPU which installed the operating system software (SV13/SV22) for Q173D(S)CPU/ Q172D(S)CPU is shown below. SV22 Real mode Advanced Instruction Description SV13...
  • Page 114: Motion Sfc Start Request From The Plc Cpu To The Motion Cpu: D(P).Sfcs (Plc Instruction: D(P).Sfcs )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.1 Motion SFC start request from the PLC CPU to the Motion CPU: D(P).SFCS (PLC instruction: D(P).SFCS ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data...
  • Page 115 3 MOTION DEDICATED PLC INSTRUCTION [Controls] (1) Request to start the Motion SFC program of program No. specified with (n2). The Motion SFC program can start any task setting of the normal task, event task and NMI task. (2) This instruction is always valid regardless of the state of real mode/virtual mode/ mode switching when the operating system software of Motion CPU is SV22.
  • Page 116 3 MOTION DEDICATED PLC INSTRUCTION [Setting range] (1) Setting of Motion SFC program (n2) usable range 0 to 255 [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 117 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which starts the Motion SFC program No.10 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.SFCS H3E1 K10 Instruction execution command...
  • Page 118: Servo Program Start Request From The Plc Cpu To The Motion Cpu: D(P).Svst (Plc Instruction: D(P).Svst )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.2 Servo program start request from the PLC CPU to the Motion CPU: D(P).SVST (PLC instruction: D(P).SVST ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data...
  • Page 119 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 120 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.SVST instruction execution is shown below. Sequence program DP.SVST execution DP.SVST instruction Request data set Start accept flag (System area) Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response data set Servo program executed processing...
  • Page 121 3 MOTION DEDICATED PLC INSTRUCTION [Start accept flag (System area)] The complete status of start accept flag is stored in the address of start accept flag in the CPU shared memory for target CPU. CPU shared memory address Description ( ) is decimal address The start accept flag for 32 axes are stored corresponding to each bit.
  • Page 122 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 123 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which requests to start of the servo program No.10 toward Axis 1, Axis 2 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. U3E1 U3E1 \G516.0...
  • Page 124: Current Value Change Instruction From The Plc Cpu To The Motion Cpu: D(P).Chga (Plc Instruction: D(P).Chga )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.3 Current value change instruction from the PLC CPU to the Motion CPU: D(P).CHGA (PLC instruction: D(P).CHGA ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data...
  • Page 125 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 126 3 MOTION DEDICATED PLC INSTRUCTION When axis No. "Jn" is specified with (S1) [Controls] (1) The current value change of axis (stopped axis) specified with (S1) is changed to the current value specified with (n2). (2) It is necessary to take an inter-lock by the start accept flag and user device of CPU shared memory so that multiple instructions may not be executed toward the same axis of same Motion CPU.
  • Page 127 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGA instruction execution by specifying "Jn" as Axis No. is shown below. Sequence program DP.CHGA execution DP.CHGA instruction Request data set Start accept flag (System area) Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms...
  • Page 128 3 MOTION DEDICATED PLC INSTRUCTION [Start accept flag (System area)] When the instruction is executed by specifying "Jn" as Axis No., the complete status of start accept flag is stored in the address of the start accept flag in the CPU shared memory for target CPU.
  • Page 129 3 MOTION DEDICATED PLC INSTRUCTION The diagnostic error flag (SM0) is turned on an operation error in the case shown below, and an error code is stored in the diagnostic error register (SD0). (Note) Error code Corrective action Error factor The target CPU module specified is wrong.
  • Page 130 3 MOTION DEDICATED PLC INSTRUCTION When axis No. "En" is specified with (S1) [Controls] (1) The synchronous encoder axis current value specified with (S1) is changed to the current value specified with (n2) in the virtual mode. (The current value change can be executed in real mode for the version (Refer to Section 1.3) that supports "incremental synchronous encoder current value in real mode".) (2) There is not an interlock signal for status of synchronous encoder current value...
  • Page 131 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGA instruction execution by specifying "En" as Axis No. is shown below. Sequence program DP.CHGA execution DP.CHGA instruction Request data set Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response data set...
  • Page 132 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 133 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the current value to 10 for synchronous encoder axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGA H3E1 "E1"...
  • Page 134 3 MOTION DEDICATED PLC INSTRUCTION When axis No. "Cn" is specified with (S1) [Controls] (1) The current value within 1 cam shaft revolution specified with (S1) is changed to the current value specified with (n2) in the virtual mode. (2) There is not an interlock signal for status of current value within 1 cam shaft revolution change.
  • Page 135 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGA instruction execution by specifying "Cn" as Axis No. is shown below. Sequence program DP.CHGA execution DP.CHGA instruction Request data set Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response data set...
  • Page 136 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 137 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the current value to 10 for Axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGA H3E1 "C1"...
  • Page 138: Current Value Change Instruction Of Command Generation Axis From The Plc Cpu To The Motion Cpu: D(P).Chgas (Plc Instruction: D(P).Chgas )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.4 Current value change instruction of command generation axis from the PLC CPU to the Motion CPU: D(P).CHGAS (PLC instruction: D(P).CHGAS ) (SV22 advanced synchronous control only) Ver.! Usable devices Internal devices Link direct device Unit access device Setting File register...
  • Page 139 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 140 3 MOTION DEDICATED PLC INSTRUCTION [Controls] (1) The current value change of command generation axis (stopped axis) specified with (S1) is changed to the current value specified with (n2). (2) It is necessary to take an inter-lock by the start accept flag and user device of CPU shared memory so that multiple instructions may not be executed toward the same axis of same Motion CPU.
  • Page 141 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGAS instruction execution by specifying "Jn" as Axis No. is shown below. Sequence program DP.CHGAS execution DP.CHGAS instruction Request data set Start accept flag (System area) Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms...
  • Page 142 3 MOTION DEDICATED PLC INSTRUCTION [Start accept flag (System area)] When the instruction is executed by specifying "Jn" as Axis No., the complete status of start accept flag is stored in the address of the start accept flag in the CPU shared memory for target CPU.
  • Page 143 3 MOTION DEDICATED PLC INSTRUCTION The diagnostic error flag (SM0) is turned on an operation error in the case shown below, and an error code is stored in the diagnostic error register (SD0). (Note) Error code Corrective action Error factor The target CPU module specified is wrong.
  • Page 144: Speed Change Instruction From The Plc Cpu To The Motion Cpu: D(P).Chgv (Plc Instruction: D(P).Chgv )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.5 Speed change instruction from the PLC CPU to the Motion CPU: D(P).CHGV (PLC instruction: D(P).CHGV ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data...
  • Page 145 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 146 3 MOTION DEDICATED PLC INSTRUCTION (3) Acceleration/deceleration time at speed change can be changed by setting the acceleration/deceleration time change parameter of the axis specified with (S1). Ver.! Refer to the "Q173D(S)CPU/Q172D(S)CPU Motion controller (SV13/SV22) Programming Manual (REAL MODE)" for acceleration/deceleration time change parameter and acceleration/deceleration time change function.
  • Page 147 3 MOTION DEDICATED PLC INSTRUCTION (2) Setting of the speed to change (n2) usable range -600000000 to 600000000 10 [mm/min] -600000000 to 600000000 10 [inch/min] inch -2147483647 to 2147483647 10 [degree/min] degree pulse -2147483647 to 2147483647[pulse/s] (Note): When the "speed control 10 multiplier speed setting for degree axis" is set to "valid", the setting range is -2147483647 to 2147483647 10 [degree/min].
  • Page 148 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the positioning speed to 20000 for Axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGV H3E1 "J1"...
  • Page 149 3 MOTION DEDICATED PLC INSTRUCTION (2) Program which changes the positioning speed to 200000 for Axis 1 of the Motion CPU (CPU No.2), when M0 that sets Axis No. as indirect setting method turned ON, and then changes the positioning speed to 50000 for Axis 2, when M1 turned ON. SM402 $MOVP "J1"...
  • Page 150: Speed Change Instruction Of Command Generation Axis From The Plc Cpu To The Motion Cpu: D(P).Chgvs (Plc Instruction: D(P).Chgvs ) (Sv22 Advanced Synchronous Control Only)

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.6 Speed change instruction of command generation axis from the PLC CPU to the Motion CPU: D(P).CHGVS (PLC instruction: D(P).CHGVS ) (SV22 advanced synchronous control only) Ver.! Usable devices Internal devices Link direct device Unit access device Setting File register Constant...
  • Page 151 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2 : 3E1H, CPU No.3 : 3E2H, CPU No.4 : 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 152 3 MOTION DEDICATED PLC INSTRUCTION (3) Acceleration/deceleration time at speed change can be changed by setting the acceleration/deceleration time change parameter of the axis specified with (S1). Refer to the "Q173DSCPU/Q172DSCPU Motion controller (SV22) Programming Manual (Advanced Synchronous Control)" for acceleration/deceleration time change parameter.
  • Page 153 3 MOTION DEDICATED PLC INSTRUCTION (2) Setting of the speed to change (n2) usable range -600000000 to 600000000 10 [mm/min] -600000000 to 600000000 10 [inch/min] inch -2147483647 to 2147483647 10 [degree/min] degree pulse -2147483647 to 2147483647[pulse/s] (Note): When the "speed control 10 multiplier speed setting for degree axis" is set to "valid", the setting range is -2147483647 to 2147483647 10 [degree/min].
  • Page 154 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the positioning speed to 20000 for Axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGVS H3E1 "J1"...
  • Page 155 3 MOTION DEDICATED PLC INSTRUCTION (2) Program which changes the positioning speed to 200000 for Axis 1 of the Motion CPU (CPU No.2), when M0 that sets Axis No. as indirect setting method turned ON, and then changes the positioning speed to 50000 for Axis 2, when M1 turned ON. SM402 $MOVP "J1"...
  • Page 156: Torque Limit Value Change Request Instruction From The Plc Cpu To The Motion Cpu: D(P).Chgt (Plc Instruction: D(P).Chgt )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.7 Torque limit value change request instruction from the PLC CPU to the Motion CPU: D(P).CHGT (PLC instruction: D(P).CHGT ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index...
  • Page 157 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 158 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGT instruction execution is shown below. Sequence program DP.CHGT execution DP.CHGT instruction Request data set Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response data set Torque limit value change Torque limit value change processing Complete device (D1+0) ON : Abnormal completion only...
  • Page 159 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 160 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the torque limit value to 10[%] for Axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGT H3E1 "J1"...
  • Page 161: Torque Limit Value Individual Change Request Instruction From The Plc Cpu To The Motion Cpu: D(P).Chgt2 (Plc Instruction: D(P).Chgt2 )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.8 Torque limit value individual change request instruction from the PLC CPU to the Motion CPU: D(P).CHGT2 (PLC instruction: D(P).CHGT2 ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G...
  • Page 162 3 MOTION DEDICATED PLC INSTRUCTION [Setting data] Setting data Description Set by Data type (First I/O No. of the target CPU)/16 Value to specify actually is the following. (n1) User 16-bit binary CPU No.2: 3E1H, CPU No.3: 3E2H, CPU No.4: 3E3H (Note): Motion CPU cannot be set as CPU No.1 in the Multiple CPU configuration.
  • Page 163 3 MOTION DEDICATED PLC INSTRUCTION [Operation] Outline operation between CPUs at the DP.CHGT2 instruction execution is shown below. Sequence program DP.CHGT2 execution DP.CHGT2 instruction Request data set Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response data set Torque limit value individual Torque limit value individual (positive direction/ (Positive direction/negative negativedierction) change processing...
  • Page 164 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 165 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which changes the positive torque limit value to 10.0[%] and negative torque limit value to 20.0[%] for Axis 1 of the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.CHGT2 H3E1 "J1"...
  • Page 166: Write Device Data Of The Self Cpu To The Device Of Other Cpu: D(P).Ddwr (Plc Instruction: D(P).Ddwr )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.9 Write device data of the self CPU to the device of other CPU: D(P).DDWR (PLC instruction: D(P).DDWR ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index...
  • Page 167 3 MOTION DEDICATED PLC INSTRUCTION [Control data] Device Item Setting data Setting range Set by The status at the instruction completion is stored. S1+0 Complete status : No error (Normal completion) — System Except 0: Error code S1+1 Number of writing data Set the number of writing data with each word 1 to 20 User...
  • Page 168 3 MOTION DEDICATED PLC INSTRUCTION (5) There is a limitation for number of simultaneous instruction execution/ simultaneous acceptance in the Motion dedicated PLC instruction. (Refer to Section 3.3 (2).) Exchange a large amount of data through the CPU shared memory. (n1) 3E1H (S2)
  • Page 169 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (S0+0). (Note) Complete status Error factor Corrective action (Error code)(H) Instruction request to Motion CPU from PLC CPU exceeds the permissible 0010 value.
  • Page 170 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which stores data for 10 words from D0 of the self CPU to W10 or later of the CPU No.2, when X0 turned ON. Stores the number of writing data "10" MOVP D101 to the number of writing data points...
  • Page 171: Read Device Data Of Other Cpu To The Device Of Self Cpu

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.10 Read device data of other CPU to the device of self CPU: D(P).DDRD (PLC instruction: D(P).DDRD ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data...
  • Page 172 3 MOTION DEDICATED PLC INSTRUCTION [Control data] Device Description Setting data Setting range Set by The status at the instruction completion is stored. S1+0 Complete status : No error (Normal completion) — System Except 0: Error code Number of reading S1+1 Set the number of reading data.
  • Page 173 3 MOTION DEDICATED PLC INSTRUCTION (5) There is a limitation for number of simultaneous instruction execution/ simultaneous acceptance in the Motion dedicated PLC instruction. (Refer to Section 3.3 (2).) Exchange a large amount of data through the CPU shared memory. (n1) 3E1H (D1)
  • Page 174 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (S0+0). (Note) Complete status Error factor Corrective action (Error code)(H) Instruction request to Motion CPU from PLC CPU exceeds the permissible 0010 value.
  • Page 175 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which stores data for 10 words from D0 of the CPU No.2 to W10 or later of the self CPU, when X0 turned ON. Stores the number of reading data "10" MOVP D101 to the number of reading data points...
  • Page 176: Interrupt Instruction To The Other Cpu: D(P).Gint (Plc Instruction: D(P).Gint )

    3 MOTION DEDICATED PLC INSTRUCTION 3.2.11 Interrupt instruction to the other CPU: D(P).GINT (PLC instruction: D(P).GINT ) Usable devices Internal devices Link direct device Unit access device Setting File register Constant (System, User) J \G U \G Index data register Others Decimal K, Real...
  • Page 177 3 MOTION DEDICATED PLC INSTRUCTION [Controls] (1) Processing for the active program (operation program status) of Motion SFC program set in the "PLC interruption of event task" is executed by the execution instruction of D(P).GINT instruction. (2) This instruction is always valid regardless of the state of real mode/virtual mode/ mode switching when the operating system software of Motion CPU is SV22.
  • Page 178 3 MOTION DEDICATED PLC INSTRUCTION [Errors] The abnormal completion in the case shown below, and the error code is stored in the device specified with the complete status storage device (D2). If the complete status storage device (D2) is omitted, an error is not detected and operation becomes "No operation".
  • Page 179 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which generates interrupt of interrupt pointer number 10 toward the Motion CPU (CPU No.2), when M0 turned ON. <Example 1> Program which omits the complete device and complete status. DP.GINT H3E1 Instruction execution command...
  • Page 180: Precautions

    3 MOTION DEDICATED PLC INSTRUCTION 3.3 Precautions (1) CPU shared memory address used in Motion dedicated instruction (a) Start accept flag (System area) The status of each flag is stored in the following address. CPU shared memory address Description ( ) is decimal address The start accept flag for 32 axes are stored corresponding to each bit.
  • Page 181 3 MOTION DEDICATED PLC INSTRUCTION The start accept flag is set after instruction acceptance of by the Motion CPU as follows. Sequence program DP.SVST execution DP.SVST instruction Request data set Start accept flag (System area) Transfer Transfer CPU dedicated transmission (0.88ms cycle) 0.88ms Response...
  • Page 182 3 MOTION DEDICATED PLC INSTRUCTION (b) "Fixed at 0" area The following area, which is used in Q173HCPU/Q172HCPU/ Q173CPU(N)/Q172CPU(N) is not used in Q173D(S)CPU/Q172D(S)CPU and is therefore "Fixed at 0" for these processor. The following interlocks are not used in new Q173D(S)CPU/Q172D(S)CPU sequence program.
  • Page 183 3 MOTION DEDICATED PLC INSTRUCTION CPU dedicated instruction transmission area shown in table below is allocated as initial setting. Table 3.1 Number of CPU dedicated instruction transmission area Number of CPU dedicated instruction transmission area for Number of Multiple CPU modules each target CPU 47 blocks 23 blocks...
  • Page 184 3 MOTION DEDICATED PLC INSTRUCTION (b) Permissible number of executions for dedicated instructions on Multiple CPU high-speed transmission When the number of blocks being used to communicate with each CPU in the Multiple CPU dedicated instruction transmission area exceeds the set value for maximum number of blocks used for the Multiple CPU high-speed transmission dedicated instruction setting (special registers SD796 to SD799 of PLC CPU), the system enters a state where the Motion dedicated...
  • Page 185 3 MOTION DEDICATED PLC INSTRUCTION • Special register of PLC CPU Device No. Name Meaning Explanation Set by Maximum number of blocks used for the Multiple CPU high-speed Specifies the maximum number of blocks SD796 transmission dedicated instruction used for the Multiple CPU high-speed setting (For CPU No.1) transmission dedicated instruction.
  • Page 186 3 MOTION DEDICATED PLC INSTRUCTION [Operation example] When multiple D(P).DDWR instructions (5 word or more each) are executed simultaneously before turning on each complete device in the 2 Multiple CPUs. If the number of blocks used for each item is set as follows, •...
  • Page 187 3 MOTION DEDICATED PLC INSTRUCTION [Program example] (1) Program which sets 2 (Initial value) to SD797 and uses SM797 as an interlock when DP.DDWR (Number of blocks used : 2) is executed. SM797 DP.SFCS H3E1 Instruction execution RST M0 command Instruction execution command...
  • Page 188 3 MOTION DEDICATED PLC INSTRUCTION (c) CPU dedicated instruction transmission area If the size of the CPU dedicated instruction transmission area is insufficient, it can be increased changing the system area size. The size of the CPU dedicated instruction transmission area is decided depending on the number of CPU modules used and selected system area size as follows.
  • Page 189 3 MOTION DEDICATED PLC INSTRUCTION (3) Execution of Motion dedicated PLC instruction (a) Motion dedicated PLC instruction can be executed with a fixed cycle execute type program and interrupt program. However, the complete device is a pulse-type. If the complete device (M100 in below example) is set, it may not be recognized during the PLC scan.
  • Page 190 3 MOTION DEDICATED PLC INSTRUCTION (4) Complete status information The codes stored in complete status at the completion of Motion dedicated PLC instruction are shown below. If the complete status storage device is omitted, an error is not detected and operation becomes "No operation".
  • Page 191 3 MOTION DEDICATED PLC INSTRUCTION (5) Order of instruction execution Methods to control using execution data after it is transmitted from the PLC CPU to the Motion CPU are shown below. (a) Method to execute after data is written to the shared memory area (Multiple CPU high speed transmission area).
  • Page 192 3 MOTION DEDICATED PLC INSTRUCTION (b) Method to execute after data is written by D(P).DDWR instruction Write the data from the PLC CPU to the Motion CPU by D(P).DDWR instruction, and then it can be utilized for Motion dedicated PLC instruction execution.
  • Page 193 3 MOTION DEDICATED PLC INSTRUCTION MEMO 3 - 82...
  • Page 194: Motion Sfc Programs

    4 MOTION SFC PROGRAMS 4. MOTION SFC PROGRAMS 4.1 Motion SFC Program Configuration The Motion SFC Program is constituted by the combination of start, steps, transitions, end and others are shows below. Operation Program start START : Entry of program. name Positioning SET Y0=X0+X10...
  • Page 195: Motion Sfc Chart Symbol List

    4 MOTION SFC PROGRAMS 4.2 Motion SFC Chart Symbol List Parts as Motion SFC program components are shown below. The operation sequence or transition control is expressed with connecting these parts by directed lines in the Motion SFC program. Symbol List Classification Name...
  • Page 196 4 MOTION SFC PROGRAMS Symbol List Classification Name Function (Code size (byte)) representation • When just before is the motion control step, transits to the next step by formation of transition condition Gn (G0 to G4095) without waiting for the motion operating completion. Shift •...
  • Page 197 4 MOTION SFC PROGRAMS Symbol List Classification Name Function (Code size (byte)) representation • When just before is the motion control step, waits for the motion operating completion and then transits to the next step by formation of transition condition Gn (G0 to G4095). If not IFBm completion of transition condition, transits to the right- IFT1...
  • Page 198: Branch And Coupling Chart List

    4 MOTION SFC PROGRAMS 4.3 Branch and Coupling Chart List Branch and coupling patterns which specify step and transition sequences in the Motion SFC charts are shown below. Name List Motion SFC chart symbol Function (Code size (byte)) representation • Steps and transitions connected in series are List processed in order from top to bottom.
  • Page 199 4 MOTION SFC PROGRAMS Combining the basic type branches/couplings provides the following application types, which are defined as in the basic types. List Name Motion SFC chart symbol Function representation CALL Kn • After a selective branch, a parallel branch can be IFBm performed.
  • Page 200 4 MOTION SFC PROGRAMS List Name Motion SFC chart symbol Function representation CALL Kn • After a selective branch, a selective branch can be IFBm performed. IFT1 SFT Gn IFBm+1 IFBm Selective branch IFT1 IFT1 IFT2 SFT Gn’ IFBm+1 Selective branch IFT1 IFT2 JMP IFEm+1...
  • Page 201 4 MOTION SFC PROGRAMS List Name Motion SFC chart symbol Function representation • The selective coupling point and parallel branch (JMP IFEm) point can be the same. IFEm Note that in the Motion SFC chart, this type is PABm displayed in order of a selective coupling PAT1 parallel branch, as shown on the left.
  • Page 202: Motion Sfc Program Name

    4 MOTION SFC PROGRAMS 4.4 Motion SFC Program Name Set the "Motion SFC program name" to the Motion SFC program No.0 to No.255 individually. Set the Motion SFC program name within 16 characters. Specify this Motion SFC program name for a "subroutine call/start step (GSUB)" and "clear step (CLR)". Refer to "Chapter 11 USER FILES"...
  • Page 203: Steps

    4 MOTION SFC PROGRAMS 4.5 Steps 4.5.1 Motion control step Name Symbol Function Starts the servo program Kn. Motion control step Specified range: K0 to K4095 [Operations] (1) Turns on the start accept flag of the axis specified with the specified servo program Kn running.
  • Page 204: Operation Control Step

    4 MOTION SFC PROGRAMS 4.5.2 Operation control step Name Symbol Function Executes the operation control program Fn/FSn. Operation Fn/FSn Specified range: F0 to F4095/FS0 to FS4095 control step [Operations] (1) Once execution type operation control step Fn In the case of Fn, executes the specified operation control program Fn once. (2) Scan execution type operation control step FSn In the case of FSn, repeats the specified operation control program FSn until the next transition condition enables.
  • Page 205: Subroutine Call/Start Step

    4 MOTION SFC PROGRAMS 4.5.3 Subroutine call/start step Name Symbol Function Calls/starts the Motion SFC program of the specified Subroutine Program name program name. call/start step [Operations] (1) Calls/starts the Motion SFC program of the specified program name. (2) Control varies with the type of the transition coupled next to the subroutine call/start step.
  • Page 206 4 MOTION SFC PROGRAMS [Instructions] (1) There are no restrictions on the depth of subroutine call/start nesting. (2) For a subroutine start, the start source Motion SFC program continues processing if the start destination Motion SFC program stops due to an error. (3) For a subroutine call, the call source Motion SFC program stops running as soon as the call destination Motion SFC program stops due to an error.
  • Page 207: Clear Step

    4 MOTION SFC PROGRAMS 4.5.4 Clear step Name Symbol Function Stops the Motion SFC program of the specified Clear step Program name program name. [Operations] (1) Stops the specified Motion SFC program running. (2) The clear-specified Motion SFC program will not start automatically after stopped if it has been set to start automatically.
  • Page 208 4 MOTION SFC PROGRAMS [Instructions] (1) When the Motion SFC program specified with the clear step is not starting, an error does not occur specifically and this step is ignored. (2) If the Motion SFC program running is stopped by the clear step, the output is held. (3) Input the stop command of target axis in addition to stop an operating axis with the clear step execution.
  • Page 209: Transitions

    4 MOTION SFC PROGRAMS 4.6 Transitions You can describe conditional and operation expressions at transitions. The operation expression described here is repeated until the transition condition enables, as at the scan execution type operation step. Refer to Chapter 6 for the conditional/operation expressions that can be described in transition conditions.
  • Page 210 4 MOTION SFC PROGRAMS • Specifiable bit devices Device Range (Note-1) X0 to X1FFF Y0 to Y1FFF M0 to M12287 (Note-2) U \G10000.0 to U \G (10000+p-1).F : CPU No. (No.1: 3E0, No.2: 3E1, No.3: 3E2, No.4: 3E3) U \G CPU No.
  • Page 211 4 MOTION SFC PROGRAMS [Instructions] • Always pair a transition with a motion control step one-for-one. If the step following WAITON/WAITOFF is not a motion control step, the Motion SFC error (error code: 16102) will occur and the Motion SFC program running will stop at the error detection. •...
  • Page 212: Jump, Pointer

    4 MOTION SFC PROGRAMS 4.7 Jump, Pointer Jump Pointer [Operations] • Setting a jump will cause a jump to the specified pointer Pn of the self program. • You can set pointers at steps, transitions, branch points and coupling points. •...
  • Page 213: Branches, Couplings

    4 MOTION SFC PROGRAMS 4.9 Branches, Couplings 4.9.1 Series transition Transits execution to the subsequent step or transition connected in series. (1) To start a servo program or subroutine and shift execution to the next without waiting for operation completion Set Shift at a transition.
  • Page 214: Selective Branch, Selective Coupling

    4 MOTION SFC PROGRAMS 4.9.2 Selective branch, selective coupling (1) Selective branch Executes only the route which condition was judged to have enabled first among the conditions of multiple transitions connected in parallel. Transitions must be all Shifts or WAITs. (Example) WAIT After start axis in the servo Starts the servo program K1.
  • Page 215: Parallel Branch, Parallel Coupling

    4 MOTION SFC PROGRAMS 4.9.3 Parallel branch, parallel coupling (1) Parallel branch Multiple routes connected in parallel are executed simultaneously. Each parallel branch destination may be started by either a step or a transition. After operation completion of preceding step, steps K2 to F10 connected in parallel are executed when the completion of condition set at transition...
  • Page 216 4 MOTION SFC PROGRAMS POINT The number of parallel branches need not match that of couplings at a parallel coupling point. (In the example of the diagram in Section 4.9.3 (2), the number of parallel branches is 3 and that of couplings is 2.) When a WAIT transition is set right after a parallel coupling, the stop completions of the axes are not included in the waiting conditions if the parallel coupling is preceded by motion control steps.
  • Page 217: Y/N Transitions

    4 MOTION SFC PROGRAMS 4.10 Y/N Transitions When routes are branch at a transition condition enables and disable, "Shift Y/N transition" or "WAIT Y/N transition" will be useful. Name Symbol Function (Not • When a transition condition set at Gn completion enables, execution shifts to the lower of condition)
  • Page 218 4 MOTION SFC PROGRAMS (1) Automatic free G number search feature (a) When not set to automatic numbering Searches for a free number forward, starting with the "set G number + 1" at the "Shift Y/N" or "WAIT Y/N" symbol. When no free numbers are found after a search up to 4095, a search is made from 0 to the "set G number - 1".
  • Page 219 4 MOTION SFC PROGRAMS (3) Instructions for the Motion SFC charts Any Motion SFC chart that will be meaningless to or conflict with the definition of Y/N transitions will result in an error at the time of editing (or Motion SFC chart conversion).
  • Page 220 4 MOTION SFC PROGRAMS (c) The following patterns may be set. • End (END) from "Shift Y/N" or "WAIT Y/N" • Jump from "Shift Y/N" or "WAIT Y/N" • Continuation from "Shift Y/N" or "WAIT Y/N" to "Shift Y/N" or "WAIT Y/N" (selective branch-selective branch) •...
  • Page 221: Motion Sfc Comments

    4 MOTION SFC PROGRAMS 4.11 Motion SFC Comments A comment can be set to each symbol of the step/transition in the motion SFC chart. Comments are shown in the Motion SFC chart by changing the display mode to "Comment display" on the Motion SFC program edit screen. Classification Name Symbol...
  • Page 222 4 MOTION SFC PROGRAMS POINT (1) Motion SFC comments are stored into the code area of Motion CPU. The code area stores the Motion SFC chart codes, operation control (F/FS) program codes, transition (G) program codes and Motion SFC comments. Be careful not to set too many comments to avoid code area overflow.
  • Page 223 4 MOTION SFC PROGRAMS MEMO 4 - 30...
  • Page 224: Operation Control Programs

    5 OPERATION CONTROL PROGRAMS 5. OPERATION CONTROL PROGRAMS 5.1 Operation Control Programs (1) Operation control programs (a) Substitution operation expressions, motion-dedicated functions and bit device control commands can be set in operation control program. (b) Multiple blocks in one operation control program can be set. (c) There are no restrictions on the number of blocks that may be set in one operation control program.
  • Page 225 5 OPERATION CONTROL PROGRAMS (2) Priorities of operators and functions Operators and functions have the following priorities. Using parentheses allows an operation sequence to be specified freely. Priority Item (Operator, Function) High Calculation within parentheses ((...)) Standard function (SIN, COS, etc.), Type conversion (USHORT, LONG, etc.) Bit inversion (~), logical negation (!), sign inversion ( ) Multiplication ( ), division (/), remainder (%) Addition (+), subtraction ( )
  • Page 226 5 OPERATION CONTROL PROGRAMS (3) Structure of instruction Many of the instructions usable in operation control programs can be divided into instruction and data parts. The instruction and data parts are used for the following purposes. • Instruction part ... Indicates the function of that instruction. •...
  • Page 227 5 OPERATION CONTROL PROGRAMS (4) How to specify data There are the following six different data usable in each instruction. Data usable in each instruction Numerical data Integer data 16-bit integer type data 32-bit integer type data 64-bit floating-point type data Bit data Batch bit data Logical data...
  • Page 228 5 OPERATION CONTROL PROGRAMS 3) Data ranges are shown below. Decimal representation Hexadecimal representation H0000000000000000, K-1.79E+308 to K-2.23E-308, H0010000000000000 to H7FE1CCF385EBC89F, Data range K0.0, H8000000000000000, K2.23E-308 to K1.79E+308 H8010000000000000 to HFFE1CCF385EBC89F 4) A round-off error may be produced in a 64-bit floating-point type data operation.
  • Page 229 5 OPERATION CONTROL PROGRAMS (f) Logical data The logical data is a value returned by a bit or comparison conditional expression and indicates whether the result is true or false. Normally, it is used in the conditional expression of a transition program. In an operation control program, the logical data is used in a bit conditional expression set to device set (SET=) or device reset (RST=).
  • Page 230 5 OPERATION CONTROL PROGRAMS (5) Internal operation data types For internal operations, when (S1) and (S2) differ in data type, the data of the smaller type is converted into that of the greater type before operation is performed. If the operation result is over the range of processed number in each type, an overflow will occur.
  • Page 231 5 OPERATION CONTROL PROGRAMS 2) Program which substitutes the result of multiplying #0 and #10 to W0L after converting into the 32-bit integer type W0L = LONG(#0) LONG(#10) LONG(#0) 12345 H00003039 (H007FB6F6) 8369910 LONG(#10) H000002A6 Since the multiplier result is processed with the 32-bit integer type by the type converting instruction, even if the device value is the same as the program example 1), an overflow will not occur.
  • Page 232: Device Descriptions

    5 OPERATION CONTROL PROGRAMS 5.2 Device Descriptions Word and bit device descriptions are shown below. (1) Word device descriptions Device descriptions Device No. (n) specified ranges Q173DSCPU/Q172DSCPU 64-bit SV22 32-bit 16-bit floating-point Q173DCPU(-S1)/ Advanced integer type Virtual mode integer type type SV13 Q172DCPU(-S1)
  • Page 233 5 OPERATION CONTROL PROGRAMS (2) Bit device descriptions Device description Device No. (n) specified ranges (Note-1) 0 to 1FFF Input relay Xn/PXn Output relay Yn/PYn 0 to 1FFF Internal relay 0 to 12287 Multiple CPU area (Note-2) (Note-3) U \Gn 10000 to (10000+p-1) device Link relay...
  • Page 234 5 OPERATION CONTROL PROGRAMS (b) Indirect specification of device No. (n) using word device using operation expression • Device No. can be specified indirectly by calculation expressions which use the following data and operators. 16-bit integer type word device 32-bit integer type word device Usable data 16-bit integer type constant 32-bit integer type constant...
  • Page 235: Constant Descriptions

    5 OPERATION CONTROL PROGRAMS 5.3 Constant Descriptions The constant descriptions of the 16-bit integer type, 32-bit integer type and 64-bit floating-point type are shown below. 16-bit integer type 32-bit integer type 64-bit floating-point type K-1.79E+308 to K-2.23E-308, Decimal K-32768 to K32767 K-2147483648L to K2147483647L K0.0, representation...
  • Page 236: Binary Operations

    5 OPERATION CONTROL PROGRAMS F/FS 5.4 Binary Operations 5.4.1 Substitution : = Format (D)=(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional conditional expression...
  • Page 237 5 OPERATION CONTROL PROGRAMS (2) Program which substitutes K123456.789 to D0L D0L = K123456.789 123456.789 123456 The 64-bit floating-point type is converted into the 32-bit integer type and the result is substituted. (3) Program which substitutes the result of adding K123 and #0 to W0 W0 = K123 + #0 5 - 14...
  • Page 238: Addition

    5 OPERATION CONTROL PROGRAMS F/FS 5.4.2 Addition : + Format (S1)+(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 239: Subtraction

    5 OPERATION CONTROL PROGRAMS F/FS 5.4.3 Subtraction : Format (S1) (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 240: Multiplication

    5 OPERATION CONTROL PROGRAMS F/FS 5.4.4 Multiplication : Format (S1) (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 241: Division

    5 OPERATION CONTROL PROGRAMS F/FS 5.4.5 Division : / Format (S1)/(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 242: Remainder

    5 OPERATION CONTROL PROGRAMS F/FS 5.4.6 Remainder : % Format (S1)%(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 243: Bit Operations

    5 OPERATION CONTROL PROGRAMS F/FS 5.5 Bit Operations 5.5.1 Bit inversion (Complement) : ˜ ˜ Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional...
  • Page 244: Bit Logical And

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.2 Bit logical AND : & Format (S1)&(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 245: Bit Logical Or

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.3 Bit logical OR : Format (S1) l (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 246: Bit Exclusive Logical Or

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.4 Bit exclusive logical OR : ^ Format (S1)^(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 247: Bit Right Shift

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.5 Bit right shift : >> Format (S1) >> (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 248: Bit Left Shift

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.6 Bit left shift : << Format (S1) << (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 249: Sign Inversion (Complement Of 2)

    5 OPERATION CONTROL PROGRAMS F/FS 5.5.7 Sign inversion (Complement of 2) : Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 250: Standard Functions

    5 OPERATION CONTROL PROGRAMS F/FS 5.6 Standard Functions 5.6.1 Sine : SIN Format SIN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional conditional expression...
  • Page 251: Cosine : Cos

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.2 Cosine : COS Format COS(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 252: Tangent : Tan

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.3 Tangent : TAN Format TAN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 253: Arcsine : Asin

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.4 Arcsine : ASIN Format ASIN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 254: Arccosine : Acos

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.5 Arccosine : ACOS Format ACOS(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 255: Arctangent : Atan

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.6 Arctangent : ATAN Format ATAN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 256: Square Root : Sqrt

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.7 Square root : SQRT Format SQRT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 257: Natural Logarithm : Ln

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.8 Natural logarithm : LN Format LN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 258: Exponential Operation : Exp

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.9 Exponential operation : EXP Format EXP(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 259: Absolute Value : Abs

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.10 Absolute value : ABS Format ABS(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 260: Round-Off : Rnd

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.11 Round-off : RND Format RND(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 261: Round-Down : Fix

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.12 Round-down : FIX Format FIX(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 262: Round-Up : Fup

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.13 Round-up : FUP Format FUP(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 263: Bcd

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.14 BCD BIN conversion : BIN Format BIN(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 264: Bin

    5 OPERATION CONTROL PROGRAMS F/FS 5.6.15 BIN BCD conversion : BCD Format BCD(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 265: Type Conversions

    5 OPERATION CONTROL PROGRAMS F/FS 5.7 Type Conversions 5.7.1 Signed 16-bit integer value conversion : SHORT Format SHORT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating...
  • Page 266: Unsigned 16-Bit Integer Value Conversion : Ushort

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.2 Unsigned 16-bit integer value conversion : USHORT Format USHORT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 267 5 OPERATION CONTROL PROGRAMS POINT It is converted into a large data type to operate the binary operations with a different data type. Therefore, USHORT does not become valid. The target binary operations are shown below. • Addition (+) • Remainder (%) •...
  • Page 268: Signed 32-Bit Integer Value Conversion : Long

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.3 Signed 32-bit integer value conversion : LONG Format LONG(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 269: Unsigned 32-Bit Integer Value Conversion : Ulong

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.4 Unsigned 32-bit integer value conversion : ULONG Format ULONG(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 270 5 OPERATION CONTROL PROGRAMS POINT It is converted into a large data type to operate the binary operations with a different data type. Therefore, ULONG does not become valid. The target binary operations are shown below. • Addition (+) • Remainder (%) •...
  • Page 271: Signed 64-Bit Floating-Point Value Conversion : Float

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.5 Signed 64-bit floating-point value conversion : FLOAT Format FLOAT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 272: Unsigned 64-Bit Floating-Point Value Conversion : Ufloat

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.6 Unsigned 64-bit floating-point value conversion : UFLOAT Format UFLOAT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 273: Floating-Point Value Conversion 32-Bit Into 64-Bit : Dflt

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.7 Floating-point value conversion 32-bit into 64-bit : DFLT Ver.! Format DFLT (S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating...
  • Page 274: Floating-Point Value Conversion 64-Bit Into 32-Bit : Sflt

    5 OPERATION CONTROL PROGRAMS F/FS 5.7.8 Floating-point value conversion 64-bit into 32-bit : SFLT Ver.! Format SFLT(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating...
  • Page 275 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which converts the 64-bit floating-point value data of #0F into 32-bit floating-point value data and substitutes the result to D2000L D2000L = SFLT ( D2001 D2000 D2000L K-1.0 K-1.0 5 - 52...
  • Page 276: Bit Device Statuses

    5 OPERATION CONTROL PROGRAMS F/FS 5.8 Bit Device Statuses 5.8.1 ON (Normally open contact) : (None) Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating...
  • Page 277: Off (Normally Closed Contact)

    5 OPERATION CONTROL PROGRAMS F/FS 5.8.2 OFF (Normally closed contact) : ! Format !(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 278: Bit Device Controls

    5 OPERATION CONTROL PROGRAMS F/FS 5.9 Bit Device Controls 5.9.1 Device set : SET Format SET(D)=(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional...
  • Page 279 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which sets M100 when either of M0 and X0 is 1 SET M100 = M0 + X0 (True) M100 (2) Program which sets M100 when #0 is equal to D0 SET M100 = #0 = = D0 (True) M100 (3) Program which sets Y0 unconditionally...
  • Page 280: Device Reset : Rst

    5 OPERATION CONTROL PROGRAMS F/FS 5.9.2 Device reset : RST Format RST(D)=(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 281 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which resets M100 when either of M0 and X0 is 1 RST M100 = M0 + X0 (True) M100 (2) Program which resets M100 when #0 is equal to D0 RST M100 = #0 != D0 (True) M100 (3) Program which resets Y0 unconditionally...
  • Page 282: Device Output : Dout

    5 OPERATION CONTROL PROGRAMS F/FS 5.9.3 Device output : DOUT Format DOUT(D), (S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 283: Device Input : Din

    5 OPERATION CONTROL PROGRAMS F/FS 5.9.4 Device input : DIN Format DIN(D), (S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 284: Bit Device Output : Out

    5 OPERATION CONTROL PROGRAMS F/FS 5.9.5 Bit device output : OUT Format OUT(D)=(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 285: Logical Operations

    5 OPERATION CONTROL PROGRAMS F/FS 5.10 Logical Operations 5.10.1 Logical acknowledgement : (None) Format Number of basic steps — [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional conditional...
  • Page 286: Logical Negation

    5 OPERATION CONTROL PROGRAMS F/FS 5.10.2 Logical negation : ! Format ! (S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 287: Logical And

    5 OPERATION CONTROL PROGRAMS F/FS 5.10.3 Logical AND : Format (S1) (S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 288: Logical Or

    5 OPERATION CONTROL PROGRAMS F/FS 5.10.4 Logical OR : + Format (S1)+(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 289: Comparison Operations

    5 OPERATION CONTROL PROGRAMS F/FS 5.11 Comparison Operations 5.11.1 Equal to : == Format (S1)==(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional conditional...
  • Page 290: Not Equal To

    5 OPERATION CONTROL PROGRAMS F/FS 5.11.2 Not equal to : != Format (S1)!=(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 291: Less Than

    5 OPERATION CONTROL PROGRAMS F/FS 5.11.3 Less than : < Format (S1)<(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 292: Less Than Or Equal To

    5 OPERATION CONTROL PROGRAMS F/FS 5.11.4 Less than or equal to : <= Format (S1)<=(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 293: More Than

    5 OPERATION CONTROL PROGRAMS F/FS 5.11.5 More than : > Format (S1)>(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 294: More Than Or Equal To

    5 OPERATION CONTROL PROGRAMS F/FS 5.11.6 More than or equal to : >= Format (S1)>=(S2) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating...
  • Page 295: Motion-Dedicated Functions

    5 OPERATION CONTROL PROGRAMS F/FS 5.12 Motion-Dedicated Functions 5.12.1 Speed change request : CHGV Format CHGV((S1), (S2)) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating...
  • Page 296 5 OPERATION CONTROL PROGRAMS (4) Operation varies with the sign of the specified speed set at (S2). Sign of specified speed Operation Positive Speed change Temporary stop Negative Return (5) The specified speed that may be set at (S2) is within the following range. (a) Real mode inch degree...
  • Page 297 5 OPERATION CONTROL PROGRAMS (10) By specifying a negative speed and making a speed change request during the start, allows the axis to start deceleration at that point and return in the opposite direction upon completion of deceleration. The following operations by the servo instruction are shown below.
  • Page 298 5 OPERATION CONTROL PROGRAMS (c) When the axis is waiting at the return position 1) Signal states • Start accept flag (M2001+n) ........ON (unchanged from before execution of CHGV instruction) • Positioning start complete (M2400+20n) ....ON (unchanged from before execution of CHGV instruction) •...
  • Page 299 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which changes the positioning speed of axis 2 CHGV(K2,K10) (2) Return program which changes the positioning speed of axis 1 to a negative value CHGV(K1,K 1000) The following operation will be performed when a return request is made in constant-speed control.
  • Page 300 5 OPERATION CONTROL PROGRAMS POINT • Precautions at speed change (1) A speed change may be invalid if the speed change is executed until the "positioning start complete signal" status changes to ON at servo program start request. When making a speed change at almost the same timing as a start, create a program to execute speed change after the "positioning start complete signal"...
  • Page 301: Command Generation Axis Speed Change Request : Chgvs (Sv22 Advanced Synchronous Control Only)

    5 OPERATION CONTROL PROGRAMS F/FS 5.12.2 Command generation axis speed change request : CHGVS (SV22 advanced synchronous control only) Ver.! Format CHGVS((S1), (S2)) Number of basic steps [Usable data] Usable Data Word device Constant Setting 64-bit 64-bit Comparison Calculation 16-bit 32-bit 16-bit 32-bit...
  • Page 302 5 OPERATION CONTROL PROGRAMS (3) For interpolation control, set any one of the interpolation axes to (S1). When linear interpolation control is exercised, a speed change varies as described below with the positioning speed designation method set in the servo program. Positioning speed designation method Operation Speed change is made so that the vector speed...
  • Page 303 5 OPERATION CONTROL PROGRAMS (9) By specifying a negative speed and making a speed change request during the start, allows the axis to start deceleration at that point and return in the opposite direction upon completion of deceleration. The following operations by the servo instruction are shown below.
  • Page 304 5 OPERATION CONTROL PROGRAMS (d) While the axis is reversion in the speed control mode 1) Make a speed change to a positive speed to change the travel direction again. 2) Turn ON the stop command to make a stop. 3) A speed change is made in the opposite direction if a negative speed change is made again.
  • Page 305 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which changes the positioning speed of axis 2 CHGVS(K2,K10) (2) Return program which changes the positioning speed of axis 1 to a negative value CHGVS(K1,K 1000) The following operation will be performed when a return request is made in constant-speed control.
  • Page 306 5 OPERATION CONTROL PROGRAMS POINT • Precautions at speed change (1) A speed change may be invalid if the speed change is executed until the "positioning start complete signal" status changes to ON at servo program start request. When making a speed change at almost the same timing as a start, create a program to execute speed change after the "positioning start complete signal"...
  • Page 307: Torque Limit Value Change Request : Chgt

    5 OPERATION CONTROL PROGRAMS F/FS 5.12.3 Torque limit value change request : CHGT Format CHGT((S1), (S2)) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting...
  • Page 308 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which changes the torque limit value of axis 2 to 10[%] CHGT(K2,K10) POINT (1) CHGT instruction is invalid (ignored) during the virtual mode. When changing the torque limit value during operation in the virtual mode, set the "torque limit value setting device"...
  • Page 309: Torque Limit Value Individual Change Request : Chgt2

    5 OPERATION CONTROL PROGRAMS F/FS 5.12.4 Torque limit value individual change request : CHGT2 Format CHGT2((S1), (S2), (S3)) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating...
  • Page 310 5 OPERATION CONTROL PROGRAMS (6) The torque limit value that may be set at (S2) and (S3) is within the range 1 to  10000 ( 0.1[%]). (7) Refer to the "Q173D(S)CPU/Q172D(S)CPU Motion controller (SV13/SV22) Programming Manual (REAL MODE)" for relation between torque limit value specified with servo program and torque limit value change request instruction.
  • Page 311 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur and a torque limit value change will not be made if: • The specified axis No. at (S1) is outside the range; or • (S2) or (S3) is an indirectly specified device and its device No. is outside the range.
  • Page 312: Target Position Change Request : Chgp

    5 OPERATION CONTROL PROGRAMS F/FS 5.12.5 Target position change request : CHGP Format CHGP((S1), (S2), (S3)) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting...
  • Page 313 5 OPERATION CONTROL PROGRAMS [Overview] The target position is changed during positioning instruction execution by target position change request. New target position can be set by the absolute address or relative movement amount from feed current value at target position change request. Operation for executing target position change request to (X, Y) = (400.0μm, 500.0μm) by absolute address setting during linear interpolation control from positioning start position (X, Y) = (0.0μm, 0.0μm) to (X, Y) = (800.0μm, 600.0μm) is shown below.
  • Page 314 5 OPERATION CONTROL PROGRAMS [Functions] (1) The target position of the axis specified with (S1) is changed. The new target position is calculated by a value stored in the device specified with (S3) using the method specified with (S2). POINT (1) CHGP instruction is enabled to only starting axis.
  • Page 315 5 OPERATION CONTROL PROGRAMS (4) Set the starting device No. to store a target position change value at (S3). Set an even number as first device, and set a target position change value as follows. Setting range degree Offset Name inch pulse Address...
  • Page 316 5 OPERATION CONTROL PROGRAMS (5) The following operations by the servo instruction at CHGP instruction execution are shown below. Control mode Servo instruction Operation The positioning is executed from current feed value Linear control during execution to new target position with linear interpolation control.
  • Page 317 5 OPERATION CONTROL PROGRAMS (8) When the reference axis speed designation or longest axis reference designation is set in the linear interpolation control, an operation is as follows. • The longest axis is not selected again at target position change. The longest axis before change is used continuously.
  • Page 318 5 OPERATION CONTROL PROGRAMS (10) When the target position change of address method to the axis of control unit [degree] is executed, operation is as follows. • The positioning to new address is executed in the current direction. • Set "0 to 35999999 10 [degree] as new address at the address method.
  • Page 319 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur and a target position change will not be made if: • The specified axis No. at (S1) is outside the range; or • Except 0 to 1 is set at (S2); or •...
  • Page 320 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which executes the target position change by movement method to axis 2 and axis 8 during positioning by ABS-2. [Servo program] [Motion SFC program] <K50> [F10] D3000L=K5000 //Axis 2 ABS-2 D3002L=K-3000//Axis 8 Axis 2, 20000 Axis 8,...
  • Page 321: Other Instructions

    5 OPERATION CONTROL PROGRAMS F/FS 5.13 Other Instructions 5.13.1 Event task enable : EI Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting floating conditional conditional...
  • Page 322: Event Task Disable : Di

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.2 Event task disable : DI Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 323: No Operation : Nop

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.3 No operation : NOP Format Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer integer...
  • Page 324: Block Transfer : Bmov

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.4 Block transfer : BMOV Format BMOV(D), (S), (n) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 325 5 OPERATION CONTROL PROGRAMS POINT The BMOV instruction cannot be used for the cam data write/read under the SV22 advanced synchronous control. Use the CAMWR/CAMWR2 instruction (Cam data write) or the CAMRD instruction (Cam data read). (Refer to Section 5.18.) (4) The word devices that may be set at (D), (S) and (n) are shown below.
  • Page 326 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which batch-transfers a contents for 5 words from D0 to all data for 5 words from #10 BMOV #10,D0,K5 Batch transfer (2) Program which batch-transfers a contents for 2048 words from #0 to the data area of cam No.2 (resolution 2048) BMOV N2,#0,K2048 Cam data of cam No.2...
  • Page 327: Same Data Block Transfer : Fmov

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.5 Same data block transfer : FMOV Format FMOV(D), (S), (n) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting...
  • Page 328 5 OPERATION CONTROL PROGRAMS (2) When conversion of Motion SFC program is made in program editing of MT Developer2, an error will occur if: • (D) to (D)+(n-1) is outside the device range • (S) is outside the device range When (n) specified is a •...
  • Page 329: Write Device Data To Cpu Shared Memory Of The Self Cpu: Multw

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.6 Write device data to CPU shared memory of the self CPU: MULTW Format MULTW(D), (S), (n), (D1) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation...
  • Page 330 5 OPERATION CONTROL PROGRAMS (4) The word devices that may be set at (D), (S), (n) and (D1) are shown below. (Note-1) (Note-1), (Note-2) Word devices Setting Bit devices data U \Gn U \Gn.m — — — — — — —...
  • Page 331 5 OPERATION CONTROL PROGRAMS [Program examples] (1) 2 words from D0 is written in the CPU shared memory to since A00H, and transits to next step after confirmation of writing completion. [F 0] RST M0 MULTW HA00,D0,K2,M0 [G 0] CPU shared memory Device memory A00H 2 words transfer...
  • Page 332: Read Device Data From Cpu Shared Memory: Multr

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.7 Read device data from CPU shared memory: MULTR Format MULTR(D), (S1), (S2), (n) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional...
  • Page 333 5 OPERATION CONTROL PROGRAMS (2) The word devices that may be set at (D), (S), (n) and (D1) are shown below. (Note-1) (Note-1), (Note-2) Word devices Bit devices Setting data U \Gn U \Gn.m — — — (Note-3) (Note-3) — —...
  • Page 334 5 OPERATION CONTROL PROGRAMS [Program examples] (1) It checks that a CPU No.1 is not resetting, 2 words is read to since #0 from the CPU shared memory C00H of CPU No.1, and transits to next step after reading completion. [G 1] !SM240 [F 1]...
  • Page 335: Write Device Data To Intelligent Function Module : To

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.8 Write device data to intelligent function module : TO Format TO(D1), (D2), (S), (n) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional...
  • Page 336 5 OPERATION CONTROL PROGRAMS (3) The word devices that may be set at (D1), (D2), (S) and (n) are shown below. (Note-1) (Note-1), (Note-2) Word devices Setting Bit devices data U \Gn U \Gn.m (D1) — — — — — —...
  • Page 337: Read Device Data From Intelligent Function Module : From

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.9 Read device data from intelligent function module : FROM Format FROM(D), (S1), (S2), (n) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional...
  • Page 338 5 OPERATION CONTROL PROGRAMS (3) The word devices that may be set at (D), (S1), (S2) and (n) are shown below. (Note-1) (Note-1), (Note-2) Word devices Setting Bit devices data U \Gn U \Gn.m — — — (Note-3) (Note-3) (S1) —...
  • Page 339: Write Buffer Memory Data To Head Module : Rto

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.10 Write buffer memory data to head module : RTO Ver.! Format RTO(D1), (D2), (D3), (S), (n), (D4) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit...
  • Page 340 5 OPERATION CONTROL PROGRAMS [Functions] (1) (n) words of data from the device specified with (S) are written to the address specified with (D3) and after of the buffer memory in the intelligent function module specified with (D2). The intelligent function module is mounted to the target SSCNET /H head module specified with (D1).
  • Page 341 5 OPERATION CONTROL PROGRAMS (4) The following modules can be used. • Analogue input (L60AD4, L60AD4-2GH) • Analogue output (L60DA4) • High-speed counter (LD62, LD62D) (5) Do resetting of the complete bit device by the user program. (6) Another RTO instruction cannot be processed until RTO instruction is executed and a complete bit device is turned ON.
  • Page 342 5 OPERATION CONTROL PROGRAMS [Program examples] (1) 2 words from #0 are written to buffer memory address 0H of the intelligent function module (First I/O No.: 010H) on the 3rd axis of the SSCNET /H head module. RTO K3, H01, H0, #0, K2, M10 [F10] RST M10 RTO K3,H01,H0,#0,K2,M10...
  • Page 343: Read Buffer Memory Data From Head Module: Rfrom

    5 OPERATION CONTROL PROGRAMS F/FS 5.13.11 Read buffer memory data from head module: RFROM Ver.! Format RFROM(D), (S1), (S2), (S3), (n), (D1) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data...
  • Page 344 5 OPERATION CONTROL PROGRAMS [Functions] (1) (n) words of data are read from the address specified with (S3) of the buffer memory in the intelligent function module specified with (S2). The intelligent function module is mounted to the target SSCNET /H head module specified with (S1).
  • Page 345 5 OPERATION CONTROL PROGRAMS (4) The following modules can be used. • Analogue input (L60AD4, L60AD4-2GH) • Analogue output (L60DA4) • High-speed counter (LD62, LD62D) (5) Do resetting of the complete bit device by the user program. (6) Another RFROM instruction cannot be processed until RFROM instruction is executed and a complete bit device is turned ON.
  • Page 346 5 OPERATION CONTROL PROGRAMS [Program examples] (1) 1 word is read from the buffer memory address 10H of the intelligent function module (First I/O No. : 020H) on the 2nd axis of the SSCNET /H head module, and is stored in W0. RFROM W0, K2, H02, H10, K1, M0 [F20] RST M0...
  • Page 347: Time To Wait : Time

    5 OPERATION CONTROL PROGRAMS F/FS — 5.13.12 Time to wait : TIME Format TIME(S) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 348 5 OPERATION CONTROL PROGRAMS POINT (1) When the waiting time setting is indirectly specified with a word device, the value imported first is used as the device value for exercising control. The set time cannot be changed if the device value is changed during a wait state. (2) The TIME instruction is equivalent to a conditional expression, and therefore may be set on only the last line of a transition (G) program.
  • Page 349: Comment Statement

    5 OPERATION CONTROL PROGRAMS F/FS 5.14 Comment Statement : // Format Number of basic steps — [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression integer integer...
  • Page 350: Vision System Dedicated Function

    5 OPERATION CONTROL PROGRAMS F/FS 5.15 Vision System Dedicated Function Ver.! 5.15.1 Open line : MVOPEN Format MVOPEN (S1), (S2) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device...
  • Page 351 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur if: • The (S1) data is outside the range of 1 to 8. • The (S2) data is outside the range of 1 to 32767. • MVOPEN is executed again for the vision system that has been logged on. •...
  • Page 352: Load A Program : Mvload

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.2 Load a program : MVLOAD Format MVLOAD(S1), (S2) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting floating...
  • Page 353 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur if: • The (S1) data is outside the range of 1 to 32. • The (S2) data is outside the range of 1 to 32767. • The vision system which is used in the vision program specified with (S1) has not been logged on.
  • Page 354: Send An Image Acquisition Trigger : Mvtrg

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.3 Send an image acquisition trigger : MVTRG Format MVTRG(S1), (S2) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating...
  • Page 355 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur if: • The (S1) data is outside the range of 1 to 8. • The (S2) data is outside the range of 1 to 32767. • The vision system specified with (S1) has not been logged on. •...
  • Page 356: Start A Program : Mvpst

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.4 Start a program : MVPST Format MVPST(S1), (S2) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting floating...
  • Page 357 5 OPERATION CONTROL PROGRAMS (4) (S2) is set in increments of 10ms. When the setting is omitted, the timeout time is 10 seconds (same as setting 1000). The process time is changed according to job contents in the vision system. Set the timeout time according to the vision system and the job contents.
  • Page 358: Input Data : Mvin

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.5 Input data : MVIN Format MVIN(S1), (S2), (D), (S3) Number of basic steps 8 or more [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional...
  • Page 359 5 OPERATION CONTROL PROGRAMS (3) In (S2), write directly the spreadsheet cell or tag as a 32 one-byte character or less character string enclosed with double quotation, or set the head of a device in which a 32 one-byte character or less character string is stored. Designation methods of the character string are shown below.
  • Page 360: Output Data : Mvout

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.6 Output data : MVOUT Ver.! Format MVOUT(S1), (S2), (S3), (S4) Number of basic steps 8 or more [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional...
  • Page 361 5 OPERATION CONTROL PROGRAMS (3) In (S2), write directly the spreadsheet cell or tag as a 32 one-byte character or less character string enclosed with double quotation, or set the head of a device in which a 32 one-byte character or less character string is stored. Designation methods of the character string are shown below.
  • Page 362 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur if: • The (S1) data is outside the range of 1 to 8. • The number of character string of spreadsheet cell or tag specified with (S2) outside the range of 1 to 32 bytes. •...
  • Page 363: Reset A Status Storage Device : Mvfin

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.7 Reset a status storage device : MVFIN Format MVFIN(S) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting...
  • Page 364: Close Line : Mvclose

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.8 Close line : MVCLOSE Format MVCLOSE(S) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting floating expression integer...
  • Page 365: Send A Command For Native Mode : Mvcom

    5 OPERATION CONTROL PROGRAMS F/FS 5.15.9 Send a command for native mode : MVCOM Format MVCOM(S1), (S2), (D), (S3), (S4) Number of basic steps 9 or more [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit...
  • Page 366 5 OPERATION CONTROL PROGRAMS (4) The return value of Native Mode command is stored as below by specifying (S3) in the device specified with (D). When the return value data is the following ([CR] indicates a return code, and [LF] indicates a line feed code.) 1[CR][LF] Status code...
  • Page 367 5 OPERATION CONTROL PROGRAMS (5) (S4) is set in increments of 10ms. When the setting is omitted, the timeout time is 10 seconds (same as setting 1000). [Errors] (1) An operation error will occur if: • The (S1) data is outside the range of 1 to 8. •...
  • Page 368: Data Control

    5 OPERATION CONTROL PROGRAMS F/FS 5.16 Data Control 5.16.1 16-bit integer type scaling: SCL Format SCL(S1), (S2), (S3), (D) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device floating Coasting...
  • Page 369 5 OPERATION CONTROL PROGRAMS (2) The method for output value calculation is either positive conversion (Input value: point X, Output value: point Y) or inverse conversion (Input value: point Y, Output value: point X) and is specified with (S1). Each of the calculation methods is as follows. (a) When the input value is between two points of scaling conversion data, the output value is calculated from the nearest two points of the input value.
  • Page 370 5 OPERATION CONTROL PROGRAMS POINT When the input value is outside the range of scaling conversion data or calculation result of output value is outside the range of -32768 to 32767, an operation error will occur. [Functions] (1) Conversion of the input value specified with (S2) is executed according to the search/conversion method specified with (S1), using the scaling conversion data of device (S3) or later.
  • Page 371 5 OPERATION CONTROL PROGRAMS (4) When the conversion result to be stored in the device specified with (D) is not an integer value, its fractional portion is rounded down. [Errors] (1) An operation error will occur, and the conversion of input value will not be executed if: •...
  • Page 372: 32-Bit Integer Type Scaling: Dscl

    5 OPERATION CONTROL PROGRAMS F/FS 5.16.2 32-bit integer type scaling: DSCL Format DSCL(S1), (S2), (S3), (D) Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting...
  • Page 373 5 OPERATION CONTROL PROGRAMS [Functions] (1) Conversion of the input value specified with (S2) is executed according to the search/conversion method specified with (S1), using the scaling conversion data of device (S3) or later. The conversion result is stored in the device specified with (D).
  • Page 374 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur, and the conversion of input value will not be executed if: • (S1) is set to other than 0 to 3. • (S2), (S3), and (D) are not even-numbered devices. •...
  • Page 375: Program Control

    5 OPERATION CONTROL PROGRAMS F/FS 5.17 Program Control Ver.! 5.17.1 Conditional branch control: IF - ELSE - IEND Format IF(S) - ELSE - IEND Number of basic steps ELSE : 3 IEND : 1 [Usable data] Usable Data Word device Constant Setting Comparison...
  • Page 376 5 OPERATION CONTROL PROGRAMS [Errors] (1) In the following case, an operation error will occur, and the corresponding Motion SFC program No. execution will be stopped. For the subroutine called program, the call source program also stops to execute. • (S) is indirectly specified device, and the device No. is outside the range. [Program examples] (1) Program which adds K10 to #100 when #0 is K100 or adds K20 to #100 when #0 is other than K100.
  • Page 377: Selective Branch Control: Select - Case - Send

    5 OPERATION CONTROL PROGRAMS F/FS 5.17.2 Selective branch control: SELECT - CASE - SEND SELECT CASE(S1) - CEND SELECT : 1 CASE(S2) - CEND CASE Format Number of basic steps CEND CASE(Sn) - CEND CELSE : 1 CELSE - CEND SEND SEND [Usable data]...
  • Page 378 5 OPERATION CONTROL PROGRAMS (6) Maximum multiplicities of selective branch control are eight including conditional branch control. (IF - ELSE - IEND) SELECT... CASE... IF... SELECT... CASE... (3 level) (2 level) (1 level) CEND SEND IEND CEND SEND [Errors] (1) In the following case, an operation error will occur, and the corresponding Motion SFC program No.
  • Page 379: Repeat Control With Specified Count: For - Next

    5 OPERATION CONTROL PROGRAMS F/FS 5.17.3 Repeat control with specified count: FOR - NEXT FOR : 9 Format FOR(D) = (S1)TO(S2)STEP(S3) - NEXT Number of basic steps NEXT : 8 [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit...
  • Page 380 5 OPERATION CONTROL PROGRAMS (5) Maximum multiplicities of repeat control are eight. FOR... FOR... (2 level) (1 level) NEXT NEXT (6) When data types of (D), (S1), (S2) and (S3) are different, type conversion processing is executed but an unintended operation may occur. Set the same data type.
  • Page 381 5 OPERATION CONTROL PROGRAMS POINT Since the incremental value continues to be added to the loop control counter specified with (D) until it reaches the final value, set the data type which the value can handle. When the data range exceeds the loop control counter range, an unintended repeat operation may occur as the value is considered to be wrong.
  • Page 382: Forced Termination Of Repeat Control: Break

    5 OPERATION CONTROL PROGRAMS F/FS 5.17.4 Forced termination of repeat control: BREAK Format BREAK Number of basic steps [Usable data] Usable Data Word device Constant Setting Comparison 64-bit 64-bit 16-bit 32-bit 16-bit 32-bit Calculation data Bit device conditional conditional floating Coasting floating expression...
  • Page 383: Synchronous Control Dedicated Function (Sv22 Advanced Synchronous Control Only)

    5 OPERATION CONTROL PROGRAMS F/FS 5.18 Synchronous Control Dedicated Function (SV22 advanced synchronous control only) Ver.! 5.18.1 Cam data read: CAMRD Format CAMRD(S1), (S2), (n), (D) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation...
  • Page 384 5 OPERATION CONTROL PROGRAMS (3) Specify the number of read points for (n). Specify the number of read points so that the device No. storing the end point data is within the range. The following shows the operation when the number of read points, starting from the first position, is outside the cam data range.
  • Page 385 5 OPERATION CONTROL PROGRAMS (b) Coordinate data format Off set Item Range Can data format (Coordinate data format) Unusable Coordinate number 2 to 16384 0 to 2147483647 Input value X [Cam axis cycle unit] At first point cam data value -2147483648 to 2147483647 Output value Y [Output axis position unit]...
  • Page 386 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which reads 2048-points of data, starting from the first point cam data of cam No. 2 (stroke ratio data format), and stores the read data to #0 to #4099. CAMRD K2,K1,K2048, #0 (2) Program which reads 6-points of data, starting from the zeroth point cam data of cam No.1 (coordinate data format), and stores the read data to #100 to #127.
  • Page 387: Cam Data Write: Camwr

    5 OPERATION CONTROL PROGRAMS F/FS 5.18.2 Cam data write: CAMWR Format CAMWR(S1), (S2), (n), (S3) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting...
  • Page 388 5 OPERATION CONTROL PROGRAMS (4) The device No. specified with (S3) should be an even number. The write cam data is stored in the specified device according to the cam data format as follows. (a) Stroke ratio data format Off set Item Range Can data format (Stroke ratio data format)
  • Page 389 5 OPERATION CONTROL PROGRAMS (5) During the execution of the CAMWR instruction, another CAMWR instruction, CAMWR2 instruction, or CAMMK instruction cannot be processed. During the execution of the CAMWR instruction, the cam data writing flag (SM505) turns on. Therefore, create an interlock. When the CAMWR instruction, CAMWR2 instruction, or CAMMK instruction is executed while the cam data writing flag (SM505) is on, an error occurs.
  • Page 390 5 OPERATION CONTROL PROGRAMS [Program examples] (1) Program which writes the data stored in #0 to #4099 to the 2048-point area, starting from the first point cam data, of cam No. 256 (stroke ratio data format) CAMWR K256,K1,K2048,#0 (2) Program (Cam axis length per cycle = 4194304) which writes the data stored in #0 to #27 to the 6-point area, starting from the zeroth point cam data, of cam No.
  • Page 391: Cam Data Write (Cam Open Area): Camwr2

    5 OPERATION CONTROL PROGRAMS F/FS 5.18.3 Cam data write (Cam open area): CAMWR2 Format CAMWR2(S1), (S2), (n), (S3) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional...
  • Page 392 5 OPERATION CONTROL PROGRAMS (4) The device No. specified with (S3) should be an even number. The write cam data is stored in the specified device according to the cam data format as follows. (a) Stroke ratio data format Off set Item Range Can data format (Stroke ratio data format)
  • Page 393 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur, and the cam data write will not be executed if: • Cam No. specified with (S1) is outside the range of 1 to 256. • For the cam data in the stroke ratio data format, the cam data first position specified with (S2) is outside the range of 1 to the cam resolution.
  • Page 394: Cam Auto-Generation: Cammk

    5 OPERATION CONTROL PROGRAMS F/FS 5.18.4 Cam auto-generation: CAMMK Format CAMMK(S1), (S2), (S3) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting floating expression...
  • Page 395 5 OPERATION CONTROL PROGRAMS (4) During the execution of the CAMMK instruction, another CAMWR instruction, CAMWR2 instruction or CAMMK instruction cannot be processed. During the execution of the CAMMK instruction, the cam data writing flag (SM505) turns on. Therefore, create an interlock. When the CAMWR instruction, CAMWR2 instruction or CAMMK instruction is executed while the cam data writing flag (SM505) is ON, an error occurs.
  • Page 396 5 OPERATION CONTROL PROGRAMS [Cam for rotary cutter] (1) Set the auto-generation data of the rotary cam cutter. (sheet length, synchronization width, etc.) Synchronous axis length Synchronous axis cycle length/diameter Synchronous axis Sheet synchronization width Acceleration/deceleration width Synchronous position adjustment Feed sheet - : The synchronous section is adjusted to the sheet start side.
  • Page 397 5 OPERATION CONTROL PROGRAMS (2) Device assignment of the cam auto-generation data for the rotary cutter cam When the synchronous position adjustment is set to 0, the cam pattern of which the sheet center is in the synchronous section is created. Off set Name Description...
  • Page 398 5 OPERATION CONTROL PROGRAMS (3) Program examples (a) Program which creates cam data (resolution: 512) for the rotary cutter operation pattern in Cam No.5. D5000L=K512 // Resolution = 512 D5002=K0 // Acceleration/deceleration system = Trapezoidal, Synchronous axis length setting = Diameter D5003=K300 // Synchronous section acceleration ratio = 3.00% D5004L=K2000...
  • Page 399 5 OPERATION CONTROL PROGRAMS [Easy stroke ratio cam] (1) Cam data can be automatically generated without using the cam data setting of MT Developer2 by setting the stroke amount and sections. With the current value per cycle "0" as starting point, automatically generates cam data from the stroke and cam curve type of each section until the specified end point (cam axis current value per cycle).
  • Page 400 5 OPERATION CONTROL PROGRAMS (2) Device assignment of the cam auto-generation data for the easy stroke ratio cam Off set Name Description Range 256/512/1024/2048/4096/ Resolution Set the cam resolution for generating the cam. 8192/16384/32768 Cam axis length per 1 to 2147483647 Set the cycle length of one cam operation cycle.
  • Page 401 5 OPERATION CONTROL PROGRAMS (Note-1): If setting is outside range, the cam axis length per cycle will be set as the final end point of the section settings. (Note-2): The types of cam curve shapes are shown below. Create the cam curves using the values below. Curve applicable Acceleration/deceleration Acceleration curve shape...
  • Page 402 5 OPERATION CONTROL PROGRAMS (3) Program that creates easy stroke ratio cam data (a) Program which creates cam data (resolution: 512) in cam No. 5. D5000L=K512 //Resolution=512 D5002L=K36000000 //Cam axis length per cycle=360.0[degree] D5004L=K0 //Cam data starting point=0th point D5006=K7 //Number of sections=7 sections D5007=K0 //Unusable...
  • Page 403 5 OPERATION CONTROL PROGRAMS (b) Program which creates cam data (resolution: 512) in cam No. 6 D6000L=K512 //Resolution=512 D6002L=K36000000 //Cam axis length per cycle=360.0[degree] D6004L=K0 // Cam data starting point=0th point D6006=K5 //Number of sections=5 sections D6007=K0 //Unusable D6008=K0 //(Section 1) Cam curve type =Constant speed D6009=K0 //Unusable D6010L=K9000000...
  • Page 404: Cam Position Calculation: Campscl

    5 OPERATION CONTROL PROGRAMS F/FS 5.18.5 Cam position calculation: CAMPSCL Format CAMPSCL(S1), (S2), (D) Number of basic steps [Usable data] Usable Data (Note-1) Word device Constant Setting Comparison 64-bit 64-bit Calculation 16-bit 32-bit 16-bit 32-bit data Bit device conditional conditional floating Coasting floating...
  • Page 405 5 OPERATION CONTROL PROGRAMS (3) The device No. specified with (S2) should be an even number. Set the cam position calculation control data in the specified device as follows. (a) Device assignment of the cam position calculation control data Off set Name Description Range...
  • Page 406 5 OPERATION CONTROL PROGRAMS [Errors] (1) An operation error will occur, and the cam position calculation will not be executed • Cam No. specified with (S1) is outside the range of 0 to 256. • The cam No. data specified with (S1) does not exist in the cam open area. •...
  • Page 407 5 OPERATION CONTROL PROGRAMS (2) Program which calculates the cam axis current feed value in the two-way cam pattern operation. Cam (Two-way) Cam axis current value per cycle 500000[pulse] [F10] //Set No.5 (Two-way cam) to the Cam No. #1000=K5 //Cam position calculation data set D2200=K0 //Cam position calculation type= Cam axis current feed valuecalculation D2201=K0...
  • Page 408: Transition Programs

    6 TRANSITION PROGRAMS 6. TRANSITION PROGRAMS 6.1 Transition Programs (1) Transition programs (a) Substitution operation expressions, motion-dedicated functions, bit device control commands and transition conditions can be set in transition programs. (b) Multiple blocks can be set in one transition program. (c) There are no restrictions on the number of blocks that may be set in a single transition program.
  • Page 409 6 TRANSITION PROGRAMS What can be set as a transition condition in the last block are bit conditional expressions, comparison conditional expressions and device set (SET=)/device reset (RST=) which return logical data values (true/false). In the case of device set (SET=)/device reset (RST=), whether the bit or comparison conditional expression specified at (S) is true or false is a transition condition, and when the transition condition enables, device set/reset is executed and execution shifts to the next step.
  • Page 410: Motion Control Programs

    7 MOTION CONTROL PROGRAMS 7. MOTION CONTROL PROGRAMS 7.1 Servo Instruction List Table 7.1 lists servo instructions used in servo programs. Refer to Section 7.2 to 7.4 for details of the current value change control (CHGA, CHGA-E, CHGA-C). Refer to the "Q173D(S)CPU/Q172D(S)CPU Motion Controller (SV13/SV22) Programming Manual (REAL MODE)"...
  • Page 411: Servo Instruction List

    7 MOTION CONTROL PROGRAMS (2) Servo instruction list Table 7.2 indicates the servo instructions available for servo programs and the positioning data set in servo instructions. Table 7.2 Servo Instruction List Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable —...
  • Page 412 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 4 to 17 5 to 20 7 to 21 8 to 22 7 to 22 6 to 21...
  • Page 413 7 MOTION CONTROL PROGRAMS Table 7.2 Servo Instruction List (continued) Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable — — — — Number of steps Number of indirect words — Absolute central point-specified circular interpolation CW Absolute central point-specified circular Central interpolation CCW point-...
  • Page 414 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 7 to 22 10 to 27 9 to 26 10 to 27 : Must be set.
  • Page 415 7 MOTION CONTROL PROGRAMS Table 7.2 Servo Instruction List (continued) Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable — — — — Number of steps Number of indirect words — FEED-1 1 axis 1-axis fixed-pitch feed start 2-axes linear interpolation FEED-2 2 axes...
  • Page 416 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 4 to 17 5 to 19 7 to 21 3 to 15 3 to 16 4 to 18...
  • Page 417 7 MOTION CONTROL PROGRAMS Table 7.2 Servo Instruction List (continued) Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable — — — — Number of steps Number of indirect words — Forward rotation Speed control with fixed position stop absolute specification Reverse rotation...
  • Page 418 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 6 to 19 4 to 16 3 to 15 3 to 17 4 to17 2 to 10...
  • Page 419 7 MOTION CONTROL PROGRAMS Table 7.2 Servo Instruction List (continued) Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable — — — — Number of steps Number of indirect words — INC-1 INC-2 INC-3 INC-4 Constant-speed control passing point incremental specification Constant-speed control...
  • Page 420 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 2 to 10 3 to 11 4 to 12 5 to 13 5 to 14 4 to 13...
  • Page 421 7 MOTION CONTROL PROGRAMS Table 7.2 Servo Instruction List (continued) Positioning data Common Arc/Helical Processing Positioning Instruction control symbol Virtual enable — — — — Number of steps Number of indirect words — FOR-TIMES Repetition of same control FOR-ON Repeat range start setting (used in speed switching control, FOR-OFF...
  • Page 422 7 MOTION CONTROL PROGRAMS Positioning data Parameter block Others (Note-1) Advanced S-curve acceleration/deceleration Number of steps — — — — — (Note-2) (Note-2) (Note-2) (Note-2) (Note-2) — 1(B) 1(B) 1(B) 1(B) 1(B) 2 to 3 5 to 10 : Must be set. : Set if required.
  • Page 423: Servo Motor/Virtual Servo Motor Shaft/Command Generation Axis Current Value Change

    7 MOTION CONTROL PROGRAMS 7.2 Servo Motor/Virtual Servo Motor Shaft/Command Generation Axis Current Value Change The current value of the specified axis/virtual servo motor/command generation axis is changed Items set using MT Developer2 Common Parameter block Others Servo Positioning Number of Speed instruction method...
  • Page 424 7 MOTION CONTROL PROGRAMS (5) The used axis No. can be set within the following range. Q173DSCPU Q173DCPU(-S1) Q172DSCPU Q172DCPU(-S1) Axis 1 to 32 Axis 1 to 16 Axis 1 to 8 [Program example] A program which made the current value change control in the real mode is described as the following conditions.
  • Page 425 7 MOTION CONTROL PROGRAMS POINT Current value changing instructions • When PLC ready flag (M2000) or PCPU READY complete flag (SM500) is OFF, a minor error [100] occurs and a current value change is not made. (Note) • This change is made only during a stop. If a current value change is made while the specified axis is starting, a minor error [101] (start accept signal of the (Note)
  • Page 426: Synchronous Encoder Shaft Current Value Change Control (Sv22 Virtual Mode Only)

    7 MOTION CONTROL PROGRAMS 7.3 Synchronous Encoder Shaft Current Value Change Control (SV22 virtual mode only) The current value of the specified synchronous encoder shaft is changed. Items set using MT Developer2 Common Parameter block Others Servo Positioning Number of Speed instruction method...
  • Page 427 7 MOTION CONTROL PROGRAMS [Program example] A program which made the current value change control of the synchronous encoder shaft is described as the following conditions. (1) System configuration The current value change control of the synchronous encoder shaft P1 is executed.
  • Page 428 7 MOTION CONTROL PROGRAMS POINT Synchronous encoder current value changing instructions • The current value change of the synchronous encoder is executed if operation is being performed in the virtual mode (during pulse input from the synchronous encoder). If the current value is changed, the feed current value of the synchronous encoder continues from the new value.
  • Page 429: Cam Shaft Within-One-Revolution Current Value Change Control (Sv22 Virtual Mode Only)

    7 MOTION CONTROL PROGRAMS 7.4 Cam Shaft Within-One-Revolution Current Value Change Control (SV22 virtual mode only) The current value of the specified cam shaft within-one-revolution is changed. Items set using MT Developer2 Common Parameter block Others Servo Positioning Number of Speed instruction method...
  • Page 430 7 MOTION CONTROL PROGRAMS [Program example] A program which made the current value change control of the cam shaft within-one- revolution current value change is described as the following conditions. (1) Current value change control conditions (a) The current value change control conditions are shown below. Item Setting Servo program No.
  • Page 431: Programming Instructions

    7 MOTION CONTROL PROGRAMS 7.5 Programming Instructions 7.5.1 Cancel • start When a cancel start has been set in the setting items of the servo program which was started at the motion control step of the Motion SFC program, the cancel of the running servo program is valid but the servo program specified to start after a cancel is ignored, without being started.
  • Page 432: Motion Devices

    8 MOTION DEVICES 8. MOTION DEVICES The motion registers (#0 to #12287) and coasting timer (FT) are available as Motion CPU-dedicated devices. They can be used in operation control (F/FS) programs or transition (G) programs. 8.1 Motion Registers (#0 to #12287) Motion device Item Specifications...
  • Page 433 8 MOTION DEVICES (a) Monitor devices (#8000 to #8639) Information for each axis is stored in the monitor devices. The details of the storage data are shown below. Axis Device No. Signal name #8000 to #8019 #8020 to #8039 Signal name Refresh cycle Signal direction #8040 to #8059...
  • Page 434 8 MOTION DEVICES (b) Motion error history devices (#8640 to #8735) The Motion error history devices are shown below. Signal direction Refresh Fetch Device No. Signal name Status Command cycle cycle #8640 Seventh error information in past (Oldest error information) #8651 #8652 Sixth error information in past...
  • Page 435: Coasting Timer (Ft)

    8 MOTION DEVICES 8.2 Coasting Timer (FT) Motion device Item Specification Number of points 1 point (FT) Data size 32-bit/point (-2147483648 to 2147483647) No latch. Cleared to zero at power-on or reset, a count Latch Coasting timer (FT) rise is continued from now on. (Note-1), (Note-2) Usable tasks Normal, event, NMI...
  • Page 436: Operation For Motion Sfc And Parameter

    9 OPERATION FOR MOTION SFC AND PARAMETER 9. OPERATION FOR MOTION SFC AND PARAMETER 9.1 Task Definitions When to execute the Motion SFC program processing can be set only once in the program parameter per program. Roughly classified, there are the following three different tasks. Task type Contents Normal task...
  • Page 437: Task Operation

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.2.2 Task operation (1) Normal task operation [Operations] The Motion SFC program is executed in the main cycle (free time) of the Motion CPU. The processing outline is shown below. • Number of consecutive transitions is set to "2". Program 1 Program 2 Program name...
  • Page 438 9 OPERATION FOR MOTION SFC AND PARAMETER (2) Event task operation [Operations] An event task executes the Motion SFC program at occurrence of an event. There are the following events. (a) Fixed cycle The Motion SFC program is executed periodically in any of 0.22ms 0.44ms, 0.88ms, 1.77ms, 3.55ms, 7.11ms and 14.2ms cycles.
  • Page 439 9 OPERATION FOR MOTION SFC AND PARAMETER <Example 2> Operation for PLC interrupt by D(P).GINT • Number of consecutive transitions is set to "2". Program name SFCS Sequence program EI/DI status by other programs. Event processing by external interrupt/ Starting of the GINT event task is accepted.
  • Page 440 9 OPERATION FOR MOTION SFC AND PARAMETER (3) NMI task operation [Operations] The Motion SFC program is executed when the input set to the NMI task factor among external interrupts (16 points of QI60) turns on. • Number of consecutive transitions is set to "2". Program name SFCS Sequence program...
  • Page 441: Execution Status Of The Multiple Task

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.3 Execution Status of the Multiple Task Execution status of each Motion SFC program when the Motion SFC program is executed multiple tasks is shown below. 3.55ms NMI interrupt NMI interrupt NMI task-execute program 3.55ms event task-execute program Normal task-execute program When there are programs which are executed by the NMI task, 3.55ms fixed-cycle...
  • Page 442: How To Start The Motion Sfc Program

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.4 How to Start the Motion SFC Program The Motion SFC program is executed during PLC ready flag (M2000) is on. The Motion SFC program may be started by any of the following three methods. (1) Automatic start (2) Start from the Motion SFC program (3) Start by Motion dedicated PLC instruction (D(P).SFCS) from PLC...
  • Page 443: How To Change From One Motion Sfc Program To Another

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.6 How to Change from One Motion SFC Program to Another Use a subroutine start to stop the Motion SFC program running and switch it to another Motion SFC program. Motion SFC program changing example using subroutine start MAIN 9.7 Operation Performed at Multiple CPU system Power-Off or Reset When the Multiple CPU system is powered off or reset operation is performed, Motion...
  • Page 444: Operation Performed When Plc Ready Flag (M2000) Turns Off/On

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.9 Operation Performed when PLC Ready Flag (M2000) Turns OFF/ON This section explains about the turns off/on of PLC ready flag (M2000). The on/off condition of PLC ready flag (M2000) differences in "Operation at STOP to RUN"...
  • Page 445: Task Parameters

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.11 Task Parameters Item Setting item Initial value Remark Number of Normal task consecutive (Normal task 1 to 30 These parameters are transitions common) imported at leading edge of Set whether the event task PLC ready flag (M2000) and or NMI task is used for used for control thereafter.
  • Page 446 9 OPERATION FOR MOTION SFC AND PARAMETER (2) Interrupt setting [Description] Set whether 16 interrupt input points (I0 to I15) of the QI60 interrupt module loaded in the motion slot are used as NMI or event task inputs. Setting can be made freely per point. All points default to event tasks.
  • Page 447: Program Parameters

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.12 Program Parameters Set the following parameters for every Motion SFC program. Item Setting range Initial value Remark Start setting Automatically started or not Not setting It is only one of normal, event and NMI tasks Normal task When you have set the event task, further set the event which will be enabled.
  • Page 448 9 OPERATION FOR MOTION SFC AND PARAMETER (1) Start setting [Description] The following control is changed by "automatically started or not" setting.  Program run by normal task Item When "automatically started" When "not automatically started" In the main cycle after PLC ready flag The program is started by the Motion SFC start request (D(P).SFCS) (M2000) ON, the program is executed from from the PLC or by a subroutine call/start (GSUB) made from the...
  • Page 449 9 OPERATION FOR MOTION SFC AND PARAMETER  Program run by NMI task Item When "automatically started" When "not automatically started" At occurrence of a valid event after PLC The program is started by the Motion SFC start request (D(P).SFCS) ready flag (M2000) ON, the program is from the PLC or by a subroutine call/start (GSUB) made from within executed from the initial (first) step in...
  • Page 450 9 OPERATION FOR MOTION SFC AND PARAMETER When the NMI task is set, multiple interrupt inputs among the external interrupts (for NMI task) can be set. <Example> Interrupt setting: Inputs for NMI task I0, I1, I2, I3, I4, I5 Motion SFC program No. 10 – NMI : I0 Motion SFC program No.
  • Page 451 9 OPERATION FOR MOTION SFC AND PARAMETER (4) END operation [Description] Set the operation at execution of the END step toward the program executed by the event or NMI task. This varies the specifications for the following items.  Program run by NMI task Item When "ended"...
  • Page 452: Task And Interrupt Processing

    9 OPERATION FOR MOTION SFC AND PARAMETER 9.13 Task and Interrupt Processing In the Motion CPU, the required operations over a fixed cycle are divided into tasks. Depending on the Motion CPU internal processing timing, the interrupt processing can affect tasks, therefore programs need to be designed with care. (1) Processing timing and processing time monitor device The Motion CPU internal processing timing and corresponding processing time monitor devices are shown in the following diagram.
  • Page 453 9 OPERATION FOR MOTION SFC AND PARAMETER (3) Operation example Axis 1 of the Motion SFC program below moves to "350.00000[degree] → 0[degree] → 160.00000[degree]". When the axis 1 feed current value (D0L) moves in the range of 120.00000 to 130.00000[degree], M100 is turned ON. [F0] RST M100 [K0]...
  • Page 454 9 OPERATION FOR MOTION SFC AND PARAMETER However, when the timing of axis 1 moving from 359.99999[degree] to 0[degree] coincides with the timing of the interrupt execution processing in the middle of [G1] processing in Motion SFC normal task processing, an unintended operation may occur.
  • Page 455 9 OPERATION FOR MOTION SFC AND PARAMETER MEMO 9 - 20...
  • Page 456: Online Change In The Motion Sfc Progrm 10- 1 To

    10 ONLINE CHANGE IN THE MOTION SFC PROGRAM 10. ONLINE CHANGE IN THE MOTION SFC PROGRAM 10.1 Online Change in the Motion SFC Program This function is used to write to the Motion SFC program to the SRAM built-in Motion CPU during the positioning control (7-segment LED : Steady "RUN"...
  • Page 457 10 ONLINE CHANGE IN THE MOTION SFC PROGRAM POINT (1) Program writing is executed during the positioning control in the online change. Be safely careful enough for work. (2) Programs writing to the SRAM built-in Motion CPU at the mode operated by ROM in the online change.
  • Page 458: Operating Method For The Online Change

    10 ONLINE CHANGE IN THE MOTION SFC PROGRAM 10.1.1 Operating method for the online change Select the "Online change OFF/ON" with the online change setting screen displayed on [Tools] menu – [Online Change Setting]" of MT Developer2. The methods for online change of Motion SFC program are shown below. Target data of online change Operation for online change •...
  • Page 459 10 ONLINE CHANGE IN THE MOTION SFC PROGRAM (2) Online change of the operation control/transition program Online change of the operation control/transition program during edit is executed by selecting the [Convert] button. Online change is possible to the operation control/transition program during execution.
  • Page 460 10 ONLINE CHANGE IN THE MOTION SFC PROGRAM (3) Online change of the servo program Online change of the servo program during edit is executed by selecting the [Convert] button. Online change is possible to the servo program during execution. A program that the online change was made is executed at the next servo program start.
  • Page 461: Writing Of Program

    10 ONLINE CHANGE IN THE MOTION SFC PROGRAM 10.1.2 Writing of program The outline operations to write the program from MT Developer2 to the program memory of Motion CPU are described. (1) Writing of program by the writing operation of MT Developer2 (a) The programs are stored in the program memory of Motion CPU stuffing to the front for every kind.
  • Page 462 10 ONLINE CHANGE IN THE MOTION SFC PROGRAM (b) If the online change is executed repeatedly, the free space in program memory is lost and the online change may not be executed. In this case, an error message is displayed by MT Developer2 at the online change, and "Online change OFF"...
  • Page 463 10 ONLINE CHANGE IN THE MOTION SFC PROGRAM MEMO 10 - 8...
  • Page 464: User Files

    11 USER FILES 11. USER FILES This section describer the user file list and directory structure. 11.1 Project There are "single file format" of treating a project as one file and "workspace format" of managing multiple projects in a workspace for user file. (1) Single file format Every project is treated as one file (file extension: .mtw).
  • Page 465: User File List

    11 USER FILES 11.2 User File List Folder configuration of user file to be saved in the workspace format is shown below. Save folder path Folder of user defined setting Workspace folder Folder of user defined setting (Multiple projects can be set.) Project folder Folder of user defined setting Project.mt2...
  • Page 466 11 USER FILES POINT (1) Double-clicking on the "Project file (Project.mt2)" opens a project. (2) A "Workspace" folder and a "Workspace list file (Workspacelist.xml)" that composes a workspace should be stored in the same folder. (3) The procedure for using on another PC a project stored in a workspace folder is shown below.
  • Page 467 11 USER FILES MEMO 11 - 4...
  • Page 468: Error Code Lists

    12 ERROR CODE LISTS 12. ERROR CODE LISTS When an error occurs while the Motion CPU is running, the error information is stored in the Motion error history devices (#8640 to #8735), special relay (SM) and special register (SD). 12.1 Confirming Error Code When an error occurs, the error code and error contents can be read using MT Developer2 or GX Works2/GX Developer.
  • Page 469: Motion Error Related Devices

    12 ERROR CODE LISTS 12.2 Motion Error Related Devices (1) Motion error history devices (#8640 to #8735) Eighth in the past (Seventh in the past to latest) error information are stored as a history. #8724 to #8735 are latest errors. All errors, including the Motion SFC control errors and the minor, major, servo, servo program setting and mode changing errors are stored.
  • Page 470 12 ERROR CODE LISTS Table 12.2 Motion error history device error information Description Signal name Motion SFC control errors Conventional errors Error Motion SFC 0 to 255: Motion SFC program No. in error program No. : Independent of Motion SFC program 2: Minor/major error (Command generation axis) (SV22 advanced synchronous control method) 3: Minor/major error...
  • Page 471 12 ERROR CODE LISTS Table 12.2 Motion error history device error information (Continued) Description Signal name Motion SFC control errors Conventional errors • Error type is followings; "2" : Error code stored in D12602+20n or D12603+20n "3" : Error code stored in D6+20n or D7+20n "4"...
  • Page 472 12 ERROR CODE LISTS Table 12.2 Motion error history device error information (Continued) Description Signal name Motion SFC control errors Conventional errors b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Speed control 10 multiplier setting for degree axis 0 : Invalid 1 : Valid...
  • Page 473 12 ERROR CODE LISTS (2) Motion error detection flag (M2039) The Motion error detection flag (M2039) turns on when any of the errors detected by the Motion CPU occurs. At error occurrence, data are set to the error devices in the following procedure. (a) Set the error code to each axis or error devices.
  • Page 474: Motion Sfc Error Code List

    12 ERROR CODE LISTS 12.3 Motion SFC Error Code List (1) Motion SFC program start errors (16000 to 16099) Error factor Error Details Error Processing Corrective Action code code Name Description At a start by D(P).SFCS instruction, PLC The specified Motion Provide ON of the PLC ready flag (M2000) PLC ready OFF 16000...
  • Page 475 12 ERROR CODE LISTS (2) Motion SFC interpreter detection errors (16100 to 16199) Error Details Error factor Error Processing Corrective Action code code Name Description • The code exists but is grammatically erroneous. • Though not within branch-coupling, a 16100 —...
  • Page 476 12 ERROR CODE LISTS (3) Motion SFC program run errors (16200 to 16299) Error Details Error factor Error Processing Corrective Action code code Name Description No specified program The servo program (Kn) specified with the 16200 — Create the specified servo program. (Kn) motion control step does not exist.
  • Page 477 12 ERROR CODE LISTS (4) Operation control/transition execution errors (16300 to 16599) Error Details Error factor Error Processing Corrective Action code code Name Description Event task enable (EI) Event task enable was executed at except Event task enable may be executed in the 16301 —...
  • Page 478 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Operation (/) 16320 — execution error Correct the program so that the divisor is The divisor is 0. other than 0. Remainder (%) 16321 —...
  • Page 479 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Direct specification 64 bit Multiple CPU area 16376 — device for CPU No.3 (U3E2\G10000 to) read error Direct specification 16 bit Multiple CPU area 16377 —...
  • Page 480 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description • Correct the program so that the (S1) is • (S1) is outside the range of 0 to 3. within the range of 0 to 3. •...
  • Page 481 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Cam No. specified by (S1) is outside the Correct the program so that the cam No. is range of 1 to 256. within the range of 1 to 256. •...
  • Page 482 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Cam No. specified by (S1) is outside the Correct the program so that the cam No. is range of 1 to 256. within the range of 1 to 256. •...
  • Page 483 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Cam No. specified by (S1) is outside the Correct the program so that the cam No. is range of 1 to 256. within the range of 1 to 256. Auto-generation type specified by (S2) has Correct the program to specify a value that been set to a value that does not...
  • Page 484 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Cam No. specified by (S1) is outside the Correct the program so that the cam No. is range of 1 to 256. within the range of 1 to 256. Cam data which No.
  • Page 485 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description • Correct the program so that the number of words (n) to be read is within the range of 1 to 256. • Number of words (n) to be read is outside •...
  • Page 486 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description • Correct the program so that number of • Number of words (n) to be written is words (n) to be written is within the range 1 outside the range 1 to 240.
  • Page 487 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Indirect specified 64- The indirectly specified device No. is outside 16467 — bit data register the range or an odd number. (D(n)F) read error Indirect specified 16- The indirectly specified device No.
  • Page 488 12 ERROR CODE LISTS Error factor Error Details Error Processing Corrective Action code code Name Description Indirect specified 16- bit batch internal 16520 — relay (M(n)) read error Indirect specified 32- bit batch internal 16521 — relay (M(n)) read error Indirect specified 16- bit batch 16522...
  • Page 489: Motion Sfc Parameter Errors

    12 ERROR CODE LISTS 12.4 Motion SFC Parameter Errors Motion SFC parameters are checked using MT Developer2. (1) Leading edge of PLC ready flag (M2000) errors (17000 to 17009) Error factor Error Details Error Processing Corrective Action code code Name Description The normal task's consecutive transition Normal task...
  • Page 490: Vision System Errors

    12 ERROR CODE LISTS 12.5 Vision System Errors Error factor Error Processing Corrective Action Error code Name Description • Any of the specified argument in the • Check the argument value and correct instruction is outside the range. the program so that the value is within the Argument range •...
  • Page 491 12 ERROR CODE LISTS Error factor Error Processing Corrective Action Error code Name Description There is no Ethernet communication line setting Correct the program to use the vision Vision system No. 18016 corresponding to the specified vision system system No. which has the Ethernet error communication line setting.
  • Page 492: Appendices

    APPENDICES APPENDICES APPENDIX 1 Processing Times The processing time for the individual instructions are shown below. Operation processing times can vary substantially depending on the nature of the source and destinations of the instructions, and the values contained in the following tables should therefore be taken as a set of general guidelines to processing time rather than as being strictly accurate.
  • Page 493 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] #0=#1*#2 D800=D801*D802 U3E1\G10000=U3E1\G10001*U3E1\G10002 #0L=#2L*#4L Multiplication D800L=D802L*D804L U3E1\G10000L=U3E1\G10002L*U3E1\G10004L #0F=#4F*#8F D800F=D804F*D808F U3E1\G10000F=U3E1\G10004F*U3E1\G10008F #0=#1/#2 D800=D801/D802 U3E1\G10000=U3E1\G10001/U3E1\G10002 Binary operation #0L=#2L/#4L Division D800L=D802L/D804L...
  • Page 494 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] #0=#1>>#2 D800=D801>>D802 U3E1\G10000`=U3E1\G10001>>U3E1\G10002 >> Bit right shift #0L=#2L>>#4L D800L=D802L>>D804L U3E1\G10000L=U3E1\G10002L>>U3E1\G10004L Bit operation #0=#1<<#2 D800=D801<<D802 U3E1\G10000=U3E1\G10001<<U3E1\G10002 <<...
  • Page 495 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] #0F=ABS(#4F) Absolute value D800F=ABS(D804F) U3E1\G10000F=ABS(U3E1\G10004F) #0F=RND(#4F) Round-off D800F=RND(D804F) U3E1\G10000F=RND(U3E1\G10004F) #0F=FIX(#4F) Round-down D800F=FIX(D804F) U3E1\G10000F=FIX(U3E1\G10004F) #0F=FUP(#4F) Round-up D800F=FUP(D804F) U3E1\G10000F=FUP(U3E1\G10004F) Standard...
  • Page 496 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] #0F=FLOAT(#4) D800F=FLOAT(D804) Converted into 64- U3E1\G10000F=FLOAT(U3E1\G10004) bit floating point FLOAT type #0F=FLOAT(#4L) (signed) D800F=FLOAT(D804L) U3E1\G10000F=FLOAT(U3E1\G10004L) #0F=UFLOAT(#4) D800F=UFLOAT(D804) Converted into 64-...
  • Page 497 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] OUT M100 = M0 OUT Y0 = M0 Bit device Bit device output control OUT PY0 = M0 OUT U3E1\G10000.0 = M0 SET M1000 = M0*M1 SET M1000 = X100*X101...
  • Page 498 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] SET M1000 = #0>#1 SET M1000 = D800>D801 SET M1000 = U3E1\G10000>U3E1\G10001 SET M1000 = #0L>#2L More than >...
  • Page 499 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] Event task enable Event task disable No operation BMOV #0,#100,K10 BMOV D800,D100,K10 BMOV U3E1\G10000,U3E1\G10100,K10 BMOV #0,#100,K100 19.0 19.0 BMOV...
  • Page 500 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] TO H0,H0,#0,K1 12.5 15.5 TO H0,H0,D800,K1 TO H0,H0,U3E1\G10000,K1 13.5 16.0 TO H0,H0,#0,K10 15.0 18.5 TO H0,H0,D800,K10 Write device data to TO H0,H0,U3E1\G10000,K10 19.0...
  • Page 501 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] RFROM #0,#4000,#4001,#4002,K1,M0 (Note-3) RFROM D800,D2000,D2001,D2002,K1,M0 RFROM U3E1\G10000,U3E1\G12000, (Note-3) U3E1\G12001,U3E1\G12002,K1,M0 RFROM #0,#4000,#4001,#4002,K10,M0 (Note-3) RFROM D800,D2000,D2001,D2002,K10,M0 RFROM U3E1\G10000,U3E1\G12000, (Note-3) Read buffer U3E1\G12001,U3E1\G12002,K10,M0...
  • Page 502 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] MVOUT K1,"A1",#0L,K1000 14.5 (Note-6) MVOUT D2000,D2001,#0L,K1000 15.0 22.0 (Note-7) MVOUT Output data MVOUT D2000,D2001,#0L,K1000 18.0 25.0 MVOUT U3E1\G10000,U3E1\G10001, 41.5...
  • Page 503 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-10) DSCL K0,K2000L,#0,#4002L (Note-10) DSCL K0,K2000L,D2000,D6002L DSCL K0,K2000L,U3E1\G10000,U3E1\G14002L 15.5 (Note-10) (Note-11) DSCL K0,K2000L,#0,#4002L 37.5 (Note-11) DSCL K0,K2000L,D2000,D6002L DSCL K0,K2000L,U3E1\G10000,U3E1\G14002L 104.5...
  • Page 504 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-15) SELECT CASE #0 == K1 #2 = #3 CEND CASE #1 == K1 #4 = #5 CEND CELSE #6 = #7...
  • Page 505 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-16) SELECT CASE D800 == K1 #2 = #3 CEND CASE D801 == K1 #4 = #5 CEND CELSE #6 = #7...
  • Page 506 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-17) SELECT CASE U3E1\G10000 == K1 #2 = #3 CEND SELECT - CASE U3E1\G10001 == K1 Selective branch CASE - #4 = #5...
  • Page 507 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-18) CAMWR #0,#2L,K256,#4 62.5 (Note-18) CAMWR D2000,D2002L,K256,D2004 CAMWR U3E1\G10000,U3E1\G10002L,K256, 104.0 (Note-18) U3E1\G10004 (Note-18) CAMWR #0,#2L,K1024,#4 207.5 (Note-18) CAMWR D2000,D2002L,K1024,D2004...
  • Page 508 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] Cam data write CAMWR2 U3E1\G10000,U3E1\G10002L,K1024, CAMWR2 565.5 (Note-19) U3E1\G10004 (Cam open area) (Note-20) CAMMK #0,#1,#2 192.5 (Note-20) CAMMK D2000,D2001,D2002...
  • Page 509 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-28) CAMMK #0,#1,#2 18403.5 (Note-28) Cam auto- CAMMK D2000,D2001,D2002 CAMMK generation CAMMK U3E1\G10000,U3E1\G10001, 18473.5 (Note-28) U3E1\G10002 (Note-29), (Note-31) CAMPSCL #0,#2,#14L...
  • Page 510 APPENDICES Processing time of operation instructions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] (Note-30), (Note-31) CAMPSCL #0,#2,#14L 27.5 CAMPSCL D2000,D2002,D2014L (Note-30), (Note-31) CAMPSCL U3E1\G10000,U3E1\G10002, 32.5 (Note-30), (Note-31) U3E1\G10014L (Note-30), (Note-32) CAMPSCL #0,#2,#14L 631.0...
  • Page 511 APPENDICES (2) Transition conditional expressions Processing time of transition conditional expressions Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] ON (Normally open X100 contact) (None) (Completion of condition) Bit device U3E1\G10000.0 status OFF (Normally...
  • Page 512 APPENDICES Processing time of transition conditional expressions (Continued) Q173DSCPU/ Q173DCPU(-S1)/ Classifi- Symbol Instruction Operation expression Q172DSCPU Q172DCPU(-S1) cations Unit [ µ s] Unit [ µ s] #0<=#1 D800<=D801 U3E1\G10000<=U3E1\G10001 Less than or equal #0L<=#2L <= D800L<=D802L (Completion of U3E1\G10000L<=U3E1\G10002L condition) #0F<=#4F D800<=D804F U3E1\G10000F<=U3E1\G10004F...
  • Page 513 APPENDICES (3) Processing time by the combination F and G (program described in F/G is NOP) F alone G alone GSUB JMP/coupling (Note) (Note) Q173DSCPU 10.5 17.0 Q172DSCPU [µs] Q173DCPU(-S1) 14.0 13.5 15.5 22.0 14.5 Q172DCPU(-S1)[µs] (Note): Varies greatly with the started or cleared program. Parallel branch (2 Pcs.) Parallel branch (5 Pcs.) At branch...
  • Page 514: Appendix 1.2 Processing Time Of Motion Dedicated Plc Instruction

    APPENDICES APPENDIX 1.2 Processing time of Motion dedicated PLC instruction Processing time of Motion dedicated PLC instruction Processing time [ µ s] (Note) Q04UD(E)HCPU (Note) Q06UD(E)HCPU Q03UDVCPU/ (Note) Q10UD(E)HCPU Q04UDVCPU/ (Note) Q13UD(E)HCPU (Note) Classifications Symbol Instruction (Condition) Q03UD(E)CPU Q06UDVCPU/ (Note) Q20UD(E)HCPU Q13UDVCPU/ (Note)
  • Page 515: Appendix 2 Sample Program

    APPENDICES APPENDIX 2 Sample Program APPENDIX 2.1 Motion control example by Motion SFC program (1) The Motion SFC program composition example to execute motion control. This sample program example using Q173DCPU is described to every following function. Function list of sample program Item Description When the forced stop input assigned to PX0 is on, all axes turn on, and...
  • Page 516 APPENDICES (2) Contents processing of the Motion SFC program Motion SFC program list Number of Automatic connective Program name Task Contents of processing operation transitions • This program starts automatically at the time of run of Motion CPU, and it is always executed. •...
  • Page 517 APPENDICES (a) No.20 : Main Main [G20] When a forced stop is released, a SM502 //Did you release a forced subroutine starts "No.110 : Motion //stop? control". (Because the next step is a shift, it becomes a subroutine start, and Motion control the next step is executed at the same time with subroutine practice, too.)
  • Page 518 APPENDICES (c) No.120 : JOG [F120] //1 axis JOG operation speed = //100000pulse/s D640L=K100000 //2 axes JOG operation speed = //100000pulse/s D642L=K100000 When each signal of PX3 to PX6 is turned on/off, which the [G120] correspondences JOG command device is SET/RST. //1 axis forward rotation JOG start It makes forward rotation JOG start of the same axis and a //SET/RST...
  • Page 519 APPENDICES (e) No.140 : Home position return Home position return request [G140] [G141] [G142] //(PX3*!1 axis home position return //(PX4*!2 axes home position return //Did you finish home position return //completion *1 axis in-position signal*!1 //completion *2 axes in-position signal*!2 //request mode? //axis start accept)? //axis start accept)?
  • Page 520 APPENDICES (f) No.150 : Programming operation Programming operation [G150] [G151] [G152] //(OFF to ON)detection of PX3. //Did you turn on PX4? //Did you finish a programming operation //mode? //PX3 turns on M0 in on when M1 (last time !(PX2*PX1) //condition of PX3) is off. RST M0 Detection for SET M0=PX3 * !M1...
  • Page 521 APPENDICES (3) System setting data of the Motion CPU System setting is shown below. (a) Module setting 1) Motion module setting Manual pulse generator interface module (Q173DPX : Slot 3) Axis No. Description Manual pulse generator, Synchronous encoder (INC) Manual pulse generator, Synchronous encoder (INC) I/O response time 0.4[ms] 2) PLC module setting...
  • Page 522 APPENDICES (b) Basic setting 1) Multiple CPU setting Setting items Description 2 modules No. of CPU All station stop by stop error of CPU 1/2 Operating mode Multiple CPU synchronous Set CPU No. 1/2 to synchronous startup startup setting 2) Multiple CPU high speed transmission area setting CPU specific send range User setting area Automatic refresh...
  • Page 523 APPENDICES 3) Automatic refresh setting a) CPU No.1 Automatic refresh Setting No. Points Start b) CPU No.2 Automatic refresh Setting No. Points Start M2000 M2319 M2400 M3039 D639 4) System basic setting Setting items Description Operation cycle Default Setting Operation at STOP to RUN M2000 is turned on by switching from STOP to RUN Forced stop 5) Latch range setting Latch (1)
  • Page 524 APPENDICES (4) Parameter setting of the PLC CPU (No.1) <Screen: GX Works2> PC parameter item Description 1 No. of PLC 2 modules 2 Operating mode All station stop by stop error of PLC1/PLC2 Multiple CPU Check the PLC No.1/PLC No.2 synchronous startup Check the all CPUs can read all inputs I/O sharing when...
  • Page 525: Appendix 2.2 Continuation Execution Example At The Subroutine Re-Start By The Motion Sfc Program

    APPENDICES APPENDIX 2.2 Continuation execution example at the subroutine re-start by the Motion SFC program (1) Explanation of the operation This is the program example which execute continuously from the motion control step which stopped on the way when it re-started after stopping the subroutine program with the clear step during the motion control is running.
  • Page 526 APPENDICES (2) Contents of processing the Motion SFC program Motion SFC program list Number of Automatic Program name Task connective Contents of processing operation transitions • This program starts automatically at the time of RUN of Motion CPU, and it is always executed. •...
  • Page 527 APPENDICES (a) No.20 : Main Main "0" is set on the continuation point (#100) [F20] as an initial value. #100=0 //Continuation point=0 [G20] SM502 //Did you release a forced //stop? The subroutine starts "No.160 : Restart continuation" after all axis servo are [F110] turned on and servo on of 1 axis and 2 SET M2042//All axis servo ON command...
  • Page 528 APPENDICES (b) No.160 : Restart continuation Restart continuation [G190] [G191] [G192] [G193] #100==0 //Is a continuation point 0? #100==10 //Is a continuation #100==20 //Is a continuation #100==30 //Is a continuation //point 10? //point 20? //point 30? [G151] The process is started corresponding to the value of //Did you turn on PX4? #100 (continuation point) from each point of P0 to P30.
  • Page 529: Appendix 2.3 Continuation Execution Example After The Stop By The Motion Sfc Program

    APPENDICES APPENDIX 2.3 Continuation execution example after the stop by the Motion SFC program (1) The explanation of the operation The program example that the Motion SFC program is stopped by external input signal ON for the forced stop from the input module, and it is executed continuously by external signal OFF for the stop is shown below.
  • Page 530 APPENDICES (2) Contents of processing Motion SFC program Motion SFC program list Number of Program Automatic Task connective Contents of processing name operation transitions • This program starts automatically at the time of RUN of Motion CPU, and it is always executed. •...
  • Page 531 APPENDICES (a) No.20 : Main Main [F20] The internal relay (M100) for the stop SET M100 //Stop ON (Initials set) turn on. Stop The subroutine starts "170: stop" and "150 : Programming operation". Programming operation [G20] The subroutine that motion control was SM502 //Did you release a forced executed at the time of the forced stop //stop?
  • Page 532 APPENDICES (c) No.150 : Programming operation Programming operation WAIT transition which [G151] wants to stop substitutes //Did you turn on PX4, and turn "The internal relay (M100) //off a stop? for the stop turns off." for PX4*!M100 the AND status. [K150:Real] The motion control step 1 ABS-2...
  • Page 533: Appendix 3 Vision System Connection Function

    APPENDICES APPENDIX 3 Vision System Connection Function Ver.! APPENDIX 3.1 Overview  The Cognex In-Sight vision system can be connected to the PERIPHERAL I/F of the Motion CPU (Q173DSCPU/Q172DSCPU/Q173DCPU-S1/Q172DCPU-S1). The vision system dedicated functions have been added to the Motion SFC program making it easy to control the vision system from the Motion SFC program.
  • Page 534 APPENDICES (1) System configuration This section explains the system configuration and precautions for using the Cognex vision system connection function. Motion CPU with PERIPHERAL I/F In-Sight Explorer MT Developer2 In-Sight series Up to 8 modules Ethernet HUB Ethernet cable Dedicated cable Servo amplifier SSCNET (/H) Alignment stage,...
  • Page 535 APPENDICES (2) Features of vision system connection function This section explains the features of the Cognex vision system connection function. (a) Method of connection with vision system The Motion CPU and vision system are connected with the Motion CPU's PERIPHERAL IF (Ethernet). A dedicated communication module, etc., is not needed.
  • Page 536 APPENDICES The following three communication methods can be used simultaneously with Ethernet. (Note-1) Ethernet 1) Telnet 2) TCP/IP protocol 3) MC protocol Cognex Motion controller vision system (Note-1): The simultaneous communication cannot be used depending on the vision system's model. Refer to the manual or help sections provided by Cognex to confirm the specifications of vision system.
  • Page 537 APPENDICES (c) Priority of the vision system dedicated function The priority of the vision system dedicated functions in the Motion CPU are shown below. Process Description Priority Servo operation process, Servo data communication Motion operation process High process, Event task of Motion SFC, etc. Vision system dedicated Execution of the communication process with the function...
  • Page 538: Appendix 3.2 Vision System Parameter Setting

    APPENDICES APPENDIX 3.2 Vision system parameter setting The vision system parameters (Ethernet communication line setting, vision program operation setting) of the MT Developer2 are set by opening an arbitrary SFC program and using the project window [System Setting] - [Vision System Parameter] - [Ethernet Communication Line Setting] or [Vision Program Operation Setting].
  • Page 539 APPENDICES (1) Ethernet Communication Line Setting Set the parameters related to the vision system Ethernet communication. (a) Vision System (camera) No. (Not necessary to set) This number (1 to 8) is used by the vision system dedicated function to identify the vision system. (b) IP Address Set the IP address set for each vision system.
  • Page 540 APPENDICES (f) Status Storage Device Set the word device in which the vision system status and vision system dedicated function error codes are set. Settable word devices are shown below. Item Device No. setting range (Note-1) D0 to D8190 Data register Link register W0 to W1FFE Motion register...
  • Page 541 APPENDICES 0: Not connected Communication discontinuity MVOPEN instruction or MVCLOSE instruction 10: Connecting Log on completed 20: Reception enabled Vision system dedicated Vision system dedicated function (Note-1) execution function (Note-1) execution completed 30: Executing Image data storage completed (Note-2) MVFIN instruction 40: Image data reception completed Read value cell read completed...
  • Page 542 APPENDICES (2) Vision Program Operation Setting The job (vision program) set in the vision system is assigned as a program number so that it can be executed from the vision system dedicated functions. (a) Program No. (Not necessary to set) This number (1 to 32) is used by the vision system dedicated function to identify the vision system job.
  • Page 543 APPENDICES POINT The vision program status storage device value is refreshed at the following timing. (1) When a job is loaded by the MVLOAD instruction or MVPST instruction. (Refreshed immediately after loading.) (2) When the vision system's online/offline status changes. ...
  • Page 544 APPENDICES (f) Image Data Storage Device Set the word device for storing the image data obtained when the job was executed. POINT The image data is stored only when the format output string setting of TCP/IP protocol is set in the vision system. (Refer to (3) in this section.) This does not need to be set if the format output string setting of TCP/IP protocol is not set in the vision system.
  • Page 545 APPENDICES (3) Setting batch send (TCP/IP protocol) of multiple data By using the format output string setting of TCP/IP protocol, image data after the job is finished can be sent in a batch to the Motion CPU.  Set with the following procedure using In-Sight Explorer.
  • Page 546 APPENDICES 6) The “TCP/IP” device will be added. Click the [Format String] button to display the FormatString dialog. 7) Set "Use Delimiter", and set the selectable character with "Standard". 8) Click the [Add] button to display the Select Output Data dialog. 9) Select the data to be sent to the Motion CPU as the result of the job execution, and then click the [OK] button.
  • Page 547 APPENDICES 10) Set "Data Type" for the added data. Select "Integer", "Unsigned Integer" or "Floating Point". The data type stored in the Motion CPU device is always a 64-bit floating point type regardless of the data type set here. 11) Click [OK] button to close the FormatString dialog. <Screen: In-Sight Explorer>...
  • Page 548: Appendix 3.3 Flow Of Vision System Control

    APPENDICES APPENDIX 3.3 Flow of vision system control This section explains the basic procedures for controlling the vision system from the Motion CPU. (1) Setting the vision system  Set the vision system network and create a job (vision program) using In-Sight Explorer.
  • Page 549 APPENDICES 5) Motion control is executed using the data acquired from the vision system. 6) Reset the status storage device using the MVFIN instruction to issue the next trigger. 7) If the job is not changed, repeat steps 3) to 6). 8) If necessary, log off the control target vision system using the MVCLOSE instruction.
  • Page 550: Appendix 3.4 Sample Program

    APPENDICES APPENDIX 3.4 Sample program (1) Explanation of the operations The following section gives an example of a program that executes positioning control using the adjustment data recognized by the vision system as the target data. (2) Setting the vision system ...
  • Page 551 APPENDICES (b) Vision program operation setting Program No.1 Setting item Description Vision System No. Vision Program Name Worksearch1 Status Storage Device D3000 Read Value Cell Not necessary to set Read Value Storage Device Image Data Storage Device D3010F APP - 60...
  • Page 552 APPENDICES (4) Motion SFC program Alignment ajustment Log onto vision system of vision sensor (camera) No. 2. [F0] //Log onto vision system MVOPEN K2 Confirm log on completion (20) with vision system status [G0] storage device (D2000). //Confirm log on completion Confirm that there is no error with error flag (M0).
  • Page 553 APPENDICES MEMO APP - 62...
  • Page 554 WARRANTY Please confirm the following product warranty details before using this product. Gratis Warranty Term and Gratis Warranty Range We will repair any failure or defect hereinafter referred to as "failure" in our FA equipment hereinafter referred to as the "Product" arisen during warranty period at no charge due to causes for which we are responsible through the distributor from which you purchased the Product or our service provider.
  • Page 555 Precautions for Choosing the Products (1) For the use of our Motion controller, its applications should be those that may not result in a serious damage even if any failure or malfunction occurs in Motion controller, and a backup or fail-safe function should operate on an external system to Motion controller when any failure or malfunction occurs.
  • Page 556 IB(NA)-0300135-K(1912)MEE MODEL: Q173D-P-SV13/22-SFCE MODEL CODE: 1XB929 HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission.

Table of Contents