Home

OMRON R88A-MCW151-E/R88A-MCW151-DRT-E Manual

image

Contents

1. 28 01 33 00 8A 00 01 NL o N N Command Class ID Instance ID Length L code Service code Address H Length H Destination node address Address L Response Block 28 01 00 00 B3 N A Command Response No of bytes Word data L code code received Word data H Service code Source node address Read data Maximum 240 bytes Parameters Service code command response In the command 33 Hex is specified In the response the leftmost bit is turned ON and B3 Hex is returned Address H Address L command The address in hexadecimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal ignored for MC Unit Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the VR memory the maximum value is 250 FA Hex Length H Length L command The number of VR memory elements to read Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the maximum is 39 elements 27 Hex The 39 VR elements imply 234 bytes to be transferred Read data response The specified data is returned from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 The user should be aware that the MC Unit does no
2. Programmable Terminal PT General purpose device Typical applicable Sensors for Servo Driver Digital Inputs Typical applicable Actuators for Digital Outputs Relais Print Registration Lamp Limit Switches Power Supply connection Typical applicable Sensors for Digital Inputs Print Registration 9 24 V Power supply Typical applicable Pulse Generators for Encoder Input p Proximity Sensor MCW151 Unit Typical applicable Units for Encoder Output Servo Driver MCW151 Unit Note 1 The RS 422A 485 Serial Port 2 is only available on the MCW151 E Unit 2 The MC Unit has one encoder axis Either the encoder input or the encoder output can be used System Configuration Section 1 2 The equipment and models which can be used in the system configuration are shown in the following table Device Model Motion Control Unit R88A MCW151 E R88A MCW151 DRT E Servo Driver see note R88D WTLI Servomotor R88M WLI Control Devices using Programmable Terminals Host Link CPU Units Personal Computer for IBM Personal Computer or 100 compa
3. 227 SECTION 9 Maintenance and Inspection 233 9 1 Routine Inspections esee ee 234 9 2 Replacing a MC NERO RD 235 Appendices Appendix A Servo Driver Parameter List 237 Appendix B Device Protocol MCW151 DRT E 239 AppendixC Programming 245 Index ws wo y beak UE eee 25 gt Revision History 261 PRECAUTIONS This section provides general precautions for using the Motion Control Unit and related devices The information contained in this section is important for the safe and reliable application of the Motion Control Unit You must read this section and understand the information contained before attempting to set up or operate a Motion Control Unit and Servo Driver amp Intended Audience General Precautions General Warnings and Safety Precautions Storage and Transportation Precautions Installation and Wiring Precautions Operation and Adjustment Precautions Maintenance and Inspection Precautions Conformance to EC Directives 8 1 8 1 1 Conformance to EC Directives xii xii
4. 13 1 4 Control System Configuration 14 1 4 1 Servo System 14 1 4 2 Encoder Signals 2 17 1 5 Specifications RR Se Sake eo ee Mone 19 1 5 1 General Specifications 19 1 5 2 Functional 19 1 5 3 DeviceNet Specifications MCWISI DRT Bonly 21 1 6 Comparison between Firmware Versions 21 Features Section 1 1 1 1 Features 1 1 1 Overview Point to point Control Continuous Path Control Electronic Gearing MCW151 E MCW151 DRT E 151 MCW151 DRT RUNO QOsrs RUNO 500 Oro MS Ons PORT2 N 26 25 24V 24V ov ov q EN Uu u 522 Ges The R88A MCW151 is a 1 5 axis Motion Control MC Unit which is con nected to the W series Servo Driver The MC Unit provides direct control of the Servo Driver enables both speed and torque control and has access to detailed Servo Driver data To support a multi axis control application the MC Unit features both an encoder input and output connection There are two types of the MCW151 Motion
5. condition Any logical expression commands Any valid BASIC commands Example 1 IF 5 gt 0 22 VR 0 THEN GOTO exceeds length Example 2 IF IN 0 ON THEN count count 1 PRINT COUNTS count fail 0 ELSE fail fail 1 ENDIF Command function and parameter description Section 6 3 6 3 99 IN Type Syntax Description Arguments See also Examples 6 3 100 INDEVICE Type Description Function IN input number final input number IN The IN function returns the value of digital inputs e IN input number final input number will return the binary sum of the group of inputs The two arguments must be less than 24 apart IN input number with the value for input number less than 32 will return the value of the particular channel IN without arguments will return the binary sum of the first 24 inputs as IN 0 23 Refer to 3 3 2 Digital I O for a description of the various types of output and inputs input number The number of the input for which to return a value Value An integer between 0 and 31 final input number The number of the last input for which to return a value Value An integer between 0 and 31 OP Example 1 The following lines can be used to move to the position set on a thumbwheel multiplied by a factor The thumbwheel is connected to inputs 4 5 6 and 7 and gives output in BCD moveloop MOVEABS IN 4 7 1 5467 WAIT IDLE
6. 623 88 GOTO s eni ex reden ae REA RR tas 6 3 89 HALD cedem gk toe ee ED RERO 6 3 90 6 3 91 HEM READ percre eat a epee ele 6 3 02 FILM STATUS tob er ERR FIERI 6 3 93 6 3 94 HLM 222 tne bead eee UM RES 623 95 HLS MODBEL gere Cet eem eC es 6 3 96 CHES NODE sors La Se Bh Bees 623 97 LGAN S Se ue mo 6 3 98 5 6 3 09 TIN uie esee EE ete EN a ee 6 534100 INDEVICE eae meet gis cs 6 3 101 imo RR eh ee I EXITUS 6 3 102 INP tese et d Us e P ee EEG 6 3 103 JOGSPEED e s cur enu hoe E ae en DEINEN RIS 6 3 I04 KEY Re ER UU eU Re uA 63 105 EAST AXIS Sot rena AER 6 3 106 LINK AXIS ee er ee NIRE Ee 6 9 107 TANPUT iet SR C ERE Ep e 6 3 108 LIST esi oe edo dale Dru eU bci 6 3 109 EN VEL Led oe dece dee RP EE ES 6 3 TO LOCK seh sires Pies ae REN ER 6 3 111 MARK inn 55 make eae teen 653 112 MARK Boo eco t UE eR RR Ro 6 3 113 MERGE iecore Rege HERE UN Re pg 6232114 MOD sot
7. Commands description of the Host Link protocol can be found in SYSMAC CS CJ Series Communications Commands Reference Manual W342 Type Header Name Function Code memory reading RR CIO AREA READ Reads the specified number of words beginning with the designated CIO IR word RL LR AREA READ Reads the specified number of words beginning with the designated LR word RH HR AREA READ Reads the specified number of words beginning with the designated HR word RD DM AREA READ Reads the specified number of words beginning with the designated DM word RJ AR AREA READ Reads the specified number of words beginning with the designated AR word RE EM AREA READ Reads the specified number of words beginning with the designated EM word memory writing WR CIO AREA WRITE Writes the specified data in word units beginning with the designated CIO IR word WL LR AREA WRITE Writes the specified data in word units beginning with the designated LR word WH HR AREA WRITE Writes the specified data in word units beginning with the designated HR word WD DM AREA WRITE Writes the specified data in word units beginning with the designated DM word WJ AR AREA WRITE Writes the specified data in word units beginning with the designated AR word WE EM AREA WRITE Writes the specified data in word units beginning with the designated EM word CPU Unit status SC STATUS WRITE Changes the CPU Unit s operating mode Testing TS TEST Returns unaltered a s
8. 7 6 Suggestions and 198 198 199 199 201 201 202 203 204 204 205 208 209 209 210 211 211 212 217 197 Features and Requirements Section 7 1 7 1 Features and Requirements Requirements Motion Perfect provides the following features Using the Project Manager to maintain a consistent copy of application programs on the computer Creating copying renaming deleting editing running and debugging programs on the MC Unit Using the Control Panel Full Controller Directory Axis Parameters Win dow and I O status to monitor the MC Unit and to control its status Using the Program Debugger Axis Parameters Window Software Oscil loscope Window and Jog Axes Window to adjust the servo system It is possible to open several windows on the Motion Perfect desktop and run them simultaneously A user could be stepping through a program displayed in an Editor Window while checking the program s output and entering input characters via a separate terminal Window and while also monitoring and updating the axis parameters and I O status The MC Unit requires Motion Perfect version 2 0 or later Please note that previous versions of the package will not work with this MC Unit The following are required to run Motion Perfect version 2 0 1 IBM Personal Computer or 10096 compatible Microsoft Windows 95 98 2000 or NT 4 0 66 MHz 486 based pro
9. SELECT program_name The SELECT command specifies the current program for editing running list ing etc SELECT makes a new program if the name entered does not exist The program name can also be specified without quotes When a program is selected the commands COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP and TROFF will apply to the currently selected program unless a program is specified in the command line When another program is selected the previously selected program will be compiled The selected program cannot be changed when a program is running This command is implemented for an offline VT100 terminal Motion Perfect automatically selects programs when you click on their entry in the list in the control panel COMPILE DEL EDIT LIST NEW RUN STEPLINE STOP TROFF gt gt SELECT PROGRAM PROGRAM selected gt gt RUN Axis Parameter The SERVO parameter determines whether the base axis runs under servo control SERVOZON or open loop SERVO OFF In closed loop the motion control algorithm will output a speed reference signal determined by the con trol gain settings and the following error The position of the Servomotor is determined using the motion control commands In open loop the speed reference signal is completely determined by the S REF axis parameter AXIS FE LIMIT REF 6 REF OUT WDOG SERVO AXIS 0 SERVO AXIS 1 ON OFF Axis 0 is under servo con
10. Name Description Page SERVO_PERIOD SERVO PERIOD sets the servo cycle period of the MC Unit 184 SET BIT SET command sets the specified bit in the specified VR 185 variable to one SWITCH STATUS SWITCH STATUS contains the status of the 10 external DIP 187 switches on the MC Unit TABLE TABLE writes and reads data to and from the Table variable 188 array TSIZE TSIZE returns the size of the currently defined Table 191 VERSION VERSION returns the version number of the BASIC language 191 installed in the MC Unit VR VR writes and reads data to and from the global VR vari 192 ables WA WA holds program execution for the number of milliseconds 193 specified WAIT IDLE WAIT IDLE suspends program execution until the base axis 193 has finished executing its current move and any buffered move WAIT LOADED WAIT LOADED suspends program execution until the base 194 axis has no moves buffered ahead other than the currently executing move WAIT UNTIL WAIT UNTIL repeatedly evaluates the condition until TRUE 194 WDOG WDOG contains the software switch which enables the Servo 195 Driver Mathematical and Logical Functions The table below outlines the mathematical and logical functions Refer to the specified pages for details Name Description Page Multiply multiplies any two valid expressions 111 Power takes the power of any two v
11. 103 6 2 3 Loop and Conditional Structures 104 6 2 4 Program Commands and 104 6 2 5 System Commands and Parameters 105 6 2 6 Mathematical and Logical 106 6 27 Constantis NE XR SILT RE RS 107 6 2 8 Motion Perfect Commands Functions and Parameters 107 6 2 9 Axis Parameters 107 6 2 10 Task Commands and Parameters 109 6 2 11 Servo Driver Commands and 110 6 2 12 Host Link Commands and 110 6 2 13 DeviceNet Commands and Parameters 110 6 3 Command function and parameter description 111 6 3 1 111 6 2 2 zo destitit sis E ME OEC e 111 6 3 3 AGG ds er exces iS tee PE aye SC BICI Bue Red ue 111 6 3 4 6 112 6 3 ssec REIS IAE ie 112 6 3 6 Js Less Than exe De Ie EAE 112 6 3 7 Is Less Than Or Equal To lt 112 6 3 8 Is Not Equal To lt gt 113 62329 Is Equal Tos cssste hebes eh eek tek ets Sh te ehe 113 6 3 10 Is Greate
12. subtracts any two valid expressions expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression VR 0 10 2 1 9 The parentheses are evaluated first and the result 18 9 is subtracted from 10 Therefore VR 0 would contain the value 8 9 Arithmetic Operation expression 1 expression 2 The divide operator divides any two valid expressions expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression a 10 2 1 9 The parentheses are evaluated first and then 10 is divided by the result 11 1 Therefore a would contain the value 0 9009 lt Logical Operation expression 1 expression 2 The less than operator lt returns TRUE if expression 1 is less than expression 2 otherwise it returns FALSE expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression IF VR 1 10 THEN GOSUB rollup If the value returned from VR 1 is less than 10 then subroutine rollup would be executed Is Less Than Or Equal To z Type Syntax Description Arguments Example Logical Operation expression 1 expression 2 The less than or equal to operator lt returns TRUE if expression 1 is less than or equal to expression 2 otherwise it returns FALSE expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression maybe 1 lt 0 Command function and parameter description 6
13. m Servo Driver Orientation Install the Servo Driver perpendicular to the wall so that the front panel dis play and setting section faces forward m Cooling As shown in the figure above provide sufficient space around each Servo Driver for cooling by cooling fans or natural convection m Side by side Installation When installing Servo Drivers side by side as shown in the figure above pro vide at least 10 mm between and at least 50 mm above and below each Servo Driver Install cooling fans above the Servo Drivers to avoid excessive temperature rise and to maintain even temperature inside the control panel m Environmental Conditions Ambient operating temperature to 55 C Ambient operating humidity 20 to 90 RH no condensation e Vibration 4 9 m s 2 2 2 Installation Method When installing the MC Unit 1 2 3 1 Insertthe lower two extensions into the bottom mounting holes on the right side of the Servo Driver 2 Movethe upper side of the MC Unit towards the Driver and verify the Servo Driver connector will directly fit into the MC Unit connector Click the higher extension into the upper mounting hole 28 Installation Section 2 2 f aie O O00 0 0 ae Jie o v Se LJ When removing the MC Unit press down the top of th
14. Baud rate 500 kbps 250 kbps 125 kbps switchable Communications media Special 5 wire cables 2 signal lines 2 power lines 1 shield line Communications dis tances 500 kbps Network length 100 m max 100 m max Drop line length 6 m max Total drop line length 39 m max 250 kbps Network length 250 m max 100 m max Drop line length 6 m max Total drop line length 78 m max 125 kbps Network length 500 m max 100 m max Drop line length 6 m max Total drop line length 156 m max Parentheses indicate the length when Thin Cables are used Communications power supply 11 to 25 VDC Supplied from the communications con nector Note Terminating resistors are required at both ends of trunk line Refer to the DeviceNet Operation Manual W267 for other communication specifications such as communication cycle times 1 6 Comparison between Firmware Versions The following table shows a comparison between the two current versions of the R88A MCW151 E and R88A MCW151 DRT E Motion Control Units The changes are only related to firmware not hardware and the firmware is com mon for both types Verify the current version of the MC Unit using the VER SION parameter 21 Section 1 6 Comparison between Firmware Versions 22 Z Caution The R88A MCW151 E FW 1 62 is fully backward compatible with the previ ous version FW 1 61 For the R88A MCW151 DRT
15. Electrical characteristics Conform to EIA RS 422A 485 Synchronization Start stop synchronization asynchronous Baud rate 1200 2400 4800 9600 19200 38400 bps Transmission Format Databit Length 7 or 8 bit Stop Bit 1 or 2 bit Parity Bit Even Odd None Transmission Mode Point to multipoint 1 N Transmission Protocol RS 422A Host Link Protocol Master Slave General Purpose RS 485 General Purpose Galvanic Isolation Yes Connector type Phoenix MSTB 2 5 5 ST 5 08 included in package Communication buffers 254 bytes Flow control None Terminator Yes internal 220Q selectable by DIP switch SW2 Cable length 500 m max 32 Wiring Connection Examples Direct Connections Using RS 232C Port 0 IBM PC AT or Compatible Computers Section 2 3 Computer MC Unit Signal Pin Pin Signal as RD 2 3 SD 0 RS 232C 50 3 4 SG 0 interface Interface GND 5 5 RD 0 RS 7 Shell FG CS 8 FG Shell D sub 9 pin mini DIN 8 pin connector male connector male Direct Connections Using RS 232C Port 1 Programming Te
16. Host Link Slave General purpose DeviceNet MCW151 DRT E only 4 2 1 4 2 2 Remote I O Communications Explicit DeviceNet Messages 60 60 65 67 68 68 72 59 Serial Communications Section 4 1 4 1 Serial Communications Both the MCW151 E as the MCW151 DRT E provide serial ports for commu nication with host computers PCs Programmable Terminals PTs and other general purpose devices The MC Units are provided with the following proto cols Motion Perfect protocol For connection to personal computer e Host Link For connection to PCs Programmable Terminals other MC Units General purpose For connection to general purpose external devices MC Unit Serial Ports Motion Perfect Host Link Master Host Link Slave General Purpose Protocol note 3 note 3 151 Port 0 RS 232C See Yes No No No note 1 Port 1 RS 232C No Yes Yes Yes Port 2 RS 422A 485 No Yes Yes Yes See note 2 MCW151 Port 0 RS 232C See Yes No No No DRT E note 1 Port 1 RS 232C No Yes Yes Yes Devices to connect Personal Com PCs MCW151s Programmable General purpose puter Terminals external devices MCWh151s Note 1 The programming port 0 RS 232C can only be used for connection to a personal computer with the Motion Perfect configuration software 2 A 4 wire RS 422A connection must be used when using Host Link Com munication 3 Forconnection to
17. STEPLINE program_name task_number The STEPLINE command executes one line i e steps in the program specified by program_name The program name can also be specified without quotes If STEPLINE is executed without program name on the command line the current selected program will be stepped If STEPLINE is executed with out program name in a program this program will be stepped If the program is specified then all occurrences of this program will be stepped A new task will be started when there is no copy of the program run ning If the task is specified as well then only the copy of the program running on the specified task will be stepped If there is no copy of the program run ning on the specified task then one will be started on it program_name The name of the program to be stepped task_number The number of the task with the program to be stepped Range 1 3 RUN SELECT STOP TROFF TRON Example 1 gt gt STEPLINE conveyor Example 2 gt gt STEPLINE maths 2 Program Command STOP program_name task number The STOP command will halt execution of the program specified with program name If the program name is omitted then the currently selected program will be halted The program name can also be specified without quotes In case of multiple executions of a single program on different tasks the task number can be used to specify the specific task to
18. Host Link Communication HLM HLS 13MM42 HLS gt HLM no response Result As no response has been received from the PC after 500 servo cycles the HLM_STATUS PORT 2 will have value 256 bit 8 is set 4 1 2 Host Link Slave Host Link Slave In Host Link Slave mode a Host Link Master such as a Programmable Termi nal can read data from and write data to the MC Unit The MC Unit will have the following mapping for the Host Link Slave MCW151 Memory Host Link Mapping Address Range VR CIO 0 to 250 Table DM 0 to 7999 The following BASIC commands are used BASIC Command Description SETCOM SETCOM configures the serial communication port including enabling the Host Link protocols HLS NODE HLS NODE defines the Slave unit number for the Host Link Slave protocol HLS MODEL HLS MODEL defines the MC Unit model code for the Host Link Slave protocol Refer to SECTION 6 BASIC Motion Control Programming Language for fur ther details on the commands The list of Host Link commands that are supported for the Host Link Slave are Commands listed here below The protocol supports both single frame and multiple frame transfer A full description of the Host Link protocol can be found in SYSMAC CS CJ Series Communications Commands Reference Manual W342 Type Header Name Function Code memory reading RR CIO AREA READ Reads the specified number of words from VR mem or
19. Arguments Example ATYPE Type Section 6 3 Therefore VR 0 will contain the value 2 01010 AND 10010 00010 Example 2 IF MPOS AXIS 0 gt 0 AND MPOS AXIS 1 gt 0 THEN GOTO cyclel Mathematical Function ASIN expression The ASIN function returns the arc sine of the expression The expression value must be between 1 and 1 The result in radians will be between 2 and 2 Input values outside the range will return zero expression Any valid BASIC expression gt gt PRINT ASIN 1 1 5708 Mathematical Function ATAN expression The ATAN function returns the arc tangent of the expression ATAN can have any value The result will be in radians and will be between 2 and 2 expression Any valid BASIC expression gt gt PRINT 1 0 7854 Mathematical Function ATAN2 expression 1 expression 2 The ATAN2 function returns the arc tangent of the nonzero complex number expression 2 expression 1 which is equivalent to the angle between a point with coordinate expression 1 expression 2 and the x axis If expression 2 gt 0 the result is equal to the value of ATAN expression 1 expression 2 The result in radians will be between PI and PI expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression gt gt PRINT ATAN2 0 1 0 0000 Axis parameter 119 Command function and parameter description Description See also
20. NCaution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed See also DRV STATUS 6 3 57 DRV READ Type Servo Driver Function Syntax DRV READ parameter selection Description The READ function reads the specified parameter of the Servo Driver DRV READ is able to read Pn type and Un type parameters and also can return Servomotor specifics which normally can be accessed using Fn011 The Servo Driver Pn parameters are divided into two groups Selection parameters which contain hexadecimal value One example is for instance the Pn50A input signal selection 1 Value parameters which contain integer values One example is for instance the Pn205 absolute encoder multi turn limit setting Please note that executing a READ will temporarily disable the Servo Driver Front Panel display Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed Arguments parameter The number of the parameter to be read Note that the parameter numbers are hexadecimal For selection 2 the following data can be read 0 Motor type 011 1 Motor capacit
21. field Online bus power is not supplied Switch Settings The MCW151 Units are equipped with the following DIP switches DeviceNet Switch Settings MCW151 DRT E only The external switch settings will set the Slaves node address setting and baud rate setting Node address The node address of the slave is set with pins 1 through 6 of the DIP switch Any node address within the setting z gt A already set on another node range can be used as long as it is not 25 Components and Unit Settings Section 2 1 DIP switch setting Node address Pin6 Pin5 Pin4 Pin3 Pin2 Pin 1 0 0 0 0 0 0 0 default 0 0 0 0 0 1 1 0 0 0 0 1 0 2 1 1 1 1 0 1 61 1 1 1 1 1 0 62 1 1 1 1 1 1 63 0 OFF 1 ON Baud rate Pins 9 and 10 are used to set the baud rate as shown in the following table Pin 10 Pin 9 Baud rate OFF OFF 125 kbps default OFF ON 250 kbps ON OFF 500 kbps ON ON Not allowed Note 1 Always turn OFF the MC Unit s power supply including the communica tions power supply before changing the baud rate setting 2 Setthe same baud rate on all of the nodes master and slaves in the Net work Other settings Pin 7 is used to select the I O Slave Messaging mode This determines the allocation of the I
22. for axis 7 at any time of the movement is calculated as dist_i The distance to move for every axis in user units starting with the base axis AXIS MOVEABS UNITS Example 1 A system is working with a unit conversion factor of 1 and has a 1000 line encoder It is therefore necessary to use the following command to move 10 turns on the motor A 1000 line encoder gives 4000 edges turn MOVE 40000 Example 2 In this example axes 0 1 and 2 are moved independently without interpola tion Each axis will move at its programmed speed and other axis parame ters MOVE 10 AXIS 0 157 Command function and parameter description Section 6 3 6 3 117 MOVEABS 158 Type Syntax Alternative Description Arguments MOVE 10 AXIS 1 MOVE 10 AXIS 2 Example 3 An X Y plotter can write text at any position within its working envelope Indi vidual characters are defined as a sequence of moves relative to a start point so that the same commands can be used no matter what the plot position The command subroutine for the letter m might be as follows m MOVE 0 12 move A B MOVE 3 6 move gt C MOVE 3 6 move C gt D MOVE 0 12 move D gt E B D C A E Motion Control Command MOVEABS pos pos 2 pos 31 pos 1 pos 2 3 p The MOVEABS command moves one or more axes at the demand speed acceleration and deceleration
23. 86 5 3 Motion Execution oe IRURE Ee OS ES ee 89 5 4 Command Line 90 5 5 BASIC Programs eese rede pede 4 Steve e 90 5 6 Task Operation Sequence 93 524 BrrorProcessinpin shoes ala ate apie le Se aot 94 SECTION 6 BASIC Motion Control Programming Language 97 6 1 OVeIVIGW d ce og eee T ENGINEER E ERA ER De TG RO e 102 6 2 Command Reference 48 103 6 5 Command function and parameter 111 SECTION 7 Motion Perfect Software Package 197 7 1 Features and 198 7 2 Connecting to the 198 7 3 Motion Perfect 199 7 4 Desktop Appearance 201 7 5 Motion Perfect ToolS ssepe Mae 204 7 6 Suggestions and 217 SECTION 8 219 8 1 Error indicators iens Fre rtis era eae ger Bale 220 8 2 Error Handling e eoe p epe ep tere e ee ped 221 8 3 Problems and
24. 90 The MC Unit can store up to 14 programs in memory provided the capacity of memory is not exceeded The MC Unit supports simple file handling instruc tions for managing these program files rather like the DOS filing system on a computer BASIC Programs Section 5 5 The Motion Perfect software package is used to store and load programs to and from a computer for archiving printing and editing It also has several controller monitor and debugging facilities Refer to SECTION 7 Motion Per fect Software Package for details on Motion Perfect 5 5 1 Managing Programs Storing Programs Program Commands Motion Perfect automatically creates a project which contains the programs to be used for an application The programs of the project are kept both in the controller as on the computer Whenever a program is created or edited Motion Perfect edits both copies in order to always have an accurate backup outside the controller at any time Motion Perfect checks that the two versions of the project are identical using a cyclic redundancy check If the two differ Motion Perfect allows copying the MC Unit version to disk or vice versa Programs on the computer are stored in ASCII text files They may therefore be printed edited and copied using a simple text editor The source programs are held in the MC Unit in a tokenised form and as a result the sizes of the programs will be less on the MC Unit compared to the same programs on the compu
25. Adding output velocity gain to a system is mechanically equivalent to adding damping It is likely to produce a smoother response and allow the use of a higher proportional gain than could otherwise be used but at the expense of higher following errors High values may cause oscillation and produce high following errors See section 1 4 1 Servo System Principles for more details In order to avoid any instability the servo gains should be changed only when the SERVO is OFF Command function and parameter description Section 6 3 See also 6 3 138 P_GAIN Type Description Precautions See also 6 3 139 Pl Type Description Note Example 6 3 140 PMOVE Type Description Note See also 6 3 141 PP_STEP Type Description AXIS D GAIN I GAIN GAIN VFF GAIN Axis Parameter The GAIN parameter contains the proportional gain The proportional out put contribution is calculated by multiplying the following error with the P GAIN parameter value The default value for axis 0 is 0 1 The proportional gain sets the stiffness of the servo response Values that are too high will cause oscillation Values that are too low will cause large fol lowing errors See section 1 4 1 Servo System Principles for more details In order to avoid any instability the servo gains should be changed only when the SERVO is OFF AXIS D GAIN GAIN OV GAIN VFF GAIN Constant The PI constant returns the numerical
26. S RATE S RATE contains the speed reference rate for the attached 181 Servomotor S REF 5 REF contains the speed reference value which is applied 182 when the axis is in open loop S REF OUT S REF OUT contains the speed reference value being 182 applied to the Servo Driver for both open as closed loop SERVO SERVO determines whether the axis runs under servo control 184 or open loop SPEED SPEED contains the demand speed in units s 186 SRAMP SRAMP contains the S curve factor 186 T RATE T RATE contains the torque reference rate for the attached 188 Servomotor T REF T REF contains the torque reference value which is applied 188 to the Servomotor UNITS UNITS contains the unit conversion factor 191 VFF GAIN VFF GAIN contains the speed feed forward control gain 192 VP SPEED VP SPEED contains the speed profile speed 192 6 2 10 Task Commands and Parameters The table below outlines the task commands and parameters Refer to the specified pages for details Name Description Page ERROR LINE ERROR LINE contains the number of the line which caused 136 the last BASIC program error PMOVE PMOVE contains the status of the task buffers 169 PROC PROC allows a process parameter from a particular process 171 to be accessed PROC LINE PROC LINE returns the current line number of the specified 171 program task PROC STATUS PROC STATUS returns the status of the process specified
27. 09 Axis 0 Reverse Limit Flag 1 Reverse limit is set for Servo Driver axis 0 0 No reverse limit 10 Axis 0 Datuming Flag 1 Datuming origin search in progress for Servo Driver axis 0 0 No datuming 11 Axis 0 Feedhold Flag 1 Feedhold input is set for Servo Driver axis 0 0 No feedhold 12 Axis 0 Following Error 1 Following error limit is reached for Servo Driver axis 0 Limit Flag 0 No following error limit 13 Task 1 Flag 1 Program is running on task no 1 0 No program is running on task 14 Task 2 Flag 1 Program is running on task no 2 0 No program is running on task 15 Task 3 Flag 1 Program is running on task no 3 0 No program is running on task 2 n to User defined Contents is allocated by using the FB SET parameter 5 3 see 00to User defined Contents is set by VR 2 note 15 4 see 00to User defined Contents is set by VR 3 note 15 Note The input words no 3 and 4 will only be transferred when I O Slave messag ing mode Il is selected 70 DeviceNet MCW151 DRT E only Input word 2 Section 4 2 The allocation of input word 2 is determined by the FB_SET parameter The following settings are supported FB SET Bit Name Function value 0 ne to User defined Contents is set by VR 0 5 1 MC Unit I O Mapping 00 Registration Input 0 1 Input is ON 0 Input is OFF 01 Registration Input 1 1 In
28. 1 0000 Command function and parameter description Section 6 3 6 3 103 JOGSPEED Type Description See also 6 3 104 KEY Type Syntax Description Argument Precautions See also Example 6 3 105 LAST_AXIS Type Description See also Note Axis Parameter The JOGSPEED parameter sets the jog speed in user units for an axis A jog will be performed when a jog input for an axis has been declared and that input is low A forward jog input and a reverse jog input are available for each axis respectively set by FWD_JOG and REV_JOG The speed of the jog can be controlled with the FAST_JOG input AXIS FAST_JOG FWD_JOG REV_JOG UNITS Parameter KEY n The KEY parameter returns TRUE or FALSE depending on if a character has been received at the serial port buffer or not A TRUE result will reset when the character is read with the GET command Channels 5 to 7 are logical channels that are superimposed on the RS 232C programming port 0 when using Motion Perfect n The specified input device When this argument is omitted the port as speci fied by INDEVICE will be used 0 RS 232C programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 DM Channel 0 is reserved for the connection to Motion Perfect and or the com mand line interface Please be
29. 2 3 2 Serial Port Connections 2 3 3 DeviceNet Connection 2 944 Specifications eeepc Caen 2 3 5 Connection examples Servo System Witing Precautions 2 5 He HORNS Soe 24 28 28 28 29 30 30 31 36 36 38 39 40 23 Components and Unit Settings Section 2 1 2 1 Components and Unit Settings The following diagram shows the main components of the MC Unit MCW151 MCW151 DRT UNO Osrs UNO Osrs o Ox Indicators E S E RS 232C Ports er Connector 5 dq RS 422A 485 Port Connector O du DeviceNet muse E s Connector NG o Connector JUXIUUUJUUuuuuur Power Connector 8 Indicators The following table describes the indicators on the front of the MC Unit Motion Control Indicator Color Status Meaning RUN Green ON The MC Unit is operating normally OFF The MC Unit did not start properly or is not pow ered on Flashing with An error occurred in the communication with the STS Servo Driver STS Red ON The axis has been disabled The Servo Enable is not ON OFF The axis is enab
30. Locations subject to condensation due to radical temperature changes Locations subject to corrosive or inflammable gases Locations subject to dust especially iron dust or salts Locations subject to vibration or shock Locations subject to exposure to water oil or chemicals Do not touch the Servo Driver radiator Regeneration Resistor or Servomotor while the power is being supplied or soon after power is turned OFF Doing so may result in a skin burn due to the hot surface xiii Storage and Transportation Precautions 4 4 5 xiv Storage and Transportation Precautions Caution N Caution Caution Do not hold the product by the cables or motor shaft while transporting it Doing so may result in injury or malfunction Do not place any load exceeding the figure indicated on the product Doing so may result in injury or malfunction Use the motor eye bolts only for transporting the Motor Using them for transporting the machinery may result in injury or malfunction Installation and Wiring Precautions Caution Caution Caution Caution Caution Caution Caution Caution N Caution Caution Caution Caution Caution Caution Do not step or place a heavy object on the product Doing so may result in injury Do not cover the inlet or outlet ports and prevent any foreign objects from entering the product Doing so may result in fire Be sure to install the p
31. poses Registration inputs Two registration inputs can be used simultaneously to capture the position in hardware Switch setting DeviceNet settings MCW151 DRT E only General purpose MCW151 E only Power supply for general and axis I O Provided externally 20 Comparison between Firmware Versions Section 1 6 Item Contents ment Task program manage Programming language BASIC Number of tasks Up to 3 tasks running simultaneously plus the Com mand Line task Max number of programs 14 Data storage capacity 251 VR 8000 Table max Saving program data MC Unit Random Access Memory RAM and Flash memory backup See note Personal Computer Motion Perfect software manages a backup on the hard disk of the personal computer Self diagnostic functions Detection of memory corruption via checksum Detection of error counter overrun Note The service life for the flash memory is 100 000 writing operations 1 5 3 DeviceNet Specifications MCW151 DRT E only The MC Unit provides the following DeviceNet specifications Item Contents Communications protocol DeviceNet Supported connections communications Master Slave Remote I O and explicit messages Both conform to DeviceNet specifications Connection forms see note Combination of multi drop and T branch connections for trunk or drop lines
32. 1 1 Captures absolute position on rising edge of Z marker to REG POS 2 Captures absolute position on falling edge of Z marker to REG POS 3 Captures absolute position on rising edge of input RO to REG POS 4 Captures absolute position on falling edge of input RO to REG POS 5 E 6 Captures absolute position on rising edge of input RO to REG POS and on rising edge of Z marker to REG POSB 7 Captures absolute position on rising edge of input RO to REG POS and on falling edge of Z marker to REG POSB 8 Captures absolute position on falling edge of input RO to REG POS and on rising edge of Z marker to REG POSB 9 Captures absolute position on falling edge of input RO to REG POS and on falling edge of Z marker to REG POSB 10 Captures absolute position on rising edge of input RO to REG POS and on rising edge of input R1 to REG POSB 11 Captures absolute position on rising edge of input RO to REG POS and on falling edge of input R1 to REG POSB 12 Captures absolute position on falling edge of input RO to REG POS and on rising edge of input R1 to REG POSB 13 Captures absolute position on falling edge of input RO to REG POS and on falling edge of input R1 to REG POSB AXIS CLOSE WIN MARK MARKB OPEN WIN REG POS REG POSB Example 1 BASE 0 catch REGIST 2 WAIT UNTIL MARK PRINT Registration input at REG_POS Example 2 A paper cutting machine uses a CAM profile to quickly dra
33. 100 0 101 120 102 250 103 370 104 470 105 530 106 550 Example 2 The following line will print the value at location 1000 gt gt PRINT TABLE 1000 Mathematical Function TAN expression The TAN function returns the tangent of the expression The expression is assumed to be in radians expression Any valid BASIC expression gt gt print TAN PI 4 1 0000 Task Parameter The TICKS parameter contains the current count of the task clock pulses TICKS is a 32 bit counter that is decremented on each servo cycle TICKS can be written and read It can be used to measure cycles times add time delays etc 189 Command function and parameter description Example 6 3 190 TRIGGER Type Syntax Description See also 6 3 191 TROFF Type Syntax Description Arguments See also Example 6 3 192 TRON Type Syntax Description See also Example 190 Note Section 6 3 Each task has its own TICKS parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed delay TICKS OP 9 ON test IF TICKS lt OP 9 OFF ELSE GOTO test ENDIF 3000 0 THEN Motion Perfect Command TRIGGER The TRIGGER command starts a previously set up SCOPE command Motion Perfect uses TRIGGER automatically for its oscilloscope function SCOPE Program Command TROFF program name The TROFF command susp
34. 172 PROCNUMBER PROCNUMBER contains the number of the task in which the 172 currently selected program is running RUN ERROR RUN ERROR contains the number of the last BASIC error 180 that occurred on the specified task TICKS TICKS contains the current count of the task clock pulses 189 109 Command Reference List Section 6 2 6 2 11 Servo Driver Commands and Parameters The table below outlines the Servo Driver commands and parameters Refer to the specified pages for details Name Description Page DRV_CLEAR DRV_CLEAR clears the alarm status of the Servo Driver 133 DRV_READ DRV_READ reads the specified parameter of the Servo 133 Driver DRV_RESET DRV RESET will software reset both the Servo Driver as the 134 MC Unit DRV_STATUS DRV_STATUS contains the current servo alarm code of the 134 Servo Driver DRV_WRITE DRV_WRITE writes a specific value to the specified parame 135 ter of the Servo Driver 6 2 12 Host Link Commands and Parameters The table below outlines the Host Link commands and parameters Refer to the specified pages for details Name Description Page HLM_COMMAND COMMAND executes a specific Host Link command to 144 the Slave HLM READ READ reads data from the Host Link Slave to either VR 146 or Table variable array HLM STATUS HLM STATUS represents the status of the last Host Link 147 Master command HLM TIMEOUT HLM TIMEOU
35. 7 SG 1 Signal ground 1 8 RD 1 Receive data 1 Input RS 232C Interface Specifications Item Specifications Electrical characteristics Conform to EIA RS 232C Synchronization Start stop synchronization asynchronous Baud rate 1200 2400 4800 9600 19200 38400 bps Transmission Format Databit Length 7 or 8 bit Stop Bit 1 or 2 bit Parity Bit Even Odd None Transmission Mode Point to point 1 1 31 Wiring Section 2 3 Item Specifications Transmission Protocol Port 0 Motion Perfect Protocol Port 1 Host Link Protocol Master Slave General purpose Galvanic Isolation No Connector type 8 pin miniDIN Communication buffers 254 bytes port 1 Recommended Cables R88A CCM002P4 Programming Port 0 Connection Cable to Personal Computer R88A CCMO01P5 E Splitter cable for serial ports 0 and 1 Cable length 15 m max RS 422A 485 Connection MCW151 E only PORT2 The MCW151 E has one serial RS 422A 485 port for communication with external devices Pin Symbol Name Port Direction 1 RD Receive data 2 Input 2 RD Receive data 2 Input 3 FG Frame Ground 2 4 SD Send data 2 Output 5 SD Send data 2 Output RS 422A 485 Interface Specifications MCW151 E only Item Specifications
36. DEL 131 DEMAND_EDGES 132 DIR 132 divide operator 112 DPOS 15 132 DRV_CLEAR 133 DRV_READ 133 DRV_RESET 134 DRV_STATUS 134 DRV_WRITE 135 EDIT 135 ENCODER 136 ENDMOVE 136 EPROM 91 136 equal operator 113 ERROR_AXIS 136 221 ERROR_LINE 136 223 ERRORMASK 137 221 EXP 137 FALSE 137 FAST_JOG 50 137 FB_SET 71 138 FB_STATUS 138 FE 15 138 FE_LIMIT 39 138 FE_RANGE 139 FHOLD_IN 50 139 FHSPEED 139 FLASHVR 139 FOR 140 FORWARD 10 141 FRAC 141 FREE 141 FS_LIMIT 142 FWD IN 40 50 142 255 256 FWD_JOG 50 142 GET 142 GOSUB 88 143 GOTO 88 143 greater than operator 113 greater than or equal operator 113 HALT 144 HEX 170 hexadecimal input 114 HLM_COMMAND 144 HLM_READ 146 HLM_STATUS 147 HLM_TIMEOUT 147 HLM_WRITE 148 HLS_MODEL 149 HLS_NODE 149 I GAIN 16 47 150 IF 150 IN 151 INDEVICE 151 INPUT 152 INT 152 JOGSPEED 153 KEY 153 LAST AXIS 153 less than operator 112 less than or equal operator 112 LINK AXIS 154 LINPUT 154 LIST 154 LN 155 LOCK 155 MARK 155 MARKB 156 MERGE 156 MOD 156 MOTION ERROR 156 221 MOVE 8 10 157 MOVEABS 8 10 158 MOVECIRC 11 159 MOVELINK 12 160 MOVEMODIFY 163 MPOS 15 163 MSPEED 163 MTYPE 89 163 multiply operator 111 NEW 164 NIO 164 NOT 164 not equal operator 113 NTYPE 89 165 OFF 165 OFFPOS 165 ON 165 166 OP 166 OPEN WIN 167 OR 167
37. MPOS CHR 13 RETURN Structural Command GOTO label The GOTO structure enables a jump of program execution GOTO jumps pro gram execution to the line of the program containing the abel Labels can be character strings of any length but only the first 15 characters are significant 143 Command function and parameter description 6 3 89 6 3 90 144 Arguments See also Example HALT Type Syntax Description See also Section 6 3 label A valid label that occurs in the program An invalid label will give a compilation error before execution GOSUB loop PRINT Measured position MPOS CHR 13 GOTO loop System Command HALT The HALT command stops execution of all program tasks currently running The command can be used both on command line as in programs The STOP command can be used to stop a single program task PROCESS STOP HLM COMMAND Type Syntax Description Note Arguments Host Link Command HLM COMMAND command port node mc area mode mc offset The HLM COMMAND command performs a specific Host Link command operation to one or to all Host Link Slaves on the selected port Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM TIMEOUT parameter The status of the transfer can be monitored with the HLM STATUS parameter 1 When using the HLM READ be su
38. Max torque 15000 Item Specification Output Range 15000 15000 Resolution Given by T RATE axis parameter 15000 Max torque Torque command of rated torque AIN1 T_RATE AIN2 Servomotor Rotation Speed Analog input 2 contains the actual Servomotor Rotation Speed data from the Servo Driver Overspeed T 15000 Item Specification Output Range 15000 15000 Resolution Given by S_RATE axis parameter 15000 1 Overspeed Rotation Speed RPM AIN2 S_RATE 53 System Functions Section 3 3 AIN3 Torque Monitor Value Analog input 3 contains the Torque Monitor Value from the Servo Driver Item Specification Output Range 15000 15000 Resolution Given by RATE axis parameter 15000 Max torque T Max torque 15000 Torque Monitor of rated torque AIN3 T_RATE 3 3 4 Absolute Encoder 54 If the Servo Driver uses a Servomotor with an absolute encoder the MC Unit will obtain the absolute encoder position each start up As a result operation can be performed immediately without any origin search operation at start up Use one of the following Servomotors with absolute encoder Servo Driver Servomotor Model Encoder Resolution Single phase 100 V R88M WOOS O 16 bit Single phase 200 V R88M WLILIT L1 16 bit Three phase 400 V AC R88M W
39. No Motion Control Unit OV Line transmitter Phase A axis 1 Phase B axis 1 Phase Z axis 1 2 3 5 Connection examples Cascading encoder signal MCW151 to MCW151 MCW151 output MCW151 input 22 INIA ai T 1 L INI OD on AJON Connecting master encoder input signal from W series Servo Driver W series Servo Driver MCW 151 input 38 33 H 1 34 36 Xx 3 35 4 B 19 i 5 Z 20 X Shell Sed LS 7 0V ENC 8 5V ENC 10 FG Servo System Precautions Encoder Line Driver output Example E6B2 CWZ1X Section 2 4 Connecting master external encoder signal MCW151 input Black Phase A 1 A Black red Phase A 2 A White Phase B 3 B White red Phase B 4 B Orange Phase Z 5 74 Orange red Phase Z 6 Iz Blue 0V COM 7 Brown 5V DC 8 2 4 Servo System Precautions Precautions for safe Operation The following precautions are directly related to the operation of the servo system Refer to 1 4 1 Servo System Pri
40. Output Speed Gain Speed Feedforward Gain 16 The Motion Control algorithm of the MC Unit is shown in the diagram below Output signal Demand position Following Measured position The proportional gain K creates an output O that is proportional to the following error E O K E All practical systems use proportional gain For many just using this gain parameter alone is sufficient The proportional gain axis parameter is called P GAIN The integral gain K creates an output O that is proportional to the sum of the following errors E that have occurred during the system operation 0 Integral gain can cause overshoot and so is usually used only on systems working at constant speed or with slow accelerations The integral gain axis parameter is called GAIN The derivative gain produces an output that is proportional to the change in the following error E and speeds up the response to changes in error while maintaining the same relative stability Derivative gain may create a smoother response High values may lead to oscillation The derivative gain axis parameter is called D GAIN The output speed gain produces an output O that is proportional to the change in the measured position and increases system damping Ko A AP The output speed gain can be useful for smoothing motions but will generate high following errors The output speed gain axis parameter i
41. Parity error port 1 Framing error port 1 Break interrupt port 1 Overrun error port 2 Parity error port 2 10 Framing error port 2 11 Break interrupt port 2 This parameter is read only O COMPILE The COMPILE command forces the compilation the current program to inter mediate code Program are compiled automatically by the system software prior to program execution or when another program is selected Motion Control Command CONNECT ratio driving_axis ratio driving axis The CONNECT command connects the demand position of the base axis to the measured movements of the axis specified by driving axis to achieve an electronic gearbox The ratio can be changed at any time by executing another CONNECT com mand on the same axis To change the driving axis the CONNECT command needs to be cancelled first CONNECT with different driving axis will be ignored The CONNECT command can be cancelled with a CANCEL or RAP IDSTOP command The CLUTCH RATE axis parameter can be used to set a specified connection change rate 127 Command function and parameter description Arguments See also Example 6 3 43 CONTROL 6 3 44 6 3 45 128 Type Description COPY Type Syntax Description Precautions Arguments See also Example COS Type Syntax Description Arguments Note Section 6 3 CONNECT works on the default basis
42. The FRAC function returns the fractional part of the expression expression Any valid BASIC expression gt gt PRINT FRAC 1 234 0 2340 System Function 141 Command function and parameter description 6 3 83 6 3 84 6 3 85 6 3 86 142 Syntax Description Precautions Example FS_LIMIT Type Alternative Description See also FWD_IN Type Description See also Note FWD_JOG Type Description See also GET Type Syntax Description Note Section 6 3 FREE The FREE function returns the remaining amount of memory available for user programs and Table array elements Each line takes a minimum of 4 characters bytes in memory This is for the length of this line the length of the previous line number of spaces at the beginning of the line and a single command token Additional commands need one byte per token most other data is held as ASCII The MC Unit compiles programs before they are executed this means that twice the memory is required to be able to execute a program gt gt PRINT FREE 47104 0000 Axis Parameter FSLIMIT The FS_LIMIT axis parameter contains the absolute position of the forward software limit in user units A software limit for forward movement can be set from the program to control the working range of the machine When the limit is reached the MC Unit will decelerate to zero and then cancel the move Bit 9 o
43. This routine sets outputs 8 to 15 ON and all others OFF VR 0 OP VR 0 VR 0 AND 65280 OP VR 0 The above programming can also be written as follows OP OP AND 65280 Example 4 This routine sets value va to outputs 8 to 11 without affecting the other out puts by using masking 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO val val 8 The value to set mask OP AND NOT 15 256 Get current status and mask OP mask OR val 256 Set val to 8 to 11 Axis Parameter OW The OPEN WIN parameter defines the beginning of the window inside or out side which a registration event is expected The value is in user units CLOSE WIN REGIST UNITS Logical Operator expression 1 OR expression 2 The OR operator performs the logical OR function between corresponding bits of the integer parts of two valid BASIC expressions The logical OR function between two bits is defined as follows Bit 1 Bit 2 Result 4 o o 4 expression_1 Any valid BASIC expression expression_2 Any valid BASIC expression Example 1 result 10 OR 2 1 9 167 Command function and parameter description Section 6 3 6 3 135 OUTDEVICE 6 3 136 OUTLIMIT 6 3 137 OV_GAIN 168 Type Description See also Type Description See also Type Description Precautions The parentheses are evalu
44. age capacity and correct the power supply 6 The power supply is defective Check the power supply Replace the power supply 7 Motion Perfect Serial communications cable is Checkthe cable connection and Correct the cable wiring cannot connect not connected properly wiring Replace cable if necessary tothe MC Unit Motion Perfect serial communi Check Motion Perfect settings Correct the settings or set the cations settings are different settings to default and reset from the MC Unit settings the MC Unit Default settings of the Unit is 9600 baud 7 data bits even parity and two stop bits 9 A program is running whichis Check the MC Unit by using Stop the program verify if it printing to the port and interfer VT100 Terminal is safe to do so by giving ing Motion Perfect s protocol command HALT or STOP 10 The MC Unit is defective Replace the MC Unit 11 Driver cannot be The MC Unit is not operating Is the RUN indicator lit Check No 1 12 enabled The MC Unit is indicating a Check the cause of the problem motion error has occurred with the AXISSTATUS parame ter 13 The communication between Check both the MC Unit and If there is an error try to find the MC Unit and Servo Driver is Servo Driver if they indicate a _ the cause and cycle power of malfunctioning communication error system 14 A Servo Driver alarm has been Check the contents of the Servo If there is an alarm follow the
45. ccce xL t E SE tarte tds SELEGT5 Durs vp pex RE ION aS ek Ses EE RUE SERVO PERIOD nat ene pee ee SER BEES SET Eee SETCOM debet E eet elc ly weld Sob 168 168 169 169 169 169 170 171 171 172 172 172 172 173 174 174 174 174 177 177 177 178 178 179 179 179 179 180 180 180 181 181 182 182 182 183 184 184 184 185 185 185 186 186 186 186 186 187 187 188 188 188 189 6 3 189 TICKS s co sbikecerg SOL eee Mane SOLA eee eee ers 6 3 190 TRIGGER Oa ies s 6 3 191 TROF E 6 3 192 TRON essed Rem deae see RR NE HIS E ERE TA 6 3 193 TRUE 6 3 194 TSIZE 2 icto ERR E NIE E 6232195 UNITS ERA RNC e RR Ra Pe eet 6 3 196 VERS ION 6 3 197 VPEE GAIN OR e RE IER ES 623 198 VBESPBED peu ph pre dh ap quee reete gin ete 6 3 199 VR 6 3 200 WA 6 3 201 WAIT 6 3 202 WAIT 6 3 203 WAIT IDEE ERREUR ER RET geese A OR LOADED Sh eS 6 3 204 WDOG EE e ee EE e 6 3 205 WHILE WEND bete tu nt e ec tete e 6 3 206 XOR 189 190 190 190 191 191 191 191 192 192 192 193 193 194 194 195 195 195 101 Overview Section 6 1 6 1 Overview This section contains the description of the commands functions and param eters of the MC Unit All
46. generated Driver alarm instructions 15 The MC Unit is defective Replace the MC Unit 227 Problems and Countermeasures Section 8 3 No Problem Probable causes Items to check Remedy 16 Motor is not turn ing The Servo Driver is not enabled Check the MC Unit to see whether the Driver is enabled and the servo loop is active WDOG and SERVO parame ters Check whether the Servo Driver is operating Correct the MC Unit settings Correct the Servo Driver operation 25 26 27 unusual noises machinery s moving parts and inspect for damage deforma tion and looseness 17 The communication between Check both the MC Unit and If there is an error try to find the MC Unit and Servo Driver is Servo Driver if they indicate a__ the cause and cycle power of malfunctioning communication error system 18 The FWD or REV limit switch Check the limit switch inputs Turn OFF the Servo Driver are set for the Servo Driver or run prohibit input MC Unit Make the setting so that the Servo Driver run prohibit inputs will not be used 19 The Servo Driver is notin the Check the Servo Driver set Correct the Servo Driver set correct speed control mode tings tings and is not receiving MC Unit speed reference 20 The mechanical axis is locked whether there is a Manually release the m
47. gt PRINT 23 0000 ERROR_LINE PROC 4 6 3 67 ERRORMASK 6 3 68 6 3 69 6 3 70 Type Description Caution See also EXP Type Syntax Description Arguments Example FALSE Type Description Example Note FAST JOG Type Axis Parameter The ERRORMASK axis parameter contains a mask value that is ANDed bit by bit with the AXISSTATUS axis parameter on every servo cycle to deter mine if a motion error has occurred When a motion error occurs the enable switch WDOG will be turned OFF the MOTION ERROR parameter will have value 1 and the ERROR AXIS parameter will contain the number of the first axis to have the error Check the AXISVALUES parameter for the status bit allocations The default setting of ERRORMASK is 268 Refer to 8 2 Error Handling for more detailed information on error handling It is up to the user to define in which cases a motion error is generated For safe operation it is strongly recommended to generate a motion error when the following error has exceed its limit for the servo axis 0 in all cases This is done by setting bit 8 of ERRORMASK AXIS AXISSTATUS ERROR AXIS MOTION ERROR WDOG Mathematical Function EXP expression The EXP function returns the exponential value of the expression expression Any valid BASIC expression gt gt print exp 1 0 2 7183 Constant The FALSE constant returns the numerical value 0 A constant is read only t
48. the program waits until the measured position on axis 0 exceeds 150 and then starts a movement on axis 1 WAIT UNTIL MPOS 5 0 gt 150 MOVE 100 AXIS 1 Example 2 The expressions evaluated can be as complex as you like provided they fol low BASIC syntax for example WAIT UNTIL DPOS AXIS 2 0 OR IN 1 ON The above line would wait until the demand position of axis 2 is less than or equal to 0 or input 1 is ON Command function and parameter description Section 6 3 6 3 204 WDOG Type System Parameter Description The WDOG parameter contains the software switch which enables the Servo Driver using the RUN Servo ON input signal The enabled Servo Driver will control the Servomotor depending on the speed and torque reference values WDOG can be turned ON and OFF under program control on command line and the Motion Perfect control button The Servo Driver will automatically be disabled when a MOTION_ERROR occurs A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK setting In this case the software switch WDOG will be turned OFF the MOTION_ERROR parameter will have value 1 and the ERROR_AXIS parameter will contain the number of the first axis to have the error Precautions The WDOG parameter can be executed automatically by Motion Perfect when the Drives Enable Button is clicked on the control panel See also AXISSTATUS ERROR AXIS ERRORMASK MOTION ERROR SERVO 6 3 2
49. wait till last move started OP 8 ON activate cutter MOVELINK 1 8 2 0 5 0 5 1 move back In this program the MC Unit waits for the roll to feed out 150 m in the first line After this distance the shear accelerates to match the speed of the paper coasts at the same speed then decelerates to a stop within a 1 m stroke This movement is specified using two separate MOVELINK commands The pro gram then waits for the next move buffer to be clear NTYPE 0 This indicates that the acceleration phase is complete The distances on the link axis link distance in the MOVELINK commands are 150 0 8 1 0 and 8 2 which add up to 160 m To ensure that the speeds and positions of the cutter and paper match during the cut task the arguments of the MOVELINK command must be correct Therefore it is easiest to first consider the acceleration constant speed and deceleration phases separately As mentioned before the acceleration and deceleration phases require the ink distance to be twice the distance Both phases can therefore be specified as MOVELINK 0 4 0 8 0 8 0 1 This move is all accel MOVELINK 0 4 0 8 0 0 8 1 This move is all decel In a constant speed phase with matching speeds the two axes travel the same distance so the distance to move must equal the link distance The con stant speed phase could therefore be specified as follows MOVELINK 0 2 0 2 0 0 1 This is all constant speed The MOVELINK co
50. 1 gt 0 In the above line 1 is greater than O and therefore VR 0 would contain the value 1 Example 2 WAIT UNTIL MPOS 200 Program execution will wait until the measured position is greater than 200 Is Greater Than or Equal To gt Type Syntax Logical Operation expression 1 expression 2 113 Command function and parameter description 6 3 12 6 3 13 6 3 14 6 3 15 114 Description Arguments Example Hexadecimal Type Syntax Description Arguments See also Example Section 6 3 The greater than or equal to operator gt returns TRUE if expression 1 is greater than or equal to expression_2 otherwise it returns FALSE expression_1 Any valid BASIC expression expression_2 Any valid BASIC expression IF target gt 120 THEN MOVEABS 0 If the variable target holds a value greater than or equal to 120 then the base axis will move to an absolute position of 0 input System Command hex_number The hexadecimal input command character assigns a hexadecimal num ber to a variable The hexadecimal number is inputted by proceeding the number by the character This operation will write the decimal equivalent to the VR Table or local variable hex_number Any hexadecimal number characters 0 9 A F Range 0 FFFFFF Hex HEX PRINT gt gt TABLE 0 SF SABCD gt gt print TABLE 0 TABLE 1 15 0000 43981 0000 S
51. 3 8 6 3 9 6 3 10 6 3 11 Section 6 3 In the above line 1 is not less than or equal to 0 and therefore variable maybe would contain the value 0 FALSE Is Not Equal To lt gt Type Syntax Description Arguments Example Is Equal To Type Syntax Description Arguments Example Logical Operation expression_1 lt gt expression_2 The not equal to operator lt gt returns TRUE if expression 1 is not equal to expression 2 otherwise it returns FALSE expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression IF MTYPE 0 THEN GOTO 3000 If the base axis is not idle MTYPE 0 indicates an axis idle then a jump would be made to label 3000 Logical Operation expression 1 expression 2 The equal to operator returns TRUE if expression 1 is equal to expression 2 otherwise it returns FALSE expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression IF IN 7 ON THEN GOTO label If input 7 is ON then program execution will continue at line starting label Is Greater Than Type Syntax Description Arguments Examples Logical Operation expression 1 expression 2 The greater than operator gt returns TRUE if expression 1 is greater than expression 2 otherwise it returns FALSE expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression Example 1 VR 0
52. 3 Program 92 5 6 Task Operation Sequence 93 5 7 Error Processing 94 85 Overview 5 1 Overview Section 5 1 The MCW151 E and MCW151 DRT E Motion Control Units feature a multi tasking version of the BASIC programming language The motion control lan guage is largely based upon a tokenised BASIC and the programs are compiled into the tokenised form prior to their execution Multitasking is simple to set up and use and allows very complex machines to be programmed Multitasking gives the MC Unit a significant advantage over equivalent single task systems It allows modular applications where the logi cally connected processes can be grouped together in the same task pro gram thus simplifying the code architecture and design The MC Unit can hold up to 14 programs if memory size permits A total of 3 tasks can be allocated to the programs The execution of the programs is user controlled using BASIC The BASIC commands functions and parameters presented here can be found in SECTION 6 BASIC Motion Control Programming Language 5 2 BASIC Programming Commands Functions Parameters The BASIC language consists among others of commands functions and parameters These BASIC statements are the building blocks provided to control the MC Unit operation Commands are words recognized by the p
53. 33 124 Type Syntax Description Arguments CAM 1 19 1 200 GOTO loop Note The subroutine camtable would load the data below into the Table array Table Degree Value position 1 0 0 2 20 1103 3 40 3340 4 60 6500 5 80 10263 6 100 14236 7 120 18000 8 140 21160 9 160 23396 10 180 24500 11 200 24396 12 220 23160 13 240 21000 14 260 18236 15 280 15263 16 300 12500 17 320 10340 18 340 9103 19 360 9000 Motion Control Command CAMBOX start point end point table multiplier link distance link axis link option link position The CAMBOX command is used to generate movement of an axis following a position profile in the Table variable array The motion is linked to the mea sured motion of another axis to form a continuously variable software gear box The Table values are absolute position relative to the starting point and are specified in encoder edges The Table array is specified with the TABLE command The movement can be defined with any number of points from 2 to 8 000 Being able to specify the start point allows the Table array to be used to hold more than one profile and or other information The MC Unit moves continuously between the val ues in the Table to allow a number of points to define a smooth profile Two or more CAMBOX commands can be executed simultaneously using the same or overlapping values in th
54. 6 3 55 6 3 56 6 3 57 6 3 58 6 3 59 6 3 60 6 3 61 6 3 62 6 3 63 6 3 64 6 3 65 6 3 66 6 3 67 6 3 68 6 3 69 6 3 70 6 3 71 6 3 72 6 3 73 6 3 74 6 3 75 6 3 76 6 3 77 6 3 78 6 3 79 6 3 80 6 3 81 6 3 82 6 3 83 CAMBOX CANCEL CLEAR BIT gestion REESE qp ED SSePR DP abere CLOSE WIN EU Beet SIRE RUNE DEN PIS RS COMPILE CONNECT dais coca eret ee e ee ecu CONTROL DRV CLEAR S ot I bru det t re eis DRVSREAD seca rats hee ORR ARSE Ee S NE eggs DRV EPBEHEREDERERDERRE TERES DRV STATUS 5 e toten tacet eet Cea cem ERROR AXIS 2 cae bebe ee RENE ERROR EINE a inl ase EU E ee ERRORMASK tenis cake e e BRE So SUE BE FE LIMIT FE RANGE PRESSE ea FHOLD IN dee etre tee tun ect e FHSPEED FLASHVR FOR TO STEP NEXT pesii RF ESSGRRDSYT Srqe Wes 122 123 124 125 126 126 126 126 126 127 127 127 128 128 128 129 129 129 130 131 131 131 132 132 132 133 133 134 134 135 135 136 136 136 136 136 137 137 137 137 138 138 138 138 139 139 139 139 140 141 141 141 142 623 84 FEWD IN sccm coo RU SRS Ree eG Se alee 673285 vege es Cia dada E MOSTRO TUR eas eee 6 3 86 GET c eine sas en sates OE DUREE FO NUES 6 3 87 GOSUB RETURN
55. 7 5 D Oscilloscope vP_SPEED o 21 pos mah 7 al NAE Hd zoo dM pow 4 ee Options General Controls The oscilloscope general control appear at the bottom left of the oscilloscope window From here you can control the time base triggering modes Table range used and others irem v rj E 21 i Options 2 The general controls are explained here Time base The required time base is selected using the up down scale but tons either side of the current time base scale text box left hand side button decreases the scale and the right hand side button increases the scale value The value selected is the time per grid division on the display If the time base is greater than a predefined value then the data is retrieved from the controller in sections as opposed to retrieving a compete trace of data at one time These sections of data are plotted on the display as they are received and the last point plot ted is seen as a white spot After the scope has finished running and a trace has been dis played the time base scale can be changed to view the trace with respect to different horizontal time scales If the time base scale is reduced a section of the trace can be viewed in greater detail with access provided to the complete trace by moving the horizontal scroll bar Horizontal Scroll Once the scope has finished running and displayed the trace of
56. BIT 9 250 THEN PRINT Command not recognized by slave ELSE IF READ BIT 8 250 THEN PRINT Timeout error ELSE PRINT Received end code HEX VR 250 ENDIF ENDIF IF attempt 3 THEN PRINT Read failed after 3 attempts STOP ENDIF attempt attemptt1l GOTO loop ENDIF 253 Index A absolute encoder 54 absolute moves 8 acceleration rate 8 adding axes 13 ASCII emulation 205 axis adding 13 configuration 44 demand position 15 encoder input 45 encoder output 45 measured position 15 repeat distance 177 servo 44 status 121 types 44 virtual 45 axis types 44 B BASIC commands 86 data structures 87 functions 86 group structure 102 I O access 50 labels 88 parameters 86 statements 86 variables 87 BASIC commands functions and parameters listed alphabetically 111 ABS 114 ACCEL 8 115 ACOS 115 add operator 111 ADD DAC 45 115 ADDAX 13 117 ADDAX_AXIS 116 AIN 117 AND 118 ASIN 119 ATAN 119 ATAN2 119 ATYPE 44 119 AUTORUN 120 AXIS 86 120 AXISSTATUS 121 208 221 BASE 86 121 BASICERROR 122 223 CAM 11 123 CAMBOX 12 124 CANCEL 13 125 CHECKSUM 126 CHR 170 CLEAR 87 126 CLEAR_BIT 126 CLOSE_WIN 126 CLUTCH_RATE 126 comment field 114 COMMSERROR 127 COMPILE 127 CONNECT 12 127 CONTROL 128 COPY 128 COS 128 CREEP 129 D_GAIN 16 47 129 DAC 182 DATUM 13 129 DATUM_IN 50 130 DECEL 8 131 DEFPOS 7 131
57. CPU Unit operating mode 0 PROGRAM mode 2 MONITOR mode 3 RUN mode mc area for HLM MREAD The MC Unit s memory selection to read the send data from MC area Data area MC TABLE Table variable array or value 8 MC VR Global VR variable array or value 9 mc offset for HLM_MREAD The address of the specified MC Unit memory area to read from Range for VR variables 0 250 Range for Table variables 0 7999 HLM READ HLM STATUS HLM TIMEOUT HLM WRITE SETCOM Example 1 The following command will read the CPU Unit model code of the Host Link Slave with node address 12 connected to the RS 232C port The result is writ ten to VR 233 HLM COMMAND HLM MREAD 1 12 MC VR 233 If the connected Slave is a C200HX PC the VR 233 will contain value 12 hex after successfull execution Example 2 The following command will check the Host Link communication with the Host Link Slave node 23 connected to the RS 422A port HLM COMMAND TEST 2 23 PRINT STATUS PORT 2 If the HLM STATUS parameter contains value zero the communication is functional Example 3 The following two commands will perform the Host Link INITIALIZE and ABORT operations on the RS 422A port 2 The Slave has node number 4 HLM COMMAND HLM_INIT 2 HLM_COMMAND HLM_ABORT 2 4 Example 4 When data has to be written to a PC using Host Link the CPU Unit can not be in RUN mode The HLM_COMMAND command c
58. Controllers according to the communication interface which is integrated into the Unit Communication Interface Model RS 422A 485 Serial Communication R88A MCW151 E DeviceNet R88A MCW151 DRT E The multi tasking BASIC motion control language provides an easy to use tool for programming advanced motion control applications Three types of motion control are possible point to point continuous path and electronic gearing Point to point PTP control enables positioning independently for each axis Axis specific parameters and commands are used to determine the paths for the axes Continuous path CP control enables the user not only to control the start and end positions but also the path between those points Possible multi axis paths are linear interpolation and circular interpolation Also user defined paths can be realized with the CAM control Electronic gearing EG enables controlling an axis as a direct link to another axis The MC Units supports electronic gear boxing linked moves and CAM movements and adding all movements of one axis to another Features Section 1 1 1 1 2 Description of Features Motion Control Servo Driver Access Easy Programming with BASIC Motion Control Language Encoder Input and Output DeviceNet Interface MCW151 DRT E only Serial Communications Absolute Encoder Support The MC Unit provides the following features The direct connection to the Servo Driv
59. Corrective measures code 00 Normal completion No problem exists 13 FCS error The FCS is wrong Check the FCS calculation method If there was influence from noise transfer the command again 14 Format error The command format is wrong ora Check the format and transfer the command that cannot be divided has command again been divided or the frame length is smaller than the minimum length for the applicable command 15 Entry number data error The data is outside the specified Correct the command arguments range or too long and transfer the command again 18 Frame length error The maximum frame length of 131 Check the data and transfer the bytes was exceeded command again 19 Not executable An I O memory batch was executed Register items to read before when items to read were not regis attempting batch read tered A3 Aborted due to FCS error in trans An FCS error occurred in the second Correct the command data and mission data or later frame transfer the command again A4 Aborted due to format error in trans The command format did not match mission data the number of bytes in the second or later frame A5 Aborted due to entry number data There was an entry number data error in transmission data error in the second or later frame or a data length error A8 Aborted due to frame length error in The length of the second or later transmission data frames exceeded the maximum of 128 bytes Set up Host L
60. E FW 1 62 many DeviceNet implementation changes have been done For both Units caution must be taken when upgrading Item FW 1 61 FW 1 62 Commands and instructions ADD_DAC No Yes Command to enable dual feed back control DeviceNet MCW151 DRT E only Software reset of MC Unit Possible by either bit in Remote I O Output word 1 or Explicit Message command RESET Possibly only by Explicit Mes sage command RESET Explicit messages read and write Different maximum transfer amount for read and write Maximum amount of elements to transfer read write is 39 three word format and 119 one word format See 4 2 2 Explicit DeviceNet Messages Device objects Update of Device objects See Appendix B Device Proto col MCW151 DRT E only SECTION 2 Installation This section describes the MC Unit components and provides the information required for installing the MC Unit 2 1 2 2 2 3 2 4 2 5 Components and Unit Installation ere ba ee eb ee eee d eee 2 2 1 Installation Conditions 2 2 2 Installation 2 2 3 BS RES oak ete ee 2 3 1 Control
61. EE Initialisation of variables Y GOSUB init vars Initialisation of serial ports Y GOSUB init serial Initialisation axis parameters RUN STARTUP 3 WA 5 Wait until process is stopped WAIT UNTIL PROC_STATUS PROC 3 0 Set ERRORMASK parameter Y Uu Following statuses will result in Motion Error bit 2 Servo Driver Communication Error bit 3 Servo Driver Alarm bit 8 Following Error Limit BASE 0 ERRORMASK 268 Initialisation Servo Driver Lu If no communication error IF AXISSTATUS AND 4 0 THEN Set Servo Driver parameters RUN INIT DRIVER 3 WA 5 245 Programming Examples Appendix C Wait until process is stopped WAIT UNTIL PROC STATUS PROC 3 0 Possible reset of system IF VR force reset TRUE THEN WA 100 DRV RESET WA 100 ENDIF F iSE GOTO m_error NDIF start Stops all movements and programs GOSUB stop_all Program status Motion amp programs stopped VR programstatus 1 WA 10 Necessary condition to start operation WAIT UNTIL IN start machine 1 Start the application program s RUN application 3 WA 10 Program status Normal running VR programstatus 2 BASE 0 Main loop loop Check for motion error or Servo Driver OFF IF MOTION ERROR THEN GOTO m_error ENDIF Check for e
62. Example 6 3 27 AUTORUN Type Syntax Description See also 6 3 28 AXIS Type Syntax Description Arguments Precautions See also Examples 120 Section 6 3 The ATYPE axis parameter sets the axis type for the axis The valid values is depending on the axis Axis Axis type ATYPE value number 0 Servo 13 fixed 1 Virtual 0 Servo 2 Encoder input 3 default Encoder output 14 2 Virtual 0 fixed The ATYPE parameters are set by the system at start up to the default value of the axis Refer to 3 3 System Functions for more details on the different axis types AXIS The following command will set axis 1 as encoder output axis gt gt ATYPE AXIS 1 14 Program Command AUTORUN The AUTORUN command starts all the programs that have been set to run at start up RUNTYPE System Command AXIS axis number The AXIS modifier sets the axis for a single motion command or a single axis parameter read write to a particular axis AXIS is effective only for the com mand or program line in which it is programmed Use the BASE command to change the base axis for all following command lines axis number Any valid BASIC expression specifying the axis number The AXIS command can be used to modify any axis parameter expression and the following axis dependent commands ADDAX CAM CAMBOX CAN CEL CONNECT DATUM DEFPOS FORWARD MOVEABS MOVECIRC MOVELINK MOVE MOV
63. If you open a new project during a development session the new projects backup copy will overwrite the previous backup 199 Motion Perfect Projects Consistency Check 200 Section 7 3 When Motion Perfect starts it always performs a consistency check between any programs on the MC Unit and the current project files on the computer It will only enable its tool site when it has successfully verified that the programs in the controller matches the project on the computer The CRC values of the programs are compared to perform the check The Check Project Window shows the status of the check When both projects are consistent the state ment Project check OK is shown in the message field If both projects differ the window will display the options for the user to deter mine how to resolve this inconsistency The Check Project Window is shown here C My Documents MP Projects Application Application prj Controller Project MCwW151 COM1 MCw151 COM1 APPLICATION APPLICATION INIT_DRIVER NIT_DRIVER MASTERSHELL MASTERSHELL STARTUP Reading directory from project file Comparing controller defined in project with connected Checking controller programs against project Checking project programs against controller Messages Programs project differ from those on controller Save Save controller programs to new project Load Load a different pr
64. O Slave Messaging mode area Pin 7 Slave Messaging Mode OFF Mode I default ON Mode Il Pin 8 is not used General Switch Settings MCW151 E only For the MCW151 E the external DIP switch can be used for general purpose The value of the switch can be accessed using the SWITCH STATUS param eter 26 AON z o z Components and Unit Settings Section 2 1 DIP switch setting Parameter Pin Pin Pin Pin Pin Pin Pin Pin Pin Pin value 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 default 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 2 1 1 1 1 1 1 1 1 1 0 1022 1 1 1 1 1 1 1 1 1 1 1023 0 OFF 1 ON B internal Switches oan ud q e Hr pe e L pd t e T B sw2 e sw2 mel slo 3 3 SW3 3 amem D 1234 IK ul 21 RS 7 E n Switch SW2 MCW151 E only Pin 1 and 2 select the serial communication for port 2 Pin2 Pin 1 Selection OFF OFF RS 422A default ON ON RS 485 Other not allowed Pin 3 selects the termination resistor between receive pi
65. REGIST command has been exe cuted and is set to TRUE when the register event occurs This parameter is read only AXIS REG_POS REGIST 155 Command function and parameter description Section 6 3 6 3 112 MARKB Type Description See also 6 3 113 MERGE Type Description Precautions See also Example 6 3 114 MOD Type Syntax Description Arguments Example Note Axis Parameter The MARKB parameter contains value TRUE when a secondary registration event has occurred to indicate that the value in the REG_POSB axis parame ter is valid MARKB is set to FALSE when the REGIST command has been executed and is set to TRUE when the register event occurs This parameter is read only AXIS REG_POSB REGIST Axis Parameter The MERGE parameter is a software switch that can be used to enable or dis able the merging of consecutive moves With MERGE is ON and the next move already in the next move buffer NTYPE the axis will not ramp down to zero speed but will load up the following move enabling a seamless merge The default setting of MERGE is OFF It is up to the programmer to ensure that merging is sensible For example merging a forward move with a reverse move will cause an attempted instan taneous change of direction MERGE will only function if the following are all true 1 Only the speed profiled moves MOVE MOVEABS MOVECIRC and MOVEMODIFY can be merged with each other 2 There is
66. Response No of bytes Word data L code code received Word data H Service code Source node address Read data Maximum 240 bytes Parameters Service code command response In the command 32 Hex is specified In the response the leftmost bit is turned ON and B2 Hex is returned Address H Address L command The address in hexadecimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the Table memory the maximum value is 7999 1F3F Hex Length H Length L command The number of Table memory elements to read Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the maximum is 39 elements 27 Hex The 39 Table elements imply 234 bytes to be transferred Read data response The specified data is returned from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 Note The user should be aware that the MC Unit does not check if the MC Unit memory data is within range of the three word format 75 DeviceNet MCWISI DRT E only Section 4 2 VR DATA READ THREE WORD FORMAT VR DATA READ ONE WORD FORMAT 76 Note VR DATA READ THREE WORD FORMAT will read VR data The data will be converted in three word format Command Block
67. Section 6 3 See also Examples 6 3 118 MOVECIRC Type Syntax Alternative Description Precautions Arguments AXIS MOVE UNITS Example 1 An X Y plotter has a pen carousel whose position is fixed relative to the plotter origin To change pen an absolute move to the carousel position will find the target irrespective of the plot position when the command is executed MOVEABS 20 350 Example 2 A pallet consists of a 6 by 8 grid in which gas canisters are inserted 85mm apart by a packaging machine The canisters are picked up from a fixed point The first position in the pallet is defined as position 0 0 using the DEFPOS command The part of the program to position the canisters in the pallet is as follows xloop FOR x 0 TO 5 yloop FOR y 0 TO 7 5 340 516 5 Move to pick up point GOSUB pick Go to pick up subroutine PRINT MOVE TO POSITION x 6 y 1 MOVEABS x 85 y 85 GOSUB place Go to place down subroutine NEXT y NEXT x Motion Control Command MOVECIRC end 1 2 centre 1 centre 2 direction Mc end 1 2 centre 1 centre 2 direction The MOVECIRC command interpolates 2 orthogonal axes in a circular arc The path of the movement is determined by the 5 arguments which are incre mental from the current position The arguments end 1 and centre 1 apply to the base axis and end 2 and centre 2 apply to the following axis All arguments are given in user u
68. The last line defines the current position to 1000 3500 in user units The current position would have been reset to 0 0 by the two DATUM com mands BASE 2 DATUM 5 BASE 1 DATUM 4 WAIT IDLE DEFPOS 1000 3500 Program Command DEL program_name RM program_name 131 Command function and parameter description Section 6 3 Description Precautions Arguments See also Example The DEL command deletes a program from memory DEL without a program name can be used to delete the currently selected program using SELECT The program name can also be specified without quotes DEL ALL will delete all programs DEL can also be used to delete the Table as follows DEL TABLE The name TABLE must be in quotes This command is implemented for an offline VT100 terminal Within Motion Perfect users can select the command from the Program menu program_name Name of the program to be deleted COPY NEW RENAME SELECT TABLE gt gt DEL oldprog 6 3 53 DEMAND EDGES Type Description See also Note 6 3 54 DIR Type Syntax Alternative Description See also 6 3 55 DPOS Type Description Note See also Example 132 Axis Parameter The DEMAND EDGES axis parameter contains the current value of the DPOS axis parameter in encoder edge units AXIS DPOS This parameter is read only Program Command DIR LS The DIR comman
69. Time Speed MERGE 1 Time Jogging moves the axes at a constant speed forward or reverse by manual operation of the digital inputs Different speeds are also selectable by input Refer to the FWD_JOG REV_JOG and FAST_JOG axis parameters 1 4 Control System Configuration 1 4 1 Servo System Principles Semi closed Loop System 14 The servo system used by and the internal operation of the MC Unit are briefly described in this section Refer to 2 4 Servo System Precautions for precautions related to servo system operation The servo system of the MC Unit uses a semi closed or inferred closed loop system This system detects actual machine movements by the rotation of the motor in relation to a target value It calculates the error between the target value and actual movement and reduces the error through feedback Control System Configuration Section 1 4 Internal Operation of the MC Unit 1 2 3 Motion Control Algorithm MC Unit Servo System Demand Sn ES Spoed m reference position l Position Speed Control Control Measured Speed Encoder Measured position Inferred closed loop systems occupy the mainstream in modern servo sys tems applied to positioning devices for industrial applications The following graph shows the basic principle of the Servo System as used in the MC Unit 1 The MC Unit performs actual position control The main input of the con troller is the fol
70. Type Description See also Example Note loop outputs are summed to the speed reference output of the servo axis axis 0 Use ADD DAC 1 to cancel the link ADD DAC works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis 1 Be aware that the control loop gains for both axes need to be determined with care As different encoders with different resolutions are used the gains are not identical 2 To create a servo loop on axis 1 set the ATYPE parameter of that axis to servo value 2 3 Setthe OUTLIMIT parameter of axis 1 to the same value as the value for axis 0 which is 15000 Otherwise the output reference axis 1 will be limit ed axis The axis from which to sum the speed reference output to the base axis Set the argument to 1 to cancel the link and return to normal operation AXIS ADDAX OUTLIMIT Example 1 The following example shows controlling the Servo Driver axis 0 with dual feedback control using both axis 0 and axis 1 BASE 0 OUTLIMIT AXIS 1 15000 ADD DAC 1 AXIS 0 ADDAX 0 AXIS 1 WDOG ON SERVO AXIS 0 ON SERVO AXIS 1 ON Execute moves on axis 0 Example 2 The following example shows controlling the Servo Driver axis 0 with using only encoder feedback on axis 1 BASE 0 OUTLIMIT AXIS 1 15000 ADD DAC 1 AXIS 0 WDOG ON SERVO OFF S_REF 0 BASE 1 Execute moves on axis 1 Axis para
71. Unit Pn511 0 l 8 Always disabled Pn511 1 8 Always disabled Pn511 2 8 Always disabled 511 3 Print Reg 6 Assigned to CN1 pin 46 valid Print registration on rising istration Signal for low input edge Input Allocation Assigned to CN1 pin 46 valid Print registration on falling for high input edge Servo Cycle Period Setting 46 The MC Unit SERVO_PERIOD system parameter can be used to set the MC Unit Servo Cycle and the Servo Driver communication access time The fol lowing values are valid SERVO_PERIOD 500 us default SERVO PERIOD 1000 us Section 3 2 System Functions Section 3 3 Caution When the parameter has been set a power down or software reset using DRV_RESET must be performed for the complete system Not doing so may result in undefined behaviour 3 3 System Functions This section explains all different functions of the MC Unit The BASIC com mands functions and parameters can also be found in SECTION 6 BASIC Motion Control Programming Language 3 3 1 Servo Driver Control Speed Control The Speed Control mode is the main operation of the motion controller The speed control mode enables all different speed profiles determined by the motion commands and possibly input encoder data For an overview of the available motion control commands which can be used refer to 6 2 1 Motion Control Commands For setting up a Motion Application with Speed Control use one
72. Using only one parameter x takes the default width and specifies the number of decimal places to be printed The numbers are right aligned in the field with any unused leading characters being filled with spaces If the number is too long then the field will be filled with asterisks to signify that there was not sufficient space to display the number The maximum field width allowable is 127 characters CHR x The CHR x command is used to send individual ASCII characters using their ASCII codes The semi colon on the end of the print line suppresses the car riage return normally sent at the end of a print line ASCII 13 generates CR without a linefeed so the line above would be printed on top of itself if it were the only print statement in a program PRINT CHR x is equivalent to PUT x in some forms of BASIC HEX x The HEX command is used to print the hexadecimal value of the output Neg ative values will result in the 2 s complement hexadecimal value 24 bit The valid range is 8388608 16777215 back slash The back slash command can be used to print a single ASCII character For example gt gt PRINT Na NX NS a N n The specified output device When this argument is omitted the port as spec ified by OUTDEVICE will be used 0 RS 232C programming port 0 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 Command function and parameter description Section 6 3 5 Motion Perfect port 0 user channe
73. When the download is complete a checksum is performed to ensure that the download process was successful and a confirmation screen will be presented to store the software into Flash memory The controller will take a few moments to store the software NWARNING During the process of storing the software into Flash memory the power must NEVER be interrupted If power is interrupted the MC Unit may disfunction and has to be returned to OMRON for repair If the storing has been completed the unit is back to normal operation At this point you can check the controller configuration to confirm the new software version 218 SECTION 8 Troubleshooting This section describes error processing and troubleshooting procedures needed to keep the system operating properly 8 1 Error Indicators ie ces teenies eae atk UNIO HERO eae We Bee E 220 8 2 Error Handling 221 8 2 1 Unit Error 221 8 2 2 Servo Driver 1 225 8 3 Problems and Countermeasures 227 8 3 1 General Problem 1 227 8 3 2 DeviceNet Slave Problem 1 230 219 Error Indicators 8 1 Error Indicators MC Unit Indicators Unit s front panel MCW151 E MCW151 MCW151 DRT RUNO sTS MSC ONS Section 8 1 The f
74. X 222 Servo Driver Alarm If the Servo Driver detects an error it will generate an alarm The MC Unit provides the following utilities to detect the Servo Driver alarm The Servo Driver Alarm bit no 3 of the AXISSTATUS axis parameter for axis 0 will be set Also input no 24 will be set STATUS system parameter will contain the Servo Driver alarm code in hex During normal operation DRV STATUS will have value 99 Hex Refer to the Servo Driver manual for appropriate alarm countermeasures Cancel the alarm using one of the following methods Perform the DRV CLEAR command in the MC Unit Please note that this is only able to cancel some of the alarm states Turn OFF the power supply both the Servo Driver and MC Unit and turn it ON again Error Handling Section 8 2 If the alarm is canceled while the Servo ON signal WDOG is still ON the Servo Driver will start as soon as the alarm is cleared which is dangerous Be sure to turn OFF the WDOG system parameter before cancelling the alarm Servo Driver Warning If the Servo Driver detects a warning e g overload warning or regenerative overload warning MC Unit Warning input no 25 will be set and the code is defined in the STATUS parameter The Servo Driver will not be dis abled and operation will continue Servo Driver Communicati
75. a PC Host Link Slave configure the MC Unit as a Host Link Master For connection to a Programmable Terminal Host Link Mas ter configure the MC Unit as a Host Link Slave When using the Host Link protocol to communicate between two or more MCW151 configure one MC Unit as Host Link Master and the others as Host Link Slave 4 1 1 Host Link Master In Host Link Master mode Host Link commands can be sent from the MC Unit to a Host Link Slave such as a PC by using BASIC commands The BASIC task execution will be paused until the response has been received from the other device The following BASIC commands can be used BASIC Command Description SETCOM SETCOM configures the serial communication port including enabling the Host Link protocols HLM_READ HLM_READ reads data from the Host Link Slave to either VR or Table memory HLM_WRITE HLM_WRITE writes data to the Host Link Slave from either VR or Table memory HLM_COMMAND HLM_COMMAND executes a specific Host Link command to the Slave HLM_STATUS HLM_STATUS represents the status of the last Host Link Master command HLM_TIMEOUT HLM_TIMEOUT defines the Host Link Master time out time 60 Serial Communications Section 4 1 Refer to SECTION 6 BASIC Motion Control Programming Language for fur ther details on the commands Host Link Master The following Host Link commands are supported for Host Link Master A full
76. a move in the next move buffer NTYPE 3 The axis group does not change for multi axis moves When merging multi axis moves only the base axis MERGE axis parameter needs to be set If the moves are short a high deceleration rate must be set to avoid the MC Unit decelerating in anticipation of the end of the buffered move AXIS MERGE OFF Decelerate at the end of each move MERGE ON Moves will be merged if possible Mathematical Function expression 1 MOD expression 2 The MOD function returns the expression 2 modulus of expression 1 This function will take the integer part of any non integer input expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression gt gt PRINT 122 MOD 13 5 0000 6 3 115 MOTION ERROR Type Description 156 System Parameter The MOTION ERROR parameter contains an error flag for axis motion errors The parameter will have value 1 when a motion error has occurred Command function and parameter description Section 6 3 See also 6 3 116 MOVE Type Syntax Alternative Description Arguments See also Examples Note A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK setting In this case the enable switch WDOG will be turned OFF the MOTION_ERROR parameter will have value 1 and the ERROR_AXIS parameter will contain the number of the first axis to have the error A motion error c
77. a right hand axis set direction to 0 to produce positive motion about the third possibly imaginary orthogonal axis If the two axes involved in the movement form a left hand axis set direction to 0 to produce negative motion about the third possibly imaginary orthogonal axis Direction Right hand axis Left hand axis 1 Negative Positive 0 Positive Negative AXIS PP_STEP UNITS The command sequence to plot the letter 0 might be as follows MOVE 0 6 Move A gt B MOVECIRC 3 3 3 0 1 Move B C MOVE 2 0 Move C gt D MOVECIRC 3 3 0 3 1 Move D gt E MOVE 6 Move E gt MOVECIRC 3 3 3 0 1 Move gt MOVE 2 0 Move gt H MOVECIRC 3 3 0 3 1 Move gt C D B E A F G Motion Control Command MOVELINK distance link_distance link_acceleration link_deceleration link axis link option link position ML distance link distance link acceleration link deceleration link axis ink option link position The MOVELINK command creates a linear move on the base axis linked via a software gearbox to the measured position of a link axis The link axis can move in either direction to drive the output motion The parameters indicate what distance the base axis will move for a certain distance of the link axis link distance The link axis distance is divided into three phases which apply to the movement of the
78. a software cam switch The proximity switch is wired to input 7 and the output is output 11 The shaft is controlled by axis 0 The motor has a 900ppr encoder The output must be on from 80 units PSWITCH uses the unit conversion factor to allow the positions to be set in convenient units First the unit conversion factor must be calculated and set Each pulse on an encoder gives four edges for the MC Unit to count There are thus 3 600 edges rev or 10 edges degree If we set the unit conversion factor to 10 we can work in degrees Next we have to determine a value for all the PSWITCH arguments sw The switch number can be any switch that is not in use In this example we will use number 0 en The switch must be enabled to work set the enable to 1 axis The shaft is controlled by axis 0 opno The output being controlled is output 11 opst The output must be on so set to 1 setoos output is to produced at 80 units rspos The output is to be on for a period of 120 units This can all be put together in the following lines of BASIC code switch UNITS AXIS 0 10 Set unit conversion factor REPDIST 360 OPTION ON PSWITCH 0 ON 0 11 0N 80 200 This program uses the repeat distance set to 360 degrees and the repeat option ON so that the axis position will be maintained between 0 and 360 degrees Motion Control Command RAPIDSTOP RS 173 Command function and parameter description Description Precaution
79. a system is likely to produce a smoother response and allow the use of a higher proportional gain than could otherwise be used High values may cause oscillation See section 1 4 1 Servo System Principles for more details AXIS GAIN OV GAIN P GAIN VFF GAIN In order to avoid any instability the servo gains should be changed only when the SERVO is OFF Motion Control Command DATUM sequence The DATUM command performs one of 6 origin search sequences to position an axis to an absolute position and also can be used to reset the following errors The origin search mechanism of the Servo Driver is used for axis 0 Axis 1 uses the mechanism in the MC Unit DATUM uses both the creep speed and the demand speed for the origin searches For axis 0 the Servo Driver function is used The creep speed in the sequences is set using the CREEP axis parameter and the demand speed is set using the SPEED axis parameter The datum switch input number which is used for sequences 3 to 7 is selected by the DATUM IN parameter DATUM works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis 129 Command function and parameter description Section 6 3 Arguments Precautions See also 6 3 49 DATUM IN Type Alternative Description Precautions See also Example 130 sequence 0 The DATUM O command will clear the motion error The currently measured position is set as the demand po
80. application All Motion Control commands and data transfers are directly communicated between the MC Unit and the Servo Driver MCW151 Axis 0 Servo Axis 1 Enc In Out Axis 2 Virtual RUN Servo ON Q Servo Driver MNG TVSEL Alarm Reset Servo Control Speed Reference Torque Reference 3 Position Data i Print Registration Data Monitor Data Status Data Digital Inputs 4 Control Status Data Analog Input Digital Encoder MC Axis Configuration 44 The MC Unit has 3 axes in total which can be used for different motion con trol purposes depending on the application The following table lists the differ ent available axis types The type of each axis is set by using the ATYPE axis parameter Axis Axis type ATYPE number value 0 Servo 13 1 Virtual 0 Servo 2 Encoder input default 3 Encoder output 14 2 Virtual 0 Servo Axis The servo axis for axis 0 controls the movement of the connected servo sys tem The Servomotor can be controlled in both speed control as in torque con trol Speed control can be achieved in closed loop and in open loop In closed loop the speed reference to the Servo Driver based on the calculated Overview Using the Parameter Unit or Front Panel Section 3 1 demanded movement p
81. aware that this channel may give problems for this function GET WAIT UNTIL KEY 1 GET 1 k Beware that for using KEY 1 in an equation may require parentheses in the statement in this case WAIT UNTIL KEY 1 TRUE System Parameter The LAST_AXIS parameter contains the number of the last axis processed by the system Most systems do not use all the available axes It would therefore be a waste of time to task the idle moves on all axes that are not in use To avoid this to some extent the MC Unit will task moves on the axes from 0 to LAST_AXIS where LAST_AXIS is the number of the highest axis for which an AXIS or BASE command has been processed whichever of the two is larger This parameter is read only AXIS BASE 153 Command function and parameter description 6 3 106 LINK_AXIS Type Description See also 6 3 107 LINPUT Type Syntax Description Arguments Precautions See also Example 6 3 108 LIST Type Syntax Alternative 154 Note Section 6 3 System Parameter The LINK_AXIS parameter contains the axis number of the link axis during any linked move Linked moves are defined where the demanded position is a function of another axis CAMBOX CONNECT and MOVELINK This parameter is read only AXIS CAMBOX CONNECT MOVELINK Command LINPUT n vr variable The LINPUT command assigns the ASCII code of the characters to an array of variables starting with
82. axis set with BASE unless AXIS is used to specify a temporary base axis ratio The connection ratio of the gearbox The ratio is specified as the encoder edge ratio not units It holds the number of edges the base axis is required to move per edge increment of the driving axis The ratio value can be either positive or negative and has sixteen bit fractional resolution driving axis The Master axis which will drive the base axis AXIS CANCEL CLUTCH RATE CONNECT RAPIDSTOP In a press feed a roller is required to rotate at a speed one quarter of the measured rate from an encoder mounted on the incoming conveyor The roller is wired to axis 0 An input channel monitors the encoder pulses from the conveyor and forms axis 1 The following code can be used BASE 1 SERVO OFF This axis is used to monitor the conveyor BASE 0 SERVO ON CONNECT 0 25 1 System Parameter The CONTROL parameter contains the type of MC Unit in the system For both the MCW151 E and MCW151 DRT E it will returns value 260 This parameter is read only Program Command COPY program_name new program name The COPY command copies an existing program in memory to a new pro gram with the specified name The program names can also be specified without quotes This command is implemented for an offline VT100 terminal Within Motion Perfect users can select the command from the Program menu program name Name of t
83. axis parameters 107 constants 107 DeviceNet commands and parameters 110 Host Link commands and parameters 110 I O commands and functions 103 loop and conditional structure commands 104 mathematical and logical functions 106 motion control commands 103 Motion Perfect statements 107 program commands and functions 104 Servo Driver commands and parameters 110 system commands and parameters 105 task commands and parameters 109 buffer actual move 89 next move 89 task 89 Index C CAM control 11 cancelling moves 13 circular interpolation 11 clearing following error 129 command line interface 90 204 comparison between firmware versions 21 components 24 connection examples encoder I O 38 serial ports 33 continuous moves 10 continuous path control 10 control speed 47 torque 49 control system 14 coordinate system description 7 scaling 169 CP control See continuous path control D data format 72 datuming See origin search debugging See BASIC programs debugging deceleration rate 8 demand position 15 demand speed 8 derivative gain 16 DeviceNet communication 68 explicit messages 72 remote I O communications 68 DeviceNet connector 36 DeviceNet specifications 21 dimensions 29 E EG control See electronic gearing electronic gearbox 12 electronic gearing 11 encoder absolute 54 input axis 45 257 258 Index output axis 45 encode
84. base axis These parts are Command function and parameter description Section 6 3 Arguments Note the acceleration part the constant speed part and the deceleration part The link acceleration and deceleration distances are specified by the link_acceleration and link_deceleration parameters The constant speed link distance is derived from the total link distance and these two parameters The three phases can be divided into separate MOVELINK commands or can be added up together into one Consider the following two rules when setting up the MOVELINK command Rule 1 In an acceleration and deceleration phase with matching speed the link_distance must be twice the distance Acceleration Deceleration link Speed distance Speed distance distance link distance 7 7 Time Time Rule 2 In a constant speed phase with matching speeds the two axes travel the same distance so the distance to move must equal the ink distance MOVELINK works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis The axis set for ink axis drives the base axis If the sum of ink acceleration and link deceleration is greater than link distance they are both reduced in proportion in order to equal the sum to link distance distance The incremental distance in user units to move the base axis as a result of the measured ink distance movement on the link axis link distance The positive incr
85. be stopped program name The name of the program to be stopped task number The number of the task with the program to be stepped Range 1 3 HALT RUN SELECT Example 1 gt gt STOP progname Example 2 The lines from abel on will not be executed in this example STOP label PRINT var RETURN 6 3 184 SWITCH STATUS Type Description System Parameter The SWITCH STATUS parameter contains the status of the 10 external DIP switches on the MC Unit For the MCW151 DRT E these are also used for the DeviceNet settings 187 Command function and parameter description 6 3 185 T_RATE Type Description See also Example 6 3 186 T_REF Type Alternative Description See also Example 6 3 187 TABLE Type Syntax Description 188 Note Note Section 6 3 If the status of the switches are changed during operation the parameter sta tus will be automatically updated This parameter is read only Axis Parameter The T_RATE parameter contains the torque reference rate for the attached Servomotor This parameter is defined as the torque value in percentage of the rated torque which is applied to the Servomotor per reference unit T_RATE parameter Applied Torque of rated torque This parameter will apply to the following parameters T_REF AIN1 Servo Driver torque command data AIN3 Servo Driver torque monitor data This parameter is
86. be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given vii TABLE OF CONTENTS PRECAUTIONS Intended Audience General Precautions General Warnings and Safety Precautions Storage and Transportation Precautions Installation and Wiring Precautions Operation and Adjustment Precautions Maintenance and Inspection Precautions 3 OQ tn FW NY Conformance to EC Directives SECTION 1 Features and System Configuration 1 1 Features 1 2 System Configuration 1 5 Motion Control Concepts 1 4 Control System Configuration 1 5 Specifications 1 6 Comparison between Firmware Versions SECTION 2 Installati liz eus Vae Sen RR RE 2 1 Components and Unit Settings 2 2 Installation 2 3 Wiring 2 4 Servo System Precautions 2 5 Wiring Precautions SECTION 3 Motion Control Functions 3 Overview 3 2 System Setup cessere MSRP ERE ona he es 3 3 System Functions SECTION 4 Communication 4 Serial Communications 4 2 DeviceNet MCW151 DRT E only xii xii ix TABLE OF CONTENTS SECTION 5 Multitasking BASIC Programming 85 Ov rvieWio elec ee Eee oe tes qe gne 86 5 2
87. carriage return CR after the last variable has been assigned If the string is invalid the user will be prompted with an error message and the task will be repeated The maximum amount of inputs on one line has no limit other than the line length Channels 5 to 7 are logical channels that are superimposed on the RS 232C programming port 0 when using Motion Perfect n The specified input device When this argument is omitted the port as speci fied by INDEVICE will be used 0 RS 232C programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 NOAN variable The variable to write to Channel 0 is reserved for the connection to Motion Perfect and or the com mand line interface Please be aware that this channel may give problems for this function GET LINPUT Consider the following program to receive data from the terminal INPUT 5 num PRINT 5 BATCH COUNT num 0 A possible response on the terminal could be 123 CR BATCH COUNT 123 Mathematical Function INT expression The INT function returns the integer part of the expression To round a positive number to the nearest integer value take the INT function of the value added by 0 5 Similarly to round for a negative value subtract 0 5 to the value before applying INT expression Any valid BASIC expression gt gt PRINT INT 1 79
88. connector 30 servo system 14 power connector 31 precautions 39 precautions 40 software limit serial port connectors 31 forward 142 reverse 180 software reset 217 specifications DeviceNet 21 functional 19 general 19 I O 36 mathematical 88 RS 232C interface 31 RS 422A 485 interface 32 speed control 47 speed feedforward gain 16 statements axis 86 description 86 system 87 task 87 system configuration basic 5 DeviceNet 6 T U table variables 87 task buffer 89 clock pulses 189 priority 92 terminal window 90 204 three word format 73 torque control 49 260 Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual Cat No 1203 E2 02 Revision code The following table outlines the changes made to the manual during each revision Page numbers refer to the previous version Revision code Date Revised content 1 June 2002 Original production 2 March 2003 Revisions and additions as follows Added comparison section for firmware update FW 1 61 FW 1 62 Added description for dual feedback control command ADD DAC and related functionality Updated DeviceNet data according to FW 1 62 261
89. eee e eae 623 142 PRINT ios ee ig Rk Gs ee eel oe DR ede 6 32144 PROG EINE 2 rique OEE CE She ELO ted PROC STATUS 5 ru eR Ete gem PROCESS ERR an bee bee TERES ek eti espe eene exe PSWIIGH iv Y caus ober Ys SAS SG ERA OMS RAPIDSTOB eto ex eue RACE Se ih 6 3 150 READ BIT odes gie rj BU e ete ees aes gen REG POS ce ELI eer Ree ea De TUA ode des Rita eek ah acis REGIST RR VARY ARRAS REMAIN tes RENAME v ure Yom Se see AREE EODEM REP DISTE 24 IRI een P UU REP OPTION tede Coe RUD ECC HER E aces REPEAT UNTIL mb Se rM ey a ee 6 3 145 6 3 146 6 3 147 6 3 148 6 3 149 6 3 151 6 3 152 6 3 153 6 3 154 6 3 155 6 3 156 6 3 157 6 3 158 6 3 159 6 3 160 REV IN cess Pu pde VNPT REV NOG Coo PIDE I EO ISDEM Ried REVERSE Ohad ea y os tad WO Ue RAO PR ese RS LIMIT oe pated cack pet pean REISEEIO SER DS ER 6 3 161 6 3 162 6 3 163 6 3 164 6 3 165 6 3 166 6 3 167 6 3 168 6 3 169 6 3 171 6 3 172 6 3 173 6 3 174 6 3 175 6 3 176 6 3 177 6 3 178 6 3 179 6 3 181 6 3 182 6 3 183 6 3 184 6 3 185 6 3 186 6 3 187 6 3 188 RUNLERROR eem ee Ee AO RUNTYPE Ie remeras teda SREB OUT EE D Rete 6 3 1 0 SCOPE Re ce BER er RE ARE CLER EARS SCOPE POS
90. given by 0 0 0 0 6 1 4 3 j 2 0 0 0 5 Example 2 The three word format of value 48 89 is given by 0 0 0 2 4 8 8 9 j2 8 0 0 0 One data item uses three words Therefore the total words for data transfers should be the amount of data transferred multiplied by three 4 2 2 1 Message Communications When sending explicit messages from an OMRON Master Unit use the CMND or IOWR instruction to send the message data as an EXPLICIT MES SAGE SEND 28 01 FINS command Command Block 28 01 32 00 8A 00 01 242 bytes max N N Command Class ID Instance ID Service Data code Service code Destination node address Response Block Normal Response 28 01 00 00 240 bytes max N Command Response No of bytes Service Data code code received Service code Source node address Note For a normal response the leftmost bit of the service code specified in the command will be turned ON and then returned For example a command service code of 32 Hex is returned as B2 Hex in the response 73 DeviceNet MCWISI DRT E only Section 4 2 Parameters 74 Error Response The following response is returned if an error occurs for the explicit message 28 01 00 00 94 FF Command Response of bytes code code received Ad
91. in the controller then the value displayed may be incorrect The refresh button will force Motion Perfect to read the whole selection again 7 5 4 Controller Configuration The Controller Configuration Window shows the hardware and software con figuration of the MC Unit The MC Unit configuration can be checked by selecting Controller Configuration from the Controller Menu or the appropriate button of the Control Panel Controller Configuration Tx Controller System Software Version MCwW151 1 61 s xx Ti Drive Module Encoder Mo Comms Ipse Range Digital inputs 0 31 Digital outputs 8 31 Analogue Inputs 0 3 7 5 5 VR and Table Editors The VR and Table Editor tools provide a spreadsheet style interface to view and modify a range of values in memory To modify a value click on the exist ing value with the mouse and type in the new value and press return The 209 Motion Perfect Tools Range Refresh Button Section 7 5 change will be immediate and can be made whilst programs are running Push the refresh button to reload the values a VR Viewer Address Value 0 1 i 2 3 4 5 7 8 i 3 10 Both the VR and Table Editor you can select the range of the view by giving the begin and end element The range of the Table Editor is limited to the highest element which is specified by the TSIZE system parameter Both edi tor show up to a maximum of
92. items can be found in alphabetical order For quick command reference check the following section Group Structure The complete set of commands functions and parameters is divided in the following groups Motion Control Commands Commands and Functions Loop and Conditional Structures Program Commands and Parameters System Commands and Parameters Mathematical Functions Constants Motion Perfect Commands and Parameters Axis Parameters Task Functions and Parameters Servo Driver Commands and Parameters Host Link Commands and Parameters 13 DeviceNet Commands and Parameters 6051509 gr A ovo ak ek N O Notation Used in this Each of the descriptions of the commands functions and parameters will con Section tain some of the following attributes Individual attributes are omitted when not applicable Type The classification is given for command function or parameter Syntax Standard BASIC notation is used to show command or function syntax Syn tax definition e Syntax code is given in typewriter font Text must typed exactly as given Argument names are given in italic font with underscores for spaces Replace these with the actual arguments Optional items are denoted with square brackets in the syntax nota tion The items are optional and can be omitted Repetition items are denoted with brackets in the syntax notation Items enclosed in these brackets are repeated zero or
93. marker phase When a primary registration event has occured MARK axis parameter will be set to TRUE and the position will be stored in the REG POS axis parameter For the secondary registration event the MARKB axis parameter will be set and the position will be stored the REG POSB axis parameter Inclusive windowing Inclusive windowing allows the print registration event only to occur within the specified window When inclusive windowing is applied signals will be ignored if the axis measured position is not greater than the OPEN WIN parameter and less than the CLOSE WIN parameter Add 256 to the mode argument value to apply inclusive windowing Exclusive windowing Exclusive windowing allows the print registration event only to occur outside the specified window When exclusive windowing is applied signals will be ignored if the axis measured position is not less than the OPEN WIN param eter or greater than the CLOSE WIN parameter Add 768 to the mode argu ment value to apply exclusive windowing REGIST must be executed once for each position capture mode Specifies the type of capture to make depending on the axis axis mode Description 0 1 Captures absolute position on Z marker to REG POS 2 Captures absolute position on input CN1 46 to REG POS 175 Command function and parameter description Section 6 3 176 See also Examples axis mode Description
94. of any length but only the first 15 characters are significant Each task has its own local labels and local variables For example consider the two programs shown below start start FOR a 1 to 100 a 0 MOVE a REPEAT WAIT IDLE 1 PRINT a GOTO start UNTIL a 300 GOTO start These two programs when run simultaneously in different tasks and have their own version of variable a and label start If you need to hold data in common between two or more programs VR vari ables should be used or alternatively if a large amount of data is to be held the Table can be used To make a program more readable when using a VR variable a named local variable can be used as a constant in the VR variable The constant however must be declared in each program using the variable In the example below VR 3 is used to hold a length parameter start start GOSUB initial GOSUB initial VR length x MOVE VR length PRINT VR length Body of program Body of program initial initial RETURN RETURN 5 2 3 Mathematical Specifications Number format NWARNING Hexadecimal format 88 The MC Unit has two main formats for numeric values single precision float ing point and single precision integer The single precision floating point format is internally a 32 bit value It has an 8 bit exponent field a sign bit and 23 bit fraction field with an implicit 1 as the 24th bi
95. pc_area Data area Host Link command PLC_DM DM area RD or value 0 PLC_IR CIO IR area RR or value 1 PLC_LR LR area RL or value 2 PLC_HR HR area RH or value 3 PLC_AR AR area RJ or value 4 PLC_EM EM area RE or value 6 pc_offset The address of the specified PC memory area to read from Range 0 9999 length The number of words of data to be transfered Range 1 30 mc_area The MC Unit s memory selection to write the received data to MC_area Data area MC_TABLE Table variable array or value 8 MC_VR Global VR variable array or value 9 146 Command function and parameter description Section 6 3 See also Example mc offset The address of the specified MC Unit memory area to write to Range for VR variables 0 250 Range for Table variables 0 7999 HLM COMMAND HLM STATUS HLM TIMEOUT HLM WRITE SETCOM The following example shows how to read 20 words from the PC DM area addresses 120 139 to MC Unit s Table addresses 4000 4019 The PC has Slave node address 17 and is connected to the RS 422A port HLM READ 2 17 PLC DM 120 20 MC TABLE 4000 6 3 92 HLM STATUS Type Syntax Description Arguments See also Examples Host Link Parameter STATUS The HLM STATUS parameter contains the status of the last Host Link Master command sent to the specified port The parameter will indicate the status for the HLM READ HLM WRITE and HLM COMMAND commands
96. power lines other power lines 53 There is malfunctioning due to Check whether there is a device Separate the Unit from the noise from a welding machine such as a welding machine noise source inverter etc inverter nearby 54 There is slippage in the Check for slippage by marking Tighten the connections mechanical system the mechanical connections 8 3 2 DeviceNet Slave Problem Solving Red Indicator ON or Flashing Use the following table to troubleshoot in a Slave that has a red indicator that is ON or flashing Error Probable cause The MS indicator is a constant red The Slave Unit is faulty Replace the Unit The MS indicator is flashing red Check that the Slave s baud rate setting is correct The setting must be 125 kbps 250 kbps or 500 kbps Restart the Unit after changing the baud rate Replace the Unit if the MS indicator continues to flash red even though the baud rate setting is correct 230 Problems and Countermeasures Section 8 3 Error Probable cause After the MS indicator turns green the NS indicator does not flash green it turns red immediately Restart the faulty Slave Unit after checking the following points Make sure that the Master and Slaves baud rate settings all match If they do not match set all of the baud rates to the same value Check for a node address duplication If necessary change the node address s
97. processor can be used to examine the computer backup project file copy of the programs In this way the location of the uncorrupted or latest version of the programs can be identified The correct program can be imported to the project by using the Load Program File option of the Project Menu The computer project copy of a program is updated during a Motion Perfect development session whenever an edit session for the program is closed Retrieving Backup If you want to abandon changes made during a development session and reload the backup copy made at the start of the session then select Revert to Backup from the Project Menu Downloading Firmware The MC Unit has Flash memory for storage of both user programs and the system software From Motion Perfect it is possible to upgrade the software to a newer version using a system file Select the System Software option from the controller menu and warning dialog will be presented to ensure the current project has been saved the user wishes to continue Press OK and select the file which needs to be loaded Caution Do not download any firmware to the MC Unit that has not been distributed by OMRON or that has not been authorized and approved by OMRON for down loading into the MCW151 series Failure to do so may result in permanent or temporary malfunction of the Unit or unexpected behaviour Downloading will take several minutes depending on the speed of the per sonal computer
98. read only AIN1 AIN3 AXIS T REF The following the statement will print the torque monitor value from the Servo Driver in percentage of the rated torque which is applied to the Servomotor gt gt PRINT AIN3 T RATE Axis Parameter DAC The T REF parameter contains the torque reference value which will be applied to the Servomotor The range of the T REF parameter is defined by 15000 15000 The actual torque reference is depending on the Servomotor To determine the torque reference in percentage of the rated torque multiply the T REF parameter value with the T RATE parameter value AXIS T REF T REF AXIS 0 1000 System Command TABLE address value value TABLE address The TABLE command loads data to and reads data from the Table array The Table has a maximum length of 8 000 elements The table values are floating point numbers with fractions The table can also be used to hold information as an alternative to variables The TABLE command has two forms TABLE adaress value value writes a sequence of values to the Table array The location of the element is specified by address The sequence can have a maximum length of 20 elements TABLE adaress returns the table value at that entry A value in the table can be read only if a value of that number or higher has been previously written to the table For example printing TABLE 1001 will produce an error message if the highest table location pre
99. the following graph Rotational Speed RPM Overspeed 4 Rated speed Speed reference Rated speed SSS San Overspeed The speed characteristics are Servomotor dependent The S_RATE axis parameter specifies the speed reference rate of the attached motor This rate is defined as the amount of Rotational speed in RPM per unit of speed refer ence Rotational Speed RPM Speed Reference 5 RATE Programming Example In the following example a simple motion application including initiation for a single axis is shown init BASE 0 P_GAIN 5 I_GAIN 0 D_GAIN 0 VFF_GAIN 0 OV_GAIN 0 ACCEL 1000 ECEL 1000 PEED 500 DOG ON ERVO ON loop MOVE 500 WAIT IDLE WA 250 MOVE 500 WAIT IDLE WA 250 GOTO loop E Torque Limit Settings During speed control it is possible to limit the torque applied by the Servo Driver by using the torque reference The required Servo Driver setting is Pn002 0 1 and refer to the Torque control section below for details on the torque reference 48 Section 3 3 System Functions Torque Control The Torque Control mode is used to apply a fixed torque independent of the travelling speed This mode can be used for specific applications which require a constant pressure To set up a Motion Application with Torque Control the following setting in the Servo Driver is requ
100. the scope channel is not required then NONE should be selected in the parameter list box Axis Channel List Box The Axis Channel List Box allows the user to select the required axis for a motion parameter or channel for a digital input output The list box label will switch according to the setting in the Param eter List Box Vertical Scale The scope vertical scale in units per grid division on the display can be set to either Automatic or Manual Mode In Automatic Mode the scope calculates the most appropriate scale when it has finished running and prior to displaying the trace If the scope is running with continuous triggering it will initially be unable to select a suitable vertical scale When this happens the Scope must be halted and re started or used in the manual scaling mode In Manual Mode the user selects the scale per grid division The vertical scale is changed by pressing the Up Down Scale Buttons at the sides of the Current Scale Text Box The button on the left decreases the scale value and the button on the right increases the scale value To return to the Automatic Mode continue pressing the left button decreasing the scale value until the word AUTO appears in the current scale text box Channel Trace Vertical Offset The Vertical Offset Buttons are used to move a trace vertically on the display This control is useful when two or more traces are identical in which case they will overl
101. the specified VR variable Program execution will be paused until the string is terminated with a carriage return CR which is also stored The string is not echoed by the controller Channels 5 to 7 are logical channels that are superimposed on the RS 232C programming port 0 when using Motion Perfect n The specified input device When this argument is omitted the port as speci fied by INDEVICE will be used 0 RS 232C programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 vr_variable The first VR variable to write to Channel 0 is reserved for the connection to Motion Perfect and or the com mand line interface Please be aware that this channel may give problems for this command GET INPUT VR Consider the following line in a program LINPUT 5 VR 0 Entering START lt CR gt will give gt 40 LIST program program Command function and parameter description Description Precautions Arguments See also 6 3 109 LN Type Syntax Description Arguments Example 6 3 110 LOCK Type Syntax Description NWARNING Arguments Example 6 3 111 MARK Type Description See also Note Section 6 3 The LIST command prints the current selected program o
102. to a valid input number the corresponding output will be turned ON and then the corresponding FWD_JOG or REV_JOG axis parame ter will be set This is the speed at which the jog will be performed which is given by the JOGSPEED parameter The value of the speed is limited to the range from 0 to the demand speed given by the SPEED parameter for this axis This value can be changed by writing directly to this field or by using the jog speed con trol up down buttons 211 Motion Perfect Tools Jog Buttons Warnings Area 7 5 9 Oscilloscope 212 Note Section 7 5 The screen provides Forward and Reverse Jog Buttons for each axis When the button is pushed the jogging is activated and the corresponding virtual input will be OFF Prior to the activation the value of the Jog Speed field will be written to the JOGSPEED parameter When released this input is ON and the jogging will be stopped The Warnings Area shows the status of the last jog request When a Jog Button is pressed a warning will be given for any of the following The axis is a SERVO axis and the servo is OFF The jog speed is 0 The acceleration or deceleration rate for this axis is 0 The forward or reverse jog input is out of range There is already a move other than a jog being performed on this axis The software oscilloscope can be used to trace axis and motion parameters which is a helpful tool for program development and system setup The oscil los
103. to avoid an unexpected restart Take appropriate measures to secure safety against an unexpected restart Doing so may result in injury Confirm that no adverse effect will occur in the system before attempting any of the fol lowing Not doing so may result in an unexpected operation or damage to the product Changing the present values or set values Changing the parameters Modifying one of the application programs Do not save data into the flash memory during memory operation or while the motor is running Otherwise unexpected operation may be caused Do not turn OFF the power supply to the Unit while data is being written to flash memory Doing so may cause problems with the flash memory Do not turn OFF the power supply to the Unit while data is being transferred Doing so may result in malfunction or damage to the product Do not download any firmware to the MC Unit that has not been distributed by OMRON or that has not been authorized and approved by OMRON for downloading into the MCW151 series Failure to do so may result in permanent or temporary malfunction of the Unit or unexpected behaviour Maintenance and Inspection Precautions NWARNING Do not attempt to disassemble repair or modify any Units Any attempt to do so may Caution result in malfunction fire electric shock or injury Resume operation only after transferring to the new Unit the contents of the data required for operation Not doing so ma
104. to write Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the maximum is 39 elements 27 Hex The 39 Table elements imply 234 bytes to be transferred Write data command The specified data should be written from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 The user should be aware that the MC Unit does not check if the PC memory data complies to the three word format VR DATA WRITE THREE WORD FORMAT will write VR data The VR data will be defined according to the three word format Command Block 28 01 36 00 8A 00 01 Neo J N N 4 Command Class ID Instance ID Word data L code Service code Address H Length H Word data H Destination node address Address Length L Write data Max 238 bytes DeviceNet MCW151 DRT E only Section 4 2 Response Block 28 01 00 00 00 02 B6 VR DATA WRITE ONE WORD FORMAT N 7 Command Response of bytes code code received Note Service code Source node address Parameters Service code command response In the command 36 Hex is specified In the response the leftmost bit is turned ON and B6 Hex is returned Address H Address L command The address in hexa
105. torque For the AIN2 channel the S_RATE axis parameter can be used to convert the data into a value in round per minute For both the AIN1 and AIN3 channels the T_RATE axis parameter can be used to convert the value into a percent age of the rated torque IN S_RATE T_RATE Consider an application where the speed of movement is determined by the analog input voltage MOVE 10000 WHILE lt gt 0 sp AINO IF sp lt 0 THEN sp 0 SPEED sp 0 1 WEND Logical Operator expression_1 AND expression_2 The AND operator performs the logical AND function on the corresponding bits of the integer parts of two valid BASIC expressions The logical AND function between two bits is defined as follows Bit 1 Bit 2 Result 0 0 0 0 1 0 1 0 0 1 1 1 expression_1 Any valid BASIC expression expression_2 Any valid BASIC expression Example 1 VR 0 10 AND 2 1 9 The parentheses are evaluated first but only the integer part of the result 18 is used for the AND operation Therefore this expression is equivalent to the following VR 0 10 AND 18 The AND is a bit operator and so the binary action is as follows Command function and parameter description 6 3 23 6 3 24 6 3 25 6 3 26 ASIN Type Syntax Description Arguments Example ATAN Type Syntax Description Arguments Example ATAN2 Type Syntax Description
106. variables can be accessed 2 Each FLASHVR command generates a write to a block of the Flash mem ory Although this memory allows numerous writes and erases it has a lim ited life cycle Programmers should be aware of this fact and use the command as limited as possible address The address of the VR variable Range 0 250 To write the Table data into the following options are used FLASHVR 1 Write entire Table array FLASHVR 2 Cancel update of Table data at start up EPROM 6 3 79 FOR TO STEP NEXT 140 Type Syntax Description Precautions Arguments See also Structural Command FOR variable start To end STEP increment commands NEXT variable The FOR NEXT loop allows the program segment between the FOR and the NEXT statement to be repeated a number of times On entering this loop the variable is initialized to the value of start and the block of commands is then executed Upon reaching the NEXT command the variable is increased by the increment specified after STEP The STEP value can be positive or negative if omitted the value is assumed to be 1 While variable is less than or equal to end the block of commands is repeat edly executed until variable is greater than end at which time program execu tion will continue after NEXT FOR NEXT statements can be nested up to 8 levels deep in a BASIC pro gram variable Any valid BASIC expression start Any valid BASIC expressi
107. xii xiv xiv XV XV XV XVi xvi Intended Audience 1 1 2 3 xii Intended Audience This manual is intended for the following personnel who must also have knowledge of electri cal systems an electrical engineer or the equivalent Personnel in charge of installing FA systems Personnel in charge of designing FA systems Personnel in charge of managing FA systems and facilities General Precautions The user must operate the product according to the performance specifications described in the operation manuals You should assume that anything not described in this manual is not possible Before using the product under the following conditions consult your OMRON representative make sure the ratings and performance characteristics of the products are good enough for the systems machines or equipment and be sure to provide the systems machines or equipment with double safety mechanisms 16 2 NWARNING Conditions not described in the manual The application of the product to nuclear control systems railroad systems aviation sys tems vehicles combustion systems medical equipment amusement machines or safety equipment The application of the product to systems machines or equipment that may have a serious influence on human life and property if they are used improperly It is extremely important that Motion Control Units and related devices be used for the specified purpose and under the specifi
108. 0 5 or 1 0 ms The I O status of the MC Unit is refreshed at the beginning of every servo cycle The captured status of the digital inputs is transferred to the IN system input variable Note that this is the status captured in the previous servo cycle The analogue outputs for the speed references are updated The digital outputs are updated conform the status of the OP system out put variable The status of the digital inputs is captured Note that no automatic processing of the I O signals is taking place except for registration This implies that all actions must be programmed in the BASIC programs Motion Perfect provides several ways of executing pausing and stopping the programs using buttons on the control panel and the editing windows The fol lowing commands can be given on the command line to control the execution Command Function RUN Run the current selected program or a specified pro gram optionally on a specified task number STOP Stop the current selected program or a specified program HALT Stop all programs on the system PROCESS Displays all running tasks The user can explicitly allocate the task priority on which the BASIC program is expected to run When a user program is run without explicit task allocation itis assigned the highest available task priority Tasks 3 has high priority and task 2 and 1 have low priority Programs can be set to run automatically at different
109. 05 WHILE WEND Type Structural Command Syntax WHILE condition commands WEND Description The WHILE WEND structure allows the program segment between the WHILE and the WEND statement to be repeated a number of times until the condition becomes FALSE In that case program execution will continue after WEND Precautions WHILE WEND loops can be nested without limit Arguments condition Any valid logical BASIC expression See also FOR REPEAT Example WHILE IN 12 OFF MOVE 200 WAIT IDLE OP 10 OFF MOVE 200 WAIT IDLE OP 10 ON WEND 6 3 206 XOR Type Logical Operator Syntax expression 1 expression 2 Description The XOR operator performs the logical XOR function between corresponding bits of the integer parts of two valid BASIC expressions The logical XOR function between two bits is defined as follows Bit 1 Bit 2 Result 0 0 0 0 1 1 195 Command function and parameter description Section 6 3 Bit 1 Bit 2 Result 1 0 1 1 1 0 Arguments expression_1 Any valid BASIC expression expression_2 Any valid BASIC expression Example a 10 XOR 2 1 9 The parentheses are evaluated first but only the integer part of the result 18 is used for the operation Therefore this expression is equivalent to the fol lowing VR 0 10 XOR 18 The XOR is a bit operator and so the binary action taking place is as follows 01010 XOR 100
110. 1 The slave detects an error within the command and will send a corre sponding end code indication 2 The slave cannot decode the command header code and sends a IC re sponse 3 The master detects an error within the response The corresponding end code will be defined in the status Error Handling Section 8 2 4 The timeout time has elapsed for the master HLM_STATUS status bits 9 8 7 0 End code case 1 or case 3 Timeout error case 4 Command not recognized case 2 If no error did occur the HLM STATUS will have value 0 In case of a non zero value any appropriate action such as a re try or emergency stop needs to be programmed in the user BASIC program 8 2 2 Servo Driver Alarms Alarm Table Alarm Description The Servo Driver Front Panel Display Area will display if an alarm is gener ated in the Servo Driver The display will display an 20 number on screen The Servo Driver alarms related to the option boards such as the MCW151 are given in the following table Refer to the OMNUC W series user s manual 1531 for specific details on other alarms and how to resolve them Display Error Description 20 See Servo Driver manual 0 MC Unit Initiation Error No MC unit has been mounted A E1 MC Unit Timeout Error No response from the MC Unit A E2 WDC Error of MC Unit There is an error in the MC Unit watchdog counter A E7 MC Unit Detec
111. 10 11000 The result is therefore 24 196 SECTION 7 Motion Perfect Software Package This section describes the operation of the Motion Perfect programming software package Motion Perfect provides the user a tool to program monitor and debug motion based applications for the MC Unit 7 1 Features and 7 2 Connecting to the 7 3 Motion Perfect 1 3 1 Project Managers ce Coen MAS Ae hee Nal ERE 7 3 2 Creating a Project for the First Time 7 4 Desktop TAL Control Panels Ro pig SORES SARE ER EES 7 4 2 Editing and Running Simple Programs 7 5 Motion Perfect 1 8 7 5 1 Terminal bee eet bee ees 129 2 i uon ec Ge CE es 7 5 3 Axis 7 5 4 Controller Configuration 7 5 5 Table 7 5 6 Status Window 7 5 7 Full Controller Directory 7 5 8 Jog Scree r creeer eR RM bed yoke eas 4 5 9 Oscilloscope
112. 100 elements Use the scroll bar to scroll through the data The editors do not update the shown values automatically Push the Refresh Button to update the values of the elements or when you have changed the range of elements 7 5 6 Status Window Digital Inputs Digital Outputs IN OUT 210 The I O Status Window allows the user to view the status of all the I O points and toggle the status of the output points The I O Status Window is shown in the centre of the screen below Refer to 5 3 Motion Execution for a description of the different types of I O fq Digital 10 Status GI x fen Digital IO Configuration Input 0 31 Outputs 8 31 This shows the total range of input channels on the current Motion Controller This shows the total range of output channels on the current Motion Control ler These banks show the status of the inputs of the Motion Controller Each bank contains 8 indicators which show the status of the inputs These banks show the status of the outputs of the Motion Controller Each bank contains 8 indicators which show the status of the outputs These output points can be put ON or OFF by clicking on the indicators Refer to 3 3 2 Digital I O for details on the MC Unit input and output map pings The in and outputs can be accessed by using controller commands IN and OP Refer to 6 3 99 IN and 6 3 132 OP Motion Perfect Tools Section 7 5 7 5 7 Full Control
113. 29 OFFPOS Type Description Precautions See also Example 6 3 130 ON Type Description Example Note Note Note Section 6 3 Bit Result 0 1 1 0 expression Any valid BASIC expression gt gt PRINT 7 AND NOT 1 6 0000 Axis Parameter The NTYPE parameter contains the type of the move in the next move buffer Once the current move has finished the move present in the NTYPE buffer will be executed The values are the same as those for the MTYPE axis parameter NTYPE is cleared by the CANCEL 1 command This parameter is read only AXIS MTYPE Constant The OFF constant returns the numerical value 0 A constant is read only OP lever OFF The above line sets the output named ever to OFF Axis Parameter The OFFPOS parameter contains an offset that will be applied to the demand position DPOS without affecting the move in any other way The measured position will be changed accordingly in order to keep the following error OFF POS effectively adjusts the zero position of the axis The value set in OFF POS will be reset to zero by the system as the offset is loaded The offset is applied on the next servo period Other commands may be exe cuted prior to the next servo period Be sure that these commands do not assume the position shift has occurred This can be done by using the WAIT UNTIL statement see example AXIS DEFPOS DPOS MPOSUNITS The following lines def
114. 6 position switches each of which can be assigned to any axis Each switch is assigned its own ON and OFF positions and output number The command can be used with 2 or all 7 arguments With only 2 arguments a given switch can be disabled PSWITCHs are calculated on each servo cycle and the output result applied to the hardware The response time is therefore 1 servo cycle period approxi mately An output may remain ON if it was ON when the PSWITCH was turned OFF The OP command can be used to turn OFF an output as follows PSWITCH 2 OFF OP 14 OFF Turn OFF pswitch controlling 14 Command function and parameter description Section 6 3 Arguments See also Example 6 3 149 RAPIDSTOP Type Syntax Alternative switch The switch number Range 0 15 enable The switch enable Range ON OFF axis The number of the axis providing the position input output_number The physical output to set Range 8 31 output_state The state to output Range ON OFF set_position The absolute position in user units at which output is set reset_position The absolute position in user units at which output is reset OP UNITS A rotating shaft has a cam operated switch which has to be changed for differ ent size work pieces There is also a proximity switch on the shaft to indicate the TDC of the machine With a mechanical cam the change from job to job is time consuming This can be eased by using PSWITCH as
115. 9 The Servo Motor power lines Check the Servo Motor power Correct the wiring and encoder lines are wired lines and encoder lines incorrectly 30 There is eccentricity in the cou Check the machinery Try turn Adjust the machinery plings connecting the Servomo ing the motor with no load i e tor axis and the mechanical with the machinery removed System There may be loose from the coupling Screws or load torque fluctua tion due to the meshing of pul ley gears 31 The gain adjustment is insuffi Execute Servomotor autotun cient ing Manually adjust the Servo motor gain Adjust the servo control parameters with Motion Per fect 32 The wrong Servomotor is Check the torque and inertia Change to a suitable Servo selected so it cannot be ratings and select another Ser motor adjusted vomotor 33 The Servomotor bearings are Turn OFF the Servo Driver Replace the Servomotor damaged power If the Servomotor has a brake turn ON the brake power supply and release the brake and then manually turn the motor s output axis with the motor s power line discon nected because the dynamic brake may be applied 34 The Servomotor windings are With a tester check resistance Replace the Servomotor disconnected between the Servomotor s U V and W power lines There should be a proper balance between the line resistances 35 Vibration is Inductive noise is being gener Check whether the Servo Driver Shorten the con
116. AE FE TE HEFE FE HEFE FE EERE EE EERE EE ERE TE TE FE FE FE EE EERE RE EE EERE GH EE EEE EH E E EE EH HH force_reset 114 VR force reset FALSE Initialisation parameters I re start reset required Pn000 Function selection basic switch Pn000 1 0 Speed Control selected Pn000 1 9 Torque Speed control IF DRV READ 000 0000 THEN DRV WRITE 000 0000 VR force reset TRUE ENDIF Pn002 Function selection application switch 2 Y Pn002 0 0 Torque Limit during speed control not used selected 002 0 1 Torque Limit 002 1 0 Speed Limit during torque control not used selected Y 002 1 1 Speed Limit IF DRV 5002 lt gt 50000 THEN 248 Programming Examples Appendix C D V EN IF D V EN IF D V EN IF D V EN IF D V EN IF D V EN IF D EN RV WRITE 002 0000 R force reset TRUE DIF Pn003 Function selection application switch 3 Pn003 0 2 Analog monitorl Torque command 003 1 0 Analog monitorlServomotor rotation speed DRV_READ 003 lt gt 50002 THEN RV_WRITE 5003 0002 R force_reset TRUE DIF Pn50A Input signal selection 1 Pn50A 0 1 Input Signal Allocation mode user defined Pn50A 1 8 RUN Signal Input always disabled Pn50A 2 8 MING Signal Input always disabled Pn50A 3 2 POT Signal Inp
117. ARD 15 JOG_REVERSE 20 CAMBOX 21 CONNECT 22 MOVELINK MTYPE can be used to determine whether a move has finished or if a transi tion from one move type to another has taken place A non idle move type does not necessarily mean that the axis is actually mov ing It can be at zero speed part way along a move or interpolating with another axis without moving itself This parameter is read only AXIS NTYPE Program Command NEW program name The NEW command deletes all program lines of the program from memory NEW without a program name can be used to delete the currently selected program using SELECT The program name can also be specified without quotes NEW ALL will delete all programs The command can also be used to delete the Table NEW TABLE The name TABLE must be in quotes This command is implemented for an offline VT100 terminal Within Motion Perfect users can select the command from the Program menu COPY DEL RENAME SELECT TABLE System Parameter The NIO parameter contains the total number of inputs and outputs of the sys tem Logical Operator NOT expression The NOT operator performs the logical NOT function on all bits of the integer part of the expression The logical NOT function is defined as follows Command function and parameter description Arguments Example 6 3 127 NTYPE Type Description See also 6 3 128 OFF Type Description Example 6 3 1
118. ASE Type Motion Control Command Syntax BASE axis 1 2 axis 31 BASE Alternative BA axis 1 axis 2 axis_3 BA Description The BASE command is used to set the default base axis or to set a specified axis sequence group All subsequent motion commands and axis parameters will apply to the base axis or the specified axis group unless the AXIS com mand is used to specify a temporary base axis The base axis is effective until itis changed again with BASE Each BASIC process can have its own axis group and each program can set its own axis group independently Use the PROC modifier to access the parameter for a certain task The BASE order grouping can be set by explicitly assigning the order of axes This order is used for interpolation purposes in multi axes linear and circular moves The default for the base axis group is 0 1 2 at start up or when a pro gram starts running on a task The BASE command without any arguments returns the current base order grouping 121 Command function and parameter description Section 6 3 6 3 31 122 Arguments axis_i The number of the axis set as the base axis and any subsequent axes in the group order for multi axis moves See also AXIS Examples Example 1 It is possible to program each axis with its own speed acceleration and other parameters BASE 1 UNITS 2000 unit conversion factor for axis 1 SPEED 100 Set speed for axi
119. C STATUS PROCNUMBER PROC 171 Command function and parameter description Section 6 3 6 3 145 PROC_STATUS Type Description See also Example 6 3 146 PROCESS Type Syntax Description See also Task Parameter The PROC_STATUS parameter returns the status of the process or task specified The parameter is used with the PROC modifier and can return the following values 0 Process stopped 1 Process running 2 Process stepping 3 Process paused PROC_LINE PROCNUMBER PROC WAIT UNTIL PROC STATUS PROC 3 0 Program Command PROCESS The PROCESS command returns the status list of all running tasks with their task number HALT RUN STOP 6 3 147 PROCNUMBER Type Description Note See also Example 6 3 148 PSWITCH Type Syntax Description Precautions 172 Task Parameter The PROCNUMBER parameter contains the number of the task in which the currently selected program is running PROCNUMBER is often required when multiple copies of a program are running on different tasks This parameter is read only PROC LINE PROC STATUS PROC MOVE length AXIS PROCNUMBER Command PSWITCH switch enable axis output number output state set position reset position The PSWITCH command turns ON an output when a predefined position is reached and turns OFF the output when a second position is reached The positions are specified as the measured absolute positions There are 1
120. Command function and parameter description Section 6 3 Precautions See also Example 6 3 142 PRINT 170 Type Syntax Description Arguments Changing the PP_STEP value will influence the position control loop Modify the control gains accordingly AXIS MOVECIRC UNITS A motor has 20 000 steps rev The MC Unit will thus internally process 40 000 counts rev A 2 500 pulse encoder is to be connected This will generate 10 000 edge counts rev A multiplication factor of 4 is therefore required to convert the 10 000 counts rev to match the 40 000 counts rev of the motor The following line would be used for axis 0 PP STEP 0 4 Command PRINT n expression expression n expression expression The PRINT command outputs a series of characters to the serial ports PRINT can output parameters fixed ASCII strings and single ASCII charac ters By using PRINT n any port can be selected to output the information to Multiple items to be printed can be put on the same line separated by a comma or a semi colon A comma separator in the print command places a tab between the printed items The semi colon separator prints the next item without any spaces between printed items The width of the field in which a number is printed can be set with the use of w x after the number to be printed The width of the column is given by wand the number of decimal places is given by x
121. Command Response No ofbytes code code received Service code Source node address Parameters Service code command response In the command 37 Hex is specified In the response the leftmost bit is turned ON and B7 Hex is returned Address H Address L command The address in hexadecimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal ignored for MC Unit Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the VR memory the maximum value is 250 FA Hex Length H Length L command The number of VR memory elements to write Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the maximum is 119 elements 77 Hex The 119 VR elements imply 238 bytes to be transferred Write data command The specified data should be written from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 RESET will perform a software reset of both the MC Unit and the Servo Driver as DRV_RESET command Command Block 28 01 05 00 8A 00 01 Command Class ID Instance ID code Service code Address H Destination node address Response Block 28 01 00 00 00 02 85 N N Command Response No ofby
122. DEFPOS com mand The OFFPOS axis parameter can also be used to shift the origin point MPOS is reset to zero at start up The range of the measured position is controlled with the REP_DIST and REP_OPTION axis parameters This parameter is read only AXIS DEFPOS DPOS ENCODER FE OFFPOS REP_DIST REP_OPTION UNITS WAIT UNTIL MPOS gt 1250 SPEED 2 5 Axis Parameter The MSPEED parameter contains the measured speed in units s It is calcu lated by taking the change in the measured position in user units in the last servo period and divide it by the servo period in seconds The servo period is set with the SERVO_PERIOD parameter MSPEED represents a snapshot of the speed and significant fluctuations which can occur particularly at low speeds It can be worthwhile to average several readings if a stable value is required at low speeds This parameter is read only AXIS SERVO_PERIOD VP_SPEED UNITS Axis Parameter The MTYPE parameter contains the type of move currently being executed The possible values are given below Move No Move Type 163 Command function and parameter description See also 6 3 124 NEW Type Syntax Description Precautions See also 6 3 125 NIO Type Description 6 3 126 NOT Type Syntax Description 164 Note Section 6 3 0 IDLE no move 1 MOVE 2 MOVEABS 4 MOVECIRC 5 MOVEMODIFY 10 FORWARD 11 REVERSE 12 DATUM 13 CAM 14 JOG_FORW
123. EMODIFY and REVERSE Other commands for which AXIS is used are REGIST WAIT IDLE and WAIT LOADED BASE Example 1 BASE 0 PRINT VP SPEED AXIS 2 Example 2 MOVE 300 AXIS 0 Example 3 REPDIST AXIS 1 100 Command function and parameter description 6 3 29 AXISSTATUS Section 6 3 Type Axis Parameter Description The AXISSTATUS axis parameter contains the axis status The AXISSTA TUS axis parameter definition for the three axes are shown in the following table Bit Description Value Character Axis 0 Axis 1 Axis 2 num as used Servo Encoder Virtual ber in Motion Driver out virtual Perfect 0 l 1 1 Following Error Warning 2 w x 2 Servo Driver Communication Error 4 a X 3 Servo Driver Alarm 8 m X 4 Forward Limit 16 f X X X 5 Reverse Limit 32 r X X x 6 Datuming 64 d X X X 7 Hold Input 128 h X X x 8 Following Error Limit 256 e X x 9 Forward Software Limit 512 X X 10 Software Limit 1024 y X 11 Cancelling Move 2048 x x x 12 Encoder Out Overspeed 4096 X The AXISSTATUS parameter is used for the motion error handling of the unit Refer to 8 2 Error Handling for more detailed information on error handling Note This parameter is read only See also AXIS ERRORMASK Example IF AXISSTATUS AND 16 gt 0 THEN PRINT In forward limit 6 3 30 B
124. FORWARD WAIT UNTIL IN 2 ON prod_pos MPOS CANCEL WAIT IDLE PRINT Product Position prod_pos SPEED 100 MOVEABS 0 WAIT IDLE GOTO start 250 Programming Examples Appendix C Example 5 Synchronising Cutter Movement A flying shear cutter is required to synchronise with a continuously moving web and to cut a roll of paper every 5m The cutter axis 0 can move a total of 600 mm We use a maximum 500 mm of this travel The blade is operated by a solenoid which is switched by digital output 8 The blade must be operated mid way through the cutter motion The cutter must synchronise to cut and return to its start position all within not more than 80 of the repeat cycle To ensure that speeds and positions of the cutter and paper match during the cut process the arguments of the MOVELINK command must be correct It is normally easiest to consider the acceleration constant speed and deceleration phases separately and then combine them as required start UNITS AXIS 0 5000 Meters UNITS AXIS 1 5000 loop BASE 0 MOVELINK 0 4 0 O 1 Wait distance MOVELINK 0 1 0 2 0 2 0 1 Accelerate MOVELINK 0 3 0 3 0 0 1 Match speed MOVELINK 0 1 0 2 0 0 2 1 Decelerate MOVELINK 0 5 5 3 3 1 Move back GOTO loop The middle MOVELINK commands can be done in one move using the following line MOVELINK 0 5 0 7 0 2 0 2 1 Example 6 Generating Sm
125. GOTO moveloop The MOVEABS command is constructed as follows Step 1 IN 4 7 will get a number between 0 and 15 Step 2 The number is multiplied by 1 5467 to get required distance Step 3 An absolute move is made to this position Example 2 In this example a single input is tested test WAIT UNTIL 4 Conveyor is in position when ON GOSUB place Parameter The INDEVICE parameter defines the default input device This device will be selected for the input commands when the n option is omitted The INDE VICE parameter is task specific The following values are supported RS 232C programming port 0 default RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 o 151 Command function and parameter description Section 6 3 See also 6 3 101 INPUT Type Syntax Description Arguments Precautions See also Example 6 3 102 INT 152 Type Syntax Description Arguments Example Note GET INPUT LINPUT KEY Command INPUT n variable variable The INPUT command will assign numerical input string values to the specified variables Multiple input string values can be requested on one line separated by commas or on multiple lines separated by carriage return The program execution will be paused until the string is terminated with a
126. IN Type Axis Parameter Alternative CW Description The CLOSE WIN axis parameter defines the end of the window inside or out side which a registration mark is expected The value is in user units See also AXIS OPEN WIN REGIST UNITS CLUTCH RATE Type Axis Parameter Description The CLUTCH RATE axis parameter defines the change in connection ratio when using the CONNECT command The rate is defined as amount of ratio per second Command function and parameter description Section 6 3 Note See also Example The default value is set to a high value 1000000 in order to ensure compat ibility with previous MC Units MC402 E The operation using CLUTCH RATE is not deterministic in position If required use the MOVELINK command instead to avoid unnecessary phase difference between master and slave AXIS CONNECT MOVELINK CLUTCH RATE 4 This setting will imply that when giving CONNECT A 1 it will take one second to reach the full connection 6 3 40 COMMSERROR 6 3 41 6 3 42 Type Description COMPILE Type Syntax Description CONNECT Type Syntax Alternative Description System Parameter The COMMSERROR parameter contains the serial communication errors that have occurred since the last time that it was initialized The bits in COMMSERROR are defined as follows Bit Description Overrun error port O Parity error port O Framing error port 0 Break interrupt port O Overrun error port 1
127. ITS DECEL 100 Set deceleration rate PRINT Deceleration rate is DECEL mm s s Motion Control Command DEFPOS pos_1 pos_2 pos_3 DP pos_1 pos_2 pos_3 The DEFPOS command defines the current demand position DPOS as a new absolute position The measured position MPOS will be changed accordingly in order to keep the following error DEFPOS is typically used after an origin search sequence see DATUM command as this sets the cur rent position to zero DEFPOS can be used at any time As an alternative also the OFFPOS axis parameter can be used This param eter can be used to perform a relative adjustment of the current position DEFPOS works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis The changes to the axis position made using DEFPOS or OFFPOS are made on the next servo update This can potentially cause problems when a move is initiated in the same servo period as the DEFPOS or OFFPOS The following example shows how the OFFPOS parameter can be used to avoid this problem DEFPOS commands are internally converted into OFF POS position offsets which provides an easy way to avoid the problem by programming as follows DEFPOS 100 WAIT UNTIL OFFPOS 0 MOVEABS 0 pos_i The absolute position for base i axis in user units Refer to the BASE com mand for the grouping of the axes AXIS DATUM DPOS OFFPOS MPOS UNITS
128. Index OUTDEVICE 168 OUTLIMIT 168 OV GAIN 16 47 168 GAIN 16 47 169 PI 169 PMOVE 90 169 power operator 111 PP STEP 169 PRINT 170 PROC 87 171 PROC LINE 171 PROC STATUS 172 PROCESS 172 PROCNUMBER 172 PSWITCH 172 RAPIDSTOP 13 173 READ BIT 174 REG POS 174 REG POSB 174 REGIST 14 174 REMAIN 177 RENAME 177 REP DIST 177 REP OPTION 178 REPEAT 178 RESET 87 179 RETURN 143 REV IN 40 50 179 REV JOG 50 179 REVERSE 10 179 RS LIMIT 180 RUN 180 RUN ERROR 180 223 RUNTYPE 93 181 S RATE 181 5 REF 47 182 5 REF OUT 182 SCOPE 182 SCOPE POS 183 SELECT 184 SERVO 47 184 SERVO PERIOD 184 5 185 SETCOM 185 SGN 185 SIN 186 SPEED 8 186 SQR 186 SRAMP 186 statement separator 114 STEPLINE 186 STOP 187 subtract operator 112 SWITCH STATUS 187 T RATE 188 T REF 188 TABLE 87 188 TAN 189 TICKS 189 TRIGGER 190 TROFF 190 TRON 190 TRUE 191 TSIZE 191 UNITS 7 8 191 UNLOCK 155 VERSION 191 VFF_GAIN 16 47 192 VP_SPEED 192 VR 87 192 WA 193 WAIT IDLE 193 WAIT LOADED 194 WAIT UNTIL 194 WDOG 47 195 221 WHILE 195 XOR 195 BASIC programs compile description 91 debugging 190 207 editing 205 error processing 94 managing 91 multitasking 86 priority 92 run at start up 92 stepping 186 storing 91 tasks 92 trace function 190 trace function TRON TROFF 190 BASIC statement groups
129. LILIC L1 17 bit A backup battery is required when using an absolute encoder Install the bat tery into the Servo Driver s battery holder Item Specification R88A BATO1W Absolute Encoder Backup Battery Unit Battery Toshiba ER3V 3 6 V 1000 mA Setting up the encoder Set up the use of the absolute encoder by performing the following setting Param Parameter Name Required Explanation eter No Setting Pn002 2 switch 0 Use as absolute encoder when using abso lute encoder E Multi turn limit setting If an absolute encoder is used the counter counts the number of rotations from the setup position and output the number of rotations from the Servo Driver to the MC Unit For some applications it is convenient to reset the multi turn data back to 0 after a certain amount of turns System Functions Section 3 3 The multi turn limit settings will set this amount of multi turn rotations Param Parameter Name Setting Unit Default Restart eter No Range Setting Power Pn205 Absolute encoder 0 65535 Rotation 65535 Yes multi turn limit setting With the default setting Pn205 65535 the Servomotor multi turn data will be as follows Multi turn data 32767 Servomotor rotations 32768 With any other setting than 65535 the Servomotor multi turn data will be as follows Multi tu
130. Labels Finding Text 206 There are several ways that programs can be opened or created Existing programs can be edited by opening an Editor Window using one of the following methods Select Edit from the Program Menu and then selecting the required pro gram Click the Edit Button on the Control Panel to open an Editor Window for the selected program Double click a program in the Program List Box on the Control Panel New programs can be created using one of the following methods Select New from the Program Menu The default name can be changed before opening the Editor Window Click into the Program Name Text Box enter the new name and then press the Edit Button Click the Create New program button on the Control Panel When opening an Editor Window Motion Perfect performs a CRC check between the program on the MC Unit and the program in the project If the CRCs are different the user will be advised to perform a project check to obtain further information on the differences The basic editing operations that can be used in an Editor Window are out lined below The operation can be accessed by selecting the corresponding button on the top of the Editor Window or can be selected from one of the menu s of the window The operations correspond to the buttons displayed in the picture below from left to right Program Edit Debug Tools Window Help Bi amp X E Es dA T m 6n Ev mm This enables the user t
131. MBOX repeats automatically and bi directionally This option is canceled by setting bit 1 of REP OPTION parameter i e REP OPTION REP OPTION 2 5 Combination of options 1 and 4 6 Combination of options 2 and 4 link position The absolute position where CAMBOX will start when ink option is set to 2 While CAMBOX is being executed the ENDMOVE parameter will be set to the end of the previous move The REMAIN axis parameter will hold the remainder of the distance on the link axis AXIS CAM REP OPTION TABLE Motion Control Command CANCEL 1 CA 1 The CANCEL command cancels the current move on an axis Speed profiled moves FORWARD REVERSE MOVE MOVEABS and MOVECIRC will be decelerated at the deceleration rate as set by the DECEL parameter and then stopped Other moves will be immediately stopped CANCEL command cancels the contents of the current move buffer MTYPE The command CANCEL 1 command cancels the contents of the next move buffer NTYPE without affecting the current move in the MTYPE buffer CANCEL works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis CANCEL cancels only the presently executing move If further moves are buffered they will then be loaded During the deceleration of the current move additional CANCELs will be ignored CANCEL 1 cancels only the presently buffered move Any moves stored in the task buffers indicated by the P
132. MOVE variable can be loaded into the buffer as soon as the buffered move is cancelled AXIS MTYPE NTYPE PMOVE RAPIDSTOP 125 Command function and parameter description Section 6 3 6 3 35 6 3 36 6 3 37 6 3 38 6 3 39 126 Examples Example 1 FORWARD WA 10000 CANCEL Example 2 MOVE 1000 MOVEABS 3000 CANCEL Cancel the move to 3000 and move to 4000 instead MOVEABS 4000 Note that the command MOVEMODIFY is a better solution for modifying end points of moves in this case CHECKSUM Type System Parameter Description The CHECKSUM parameter contains the checksum for the programs in RAM At start up the checksum is recalculated and compared with the previously held value If the checksum is incorrect the program will not run Note This parameter is read only CLEAR Type System Command Syntax CLEAR Description The CLEAR command resets all global VR variables to zero and when used in program will also reset the local variables on the current task to zero See also RESET VR CLEAR BIT Type System Command Syntax CLEAR BIT bit number vr number Description The CLEAR BIT command resets the specified bit in the specified VR vari able to zero Other bits in the variable will keep their values Arguments bit number The number of the bit to be reset Range 0 23 vr number The number of the VR variable for which the bit will be reset Range 0 250 See also READ BIT SET BIT VR CLOSE W
133. Motion Control Option Board OPERATION MANUAL MCW151 Series Motion Control Option Board Models R88A MCW151 E R88A MCW151 DRT E Operation Manual Produced March 2003 Notice OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual The following conventions are used to indicate and classify precautions in this manual Always heed the information provided with them Failure to heed precautions can result in injury to people or dam age to property NDANGER Indicates an imminently hazardous situation which if not avoided will result in death or serious injury NWARNING Indicates a potentially hazardous situation which if not avoided could result in death or serious injury Caution Indicates a potentially hazardous situation which if not avoided may result in minor or moderate injury or property damage OMRON Product References All OMRON products are capitalized in this manual The word Unit is also capitalized when it refers to an OMRON product regardless of whether or not it appears in the proper name of the product The abbreviation Ch which appears in some displays and on some OMRON products often means word and is abbreviated Wd in documentation in this sense The abbreviation PC means Programmable Controller and is not used as an abbreviation for any thing else Visual Aids The followin
134. N 2 wire Connections Using RS 422A 485 Port 2 MCW151 E only MC Unit MC Unit Signal Pin Pin Signal N RD 1 r 1 RD RS 485 RD 2 Y 2 RD RS 485 nterface T nterface FG L cl SS 3 SD 4 4 SD SD 5 5 SD COMBICON DIP switch SW2 COMBICON DIP switch Sw2 Plug Pin 1 ON Plug Pint Pin2 ON Pin2 ON Pin 3 ON Pin3 OFF MC Unit Pin Signal 1 RD 2 RD RS 485 nterface COMBICON DIP switch SW2 3 FG Plug Pin1 ON 4 SD Pin2 ON Pin 3 ON 5 SD Note 1 MC Unit Communication Mode General purpose 2 For the 2 wire system Switch SW2 1 2 ON the RD and SD resp the RD and SD are interconnected within the MC Unit 35 Wiring Section 2 3 2 3 3 DeviceNet Connection 2 3 4 Digital Inputs This section explains the pin allocation of the DeviceNet connector for the DeviceNet network For further details on how to connect the DeviceNet net work refer to DeviceNet Operation Manual W267 Pin Symbol Signal Color of Cable 1 V Power line positive voltage Red 2 CAN H Communications line high White 3 Shield Shield 4 CAN L Communications line low Blue 5 V Power line negative voltage Black l O Specifications The following tables provide specifications and circuits for the I
135. Note that print ing the MPOS and DPOS parameters will give the 24 bit integer value see above description The comparison functions considers small difference between values as equal to avoid unexpected comparison results Therefore any two values for which the difference is less than 1 19 10 are considered equal The precedence of the operators is given below Unary Minus NOT MOD qs lt gt gt gt lt lt AND OR XOR Left to Right The best way to ensure the precedence of various operators is through the use of parentheses 5 3 Motion Execution Motion Generator Every task on the MC Unit has a set of buffers that holds the information from the motion commands given The motion commands include MOVE MOVE ABS MOVEMODIFY MOVECIRC FORWARD REVERSE MOVELINK CONNECT CAM and CAMBOX Refer to 6 2 1 Motion Control Commands for details on specific commands The motion generator a background process that prepares and runs moves has a set of two motion buffers for each axis One buffer holds the Actual Move which is the move currently executing on the axis The MTYPE axis parameter contains the identity number of this move For example the MTYPE will have value 10 if currently the FORWARD move is executed The other buffer holds the Next Move which is executed after the Actual Move has fin ished The NTYPE axis parameter contains the identity number of this next move The BASIC pro
136. O and Encoder connections Digital inputs 10 to 17 Item Specification Circuit Configuration Type PNP Motion Control Unit Maximum voltage 24 VDC 10 3 3kQ mE ono 19 ANN External power _ _ 1 Input current 7 0 mA at 24 VDC temal power L r AY x E ON voltage 11 V min Lem OFF voltage 1 V max OV common for input circuits 36 Input Response times The response times given in the following table are the times between the change in the input voltage and the corresponding change in the IN parame ter These times are depending on the MC Unit s Servo Period and the priority of the corresponding BASIC task and they include the physical delays in the input circuit Task Priority Servo Period High Priority Low Priority 0 5 ms 1 8 ms max 2 8 ms max 1 0 ms 2 3 ms max 3 3 ms max Print Registration delay time The print registration is used to capture position data in hardware triggered by either a digital input or the Z marker encoder signal For the encoder axis 1 the print registration delay times are given by Wiring Section 2 3 Digital Outputs Description Delay Time Digital Input 10 RO and 11 R1 rising edge 50 us Digital Input 10 RO and 11 R1 falling edge 150 us Z marker rising edge 2 us Z marker falling edge 2 us Digital outputs O8 to 013 I
137. PE settings Be sure to write program data to Flash memory before executing the command All data of Table and VR variables is erased and possibly re read from Flash memory All axis parameters are set to default During the DRV RESET communication between the MC Unit and other devices is temporarily not possible If a connection with Motion Perfect was present this will disconnect Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed DRV STATUS Type Servo Driver Parameter Description The DRV STATUS parameter contains the current servo alarm code of the Servo Driver The alarm codes are given as hexadecimal values No alarm will return value 99 Hex Please refer to 8 2 Error Handling for further details on Servo Driver alarms Note This parameter is read only See also DRV CLEAR HEX PRINT Example The Servo Driver of this system has an overcurrent alarm gt gt PRINT HEX DRV STATUS 10 Command function and parameter description 6 3 60 DRV_WRITE Type Syntax Description Caution Arguments See also Examples 6 3 61 EDIT Type Syntax Alternative Description Precautions Arguments See also Section 6 3 Servo Driver Command WRITE parameter value The DRV WRITE comma
138. R 002 Amount of data 2 words Destination address VR 0 HLM_READ 2 13 PLC_IR 2 2 MC_VR 0 Host Link Communication gt HLS 13RR0002000242 HLS gt HLM 13RR000101010241 Result VR address value 0 257 0000 1 258 0000 E Writing data to PC using WRITE BASIC program Source address Table 18 Amount of data 2 words Destination address LR 014 TABLE 18 0701 0702 HLM_WRITE 2 13 PLC_LR 14 2 MC_TABLE 18 Host Link Communication HLM HLS 13WL0014070107025F HLS gt HLM 813WL0059 Result LR address value 0 701 Hex 1 702 Hex Send TS test command to PC using HLM COMMAND BASIC program HLM COMMAND HLM TEST 2 13 Host Link Communication gt HLS 13TSMCW151 TEST STRING2A HLS HLM 13TSMCW151 TEST STRING2A Result HLM_STATUS PORT 2 0 which implies correct communication Set PC in MONITOR mode using COMMAND BASIC program HLM COMMAND HLM STWR 2 13 2 Host Link Communication 64 Serial Communications Section 4 1 13SC0250 13SC0052 HLM HLS HLS HLM Result The PC is running in MON mode Note that this is necessary for writing data to the PC using HLM_WRITE Reading PC model code using HLM COMMAND timeout BASIC program HLM TIMEOUT 500 Destination address VR 100 HLM COMMAND HLM MREAD 2 13 MC VR 100
139. Remote I O communications UE communications MC Unit Slave Slave MC Unit The following OMRON Master Units can be used Applicable PC Master Unit model Mounting position Max number of Units number With Without Configurator Configurator CS1 Series CS1 DRM 1 CPU Rack or Expansion I O Rack 16 1 Classified as Special I O Units C200HZ HX HG HE C200HW DRM21 V1 CPU Rack or Expansion I O Rack 10 16 see 1 Classified as Special I O Units note Note Some CPUs can control 16 Master Units and other CPUs can control 10 1 3 Motion Control Concepts Coordinate System The MC Unit offers the following types positioning control operations 1 Point to point control 2 Continuous Path control 3 Electronic Gearing This section will introduce some of the commands and parameters as used in the BASIC programming of the motion control application Refer to SECTION 6 BASIC Motion Control Programming Language for details Positioning operations performed by the MC Unit are based on an axis coordi nate system The MC Unit converts the position data from either the con nected Servo Driver or the connected encoder into an internal absolute coordinate system The engineering unit which specifies the distances of travelling can be freely defined for each axis separately The conversion is performed through the use of the unit conversion factor which is defined by the UNITS axis parame ter The origin point of the coordinate sy
140. S 100 AXIS 0 MOVEABS 50 AXIS 1 50 At start both the axis 0 and axis 1 will move to a coordinate of 50 over the same duration of time At this point axis 1 will stop and the axis O will con tinue to move to a coordinate of 100 Relevant Axis Parameters As mentioned before the move of a certain axis is determined by the axis parameters Some relevant parameters are given in the next table Parameter Description UNITS Unit conversion factor ACCEL Acceleration rate of an axis in units s DECEL Deceleration rate of an axis in units s SPEED Demand speed of an axis in units s Motion Control Concepts Section 1 3 Defining moves The speed profile below shows a simple MOVE operation The UNITS param eter for this axis has been defined for example as meters The required maxi mum speed has been set to 10 m s In order to reach this speed in one second and also to decelerate to zero speed again in one second both the acceleration as the deceleration rate have been set to 10 m s The total dis tance travelled is the sum of distances travelled during the acceleration con stant speed and deceleration segments Suppose the distance moved by the MOVE command is 40 m the speed profile will be given by the following graph Speed ACCEL 10 10 DECEL 10 SPEED 10 MOVE 40 0 1 2 3 4 5 6 Time The following two speed profiles show the same movement with an accelera tion time respectively a dece
141. S Allocation 0 master has not established the remote I O connection and does not perform polled data exchange with the MC Unit The MC Unit is in a bus off state There is no network power available 1 master has established the remote I O connection and performs polled data exchange with the MC Unit The MC Unit is not in a bus off state There is network power available FB SET Axis Parameter The FE axis parameter contains the position error in user units This is calcu lated by the demand position DPOS axis parameter minus the measured position MPOS axis parameter The value of the following error can be checked by using the axis parameters FE LIMIT and FE RANGE This parameter is read only AXIS DPOS FE LIMIT FE RANGE MPOS UNITS Axis Parameter Command function and parameter description 6 3 75 6 3 76 6 3 77 6 3 78 Alternative Description See also FE RANGE Type Alternative Description See also FHOLD IN Type Alternative Description Precautions Note See also FHSPEED Type Description Precautions See also FLASHVR Type Syntax Section 6 3 FELIMIT The FE LIMIT axis parameter contains the limit for the maximum allowed fol lowing error in user units When exceeded bit 8 of the AXISSTATUS parame ter of the axis will be set If the ERRORMASK parameter has been properly set a motion error wi
142. T defines the Host Link Master timeout time 147 HLM WRITE WRITE writes data to the Host Link Slave from either 148 VR or Table variable array HLS MODEL HLS MODEL defines the MC Unit model code for the Host 149 Link Slave protocol HLS NODE HLS NODE defines the Slave unit number for the Host Link 149 Slave protocol 6 2 13 DeviceNet Commands and Parameters The table below outlines the DeviceNet commands and parameters Refer to the specified pages for details Name Description Page FB SET FB SET sets the Remote I O Messaging data to be trans 138 ferred for input word 2 FB STATUS FB STATUS returns the status of the communications of the 138 MC Unit with the DeviceNet master 110 Command function and parameter description Section 6 3 6 3 6 3 1 6 3 2 6 3 3 Command function and parameter description NWARNING Multiply Type Syntax Description Arguments Example Power Type Syntax Description NWARNING Arguments Example Add Type Syntax Description Arguments Example This section describes the commands functions and parameters which are used in the BASIC programming language It is the responsibility of the programmer to ensure that the motion func tions are invoked correctly with the correct number of parameters and values Failure to do so may result in unexpected behavior loss or dam age to the machinery A
143. TIL statement to be repeated a number of times until the condition becomes TRUE REPEAT UNTIL construct can be nested indefinitely commands Any valid set of BASIC commands condition Any valid BASIC logical expression FOR WHILE A conveyor is to index 100mm at a speed of 1000mm s wait for 0 55 and then repeat the cycle until an external counter signals to stop by turning ON input 4 cycle SPEED 1000 REPEAT MOVE 100 Command function and parameter description 6 3 159 RESET Type Syntax Description See also 6 3 160 REV_IN Type Description See also 6 3 161 REV_JOG Type Description See also 6 3 162 REVERSE Type Syntax Alternative Description Precautions See also Example Section 6 3 WAIT IDLE WA 500 UNTIL IN 4 ON System Command RESET The RESET command sets the value of all local variables of the current BASIC task to zero CLEAR Axis Parameter The REV IN parameter contains the input number to be used as a reverse limit input The number can be set from 0 to 7 and 19 Range 0 to 7 is used to select one of the MC Unit inputs Defining value 19 will select the Servo Drivers NOT Reverse drive prohibited CN1 pin 43 input As default the parameter is set to 1 no input is selected If an input number is set and the limit is reached any reverse motion on that axis will be stopped Bit 5 of the AXISSTATUS axi
144. The status bits are defined in the following table Bit Name Description 0 7 End code The end code can be either the end code which is defined by the Host Link Slave problem in sent com mand string or an end code defined because of a problem found by the Host Link Master problem in received response string 8 Timeout error A timeout error will occur if no response has been received within the timeout time This indicates com munication has been lost 9 Command not This status indicates that the Slave did not recognize recognized the command and has returned a IC response The HLM STATUS will have value 0 when no problems did occur In case of a non zero value any appropriate action such as a re try or emergency stop needs to be programmed in the user BASIC program Each port has an HLM STATUS parameter The PORT modifier is required to specify the port n The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 HLM_COMMAND HLM_READ HLM_TIMEOUT HLM_WRITE Example 1 gt gt HLM _WRITE 1 28 PLC_EM 50 25 MC_VR 200 gt gt PRINT HEX HLM STATUS PORT 1 1 Apparently the CPU Unit is in RUN mode and does not accept the write oper ation Example 2 gt gt COMMAND TEST 2 0 gt gt PRINT STATUS PORT 2 256 0000 A timeout error has occured 6 3 93 TIMEOUT Type Host Link Parameter 147 Command function and p
145. WD DM AREA WRITE HLM WRITE Not Valid Valid Valid WJ AR AREA WRITE HLM WRITE Not Valid Valid Valid WE EM AREA WRITE HLM WRITE Not Valid Valid Valid SC STATUS CHANGE COMMAND Valid Valid Valid TS TEST HLM COMMAND Valid Valid Valid MM PC MODEL READ HLM COMMAND Valid Valid Valid XZ ABORT command HLM COMMAND Valid Valid Valid only ms INITIALIZE com HLM COMMAND Valid Valid Valid mand only IC Undefined com Valid Valid Valid mand response only These are the end codes as they can be defined in the HLM STATUS param eter End Contents Probably cause Corrective measures code 00 Normal completion No problem exists 01 Not executable RUN mode The command that was sent cannot Check the relation between the com be executed when the PC is in RUN mand and the PC mode mode 13 FCS error The FCS is wrong Most likely influence from noise transfer the command again 14 Format error The command format is wrong ora Check the format and transfer the command that cannot be divided has command again been divided or the frame length is smaller than the minimum length for the applicable command 15 Entry number data error The data is outside the specified Correct the command arguments range or too long and transfer the command again 18 Frame length error The maximum frame length of 131 Check the command and transfer bytes was exceeded the command again 19 Not executa
146. al Servo Driver The virtual axis behaves like a perfect servo axis measured position is equal to the demand position All move commands and axis parameters available for the servo axis are available Apart from the MC Unit there are three ways of accessing the Servo Driver Using the Front Panel on the Servo Driver Using the Hand held Parameter Unit of the Servo Driver Using Servo Driver Monitoring Software on the personal computer These three methods enables the user to perform parameter settings speed and current monitoring I O monitoring autotuning jogging and other opera tions E Limitations on using Parameter Unit together with the MC Unit If the MC Unit is mounted to the Servo Driver it is not allowed to have the Parameter Unit or the Servo Driver Software connected to the Servo Driver when performing the following operations During start up of the system either by power up or software reset During reading or writing Servo Driver parameters using commands DRV READ and DRV WRITE During execution of any Driver Command in the MC Unit such as DRV RESET and DRV CLEAR Front Panel Display Area The Front Panel Display Area of the Servo Driver will not be lit in the following circumstances 45 System Set up The Display will not be lit for some seconds during start up either by power up or software reset The Display will not be lit for some time when the following commands are exec
147. alid expressions 111 Add adds any two valid expressions 111 Subtract subtracts any two valid expressions 112 Divide divides any two valid expressions 112 Is Less Than lt returns TRUE if expression 1 is less than expression 2 112 otherwise FALSE Is Less Than Or returns TRUE if expression 1 is less than or equal to 112 Equal To expression 2 otherwise FALSE Is Not Equal lt gt lt gt returns TRUE if expression 1 is not equal to 113 expression 2 otherwise FALSE Is Equal To returns TRUE if expression 1 is equal to expression 2 oth 113 erwise FALSE Is Greater Than gt returns TRUE if expression 1 is greater than expression 2 113 otherwise FALSE Is Greater Than or returns TRUE if expression 1 is greater than or equal to 113 Equal To expression 2 otherwise FALSE ABS ABS returns the absolute value of expression 114 ACOS ACOS returns the arc cosine of expression 115 AND AND performs an AND operation on corresponding bits of the 118 integer parts of two valid BASIC expressions ASIN ASIN returns the arc sine of expression 119 ATAN ATAN returns the arc tangent of expression 119 ATAN2 returns the arc tangent of the nonzero complex num 119 ber expression 2 expression 1 Command Reference List Section 6 2 6 2 7 6 2 8 6 2 9 Constants Na
148. an be cleared executing a DATUM 0 command This parameter is read only AXISSTATUS DATUM ERROR_AXIS ERRORMASK WDOG Motion Control Command MOVE dist_1 dist_2 dist_3 Mo dist_1 dist_2 dist_3 The MOVE command moves with one or more axes at the demand speed and acceleration and deceleration to a position specified as increment from the current position In multi axis moves the movement is interpolated and the speed acceleration and deceleration are taken from the base axis The specified distances are scaled using the unit conversion factor in the UNITS axis parameter If for example an axis has 4 000 encoder edges mm then the number of units for that axis would be set to 4000 and MOVE 12 5 would move 12 5 mm MOVE works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis Argument dist 1 is applied to the base axis dist 2is applied to the next axis etc By changing the axis between indi vidual MOVE commands uninterpolated unsynchronised multi axis motion can be achieved Incremental moves can be merged for profiled continuous path movements by turning ON the MERGE axis parameter Considering a 2 axis movement the individual speeds are calculated using the equations below Given command MOVE x x and the profiled speed as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance L 12 2 The individual speed
149. an be used to set it to MON ITOR mode The Slave has node address 0 and is connected to the RS 232C port HLM_COMMAND HLM_STWR 2 0 2 145 Command function and parameter description Section 6 3 6 3 91 READ Type Host Link Command Syntax HLM READ port node pc area pc offset length mc area mc offset Description The HLM READ command reads data from a Host Link Slave by sending a Host Link command string containing the specified node of the Slave to the serial port The received response data will be written to either VR or Table variables Each word of data will be transferred to one variable The maximum data length is 30 words single frame transfer Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM TIMEOUT parameter The status of the transfer can be monitored with the HLM STATUS parameter Note 1 When using the READ be sure to set up the Host Link Master pro tocol by using the SETCOM command 2 The Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems Arguments port The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node The Slave node number to send the Host Link command to Range 0 31 pc_area The PC memory selection for the Host Link command
150. and function and parameter description Section 6 3 6 3 32 CAM Type Syntax Description Arguments See also Example PRINT The error RUN_ERROR 0 PRINT occurred in line ERROR LINE 0 ENDIF STOP The IF statement is present to prevent the program going into error routine when it is stopped normally Motion Control Command CAM start point end point table multiplier distance The CAM command is used to generate movement of an axis following a position profile which is stored in the Table variable array The Table values are absolute positions relative to the starting point and are specified in encoder edges The Table array is specified with the TABLE command The movement can be defined with any number of points from 2 to 8 000 The MC Unit moves continuously between the values in the Table to allow a num ber of points to define a smooth profile Two or more CAM commands can be executed simultaneously using the same or overlapping values in the Table array The Table profile is traversed once CAM requires that the start element in the Table array has value zero The distance argument together with the SPEED and ACCEL parameters deter mine the speed moving through the Table array Note that in order to follow the CAM profile exactly the ACCEL parameter of the axis must be at least 1000 times larger than the SPEED parameter CAM works on the default basis axis set with BASE unless AXIS is used to
151. arameter description Section 6 3 6 3 94 WRITE 148 Description See also Example Type Syntax Description Note Arguments The HLM_TIMEOUT parameter specifies the fixed timeout time for the Host Link Master protocol for both serial ports A timeout error will occur when the time needed to both send the command and receive the response from the Slave is longer than the time specified with this parameter Command Response Characters 1 d ara Timeout p The parameter applies for the HLM_READ HLM_WRITE and HLM_COMMAND commands The HLM_TIMEOUT parameter is specified in servo periods HLM_COMMAND HLM_READ HLM_STATUS HLM_WRITE SERVO_PERIOD Consider the servo period of the MC Unit is set to 500 ms SERVO_PERIOD 500 gt gt HLM_TIMEOUT 2000 For both serial ports the Host Link Master timeout time has been set to 1 s Host Link Command HLM_WRITE port node pc_area pc_offset length mc_area mc_offset The HLM_WRITE command writes data from the MC Unit to a Host Link Slave by sending a Host Link command string containing the specified node of the Slave to the serial port The received response data will be written from either VR or Table variables Each variable will define on word of data which will be transferred The maximum data length is 29 words single frame trans fer Program execution will be paused until the response string has been received or the t
152. are consid ered as 1 task number The number of the step on which to execute the program Range 1 3 AUTORUN EPROM EX gt gt RUNTYPE progname 1 3 The above line sets the program progname to run automatically at start up on task 3 RUNTYPE progname 0 The above line sets the program progname to manual running Axis Parameter The S RATE parameter contains the speed reference rate for the attached Servomotor This parameter is defined as the speed value in rounds per minute which the Servomotor will move per reference unit Rotational Speed RPM Speed Reference 1 5 RATE This parameter will apply to the following parameters 5 REF S REF OUT OUTLIMIT AIN2 Servo Driver rotation speed data This parameter is read only 181 Command function and parameter description Section 6 3 See also Example 6 3 168 S_REF Type Alternative Description See also Example 6 3 169 S REF OUT Type Alternative Description Note See also Example 6 3 170 SCOPE Type Syntax 182 AIN2 AXIS 5 REF S REF OUT OUTLIMIT The following the statement will print the current speed reference in RPM which is applied to the Servo Driver PRINT S REF OUT S RATE Axis Parameter DAC The S REF parameter contains the speed reference value which is applied directly to the Servo Driver when the axis is in open loop SERVO OFF The range of the 5 REF parameter is defin
153. ated first but only the integer part of the result 18 is used for the operation Therefore this expression is equivalent to the fol lowing result 10 OR 18 The OR is a bit operator and so the binary action taking place is 01010 OR 10010 11010 Therefore result will contain the value 26 Example 2 IF KEY OR VR 0 2 THEN GOTO label Parameter The OUTDEVICE parameter defines the default output device This device will be selected for the PRINT command when the n option is omitted The OUTDEVICE parameter is task specific The following values are supported RS 232C programming port 0 default RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 NOM o PRINT Axis Parameter The OUTLIMIT parameter contains the speed reference limit that restricts the speed reference from the MC Unit to the Servo Driver for both servo loop SERVO ON and open loop SERVO OFF The default value of OUTLIMIT for axis 0 is 15000 This sets the speed refer ence range to 15000 14999 which is the actual input reference range of the Servo Driver AXIS S_RATE S_REF S_REF_OUT SERVO Axis Parameter The OV_GAIN parameter contains the output velocity gain The output veloc ity output contribution is calculated by multiplying the change in measured position with the OV_GAIN parameter value The default value is 0
154. ation Manual or for information on the CMD 490 instruction refer to the PCs Operation Manual Example Conditions Master node address 0 Slave network address 1 Slave node address 2 Example Using CMND 490 CMND S D Command Words S First Command Word Word Contents Hex Meaning S 28 01 EXPLICIT MESSAGE SEND command code 28 01 Hex S41 02 35 Slave node address 2 TABLE DATA WRITE THREE WORD FORMAT command service code 35 Hex 5 2 008 Class ID 008A Hex 5 3 00 01 Instance ID 0001 Hex S44 00 0A Write start address Table 10 000A Hex S45 00 03 Number of Table elements to write 0003 Hex 5 6 00 00 Data written to the MC Unit s Table 10 547 92 78 Three word format 279278 S 8 00 27 DeviceNet MCWISI DRT E only Section 4 2 Word Contents Hex Meaning 5 9 0001 Data written to the Unit s Table 11 5410 4286 Three word format 1428 6 5 11 80 01 5 12 00 00 Data written to the MC Unit s Table 12 5413 88 24 Three word format 928824 S414 00 92 D Response Words D First Response Word Results are stored as shown in the following table Word Contents Hex Meaning D 28 01 EXPLICIT MESSAGE SEND command code 28 01 Hex D 1 00 00 Response code 0000 Hex Normal com pletion D 2 00 02 No of received bytes data length after D02003 2 bytes D 3 02 B5 Sl
155. ave node address 2 TABLE DATA WRITE THREE WORD FORMAT response service code B5 Hex Control Words C First Control Word Word Contents Hex Meaning C 00 1E No of bytes of command data 30 bytes of command data S C 1 00 08 No of words of response data 8 bytes of response data D C 2 00 01 Destination node network address 1 C 3 00 FE Master s node address 0 Master s Unit address FE Hex C 4 00 00 Response returned communications port No 0 No of retries 0 C 5 00 64 Response monitoring time 10 s 83 SECTION 5 Multitasking BASIC Programming This section provides an overview of the fundamentals of multitasking BASIC programs and the methods by which programs are managed in the MC Unit Dal VOVEIVICW 6 ee E ONE det e Ves a etes 86 5 2 BASIC Programming 86 5 2 1 Axis System and Task 86 5 2 2 Data Structures and 87 5 2 3 Mathematical 88 533 Motion Execution ta e eee 89 5 4 Command Line 90 5 5 BASIC Programs eso be RE USC eS PERI E 90 5 5 1 Managing 91 5 5 2 Program 91 5 5
156. aximum is 119 elements 77 Hex The 119 VR elements imply 238 bytes to be transferred Read data response The specified data is returned from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 TABLE DATA WRITE THREE WORD FORMAT will write Table data The Table data will be defined according to the three word format Command Block 28 01 35 00 8A 00 01 e Command Class ID Instance ID Word data L code Service code Address H Length H Word data H Destination node address Address L Length L Write data Max 238 bytes 77 DeviceNet MCWISI DRT E only Section 4 2 Response Block 28 01 00 00 00 02 B5 N N N Command Response No ofbytes code code received Note VR DATA WRITE THREE WORD FORMAT 78 Service code Source node address Parameters Service code command response In the command 35 Hex is specified In the response the leftmost bit is turned ON and B5 Hex is returned Address H Address L command The address in hexadecimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the Table memory the maximum value is 7999 1F3F Hex Length H Length L command The number of Table memory elements
157. ay each other and only the uppermost trace will be seen on the display The offset value will remain in effect for a channel until the Vertical Offset Reset Button is pressed or the scroll bar is used to return the trace to its original position Vertical Offset Reset The vertical offset value applied using the vertical offset scroll bars can be cleared when the Vertical Offset Reset Button is pressed Cursor Button After the scope has finished running and has displayed a trace the cursor bars can be enabled These are displayed as two vertical bars of the same color as the channel trace and initially located at the maximum and minimum trace points The values these repre sent are shown below the scope display and the text is of the same color as the channel the values represent The bars can be moved by positioning the mouse cursor over the required bar holding down the left mouse button and dragging the bar to the required position The maximum or minimum value shown below the display is updated as the bar is dragged along with the value of the trace at the current bar position The cursor bars are enabled disabled by pressing the Cursor But ton which toggles alternately displaying and removing the cursor bars When the cursor bars are disabled the maximum and minimum points are indicated by a single white pixel on the trace 215 Motion Perfect Tools Advanced Oscilloscope Configuration Options Para
158. ay occur if it does not find any MC Units con nected to the computer or if the project consistency check fails and the check is canceled In the offline mode all project related functions will be disabled The user will only have access to Terminal Window VT100 emulation System software load Communications setup A Terminal Window can be opened and an attempt can be made to establish communications with the MC Unit If the MC Units line mode gt gt prompt is returned when the Enter Key is pressed then the MC Unit can be communi cated with using the BASIC system commands see the BASIC on line help for further information The commands given in 6 2 4 Program Commands and Functions can be used to manipulate programs using a terminal Project Backups If the MC Unit stops responding during a development session and the same project is reconnected then it is likely the consistency check will be passed 217 Suggestions and Precautions Section 7 6 In the case that the programs are not consistent the Check Project Options Window will be displayed Please be aware that if the current project is re opened the backup copy of the project will be overwritten It is therefore nec essary to determine which copy of the programs to use before re connecting Motion Perfect To investigate the inconsistency further a Terminal Window can be opened off line and the programs on the MC Unit can be listed Any computer based editor or word
159. ber of arguments Command OP output number value sets a single output channel range of output numberis between 8 and 17 and value is the value to be output either 0 or 1 Command OP binary pattern sets the binary pattern to the 24 outputs according to the value set by binary pattern Function OP without arguments returns the status of the first 24 outputs This allows multiple outputs to be set without corrupting others which are not to be changed Refer to 3 3 2 Digital I O for a description of the various types of output and inputs The first 8 outputs 0 to 7 do not physically exist on the MC Unit They can not be written to and will always return 0 output_number The number of the output to be set value The value to be output either OFF or ON All non zero values are considered as ON binary_pattern The integer equivalent of the binary pattern is to be output IN Example 1 The following two lines are equivalent Command function and parameter description Section 6 3 6 3 133 OPEN_WIN Type Alternative Description See also 6 3 134 OR Type Syntax Description Arguments Examples OP 12 1 OP 12 ON Example 2 This following line sets the bit pattern 10010 on the first 5 physical outputs outputs 13 to 17 would be cleared The bit pattern is shifted 8 bits by multiply ing by 256 to set the first available outputs as outputs 0 to 7 do not exist OP 18 256 Example 3
160. bject 0x01 Object class Attribute Not supported Not supported Set Object instance Attribute 1 Vendor 2 Product Type 3 Product Code write 5 Status bits supported 6 Serial number 7 Product name Yes No R88A MCW151 DRT E tem BevieNetseie Parameter option Object instance Service 05 Reset OE Get Attribute Single 239 Device Protocol MCWISI DRT E only Appendix B Message Router Object 0x02 Object class Attribute Not supported Not supported Object instance Attribute Not supported Not supported Vendor specification addition DeviceNet Object 0x03 Object class Attribute Not supported Not supported Get Set read write Object instance tem DevieNetsevice Parameteropton Object instance Service No Assembly Object 0x04 Object class Attribute Not supported Not supported tem DevieeNetsevice Parameter option No Object instance Service OE Get Attribute Single 10 Set Attribute Single No Connection Object 0x05 Not supported Max number of connections 240 Device Protocol MCWISI DRT E only Appendix B ten information Max number ofinstances Object instance 1 Attribute Instance type Transport class Set Value write Object instance 1 Attribute Io fs 13 Produced connection path length PER No No No No 10000 hexadecimal No 0000 hexadecimal Object instance 1 tem Section
161. ble 64 VARIABLE not found 21 Value is read only 65 Table index range error 22 Modifier not allowed 66 Table is full 24 Command is command line only 67 Invalid line number 25 Command runtime only 68 String exceeds permitted length 26 LABEL expected 70 Value is incorrect 27 Program not found 71 Invalid I O channel 28 Duplicate label 72 Value cannot be set 29 Program is locked 73 Directory not locked 30 Program s running 74 Directory already locked 31 Program stopped 75 Program not running on this process 32 Cannot select program 76 Program not running 33 No program selected 77 Program not paused on this process 34 No more programs available 78 Program not paused 35 Out of memory 79 Command not allowed when running Motion Perfect 36 No code available to run 80 Directory structure invalid 37 Command out of context 81 Directory is locked 38 Too many nested structures 82 Cannot edit program 39 Structure nesting error 83 Too many nested OPERANDS 40 ELSE ELSEIF ENDIF without previous IF 84 Cannot reset when drive servo on 41 WEND without previous WHILE 86 Drive interface requires re power up 56 Invalid use of 89 Network timeout 57 VR x expected 92 Invalid program name Host Link Master 224 For the Host Link master protocol any error with communication can be read from the status represented by the HLM_STATUS parameter In the process of sending a Host Link command and receiving a response several problems may occur
162. ble Access right was not obtained Obtain access rights 21 Not executable due to CPU Unit The command cannot be executed Cycle the CPU Unit s power supply CPU error because a CPU error has occurred in the CPU Unit Set up Host Link Master 62 The SETCOM is required to set up the serial communication port for the Host Link Master protocol After setting the following command SETCOM baudrate data bits stop bits parity port 6 the HLM READ HLM WRITE and HLM COMMAND commands can be used to read and write data using Host Link Serial Communications Host Link Master Timeout Host Link Master Status Programming Precautions Section 4 1 The timeout mechanism is implemented to avoid the BASIC task is paused for a long time due to bad or no communication The timeout time is specified by the HLM_TIMEOUT parameter and is defined as the maximum amount of time the program task will be paused to send the command and receive the response Command Response Characters SR 1 9 m Timeout gt In case the total timeout time has elapsed the correct status will be defined using HLM STATUS and the BASIC task will continue The HLM TIMEOUT parameter specifies the timeout time for all commands and for all ports In the process of sending a Host Link command and receiving a response several problems may occur 1 The Slave detects an error within the command and will send a corre sponding end
163. ble below outlines the I O commands and functions Refer to the speci fied pages for details Name Description Page AIN AIN provides four analog channels which contain the Servo 117 Driver monitor data signals GET GET waits for the arrival of a single character and assigns the 142 ASCII code of the character to variable IN IN returns the value of digital inputs 151 INDEVICE INDEVICE parameter defines the default input device 151 103 Command Reference List 6 2 3 6 2 4 104 Section 6 2 Name Description Page INPUT INPUT waits for a string to be received and assigns the 152 numerical value to variable KEY KEY returns TRUE or FALSE depending on if character is 153 received LINPUT LINPUT waits for a string and puts it in VR variables 154 OP OP sets one or more outputs or returns the state of the first 24 166 outputs OUTDEVICE OUTDEVICE defines the default output device 168 PRINT PRINT outputs a series of characters to a serial port 170 PSWITCH PSWITCH turns ON an output when a predefined position is 172 reached and turns OFF the output when a second position is reached REGIST REGIST captures an axis position when a registration input or 174 the Z mark on the encoder is detected SETCOM SETCOM sets the serial communications 185 Loop and Conditional Structures The table below outlines the loop and conditional structure command
164. carefully and be sure you understand the information provided before attempting to install or operate the MC Unit Be sure to read the precautions provided in the following section Name Cat No Contents MCW151 Series 1203 Describes the installation and operation of the R88A MCW151 E R88A MCW151 E and MCW151 DRT E Motion Control Units R88A MCW151 DRT E This manual Operation Manual OMNUC W series 1531 Describes the installation and operation of the W series Servo Driver R88M WLI AC Servomotors and Servomotor R88D WLI AC Servo Drivers User s manual DeviceNet Operation Manual W267 Describes the configuration and construction of a DeviceNet net work including installation procedures and specifications for cables connectors and other connection devices as well as information on the communications power supply DeviceNet Configurator Oper W328 Describes the operation of the DeviceNet Configurator to allocate ation Manual remote I O areas according to application needs as well as proce dures to set up a DeviceNet network with more than one master Precautions provides general precautions for using the MC Unit and related devices Section 1 describes the features and system configuration of the R88A MCW151 E and R88A MCW151 DRT E Motion Control Units and concepts related to their operation Section 2 describes the MC Unit components and provides the information for installing the MC Unit Section 3 de
165. cessor 133 MHz Pentium recommended 16 MB RAM 32 MB recommended 10 MB of hard disk space Enhanced serial communications port UART 16550 800 x 600 pixel display or higher resolution with at least 256 colors Mouse or tracker ball 3e I 7 2 Connecting to the MC Unit 198 Note Motion Perfect can be connected to the MC Unit once the MC Unit is pow ered up and running in order to use all features After installation Motion Per fect can be started by using the Start Button The computer should be connected to the MC Unit using a RS 232C Serial Cable by OMRON between a COM port on the computer and the MC Units RS 232C Programming Port Refer to 2 3 2 Serial Port Connections for details When started Motion Perfect will display its introductory splash screen whilst looking for any controllers connected to the computer Motion Perfect Projects Section 7 3 omnon Motion Perfect 2 Version 2 1 2 3 Cancel Checking 1 9600 7 2 gt Controller MC W151 COM1 version 1 61 found The status of the connection to the controller is displayed on the screen The statements indicate at which COM port Motion Perfect is currently checking for a Motion Controller and which settings are used The screen will confirm if Motion Perfect has found a controller or will indicate that no controller is found Motion Perfect will be disconnected when no suitable controllers have been found T
166. ch condition will generate a motion error for each axis If the result of a bitwise AND operation of the ERRORMASK and AXISSTATUS parameter value for one axis is non zero a motion error will occur MOTION_ERROR The MOTION_ERROR system parameter will be ON when a motion error has occurred ERROR_AXIS The ERROR_AXIS system parameter contains the axis num ber for which the detected motion error has occurred DATUM The DATUM O will clear the motion error The AXISSTATUS status will be cleared DRV RESET DRV RESET will software reset both the Servo Driver as the MC Unit Axis Status Definition The axis status for each axis is defined using the AXISSTATUS axis parame ter The AXISSTATUS axis parameter definition for the three axes is shown in the following table The default value of ERRORMASK for all axes is 268 Note that the ERRORMASK parameter can be set separately for each axis Bit Description Value Character Axis 0 Axis 1 Axis 2 as used Servo Encoder in Virtual in Motion Driver out virtual Perfect 0 1 1 Following Error Warning 2 w X 2 Servo Driver Communication Error 4 a X 3 Servo Driver Alarm 8 m X 4 Forward Limit 16 f X x x 5 Reverse Limit 32 r x X 6 Datuming 64 X X X 7 Feed Hold Input 128 h X X X 8 Following Error Limit 256 e X 9 Forward Software Limit 512 X X 10 Reverse Software Limit 1024 y X 11 Cancelling Move 2048 x x x 12 Encoder Out Overspeed 4096
167. cified rate The following operations are possible on the Axis Parameters Window The user is able to change the size of the window The black dividing bar can be repositioned to change the space occupied by the two banks When the user changes the UNITS parameter for an axis all the parame ters given in user units for that axis will be adjusted by the new factor These new values will loaded automatically in the screen The AXISSTATUS parameter field displays the axis status bits The char acters indicating each bit will turn red and capital if the bit is ON and green if the bit is OFF The ocyxehdrfmaw characters correspond to w Following Error Warning a Servo Driver Communication Error m Servo Driver Alarm f Forward Limit r Reverse Limit d Datuming h Feed Hold Input e Following Error Limit x y Forward Software Limit Reverse Software Limit 208 Motion Perfect Tools Section 7 5 Cancelling Move Encoder Out Overspeed The Axes Button at the bottom of the window can be pressed to access a Window to select the axes that are displayed By default the axes set for the last modified start up program from the File Menu Jog Axes Window or Axes Parameters Window will be displayed The parameters in the bank 1 section are only read when the screen is first displayed or the parameter is edited by the user It is possible that if a parameter is changed
168. code indication 2 The Slave cannot decode the command header code and sends a IC re sponse 3 The Master detects an error within the response The corresponding end code will be defined in the status 4 The timeout time has elapsed for the Master The HLM STATUS BASIC parameter represents the Host Link Master status on the specific port HLM STATUS status bits 9 8 7 0 End code case 1 or case 3 Timeout error case 4 Command not recognized case 2 If no error did occur the HLM STATUS will have value 0 In case of a non zero value any appropriate action such as a re try or emergency stop needs to be programmed in the user BASIC program Consider the following precautions when programming the Host Link commu nications 1 The Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems 2 The Host Link Master commands provide the tools to exchange data with the Host Link Slave The user program should contain proper error han dling routines to deal with communication failure and perform retries if nec essary 63 Serial Communications Section 4 1 Examples Consider the following operations for a MC Unit connected to a PC using port 2 RS 422A The Slave PC has node address 13 Reading data from PC using READ BASIC program Set up Host Link Master for port 2 SETCOM 9600 7 2 2 2 6 Source address CIO I
169. command reads or writes the value of a global VR variable These VR variables hold real numbers and can be easily used as an element or as an array of elements The MC Unit has in total 251 VR variables The VR variables can be used for several purposes in BASIC programming The VR variables are globally shared between tasks and can be used for communications between tasks 1 The Table and VR data can be accessed from all different running tasks To avoid problems of two program tasks writing unexpectedly to one global variable write the programs in such a way that only one program writes to the global variable at a time 2 The Table and VR data in RAM will be lost when the power is switched OFF If valid data needs to be recovered during start up write the data into Flash memory using the FLASHVR command address The address of the VR variable Range 0 250 CLEAR BIT READ BIT SET BIT TABLE Example 1 Command function and parameter description Section 6 3 6 3 200 WA Type Syntax Description Arguments Example 6 3 201 WAIT IDLE Type Syntax Description In the following example the value 1 2555 is placed into VR variable 15 The local variable va is used to name the global variable locally val 15 VR val 1 2555 Example 2 A transfer gantry has 10 put down positions in a row Each position may at any time be full or empty VR 101 to VR 110 are used to hold an array of ten 1 s and 0 s to s
170. cope provides four channels each capable of recording at up to 1 000 samples s with manual cycling or program linked triggering The MC Unit records the data at the selected frequency and then uploads the information to the scope to be displayed If a larger time base value is used the data is retrieved in sections and the trace is seen to be plotted in sections across the display 1 Motion Perfect uses the SCOPE command when running the Oscilloscope function 2 To minimize calculation time for writing the real time data the SCOPE command is writing raw data to the Table array For example a The parameters are written in encoder edges per second and there fore not compensated for the UNITS conversion factor b The MSPEED parameter is written as the change in encoder edges per servo period 3 Applications like the CAM command CAMBOX command and the SCOPE command all use the same Table as the data area Exactly when the MC Unit starts to record the required data depends upon whether it is in Manual or Program Trigger Mode In Program Trigger Mode it starts recording data when it encounters TRIGGER command in a program running on the MC Unit In Manual Mode it starts recording data immediately The Trigger Button can be used to start the scope as soon as the required settings have been made The scope controls are divided into the two parts the general controls and the channel specific controls Motion Perfect Tools Section
171. d displays a list of the programs held in memory their mem ory size and their RUNTYPE Furthermore the controllers available memory size power up mode and current selected program is displayed FREE POWER UP PROCESS RUNTYPE SELECT Axis Parameter The DPOS axis parameter contains the demand position in user units which is generated by the move commands in servo control When the controller is in open loop SERVO OFF the measured position MPOS will be copied to the DPOS in order to maintain a zero following error The range of the demand position is controlled with the REP DIST and REP OPTION axis parameters The value can be adjusted without doing a move by using the DEFPOS command or OFFPOS axis parameter DPOS is reset to zero at start up This parameter is read only AXIS DEFPOS DEMAND EDGES FE MPOS REP DIST REP OPTION OFFPOS UNITS PRINT DPOS AXIS 0 34 0000 The above line will return the demand position in user units Command function and parameter description Section 6 3 6 3 56 DRV CLEAR Type Servo Driver Command Syntax DRV CLEAR Description The DRV CLEAR command clears the alarm status of the Servo Driver This command is not capable of clearing all the possible alarm states Some alarms can only be cancelled by turning OFF the power supply both the MC Unit as the Servo Driver and then turning it ON again Please refer to 8 2 Error Handling for further details on Servo Driver alarms
172. d parameter description Section 6 3 Precautions See also Example WAIT IDLE works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis The execution of WAIT IDLE does not necessarily mean that the axis will be stationary in a servo motor system AXIS WAIT LOADED MOVE 100 WAIT IDLE PRINT Move Done 6 3 202 WAIT LOADED 6 3 203 WAIT UNTIL 194 Type Syntax Description See also Example Type Syntax Description Arguments Examples System Command WAIT LOADED The WAIT LOADED command suspends program execution until the base axis has no moves buffered ahead other than the currently executing move The command can only be used in a program This is useful for activating events at the beginning of a move or at the end when multiple moves are buffered together WAIT LOADED works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis AXIS WAIT IDLE Switch output 8 ON at start of start of MOVE 500 and OFF at end MOVE 800 MOVE 500 WAIT LOADED OP 8 ON MOVE 400 WAIT LOADED OP 8 OFF System Command WAIT UNTIL condition The WAIT UNTIL command repeatedly evaluates the condition until it is TRUE After this program execution will continue The command can only be used in a program condition Any valid BASIC logical expression Example 1 In this example
173. d refer ence in open loop 3 3 2 Digital I O The MC Unit has two different types of digital I O These are the digital I O on the MC Unit and the mapping of the Servo Driver digital I O The inputs and outputs are accessible by using the IN and OP commands in BASIC Type Description Range amount Input mapping Unit Digital Inputs 0 7 8 Servo Driver Digital Inputs 16 22 7 Servo Driver Output Signals 24 31 8 Output mapping MC Unit Digital Outputs 8 13 6 Servo Driver Control Signals 16 17 2 Input Mapping E MC Unit Digital Inputs The MC Unit inputs are freely allocable to different functions Some of the functions are origin search limit switches jog inputs and so on The MC Unit uses axis parameters to allocate a certain function to an input The following table introduces the related axis parameters Parameters Description DATUM IN Selection origin switch input FAST JOG Selection of fast jog input FHOLD IN Selection of feedhold input FWD IN Selection of forward limit input FWD JOG Selection of forward jog input REV IN Selection of reverse limit input REV JOG Selection of reverse jog input Servo Driver Digital Inputs The digital inputs of the Servo Driver CN1 40 to CN1 46 can be directly accessed from the MC Unit The mapping of the inputs is specified in the fol lowing table Input Servo Driver Descriptio
174. de the panel and make sure that it falls within the acceptable range Is the Unit exposed to direct sun light It must not be exposed to direct sunlight Shield the Unit from direct sunlight Is there any accumulation of dust especially iron dust or salts There must be none of these present Remove any accumulation of dust or salts and protect against them Is the Unit exposed to any spray of water oil or chemicals It must not be exposed to any of these Protect the Unit from water oil and chemicals Is the location subject to corrosive or flammable gases The Unit must not be exposed to these Check for smells or use a gas sen sor Is the location subject to shock or vibration The amount of shock or vibra tion must be within the acceptable ranges given in the specifications Install a cushion or other device to reduce shock and vibration Is the location near any source of noise There must be no noise Remove the Unit from the noise source or apply countermeasures 234 Replacing a MC Unit Section 9 2 Item Inspection points Criteria Remarks Installation Is the MC Unit securely mounted There must be looseness With a Phillips screwdriver tighten and wiring all mounting screws Are the cable connectors properly inserted and locked Are there any loose screws in the external wiring Carefully insert and lock all cable con
175. decimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal ignored for MC Unit Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the VR memory the maximum value is 250 FA Hex Length H Length L command The number of VR memory elements to read Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the maximum is 39 elements 27 Hex The 39 VR elements imply 234 bytes to be transferred Write data command The specified data should be written from word H leftmost byte bits 08 to 15 to word L rightmost byte bits 00 to 07 The user should be aware that the MC Unit does not check if the PC memory data complies to the three word format VR DATA WRITE ONE WORD FORMAT will write VR data The VR data will be defined according to the one word format Command Block 28 01 37 00 8A 00 01 Actu uf IN Command Class ID Instance ID Word data L code Service code Address Length Word data H Destination node address Address Length L Write data Max 238 bytes 79 DeviceNet MCWISI DRT E only Section 4 2 RESET 80 Response Block 28 01 00 00 00 02 B7 N
176. details Output Mapping E MC Unit Digital Outputs The physical outputs are freely allocable to any user defined functions An output can be set and reset depending on the current axis position by using the command PSWITCH 51 System Functions Section 3 3 Servo Driver Control Signals Two output signals are implemented as Servo Driver control signals The con trol signals are the TVSEL and MING signals and they are specified as fol lows Output Signal Description States nr Name 16 TVSEL Control Mode Switch OFF Speed control ON Torque control 17 MING Gain reduction Input OFF Speed control by PI control ON Speed control by P control 3 3 3 Monitoring Data The Servo Driver speed command REF analog input of the Servo Driver provides the system an analog input which can be used for general purpose Furthermore detailed Servo Driver speed and torque signals can be moni tored in the MC Unit E AINO Analog Input The analog input is connected to CN1 5 and 6 and uses the Servo Driver input circuit Servo Driver MCW151 3 Item Specification Input Voltage Range 12 V 12 V Resolution 16 bit over 15 V 15 V 52 System Functions Section 3 3 Torque Command Value Analog input 1 contains the torque command data from the Servo Driver
177. ditional error code FF Hex General error code Service code 94 Hex Source node address Destination node address command The node address of the destination of the explicit message Service code command response A service code defined for DeviceNet In a normal response bit 15 of the ser vice code specified will be turned ON and returned For an error response the service code will always be 94 Hex Class ID command The class ID of the destination of the explicit message The class ID is always 008A Hex when reading or writing the MC Unit memory Instance ID command The instance ID of the destination of the explicit message The instance ID is always 0001 Hex when reading or writing the MC Unit memory Service data command response The data defined for the services codes No of bytes received response The number of bytes received from the destination node address local node Source node address response The node address of the OMRON Slave Unit or slave manufactured by another company of which the explicit message was sent is returned General error code response The following error codes may be returned General Error name Cause of error error code 08 Hex Service not supported The requested service was not imple mented or was not defined for this Object Class Instance 09 Hex Invalid attribute value Invalid attribute data detected 11 Hex Reply data too large The data to be transmitted
178. ds with their tokenised versions in upper case loop OP 8 ON WA 1000 OP 8 OFF WA 1000 GOTO loop The program can now be run stepped and stopped without closing the Editor Window The Program Menu can be used but it is easier to use the Control Panel as described in the previous section The Editor Window has similar buttons itself to do the same The command line will also remain available for immediate commands if the Terminal Window is open 203 Motion Perfect Tools Compilation Example 2 1 2 3 Section 7 5 The system will compile and link the program before running it If the compiler detects errors in the program it will not run but will print the line number at which the error occurred The line can be located by looking at the current line number displayed in the bottom right of the Editor Window s status bar or by selecting Goto from the Edit Menu A similar second program can be made based on the first program This can be done quickly by copying the OP1 program and then editing it 1 Select Copy program from the Program Menu and copy the OP1 pro gram calling the new program OP2 2 Select the OP2 program and press the Edit Button to open it 3 Change the OP2 program to control a different OP with a different period Refer to for SECTION 6 BASIC Motion Control Programming Language details on programming 4 Executed the programs together The Run and Step Buttons on the Control Panel wi
179. e MC Unit case and remove the upper extension from the Driver 2 2 3 Dimensions The basic dimensions of the MC Unit are shown below C MCW151 i RUNO Osrs 500 fle eee leo PORTO 1 PORT2 vo UUUUUUUUUUt ao 20 128 29 Wiring Section 2 3 2 3 Wiring 2 3 1 Control Connections Connector The I O Connector is used for wiring to the digital and the connection for the encoder input or encoder output Refer to 2 3 4 I O Specifications for elec trical specifications Connector pin arrangement 2 D A 1 2 A BAS B 4 B ee Z 5 6 7 D 0V 7 8 5V D aA 10 RO 9 10 FG Ej oo 12 11 12 H R1 VO 14 13 14 doo 16 15 16 15 mae OV IN 17 18 17 Moo O8 19 20 O9 pM O10 21 22 O11 D ae 012 23 24 013 D OV_OP 25 26 24V OP 25 n o 26 l O Connector Pin Functions Pin Signal Name Function 1 A Encoder phase A Input Output 2 A Encoder phase A Input Output 3 B Encoder phase B Input Output 4 B Encoder pha
180. e Motion Perfect has verified that the contents of the controller and the project on the computer are consistent the Motion Perfect Desktop will appear The desktop work area of Motion Perfect is where you will open up the windows to use when editing programs and using the Motion Perfect tools The general look of the desktop is displayed below Terminal Window Toolbar Editor Window ternal Options Window Help Controller status Store Programs in EPROM Drives Enabled Avis status ear JIBNAPPLICATION vE UT DRIVER IMASTERSHELI fu Edit MASTERSHELL Program Edit Debug Tools pg Terminal Channel 0 Terminal Edit Options will result in Mo ommunication Er b air EPROM selected for power up Memory available 140972 Selected program DRIVER Directory is UNLOCKED Program ource Code Set ERRORMASK par Following statu bit 2 Servo D bit 3 Servo Dris bit 8 Following Error Limit BASE 0 ERRORMASK 268 291 Manual 599 Manual APPLICATION DRIVER Selected Program INIT DRIVER Initi Pimia amp P Free Memory 110972 M Motion Stop IF AXISSTATUS AND 4 Set Servo Driver parameters RUN INIT DRIVER 3 5 IMASTERSHELL STARTUP 0K gt gt 1280 Manual 291 Manual Wait until process is stopped Controller Messages Messages Program STARTUP running o
181. e Table array The CAMBOX command requires the start element of the Table to have value zero Note also that CAMBOX command allows traversing the Table backwards as well as forwards depending on the Master axis direction The link option argument can be used to specify different options to start the command and to specify a continuous CAM For example if the link option is set to 4 then the CAMBOX operates like a physical CAM CAMBOX works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis start point The address of the first element in the Table array to be used Command function and parameter description Section 6 3 Precautions See also 6 3 34 CANCEL Type Syntax Alternative Description Precautions See also end_point The address of the end element in the Table array table_multiplier The Table multiplier value used to scale the values stored in the Table As the Table values are specified in encoder edges use this argument to set the val ues for instance to the unit conversion factor set by UNITS parameter link_distance The distance in user units the link axis must move to complete the specified output movement The link distance must be specified as a positive distance link_axis The axis to link to link_option 1 Link starts when registration event occurs on link axis 2 Link starts at an absolute position on link axis see ink position 4 CA
182. e has a width of a quarter pulse period length when both phase A and B are low The Z phase signal is active after power on The generated frequency is limited to the maximum allowable frequency If the internal speed would result in a frequency above this maximum an axis status flag will be set See 8 2 1 MC Unit Error Handling for details 18 Specifications Section 1 5 1 5 Specifications 1 5 1 General Specifications The MC Unit provides the following general specifications Item Contents Applicable Servo Driver R88D W Series software version 14 or later see note Servomotors Type R88M W Series Encoder Incremental Absolute Installation Method Mounted on the CN10 connector on the Servo Driver side Basic Specifications Power Supply Method 5 VDC supplied from the control power supply of the Servo Driver 24 VDC supplied from external power supply Total Power Consumption 4 0 W External Dimensions 20 x 142 x 128 mm H x W x D Approx Mass 200 g Current Consumption 170 mA for 24 VDC Output Power Supply 5 VDC maximum 160 mA to external encoder Environment Ambient Operating Tem perature 0 to 55 C Ambient Operating Humidity 90 RH or less non condensing Ambient Atmosphere Free from corrosive gasses Ambient Storage Temper ature 20 to 75 C Ambient Storage Humidity 90 RH or
183. e in the program indi cated by highlighting The breakpoint can be removed to selecting the same 207 Motion Perfect Tools Section 7 5 operation again or to just by removing the line manually All breakpoints can be removed from a program by selecting Clear All Breakpoints from the Debug Menu 7 5 3 Axis Parameters The Axis Parameters Window allows the user to set and read the axis param eter settings This window works like a Windows based spread sheet The Axis Parameter Window is shown below Axis Parameters Oix _waso 2 P_GAIN 0 1000 1 0 1 0 I_GAIN 0 0 0 0 0 0 D GAIN 0 0 0 0 0 0 0 GAIN 0 0 0 0 0 0 VFF GAIN 0 0 0 0 0 0 UNITS 1 0 1 0 1 0 SPEED 1000 0 1000 0 1000 0 ACCEL 10000 0 10000 0 10000 0 DECEL 10000 0 10000 0 10000 0 CREEP 100 0 100 0 100 0 7 MTYPE IDLE IDLE IDLE NTYPE IDLE IDLE IDLE MPOS 0 0 0 0 0 0 DPOS 0 0 0 0 0 0 FE 0 0 0 0 0 0 AXISSTATUS ocyxehdrfmaw ocyxehdrfmaw ocyxehdrfmaw VPSPEED 0 0 0 0 0 0 The Axis Parameters Window is made up of a table of cells separated into two banks bank 1 at the top and bank 2 at the bottom Bank 1 contains the values of parameters that can be changed by the user The values can be changed by clicking on it and entering the new value Bank 2 is read only and contains the values which are set by the system software of the MC Unit as it processes the BASIC commands and moni tors the status These values are updated continuously at a spe
184. e measured motion of another axis to form a continuously variable software gearbox CANCEL CANCEL cancels the move on an axis 125 CONNECT CONNECT connects the demand position of an axis to the 127 measured movements of the axis specified for driving axis to produce an electronic gearbox DATUM DATUM performs one of 7 origin search sequences to posi 129 tion an axis to an absolute position or reset a motion error DEFPOS DEFPOS defines the current position as a new absolute posi 131 tion FORWARD FORWARD moves an axis continuously forward at the speed 141 set in the SPEED parameter MOVE MOVE moves one or more axes at the demand speed accel 157 eration and deceleration to the position specified as increment from the current position MOVEABS MOVEABS moves one or more axes at the demand speed 158 acceleration and deceleration to the position specified as absolute position i e in reference to the origin MOVECIRC MOVECIRC interpolates 2 orthogonal axes in a circular arc 159 MOVELINK MOVELINK creates a linear move on the base axis linked via 160 a software gearbox to the measured position of a link axis MOVEMODIFY MOVEMODIFY changes the absolute end position of the cur 163 rent single axis linear move MOVE or MOVEABS RAPIDSTOP RAPIDSTOP cancels the current move on all axes 173 REVERSE REVERSE moves an axis continuously in reverse at the 179 speed set in the SPEED parameter Commands and Functions The ta
185. e possible following error of th rror SETCOM baud rate data bits stop bits parity l option SETCOM baud rate data bits stop bits parity 2 0option if any for diagnostics 247 Programming Examples Appendix C RETURN Motion error routine m_error Program status Er VR programstatus ror or emergency stop 3 Stop all movements GOSUB stop_all If Servo Driver comm error then IF AXISSTATUS AND 4 gt 0 THEN Stop all programs including master shell HALT ENDIF A reset input can be defined to continue operation WAIT UNTIL IN resetting ON If Servo Driver Alarm then IF AXISSTATUS AND 8 0 THEN Clear alarm DRV CLEAR ENDIF GOTO start STOP Emergency stop e Stops Program status Error or emergency stop VR programstatus 3 Stop all movements GOSUB stop all WAIT UNTIL IN e stop 1 GOTO start Servo Driver Parameter Setting program The following program can be used to set the correct Servo Driver settings Modify the parameters to those required for the application REET AE FE FE AE FE FE HE EEE EEE FE FE FE FE FE FE FE BEE FE AE FE FE HEE ERE FE FE FE E H Servo Driver parameter setting program Tasks Set up Servo Driver parameters Inputs None Outputs VR 114 Force reset value FALSE gt power toggle or drv reset not required value TRUE gt power toggle or drv_reset required TAE
186. e to the time taken to upload the data via the serial link 7 6 Suggestions and Precautions Programming and When using Motion Perfect please consider the following items Program Control Motion Perfect provides complete programming functions such as edit delete rename create select and copy functions When available these should be used instead of the equivalent BASIC system commands in the Terminal Window Motion Perfect cannot detect changes made by these BASIC system commands and a project check will be required to resolve inconsistencies Use Reset the Controller on the MC Unit Menu to perform a software reset of both the MC Unit and the Servo Driver as DRV_RESET com mand You do not need to close an Editor Window to run a program It saves time not to It is better to open an edit session for each program you want to see before running any programs If there are programs already run ning then it will not be possible to open an edit session Do not turn the power ON and OFF or remove the serial connection when using Motion Perfect If you do so a communications error message will appear and Motion Perfect will go off line You can force Motion Perfect to compare the computer project with the MC Unit programs at any time by selecting Check project from the File Menu Running Motion Perfect Motion Perfect can be run in an off line mode if it is unable to find a MC Unit Off line and open a valid project This m
187. eaning D 28 01 EXPLICIT MESSAGE SEND command code 28 01 Hex D 1 00 00 Response code 0000 Hex Normal com pletion D 2 00 0A No of received bytes data length after D02003 10 bytes D 3 02 B4 Slave node address 2 VR DATA READ ONE WORD FORMAT response service code B4 Hex D 4 00 OF Data read from the MC Unit s VR 200 One word format 15 0 5 00 Data read from the MC Unit s VR 201 One word format 191 81 DeviceNet MCWISI DRT E only Using the CMD 490 instruction to write data 82 Section 4 2 Word Contents Hex Meaning D 6 0A 33 Data read from the MC Unit s VR 202 One word format 2611 D 7 FF FF Data read from the MC Unit s VR 203 One word format 65535 Control Words C First Control Word Word Contents Hex Meaning C 00 0C No of bytes of command data 12 bytes of command data S C 1 00 10 No of bytes of response data 16 bytes of response data D C 2 00 01 Destination node network address 1 C 3 00 FE Master s node address 0 Master s Unit address FE Hex C 4 00 00 Response returned communication port No 0 No of retries 0 C 5 00 64 Response monitoring time 10 s In the following example the CMD 490 instruction is used to write data three word format to Table 10 to Table 12 on the Slave Unit from the Master CS1 PCs For more information on explicit messages refer to the DeviceNet Master Unit Oper
188. echanical limit or lock in mechanical lock effect 21 The MC Unit is defective Replace the MC Unit 22 Rotation is The Servo Driver is set for Check whether the Servo Driver Correct the setting for the reversed reverse rotation is set for reverse rotation by jog direction of Servo Driver rota ging tion 23 The PP_STEP parameter set Check whether the parameter is Correct the parameter value ting is set for reverse rotation set for reverse rotation is nega tive 24 There are The machinery is vibrating Check for foreign objects in any necessary repairs The speed loop gain is insuffi cient The gain is too high Perform autotuning Manually adjust decrease the gain The wrong Servomotor is selected so it cannot be adjusted Check the torque and inertia ratings and select another Ser vomotor Change to a suitable Servo motor There is eccentricity in the cou plings connecting the Servomo tor axis and the mechanical system Adjust the mounting of the Servomotor and machinery 228 Problems and Countermeasures Section 8 3 No Problem Probable causes Items to check Remedy 28 Motor rotation is The parameters are setincor Check the MC Unit parameters Set the parameters correctly unstable rectly with Motion Perfect and modify the initialisation program accordingly 2
189. ed First perform the clear scan list operation check that the Slave has joined the network and then perform the create scan list operation If another company s Master Unit is being used refer to that Master s operation manual for details on adding a new Slave to its scan list The NS Indicator alternates between being green and flashing green or alter nates between flashing red and flashing green When using an OMRON Master check the following items and perform the necessary error processing steps Register the scan list again After performing the clear scan list operation check that the Slave has joined the network and perform the create scan list operation gt Make sure that the Slave s allocated I O area does not overlap with that of another Slave If there is an overlap change the Slave s node address to eliminate it gt Make sure the the allocated I O area does not exceed the allowed range If the I O area exceeds this range change the Slave s node address to correct the problem When using another company s Master Unit check that the I O size reg istered in the Master s scan list matches the actual I O size of the Slave The I O size is recorded in the following attributes of the connection object Interface 2 Polled I O Connection Produced Connection size Input size Consumed Connection size Output size and Interface 3 Bit strobed I O Connection Produced Connection size Input size Refe
190. ed by 15000 14999 but can be lim ited by using the OUTLIMIT parameter The actual speed reference is depending on the Servomotor To determine the speed reference in rounds per minute RPM multiply the 5 REF param eter value with the 5 RATE parameter value The value currently being applied to the drive can be read using the S REF OUT axis parameter AXIS 5 RATE S REF OUT OUTLIMIT SERVO The following lines can be used to force a square wave of positive and nega tive movement with a period of approximately 500ms on axis 0 WDOG ON SERVO OFF square S REF AXIS 0 2000 WA 250 S REF AXIS 0 2000 WA 250 GOTO square Axis Parameter DAC OUT The S REF OUT parameter contains the speed reference value being applied to the Servo Driver for both open and closed loop In closed loop SERVO ON the motion control algorithm will output a speed reference signal determined by the control gain settings and the following error The position of the Servomotor is determined using the motion control commands In open loop SERVO OFF the speed reference signal is deter mined by the S REF axis parameter The actual speed reference is depending on the Servomotor To determine the speed reference in rounds per minute RPM multiply the 5 REF param eter value with the 5 RATE parameter value This parameter is read only AXIS OUTLIMIT 5 REF 5 REF OUT SERVO gt gt PRINT S REF OUT AXIS 0 288 0000 Mot
191. ed conditions especially in applications that can directly or indirectly affect human life You must consult with your OMRON representative before applying Motion Control Units and related devices to the above mentioned appli cations General Warnings and Safety Precautions Observe the following warnings when using the MC Unit and all pheripheral devices Consult your OMRON representative when using the product after a long period of storage NWARNING NWARNING NWARNING NWARNING NWARNING NWARNING NWARNING Always connect the frame ground terminals of the Servo Driver and the Servomotor to a class 3 ground to 100 O or less Not connecting to a class 3 ground may result in elec tric shock The product contains dangerous high voltage inside Turn OFF the power and wait for at least five minutes to allow power to discharge before handling or working with the prod uct Do not touch the inside of the Servo Driver Doing so may result in electric shock Do not remove the front cover terminal covers cables Parameter Units or optional items while the power is being supplied Doing so may result in electric shock Installation operation maintenance or inspection must be performed by authorized per sonnel Not doing so may result in electric shock or injury Wiring or inspection must not be performed for at least five minutes after turning OFF the power supply Doing so may result in electric shock Do not damage pre
192. emental distance in user units that is required to be mea sured on the link axis to result in the distance motion on the base axis link acceleration The positive incremental distance in user units on the link axis over which the base axis will accelerate link deceleration The positive incremental distance in user units on the link axis over which the base axis will decelerate link axis The axis to link to 161 Command function and parameter description Section 6 3 162 See also Example link_option 1 Link starts when registration event occurs on link axis 2 Link starts at an absolute position on link axis see ink position 4 MOVELINK repeats automatically and bi directionally This option is canceled by setting bit 1 of REP_OPTION parameter i e REP_OPTION REP_OPTION OR 2 Combination of options 1 and 4 Combination of options 2 and 4 link_position The absolute position where MOVELINK will start when ink option is set to 2 AXIS REP OPTION UNITS A flying shear cuts a roll of paper every 160 m while moving at the speed of the paper The shear is able to travel up to 1 2 m of which 1 m is used in this example The paper distance is measured by an encoder the unit conversion factor being set to give units of metres on both axes Axis 1 is the link axis MOVELINK 0 150 0 0 1 wait distance MOVELINK 0 4 0 8 0 8 0 1 accelerate MOVELINK 0 6 1 0 0 0 8 1 match speed then decelerate WAIT UNTIL NTYPE 0
193. emory area to read from Range for VR variables 0 250 Range for Table variables 0 7999 HLM COMMAND HLM READ HLM STATUS HLM TIMEOUT SETCOM The following example shows how to write 25 words from MC Units VR addresses 200 224 to the PC EM area addresses 50 74 The PC has Slave node address 28 and is connected to the RS 232C port HLM WRITE 1 28 PLC EM 50 25 MC VR 200 Host Link Parameter The HLS MODEL parameter defines the MC Unit model code for the Host Link Slave protocol When a Host Link Master gives a PC MODEL READ MM command the MC Unit will return the code as defined by this parame ter The MCW151 has been assigned the model code value FA Hex which is the default of this parameter If this model code gives compatibility problems for the Master another model code can be assigned The valid range for this parameter is 00 FF Hex HLS NODE Host Link Parameter 149 Command function and parameter description Section 6 3 6 3 97 6 3 98 150 Description See also GAIN Type Description Precautions See also The HLS_NODE parameter defines the Slave unit number for the Host Link Slave protocol The MC Unit will only respond to Host Link Master command strings with the unit number as specified in this parameter The valid range for this parameter is 0 31 The default value is 0 HLS_MODEL Axis Parameter The _GAIN parameter contains the integral gain for the axis The i
194. ends a trace at the current line and resumes nor mal program execution for the program specified with program_name The program name can also be specified without quotes If the program name is omitted the selected program will be assumed program_name The name of the program for which to suspend tracing SELECT TRON gt gt TROFF lines Program Command TRON The TRON command creates a breakpoint in a program that will suspend pro gram execution at the line following the TRON command The program can then for example be executed one line at a time using the STEPLINE com mand Program execution can be resumed without using the STEPLINE com mand by executing the TROFF command The trace mode can be stopped by issuing a STOP or HALT command Motion Perfect highlights lines containing TRON in the Edit and Debug Windows TROFF TRON MOVE 0 10 MOVE 10 0 TRON MOVE 0 10 Command function and parameter description 6 3 193 TRUE Type Description Example 6 3 194 TSIZE Type Description See also Example 6 3 195 UNITS Type Description Precautions See also Example Note Note 6 3 196 VERSION Type Description Section 6 3 MOVE 10 0 Constant The TRUE constant returns the numerical value 1 A constant is read only test t 0 AND IN 2 IF t TRUE THEN PRINT Inputs are ON ENDIF System Parameter The TSIZE parameter
195. er The REG POSB parameter stores the position in user units at which the sec ondary registration event occurred This parameter is read only AXIS MARKB REGIST UNITS Axis Command REGIST mode The REGIST command performs the print registration operation The com mand captures an axis position when a registration input or the Z marker on the encoder is detected The capture is carried out by hardware so software delays do not affect the accuracy of the position captured The operation of the print registration is axis specific REGIST works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Command function and parameter description Section 6 3 Precautions Arguments Axis 0 For axis 0 the print registration mechanism of the Servo Driver is used The registration is either triggered by the Servomotor encoder Z marker or the dig ital input on the Servo Driver CN1 46 The Servo Driver parameter Pn511 3 will set the input to register on falling or rising edge For details please refer to 3 3 2 Digital I O When the registration event has occured MARK axis parameter will be set to TRUE and the position will be stored in the REG_POS axis parameter Axis 1 For axis 1 the print registration mechanism of the MC Unit provides two regis ters which allows two simultaneous events to be captured The registration event can either be input IO RO input 1 R1 or the encoder input Z
196. er provides a high performance high precision control system Operation will be processed in optimal synchroniza tion Supports both speed and torque control modes of the Servo Driver Supports switching between the modes during operation Supports speed limit during torque control using the speed reference Selectable MC Unit servo period cycle which can be set to either 0 5 ms or 1 0 ms Apart from the motion control operation with the Servo Driver the MC Unit provides the following features Monitor the detailed Servo Driver alarm status Monitor various monitor signals rotation speed command torque Monitor the Servo Driver digital inputs and analog input to include in the application Read and write of the Servo Driver Parameters Execution of several Driver functions from the MC Unit Examples are Print Registration Origin Search Driver Alarm Reset and Driver Reset The multi task BASIC motion control language is used to program the MC Unit A total of 14 programs can be held in the Unit and up to 3 tasks can be run simultaneously The MC Unit is programmed using a Windows based application called Motion Perfect Motion Perfect allows extremely flexible programming and debugging To achieve a solution for multi axis applications the MC Unit is provided with an encoder axis This axis provides either to have an encoder input for exter nal encoders or to have an encoder output to cascade position data to ano
197. er than the number of points for the motion parameter the additional table points will not be displayed but can be viewed by scrolling the table trace using the horizontal scroll bar The motion parameter trace will not move If the overall time base is greater than a predefined value then the data is retrieved from the MC Unit in blocks and the display can be seen to be updated in sections The last point plotted in the current section will be dis played as a white spot If the scope is configured both to record motion parameters and to plot Table data then the Table data is returned in one complete block and the motion Suggestions and Precautions Section 7 6 parameters are read either continuously or in block depending upon the time base Even if the scope is in Continuous Trigger Mode the Table data is not re read only the motion parameters are continuously read from the MC Unit Enabling Disabling Scope While the scope is running all the scope controls except the Trigger Button Controls will be disabled To change the time base or vertical scale the scope must be stopped and restarted Display Accuracy The MC Unit records the parameter values at the required sample rate in the Table and then passes the information to the scope The trace displayed is therefore accurate with respect to the selected time base There is however a delay between when the data is recorded by the MC Unit and when it is dis played on the scope du
198. erse limit switch is OFF Alarm display ervo Driver Indicators Symbol Name Color Function POWER Power supply indicator Green Lit when control power supply is normal CHARGE Charge indicator Red Lit when main circuit power sup ply is charging 8 2 Error Handling 8 2 1 MC Unit Error Handling Motion Error The MC Unit is continuously checking for error conditions during operation parallel to all running processes If a motion error occurs the Servo Driver will be disabled by using the RUN Servo ON signal to the Servo Driver A motion error will occur when the AXISSTATUS state for one of the axes matches the ERRORMASK parameter setting defined by the user of that axis The Servo ON signal WDOG will be turned OFF the MOTION ERROR parameter will be set to 1 and the ERROR AXIS parame ter will contain the number of the first axis to have the error condition The motion error can be cleared by using the DATUM 0 command or performing a system reset by using the DRV RESET command The relevant parameters and commands are given here Parameter Description WDOG The WDOG system parameter is the software switch used to control the Driver Servo ON input which enables the driver AXISSTATUS The AXISSTATUS axis parameter contains the current status bits of an axis 221 Error Handling Section 8 2 Parameter Description ERRORMASK The ERRORMASK axis parameter enables to user to deter mine whi
199. est res IN 0 OR IN 2 IF res FALSE THEN PRINT Inputs are off ENDIF Axis Parameter 137 Command function and parameter description Description See also FB SET Type Description 6 3 71 See also Note 6 3 72 FB STATUS Type Description See also 6 3 73 FE Type Description See also Note 6 3 74 FE LIMIT Type 138 Section 6 3 The FAST JOG axis parameter contains the input number to be used as the fast jog input The number can be from 0 to 7 As default the parameter is set to 1 no input is selected The fast jog input controls the jog speed between two speeds If the fast jog input is set the speed as given by the SPEED axis parameter will be used for jogging If the input is not set the speed given by the JOGSPEED axis param eter will be used This input is active low AXIS FWD JOG JOGSPEED REV JOG SPEED DeviceNet Parameter The FB SET DeviceNet parameter sets the Remote I O Messaging data to be transferred for input word 2 The following settings can be made FB SET Allocation 0 VR 0 1 MC Unit I O mapping 2 Servo Driver I O mapping See 4 2 1 Remote I O Communications for detailed information on bit alloca tion FB_STATUS DeviceNet Parameter The FB_STATUS DeviceNet parameter returns the status of the communica tions of the MC Unit with the DeviceNet master The following values can be returned FB_STATU
200. eter or the DEFPOS command During the parameter setting the UNITS axis parameter is used determin ing the unit conversion factor The absolute position is modified accord ingly Note The coordinate system of the MC Unit is not synchronized to the coordinate system of the Servo Driver The user must verify that the range of the Servo motor position falls into the MC Unit range If not the position will be adjusted within range and the position data is invalid 56 System Functions Section 3 3 3 3 5 Other Servo Driver Commands Access Servo Driver For applications which require online Servo Driver parameter changes or to Parameters set up a new Servo Driver the MC Unit provides the BASIC commands DRV_READ and DRV_WRITE Using these commands it is possible to read from and write to all Servo Driver parameters directly from the MC Unit user program Reset Servo Driver and The DRV_RESET command will software reset both the Servo Driver and the MC Unit MC Unit This may be necessary for instance after a Servo Driver parameter write using DRV_WRITE or for clearing a Servo Driver Alarm 57 SECTION 4 Communication Interfaces This section describes the communication components of the MCW151 E and MCW151 DRT E The functionality of the serial communication protocols including Host Link Master and Slave and the DeviceNet interface are explained 4 1 Serial Communications 4 1 1 4 1 2 4 1 3 Host Link Master
201. ettings so that each node has a unique number See the troubleshooting steps below under the error heading The NS indicator lights green but turns red after a short time Check whether all of the Slaves settings are correct If a particular Slave s NS indicator is always red replace that Slave The NS indicator lights green but turns red after a short time or The NS indicator lights green but starts flashing red after a short time Restart the faulty Slave Unit after checking the following points Make sure that there are 121 Q Terminating Resistors connected at both ends of the trunk line Connect 121 Q Terminating Resistors if the wrong resistance is being used Check whether all of the Slaves settings are correct Check whether the communications cables are connected properly Check whether the power supply is set correctly Check all the nodes for broken wires in the communications and power supply cables attached to the connectors Check whether power is correctly supplied to the network If there is nearby equipment that generates electrical noise take steps to shield the Master Slaves and communications cables from the noise If an error has occurred with an OMRON Master Unit refer to the Master Unit s Operation Manual If an error has occurred in a Master supplied by another maker refer to the relevant operation manual If a particular Slave s NS indicator is always red replace that S
202. f the AXISSTATUS axis parameter will be turned ON while the axis position is greater than FS_LIMIT AXIS AXISSTATUS RS_LIMIT UNITS Axis Parameter The FWD_IN axis parameter contains the input number to be used as a for ward limit input The number can be set from 0 to 7 and 18 Range 0 to 7 is used to select one of the MC Unit inputs Defining value 18 will select the Servo Driver s POT Forward drive prohibited CN1 pin 42 input As default the parameter is set to 1 no input is selected If an input number is set and the limit is reached any forward motion on that axis will be stopped Bit 4 of the AXISSTATUS will also be set This input is active low AXIS AXISSTATUS REV Axis Parameter The FWD JOG axis parameter contains the input number to be used as a jog forward input The input can be set from 0 to 7 As default the parameter is set to 1 no input is selected This input is active low AXIS FAST JOG JOGSPEED REV JOG Command GET n variable The GET command assigns the ASCII code of a received character to a vari able If the serial port buffer is empty program execution will be paused until a character has been received Channels 5 to 7 are logical channels that are Command function and parameter description Section 6 3 Arguments Precautions See also Example superimposed on the RS 232C programming port 0 when using Motion Per fect n The specified input device When
203. ffers When the CANCEL or RAPIDSTOP com mands are given the selected axis respectively all axes will cancel their cur rent move Origin Search The encoder feedback for controlling the position of the motor is incremental This means that all movement must be defined with respect to an origin point The DATUM command is used to set up a procedure whereby the MC Unit goes through a sequence and searches for the origin based on digital inputs and or Z marker from the encoder signal 13 Control System Configuration Section 1 4 Print Registration Merging Moves Jogging The MC Unit can capture the position of an axis in a register when an event occurs The event is referred to as the print registration input On the rising or falling edge of an input signal which is either the Z marker or an input the MC Unit captures the position of an axis in hardware This position can then be used to correct possible error between the actual position and the desired position The print registration is set up by using the REGIST command The position is captured in hardware and therefore there is no software over head and no interrupt service routines eliminating the need to deal with the associated timing issues If the MERGE axis parameter is set to 1 a movement will always be followed by a subsequent movement without stopping The following illustrations will show the transitions of two moves with MERGE value 0 and value 1 Speed MERGE 0
204. for any two axes Adding axes Adding any two axes Acceleration deceleration curves Trapezoidal or S curve Servo Driver Access Motion Control Speed Control Torque Control Position Feed back Driver Enable Driver Print Registration Monitoring Driver Alarm and Warning Status General Driver Status Driver Digital Input Driver Analogue Input Driver Limit Switches General Control Driver Alarm Reset Driver Reset Parameter Access Read and Write Pn parameters Read Un parameters External connected devices Personal Computer with Motion Perfect Programming Software Serial Communications RS 232C Port 0 Connection to PC Motion Perfect Software Port 1 Host Link Master protocol Host Link Slave protocol General purpose RS 422A 485 MCW151 Port 2 E only Host Link Master protocol Host Link Slave protocol General purpose External Encoder Input Line receiver input maximum response frequency 1500 kHz pulses before multiplication Pulse multiplication x4 Encoder Output Line receive output maximum frequency 500 kHz pulses Internal counts to output pulse ratio 64 1 Digital Inputs Total of 8 digital inputs can be wired and used for instance for limit switches emergency stop and prox imity inputs Two inputs can be used for registration of the encoder input output axis Digital Outputs Total of 6 digital outputs can be wired and used for position dependent switching or other general pur
205. forward input 142 Motion Perfect jog screen 211 reverse input 179 speed 153 labels definition 87 LED indicators 24 limit switches description 39 forward input 142 reverse input 179 Servo Driver 51 linear interpolation 10 linked CAM control 12 linked move 12 local variables 87 master shell program 245 mathematical specifications 88 measured position 15 monitoring data Servo Driver analog input 52 Servo Driver torque command 53 Servo Driver torque monitor 54 Servomotor rotation speed 53 motion control algorithm 15 concepts 7 14 types 2 motion generator 89 Motion Perfect axis parameters window 208 connecting to MC Unit 198 control panel 202 controller configuration window 209 debugging 207 desktop 201 features 198 firmware download 218 full controller directory window 211 status window 210 jog screen 211 oscilloscope 212 program editor 205 project backup 217 requirements 198 retrieving backup 218 simple examples 203 Table editor 209 terminal window 204 tools 204 VR editor 209 Motion Perfect projects backup 199 consistency check 200 description 199 manager 199 motor runaway 39 move loading 90 moves absolute 8 calculations 9 cancelling 13 continuous 10 defining 9 execution 89 merging 156 relative 8 multitasking 86 Index number format 88 one word format 72 origin search 13 output speed gain 16 P point to p
206. g Item Inspection points Criteria Remarks Power Measure the voltage variations at 24 VDC 20 4 to 26 4 VDC With a voltage tester check Supply the I O power supply terminal block between the terminals and make Do they meet the standards sure that the power supply falls within the acceptable range Installation Is the MC Unit securely mounted There must be looseness With a Phillips screwdriver tighten and wiring all mounting screws Carefully insert and lock all cable connectors With a Phillips screwdriver tighten all screws in the external wiring Are any crimp terminals for external wiring too close together There must be sufficient dis tance between them Do a visual check and separate the terminals as required Are any external cables discon nected There must be no external abnormalities Do a visual check and connect or replace cables as required Environment conditions Is the ambient temperature within the acceptable range When used in a panel the ambient temperature inside the panel must be checked 0 to 55 C With a thermometer check the ambient temperature inside the panel and make sure that it falls within the acceptable range Is the ambient humidity within the acceptable range When used in a panel the ambient temperature inside the panel must be checked 10 to 90 RH with no con densation With a hydroscope check the ambient humidity insi
207. g Motion with Mark Detection A cyclic cut to length operation requires a rolled product to be cut in relation to a printed mark The product is nominally 150 mm long and the printed registration mark appears 30 mm from the end of the product The product must be stationary when cut but the draw motion should be one continuous move A high speed optical sensor is connected to the registration input of the feed axis loop REGIST 3 DEFPOS 0 MOVE 150 WAIT UNTIL MARK MOVEMODIFY REG_POS 30 WAIT IDLE GOSUB cut_operation GOTO loop cut_operation Omitted from this example RETURN Example 9 Host Link Master Program The following program shows a possible implementation of the Host Link protocol The user program should contain a mechanism of error checking and possibly retries Configure serial port 2 SETCOM 9600 7 2 2 2 6 Set timeout time to 500 servo cycles HLM TIMEOUT 500 Define attempt counter attempt 1 loop Read data 2 words from the PC CIO IR area address 2 252 Programming Examples Appendix C to VR memory address 0 The PC has Host Link slave node 13 READ 2 13 PLC IR 2 2 MC VR 0 GOSUB check status PRINT VR 0 0 VR 1 0 STOP check status VR 250 HLM STATUS PORT 2 IF VR 250 0 THEN RINT Succeeded P RETURN ELSE PRINT Failure attempt 0 IF READ
208. g headings appear in the left column of the manual to help you locate different types of information Note Indicates information of particular interest for efficient and convenient opera tion of the product 1 2 3 Indicates lists of one sort or another such as procedures checklists etc Trademarks and Copyrights DeviceNet is a registered trademark of the Open DeviceNet Vendor Association Inc OMRON 2003 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means mechanical electronic photocopying recording or otherwise without the prior written permission of OMRON No patent liability is assumed with respect to the use of the information contained herein Moreover because OMRON is constantly striving to improve its high quality products the information contained in this manual is subject to change without notice Every precaution has been taken in the preparation of this manual Neverthe less OMRON assumes no responsibility for errors or omissions Neither is any liability assumed for damages resulting from the use of the information contained in this publication About this Manual This manual describes the installation and operation of the R88A MCW151 E and R88A MCW151 DRT E Motion Control Option Boards MC Units and includes the sections described below Please read this manual and the related manuals listed in the following table
209. gram is compiled before it is executed if it has been edited The selected program is compiled if it has been edited before switching the selected program to another program The selected program is compiled by using the COMPILE command 91 BASIC Programs Section 5 5 The program syntax and structure are checked during compilation If compila tion is unsuccessful a message will be provided and no program code will be generated A red cross will appear in the Motion Perfect directory box Programs cannot be run when compilation errors occur The errors should be corrected and the program recompiled The compilation process also includes the following Removing comments Compiling numbers into the internal processor format Converting expressions into reverse Polish Notation format for execution Precalculating variable locations Calculating and embedding loop structure destinations NWARNING As the compiling process requires some free memory un expected compiling errors may be occurring when the amount of free memory is not sufficient 5 5 3 Program Execution Refresh Relevant commands Setting Programs to Run at Start up 92 The timing of the execution for the different tasks and the refreshing of the I O of the MC Unit revolves around the servo cycle period of the system The servo cycle period is determined by the SERVO PERIOD system parameter The MC Unit will either have a servo cycle period of
210. grams are separate from the motion generator program which controls moves for the axes The motion generator has separate functions for each axis so each axis is capable of being programmed with its own axis parameters for example speed acceleration and moving independently and simultaneously or they can be linked together using special commands When a move command is processed the motion generator waits until the move buffers for the required axes are empty and then loads these buffers with the move information 89 Command Line Interface Section 5 4 Note If the task buffers are full the program execution is paused until buffers are Sequencing Move Loading available again This also applies to the command line task and no com mands can be given for that period Motion Perfect will disconnect in such a case The PMOVE task parameter will be set to TRUE when the task buffers are full and will be reset to FALSE when the task buffers are available again Task buffers Task 1 MOVECIRC AXIS 0 FORWARD AXIS 1 Motion Task 2 Generator Task 3 MOVE AXIS 0 Sequencing Move buffers Axis 0 1 2 Move Next Move NTYPE MOVE 1 FORWARD 10 IDLE 0 Y Loading Actual Move MTYPE 4 MOVECIRC 4 IDLE 0 On each servo cycle interrupt see 5 5 3 Program Execution the motion gen erator examines the NTYPE buffers to see if any of the
211. h memory will be copied to the RAM Note Motion Perfect offers this command as a button on the control panel Also pop up screens will prompt to write the program data into Flash memory See also FLASHVR RUNTYPE 6 3 65 ERROR AXIS Type System Parameter Description The ERROR AXIS axis parameter contains the number of the axis which has caused the motion error A motion error occurs when the AXISSTATUS state for one of the axes matches the ERRORMASK setting In this case the enable switch WDOG will be turned OFF the MOTION ERROR parameter will have value 1 and the ERROR AXIS parameter will contain the number of the first axis to have the error Refer to 8 2 Error Handling for more detailed information on error handling Note This parameter is read only See also AXISSTATUS ERRORMASK MOTION ERROR WDOG 6 3 66 ERROR LINE Type Task Parameter Description The ERROR LINE parameter contains the number of the line which caused the last BASIC run time error in the program task This value is only valid when the BASICERROR parameter is TRUE 136 Command function and parameter description See also Example Note Section 6 3 Each task has its own ERROR_LINE parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed Refer to 8 2 Error Handling for more detailed information on error handling This parameter is read only BASICERROR PROC RUN_ERROR gt
212. he command will enable the Host Link protocols or define the general pur pose communication The serial ports have 9 600 baud 7 data bits 2 stop bits even parity and XON XOFF enabled for general purpose communication by default These default settings are recovered at start up baud_rate 1200 2400 4800 9600 19200 38400 data_bits 7 8 stop_bits 1 2 parity 0 None 1 Odd 2 Even port_number 0 RS 232C programming port 0 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 mode Select one of the following modes for serial ports 1 and 2 0 General purpose communication no XON XOFF mechanism 5 Host Link Slave protocol 6 Host Link Master protocol Mathematical Function SGN expression The SGN function returns the sign of a number It returns value 1 for positive values including zero and value 1 for negative values 185 Command function and parameter description Arguments Example 6 3 178 SIN Type Syntax Description Arguments Example 6 3 179 SPEED Type Description See also Example 6 3 180 SQR Type Syntax Description Arguments Example 6 3 181 SRAMP Type Description Precautions See also 6 3 182 STEPLINE Type 186 Section 6 3 expression Any valid BASIC expression gt gt PRINT SGN 1 2 1 0000 Mathematical Function SIN expression The SIN function returns the sine of the expression Input values are in radi ans and
213. he number of words num ber of bytes that are used depends upon the addresses The minimum is one byte and the maximum is 64 bytes 32 words 69 DeviceNet MCWISI DRT E only Section 4 2 Area Allocation DeviceNet Input The table below specifies the input data allocation of the status of the MC Unit Input Bit Name Function word 1 00 Unit Operating Flag 1 MC Unit is operating 0 MC Unit is not operating 01 Servo Driver Enable Flag 1 Servo Driver enabled 0 Servo Driver disabled 02 Axis 0 Servo ON 1 Servo is ON for Servo Driver axis 0 The axis is in closed loop 0 Servo is OFF for Servo Driver axis 0 The axis is in open loop 03 MC Unit Motion Error 1 Motion error has occurred for one of the axes Flag 0 No motion error 04 MC Unit Motion Warning 1 Motion warning has occurred for Servo Driver axis 0 The following Flag error warning limit is exceeded 0 No motion warning 05 Servo Driver Alarm Flag 1 Servo Driver alarm ALM has occurred 0 No Servo Driver alarm 06 Servo Driver Warning 1 Servo Driver warning WARN has occurred Flag 0 No Servo Driver warning 07 Servo Driver Communi 1 Communication error between MC Unit and Servo Driver has cation Error occurred 0 No communication error 08 Axis 0 Forward Limit Flag 1 Forward limit is set for Servo Driver axis 0 0 No forward limit
214. he offline terminal will be shown Refer to SECTION 8 Troubleshoot ing 7 3 Motion Perfect Projects Motion Perfect facilitates the works with MC Unit applications by using projects which are a valuable aid in efficient application design and develop ment Projects are stored on the computer and each project contains the MC Unit programs parameters and data required for one motion application Managing each application as one project enables effective version control and provides a mechanism for verifying the application programs on the MC Unit 7 3 1 Project Manager Project Backups The project manager is a background process that automatically maintains consistency between the programs on the MC Unit and the project on the computer When you edit a program in the Motion Perfect editor it changes both copies of the program This avoids the slow process of uploading and downloading programs and ensures that there is always a backup of changes you make As programs are created copied or erased on the MC Unit using the Motion Perfect tools the project is updated so that the files and programs are always consistent A backup copy of the project is stored on the computer after on line operation has been successfully started The backup copy can be loaded if the MC Unit version of the programs become corrupted for any reason by selecting Revert to backup from the File Menu The backup file will be overwritten each time a project is opened
215. he program to be copied new program name Name to use for the new program DEL NEW RENAME gt gt COPY prog newprog Mathematical Function COS expression The COS function returns the cosine of the expression Input values are in radians and may have any value The result value will be in the range from 1 to 1 expression Any valid BASIC expression Command function and parameter description Example 6 3 46 CREEP Type Description See also Example 6 3 47 D GAIN Type Description See also Precautions 6 3 48 DATUM Type Syntax Description Section 6 3 PRINT COS 0 1 0000 Axis Parameter The CREEP axis parameter contains the creep speed on the axis The creep speed is used for the slow part of an origin search sequence CREEP is allowed to have any positive value including zero The creep speed is entered in units s using the unit conversion factor UNITS For example if the unit conversion factor is set to the number of encoder edges inch the speed is set in inches s AXIS DATUM UNITS BASE 2 CREEP 10 SPEED 500 DATUM 4 CREEP AXIS 1 10 SPEED AXIS 1 500 DATUM 4 AXIS 1 Axis Parameter The D GAIN axis parameter contains the derivative gain for the axis The derivative output contribution is calculated by multiplying the change in follow ing error with D GAIN The default value is zero Adding derivative gain to
216. ible errors that may occur and suggest the way to detect them For a full description of the error handling refer to section 8 2 Error Handling The MC Unit outputs may have undefined status due to deposits on or burn ing of the output relays or destruction of the output transistors As a counter measure for such problems external safety measures must be provided to ensure safety in the system If a BASIC error is generated during the execution of a BASIC command in some task the program will be halted immediately or the user can define a specific error routine structure to stop the system The error routine can stop the driver put the digital I O in a safe status and notify the PC Unit of the error Please refer to section 6 3 31 BASICERROR on the way to include an error subroutine in a BASIC program In case a motion error occurs the MC Unit will disable the control of the driver automatically The user has the ability to decide for each axis which motion errors will disable the driver by using the ERRORMASK parameter see sec tion 6 3 67 ERRORMASK After detection of the motion error the user is free to program the necessary countermeasures for the other axes and the com plete system The Host Link Master protocol uses the HLM STATUS parameter to define the different error states The HLM STATUS parameter will contain error states like Timeout and invalid Host Link strings received from the master The required actions such as a re t
217. id async communications channels VT100 Emulation The MC Unit expects to talk to a terminal that accepts the DEC VT100 termi nal protocol This setting can be used for the Terminal Window to emulate a VT100 terminal ASCII Emulation This mode will echo the ASCII description for the non printing characters received Also CR and LF will cause the corresponding action This section describes the Editor used to edit BASIC programs for the MC Unit The Editor is a fully featured Windows based tool An Editor Window will be opened when a new program is created or an existing program is selected for editing When the cursor is moved off the current line any changes made to this line are sent to the MC Unit which performs syntax checking tokenises the line all recognized BASIC keywords are converted to upper case and returns the tokenised result to the window When an Editor Window is closed the project file is updated with the modified program It is not possible to open a new Editor Window while any program is running on the MC Unit fa Edit APPLICATION x Program Edi Debug Tools Window Help op OP 8 ON Wa 100 OP 8 OFF Wa 100 GOTO loop L 6 C 4 NotCompiled NUM 4 205 Motion Perfect Tools Section 7 5 Creating and Opening Programs Opening Programs Creating Programs Basic Editing Operations Saving Program Printing Program Cut Copy and Paste Listing and Jumping to
218. ignal that the positions are full 1 or empty 0 The gantry puts the load down in the first free position Part of the program to achieve this would be as follows movep MOVEABS 115 Move to first put down position FOR VR 0 101 TO 110 IF VR VR 0 0 THEN GOSUB load MOVE 200 7200 is spacing between positions NEXT VR 0 PRINT All positions are full WAIT UNTIL IN 3 ON GOTO movep load Put load in position and mark array OP 15 OFF VR VR 0 1 RETURN The variables are backed up by a battery so the program here could be designed to store the state of the machine when the power is OFF It would of course be necessary to provide a means of resetting completely following manual intervention Example 3 loop Assign VR 65 to VR 0 multiplied by axis 1 measured position VR 65 VR 0 MPOS AXIS 1 PRINT VR 65 GOTO loop System Command WA time The WA command pauses program execution for the number of milliseconds specified for time The command can only be used in a program time The number of milliseconds to hold program execution The following lines would turn ON output 7 two seconds after turning OFF out put 1 OP 1 OFF WA 2000 OP 7 ON System Command WAIT IDLE The WAIT IDLE command suspends program execution until the base axis has finished executing its current move and any buffered move The com mand can only be used in a program 193 Command function an
219. imeout time has elapsed The timeout time is specified by using the HLM_TIMEOUT parameter The status of the transfer can be monitored with the HLM_STATUS parameter 1 When using the HLM_READ be sure to set up the Host Link Master pro tocol by using the SETCOM command 2 The Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems port The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node The Slave node number to send the Host Link command to Range 0 31 Command function and parameter description Section 6 3 See also Example 6 3 95 HLS MODEL Type Description See also 6 3 96 HLS NODE Type pc_area The PC memory selection for the Host Link command pc_area Data area Host Link command PLC_DM DM area RD or value 0 PLC_IR CIO IR area RR or value 1 PLC_LR LR area RL or value 2 PLC_HR HR area RH or value 3 PLC_AR AR area RJ or value 4 PLC_EM EM area RE or value 6 pc_offset The address of the specified PC memory area to write to Range 0 9999 length The number of words of data to be transfered Range 1 29 mc area The MC Unit s memory selection to read the send data from MC area Data area MC TABLE Table variable array or value 8 MC VR Global VR variable array or value 9 mc offset The address of the specified MC Unit m
220. in the response buffer is larger than the allo cated response buffer 13 Hex Not enough data The service did not supply enough data to perform the specified opera tion 15 Hex Too much data The service supplied more data than was expected 16 Hex Object does not exist The object does not exist in the device 20 Hex Invalid parameter A parameter associated with the request was invalid DeviceNet MCWISI DRT E only Section 4 2 Note 1 Unlike other FINS commands this command is addressed to the local node s DeviceNet Master Unit The actual destination of the explicit mes sage is given in the command data as described above Always specify the local node s DeviceNet Master Unit in the control code of the CMND or IOWR instruction An error will occur if another node s Master Unit is specified 2 Ifthe DeviceNet Master Unit receives an explicit message it will automat ically return a response 4 2 2 2 Explicit Messages TABLE DATA READ TABLE DATA READ THREE WORD FORMAT will read Table data The THREE WORD FORMAT data will be converted in three word format Command Block 28 01 32 00 8A 00 01 Command Class ID Instance ID Length L code Service code Address H Length H Destination node address Address L Response Block 28 01 00 00 B2 Y N A Command
221. in which a Servo Driver and MC Unit are used complies with EC directives the Servo System must be installed as follows refer to OMNUC W series User s manual 1531 1 The Servo Driver must be mounted in a metal case control box It is not necessary to mount the Servomotor in a metal box 2 Noise filters and surge absorbers must be inserted in power supply lines 3 Shielded cable must be used for I O signal cables and encoder cables Use soft steel wire 4 Cables leading out from the control box must be enclosed within metal ducts or conduits with blades 5 Ferrite cores must be installed for cables with braided shields and the shield must be di rectly grounded to a ground plate SECTION 1 Features and System Configuration This section describes the features and system configuration of the R88A MCWISI E and R88A MCW151 DRT E Motion Control Units and concepts related to their operation 1 Beat teS ae E SENE ISSUED EIN wh Eten 2 IJ OVERVIEWS exe du fh eed TE I EE D Eus Pe Bae e 2 1 1 2 Description of 3 1 2 System Configuration cse coepere epe dae Ee 5 1 3 Motion Control 7 1 3 1 PIP control test laste eee ene te s 8 1 3 2 e site dod POTS PASE PSR SA 10 1 353 SEGI Conttoli reet X ee IR a EE 11 1 3 4
222. ine the current demand position as zero OFFPOS DPOS WAIT UNTIL OFFPOS 0 Wait until This example is equivalent to DEFPOS 0 applied Constant The ON constant returns the numerical value 1 A constant is read only OP lever ON The above line sets the output named ever to ON 165 Command function and parameter description 6 3 131 ON Type Syntax Description Precautions Arguments See also Example 6 3 132 OP Type Syntax Description Precautions Arguments See also Examples 166 Section 6 3 Structural Command ON expression GOSUB label label ON expression GOTO label label The ON GOSUB and ON GOTO structures enable a conditional jump The integer expression is used to select a label from the list If the expression has value 1 the first label is used for value 2 then the second abel is used and so on Depending on the GOSUB or GOTO command the subroutine or normal jump is performed If the expression is not valid no jump is performed expression Any valid BASIC expression label Any valid label in the program GOSUB GOTO REPEAT GET 5 char UNTIL 1 lt char and char lt 3 ON char GOSUB mover stopper change Function Command OP output_number value binary pattern OP The OP command sets one or more outputs or returns the state of the first 24 outputs OP has three different forms depending on the num
223. ingle block that was sent from the Master PC model code MM PC MODEL READ Reads the model code of the CPU Unit reading Host Link communi XZ ABORT command only Aborts the operation being performed by a Host Link cations processing command and returns to the initial status S INITIALIZE command only Initializes the transfer control procedures for all Host Link Units IC Undefined command This is the response when the command header code response only is invalid The Host Link Master protocol supports the commands only in single frame and can be used with the BASIC commands as shown in the next table The table also shows for which operating mode of a CPU Unit Slave the com mand is valid Header Name BASIC Command CPU Unit Operating Mode Code required RUN MON PRG RR CIO AREA READ HLM READ Valid Valid Valid RL LR AREA READ HLM READ Valid Valid Valid RH HR AREA READ HLM READ Valid Valid Valid RD DM AREA READ HLM READ Valid Valid Valid RJ AR AREA READ HLM READ Valid Valid Valid RE EM AREA READ HLM READ Valid Valid Valid 61 Serial Communications Section 4 1 End Code Summary Header Name BASIC Command CPU Unit Operating Mode Code required RUN MON PRG WR CIO AREA WRITE HLM WRITE Not Valid Valid Valid WL LR AREA WRITE HLM WRITE Not Valid Valid Valid WH HR AREA WRITE HLM WRITE Not Valid Valid Valid
224. ink Slave 66 The SETCOM is required to set up the serial communication port for the Host Link Slave protocol After setting the following command SETCOM baudrate data bits stop bits parity port 5 the MC Unit will respond to any Host Link command from the master with the specified node number as set with the HLS NODE parameter Serial Communications Example Consider a MCW151 E con using port 2 RS 422A The following program Section 4 1 nected to the NT11S Programmable Terminal Host Link Slave can be configured by using the Define Host Link Slave node HLS_NODE 15 Define Host Link Slave model code HLS MODEL SFA Set up Host Link 51 SETCOM 9600 7 2 2 2 5 The MC Unit is now set up to 4 1 3 General purpose The MCW151 provide a set of commands to implement any user defined pro tocol The list of commands is provided here Example lave for port 2 communicate with the Programmable Terminal BASIC Command Description SETCOM SETCOM configures the serial communication port including enabling the Host Link protocols GET GET assigns the ASCII code of a received charac ter to a variable INPUT INPUT will assign numerical input string values to the specified variables KEY KEY returns TRUE or FALSE depending on if a character has been received LINPUT LINPUT assigns the ASCII code of the characters to an array of variables PRINT PRINT
225. input and output areas allocated to the Master The data is transferred automatically at high speed so it is useful to use this for data which requires regular data transfers with the Master When larger amount of data needs to be exchanged with the MC Unit explicit message communications can be used Transferring data with explicit message communications takes more time than transferring data with the input and output areas but all of the MC Unit mem ory can be accessed Use this feature for large data transfers which can be performed when required such as transferring position profile data Remote Master Unit communications CPU Unit MC Unit Input Area Output Area VR memory Explicit message com munications Transfers data in any area Table memory DeviceNet Network Refer to Appendix B Device Protocol MCW151 DRT E only for the Device Protocol definition 4 2 1 Remote I O Communications 68 The Master and Slaves can communicate as described below with DeviceNet remote I O communications Input Area Inputs at the Slave are read automatically and mirrored in the Master s input area Output Area Data written in the output area allocated in the Master s memory are auto matically output to the corresponding Slave DeviceNet MCW151 DRT E only Section 4 2 Note The names of the input and output areas indicate the direction of I O fr
226. int registration axis 0 Print registration on axis 0 is done by using the mechanism of the Servo Driver The registration can be triggered by either the Servomotor encoder Z marker or by the CN1 46 input of the Servo Driver When the input is used one of the following settings is required Param Parameter Name Required Explanation Remark eter No Setting Pn511 3 Print Reg 6 Assigned to CN1 pin 46 valid Print registration on rising istration Signal for low input edge Input Allocation Assigned to CN1 pin 46 valid Print registration on falling for low input edge E Print registration axis 1 Print registration on axis 1 is done by using the MC Unit registration mecha nism The registration can be triggered by either the input I0 RO input 11 R1 or the encoder input Z marker of the MC Unit Two registration registers are provided for the axis This allows for two simul taneous registration events for which the difference in positions can be deter mined Driver Limit Switches The limit switches should be connected to the Servo Driver In this case both the Servo Driver and the MC Unit are able to put the system into a safe state In order to use the Driver POT and NOT signals also in the MC Unit the fol lowing settings are required FWD_IN 18 and REV 19 If one of the limits is reached appropriate countermeasures will be performed See SECTION 8 Troubleshooting for
227. ion Perfect Command SCOPE control period table start table stop P1 P2 P3 Command function and parameter description Section 6 3 Description Note Arguments See also Examples 6 3 171 SCOPE_POS Type The SCOPE command programs the system to automatically store up to 4 parameters every sample period The storing of data will start as soon as the TRIGGER command has been executed The sample period can be any multiple of the servo period The parameters are stored in the Table array and can then be read back to a computer and displayed on the Motion Perfect Oscilloscope or written to a file for further analysis using the Create Table file option on the File Menu The current Table position for the first parameter which is written by SCOPE can be read from the SCOPE_POS parameter 1 Motion Perfect uses the SCOPE command when running the Oscilloscope function 2 To minimize calculation time for writing the real time data the SCOPE command is writing raw data to the Table array For example a The parameters are written in encoder edges per second and there fore not compensated for the UNITS conversion factor b The MSPEED parameter is written as the change in encoder edges per servo period 3 Applications like the CAM command CAMBOX command and the SCOPE command all use the same Table as the data area control Set ON or OFF to control SCOPE execution If turned ON the SCOPE is ready to run a
228. ired Param Parameter Name Required Explanation eter No Setting Pn000 1 Control Mode 9 Torque Speed Control Selection The output no 16 is used to control the switch between speed and torque control during operation Speed control will be applied when OP 16 OFF and torque control will be enabled when OP 16 ON The torque control ref erence value is set by the T_REF axis parameter Speed Torque Speed Control Control Control Time OP 16 OFF ON OFF Torque Reference The torque applied to the Servomotor is proportional to the torque reference value defined by the T REF axis parameter The torque reference character istics are given in the following graph Applied Torque of rated torque Max torque Rated torque 100 Torque 15000 j reference Rated torque 100 M Max torque The torque characteristics are Servomotor dependent The actual applied torque of the Servomotor as percentage of the rated torque can be deter mined by using the T_RATE axis parameter Applied Torque of rated torque T REF T RATE 49 System Functions Section 3 3 Speed Limit Settings During torque control it is advisable to limit the Servomotor speed by using the speed reference The required Servo Driver setting is Pn002 1 1 and please refer to the Speed Control section above for details on the spee
229. it the front panel on the Servo Driver or using the personal computer monitoring software Be sure to follow the procedure carefully Any mistakes in performing the proce dure may lead to faulty operation Absolute Encoder Setup At the setup of the application the incremental position of the origin needs to be determined Perform the following actions Set the correct Servo Driver settings When the Servo Driver is set up for absolute encoder the MC Unit position will be automatically updated Put the Servomotor into the origin position for the system Execute the Servo Driver absolute encoder setup function Fn008 to reset the multi turn data Note that performing this operation will stop communication between Servo Driver and MC Unit Power down the system and put the power back on The MC Unit mea sured position of axis 0 has now been set and is equal to the P The measured position is represented by the MPOS axis parameter The value can be used in the start up routine of the application Determining absolute At every startup the measured position will be updated to the actual position position of the Servomotor This position P is the position as read by the encoder and will need to be compensated for the origin point position The application initiation routine should contain the following steps Define the current position relative to the origin point position This possi ble by using the OFFPOS axis param
230. ix C Programming Examples Master Shell Program Good programming practice requires to have a master shell program A master shell program can be used for most applications and will perform the following tasks Set up the MC Unit and the Servo Driver Control the application program tasks Continuously monitoring the status of the system Please find below an example of such a master shell program Be sure to modify it to the specific application and to check proper operation for all possible conditions before relying on its safety operation This program should be set to run at power up at low priority task 1 TAEAE FE HE FE FE HE HE TE FE FE FE FE FE FE FE E E FE FE FE TE FE FE FE TE TE FE FE E E FE FE E HE TE E EE Master shell program Tasks 1 Set up MC Unit and Servo Driver 2 Control application program tasks 3 Continuous error checking Inputs IN 6 start_machine active high Start application IN 7 e_stop active low Y t Emergency stop IN 5 resetting active high Reset motion error Main variables used Program status VR 111 Uu Lu Y 0 Initialising system 1 Motion amp programs stopped 2 Normal running 3 Error or emergency stop Execution Run program on priority 1 lowest priority EERE FE FE FE EE HEE HE EEE FE AE AE FE HH EE HE EEE FE FE FE AE FE HH HE FE FE FE FE FE FE FE FE AE FE FE FEAE HE EH
231. l 5 6 Motion Perfect port 0 user channel 6 7 Motion Perfect port 0 user channel 7 expression The expression to be printed See also OUTDEVICE hexadecimal input Examples Example 1 PRINT CAPITALS and lower case CAN BE PRINTED Example 2 Consider VR 1 6 and variab 1 5 the print output will be as follows PRINT 123 45 VR 1 variab 123 4500 4 5000 Example 3 In this example the semi colon separator is used This does not tab into the next column allowing the programmer more freedom in where the print items are placed length PRINT DISTANCE mpos DISTANCE 123 0000 Example 4 PRINT VR 1 4 1 variab 6 2 6 0 1 50 Example 5 params PRINT DISTANCE mpos 0 SPEED v 2 DISTANCE 123 SPEED 12 34 Example 6 PRINT ITEM total OF limit CHR 13 Example 7 gt gt PRINT HEX 15 HEX 2 F FFFFA 6 3 143 PROC Type Task Command Syntax PROC number Description The PROC modifier allows a process parameter from a particular process to be read or written If omitted the current task will be assumed Argument task number The number of the task to access Example WAIT UNTIL PMOVE PROC 3 0 6 3 144 PROC LINE Type Task Parameter Description The PROC LINE parameter returns the current line number of the specified program task The parameter is used with the PROC modifier Note This parameter is read only See also PRO
232. lace a torsion load on the axes 40 The mechanical structure is Perform autotuning producing stick slip high vis Manually adjust the gain cosity statical friction 41 The wrong Servomotor is Check the torque and inertia Change to a suitable Servo selected so it cannot be ratings and select another Ser motor adjusted vomotor 42 The Servomotor or Servo Driver Replace the Servomotor or is defective the Servo Driver 43 There is slip The slippage is not constant Is shielded cable being used shielded cable page in position Malfunction due to noise 44 ing The shield is not properly Check the ground wiring Correct the wiring grounded at the Servo Driver 45 The MC Unit s output power Check whether the MC Unit s Separate the MC output sup supply is not separated from output power supply is sepa ply from other power sup other power supplies rated from other power sup plies 46 plies Install a noise filter at the pri mary side of the MC Unit s output power supply 47 Ground the MC Unit s output power supply 48 Twisted pair cable is not being Check whether twisted pair Use twisted pair cable for used for the encoder in or out cable is being used for the pulse outputs puts encoder wires The connected voltage is 0 V or 5 24 VDC The encoder and other control Check whether the cable is sep Separate the cable from wires are not separated from arated from other power lines other
233. lating transformer and a line filter in the power supply section to remove such noise Use twisted pair cables for power supply lines Use adequate grounds i e to 100 Q or less with wire cross sections of 1 25 mm or greater Use twisted pair shielded cables for control voltage output signals input signals and encoder signals The maximum distance for the encoder signal from an encoder to the MC Unit must not exceed 20 m The input terminals that operate the 24 V system are isolated with optical couplers to reduce external noise effects on the control system 41 SECTION 3 Motion Control Functions This section describes the different Motion Control functions of the MC Unit Also the functionality of the Servo Driver related commands are explained Salo OVETVIEW ES EU VERS S UR EROR 44 322 Systeri RI EA IURI E ES NU RISUS NUES RS RUE 46 3 3 System Functions 47 3 3 1 Servo 47 323 2 Digital VO sce ces ke Rey RED Pee wee be EE 50 3 3 3 Monitoring Data 52 3 3 4 Absolute 54 3 3 5 Other Servo Driver Commands 57 43 Overview 3 1 Overview Section 3 1 The MC Unit together with the Servo Driver combine into one complete Servo System which is able to control the
234. lave Trouble Adding a Slave to the Network work Use the following table to troubleshoot problems in adding a Slave to the net Error Probable cause The NS indicator remains OFF Check if the baud rate of the Master Unit coincides with that of the Slave Unit If the baud rate are different correct the baud rate of the Slave Unit Check that the Slave s connector is connected correctly Check whether the communications power supply is supplying 24 VDC Make sure that the Master is operating properly When using an OMRON Master refer to the Master Unit s Operation Manual When using another company s Master Unit refer to that Mas ter s user s manual Check whether the communications cables are connected properly Check whether the power supply is set correctly Check for broken wires in the communications and power supply cables attached to the connectors 231 Problems and Countermeasures Section 8 3 Error Probable cause The NS indicator continues to flash green Make sure that the Master is operating properly When using an OMRON Master refer to the Master Unit s Operation Manual When using another company s Master Unit refer to that Mas ter s user s manual Check whether the Slave is registered in the Master s scan list If an OMRON Master Unit is being used a new Slave cannot be added to the network if the Master is operating with the scan list enabl
235. led Flashing alone A motion error has occurred The Servo Driver has been disabled Flashing with An error occurred in the communication with the RUN Servo Driver RS 422A 485 MCW151 E only Indicator Color Status Meaning SD Green ON Transmitting data OFF No communication RD Green ON Receiving data OFF No communication 24 Components and Unit Settings Section 2 1 DeviceNet MCW151 DRT E only Indi Color Status Definition Meaning ca tor MS Green Device Normal operating status Operational Flashing Device in Reading switch settings Standby Red ON Unrecover Unit hardware error Watchdog timer error able Fault Flashing Minor Fault Switch settings incorrect No Unit Unit power is not supplied waiting for initial Power processing to start or the Unit is being reset NS Green Link OK Network is operating normally communica Online Con tions established nected Flashing Online Not Network is operating normally but communi connected cations have not yet been established Red ON Critical Link fatal communications error has occurred Failure Network communications are not possible Flashing Connection Communications timeout Timeout OFF No Fieldbus Checking for node address duplication on the Power Not Master switch settings are incorrect
236. ler Directory 7 5 8 Jog Screen Note Jog Inputs Jog Speed Settings The Full Controller Directory Window dynamically shows details of all pro grams on the MC Unit and details of all running tasks or processes The win dow can be opened by selecting Full Directory from the Program Menu or the appropriate button on the Control Panel Full Controller Directory Controller directory Running processes APPLICATION 34 10 Manual APPLICATION Running INIT DRIVER 3300 599 Manual MASTERSHELL 5725 1280 Manual STARTUP 396 281 Manual Free memory 111509 0 The Jog Screen can be used to set up and operate the jogging operation of the motion controller with the bi directional virtual I O The screen sets the axis parameters corresponding to jogging FWD JOG REV and JOGSPEED and controls the virtual inputs which are set to jogging This tool will not use the Fast Jog feature of the controller and therefore the FAST JOG parameter is assumed to be 1 The jogging inputs which are connected are considered to be active low nor mally closed This implies that jogging is enabled when the input is low and is disabled when the input is high The Jog Screen is shown below E Axes BEI Axis Position Jog speed Jog inputs mem aee Ed E r Warnings There are separate inputs for forward and reverse jogging of each axis When a jog input is set
237. leration time of 2 seconds Speed ACCEL 5 heeg DECEL 10 SPEED 10 MOVE 40 0 1 2 3 4 5 6 Time Speed ACCEL 10 10 DECEL 5 SPEED 10 MOVE 40 3 4 5 0 1 2 6 Time Move Calculations The following equations are used to calculate the total time for the motion of the axes Consider the moved distance for the MOVE command as D the demand speed as the acceleration rate and deceleration rate d Motion Control Concepts Continuous Moves 1 3 2 CP control Linear Interpolation 10 Section 1 3 Acceleration time Acceleration distance 2a Deceleration time V d y Deceleration distance 2l 2d 2 Constant speed distance D V a d 2ad Total time _D V a d V 2ad The FORWARD and REVERSE commands can be used to start a continuous movement with constant speed on a certain axis The FORWARD command will move the axis in positive direction and the REVERSE command in nega tive direction For these commands also the axis parameters ACCEL and SPEED apply to specify the acceleration rate and demand speed Both movements can be canceled by using either the CANCEL or RAPID STOP command The CANCEL command will cancel the move for one axis and RAPIDSTOP will cancel moves on all axes The deceleration rate is set by DECEL Continuous Path control enables to control a specified path between the start and end position of a movement for one or multiple axes The MC Unit sup
238. less non condensing Vibration Resistance 4 9 m s Impact Resistance Acceleration 19 6 m s or less when the impact is applied three times in each X Y Z direction Note The MC Unit cannot be used with software version 8 1 5 2 Functional Specifications The MC Unit provides the following functional specifications Item Contents Type of Unit Optional board for W series Servo Driver Motion Control Speed Control Inferred closed loop with PID output speed and speed feed forward gains Speed reference open loop Possible torque limit operation Torque Control Torque reference Possible speed limit operation Control Switch Speed Torque control switching during operation Configuration Maximum No of axes 3 No of controlled servo axes 1 Maximum No of encoder in or output axes Maximum No of virtual axes 2 Servo Loop Cycle Selectable to 0 5 ms or 1 0 ms Measurement Units User definable 19 Specifications Section 1 5 Item Contents Positioning operations Linear interpolation Linear interpolation for any number of axes Circular interpolation Circular interpolation for any two axes CAM profile CAM profile movement for any axis Electronic gearbox Electronic gearbox link between any two axes Linked CAM Linked CAM profile movement for any two axes Linked move Linked move
239. ll be generated This limit is used to guard against fault conditions such as mechanical lock up loss of encoder feedback etc AXIS AXISSTATUS ERRORMASK FE FE RANGE UNITS Axis Parameter FERANGE The FE RANGE axis parameter contains the limit for the following error warn ing range in user units When the following error exceeds this value on a servo axis bit 1 in the AXISSTATUS axis parameter will be turned ON This range is used as a first indication for fault conditions in the application compare FE LIMIT AXIS AXISSTATUS ERRORMASK FE FE LIMIT UNITS Axis Parameter FH IN The FHOLD_IN axis parameter contains the input number to be used as the feedhold input The number can be from 0 to 7 As default the parameter is set to 1 no input is selected If an input number is set and the feedhold input turns set the speed of the move on the axis is changed to the value set in the SPEED axis parame ter The current move is NOT cancelled Furthermore bit 7 of the AXISSTA TUS parameter is set When the input turns reset again any move in progress when the input was set will return to the programmed speed This feature only works on speed controlled moves Moves which are not speed controlled CAMBOX CONNECT and MOVELINK are not affected This input is active low AXIS AXISSTATUS FHSPEED Axis Parameter The FHSPEED axis parameter contains the feedhold speed This parameter can be set to a va
240. ll control only the currently selected program Use the Run Stop and Step Button or the menus to control other programs at the same time 7 5 Motion Perfect Tools 7 5 1 204 Terminal This section describes the main Motion Perfect tools Terminal Editor Axis Parameters Controller Configuration VR and Table Editors Status Full Controller Directory Jog Axes Oscilloscope 0500 RG The Terminal Window provides a direct connection to the MC Unit Most com mands functions and parameter read writes can be issued directly on the command line Most of the functions that must be performed during the installation program ming and final setup of a system with a MC Unit have been automated by the options available in the Motion Perfect Menus A Terminal Window is shown in the following display Motion Perfect Tools 7 5 2 Editor Note Section 7 5 Terminal Channel 0 OF Terminal Edit Options gt dir PROM selected for power up emory available 110972 Selected program INIT DRIVER 291 Manual INIT DRIVER 3300 599 Manual 5725 1280 Manual 291 Manual H T100 Log Off Channel g Up to four Terminal Windows can be opened simultaneously over the single serial port Channel 0 must be used to issue commands Channels 5 6 and 7 can be used to provide I O windows to programs running on the MC Unit Channel Number The Channel Number Combo Box can be used to select one of the val
241. lowing error which is the calculated difference between the demand position and the actual measured position 2 The Position Controller calculates the required speed reference output de termined by the following error and possibly the demanded position and the measured position The speed reference is provided to the Servo Driv er 3 The Servo Driver controls the rotational speed of the Servomotor corre sponding to the speed reference The rotational speed is proportional to the speed reference 4 The rotary encoder will generate the feedback pulses for both the speed feedback within the Servo Driver speed loop and the position feedback within the MC Unit position loop The servo system controls the motor by continuously adjusting the speed ref erence to the Servo Driver The speed reference is calculated by the MC Units Motion Control algorithm which is explained in this section The Motion Control algorithm uses the demand position the measured posi tion and the following error to determine the speed reference The following error is the difference between the demanded and measured position The demand position measured position and following error are represented by axis parameters MPOS DPOS and FE Five gain values have been imple mented for the user to be able to configure the correct control operation for each application 15 Control System Configuration Section 1 4 Proportional Gain Integral Gain Derivative Gain
242. lue in user units s at which speed the axis will move when the feed hold input turns ON The current move is not cancelled FHSPEED can have any positive value including zero The default value is zero This feature only works on speed controlled moves Moves which are not speed controlled CAMBOX CONNECT and MOVELINK are not affected AXIS FHOLD IN UNITS System Command FLASHVR address 139 Command function and parameter description Section 6 3 Description Note Arguments See also The FLASHVR command is used to store VR or Table variable data into the Flash memory After the data has been stored at each power up the VR and Table data will be restored to the values held in Flash memory Storing the data in Flash memory for this Unit is required as data in RAM is not contained when power is down The command will write either a single VR variable or the entire Table array Although the Table array is updated correctly with the Flash memory data at start up the Table pointer TSIZE parameter is zero To able to access the Table data a write operation needs to be performed to the Table variable with address one higher than the highest variable used 1 When the entire Table array is restored from Flash memory at start up the Table has not yet been initialised To initialise the Table for the range used in the application write a value to the Table variable with address one higher than used From that moment the Table
243. ly after the Trigger Button is pressed Program Mode Button pressed program listing In Program Trigger Mode the scope starts running when the Trig ger Button is pressed The MC Unit will start recording data when a TRIGGER command is executed in a program running on the MC Unit After the TRIGGER command is executed by the program and the MC Unit has recorded the required data the required data is retrieved by the scope and displayed The scope stops running if in One shot Trigger Mode or it waits for the next trigger on the MC Unit if in Continuous Trigger Mode Trigger Button When the Trigger Button is pressed the scope will be started If the scope is Manual Mode then the MC Unit immediately starts recording data If it is in Program Trigger Mode then the MC Unit waits until it encounters a TRIGGER command in a running pro gram After the Trigger Button has been pressed the text on the Button changes to Halt while the scope is running If the scope is in the One shot Mode then after the data has been recorded and plotted on the display the Trigger Button text will return to Trigger indi cating that the operation has been completed The scope can be halted at any time when it is running by pressing the trigger button the Halt text is displayed Reset Scope Configuration The current scope configuration and all settings will be saved when the scope window is closed and retrieved when the scope windo
244. m are available If there are any available then it checks the task buffers to see if there is a move waiting to be loaded If a move can be loaded then the data for all the speci fied axes is loaded from the task buffers into the NTYPE buffers and the cor responding task buffers are marked as idle This process is called sequencing Once sequencing has been completed the MTYPE buffers are checked to see if any moves can be loaded If the required MTYPE buffers are available then the move is loaded from the NTYPE buffers to the MTYPE buffers and the NTYPE buffers are marked as idle This process is called move loading If there is a valid move in the MTYPE buffers then it is processed When the move has been completed the MTYPE buffers are marked as idle 5 4 Command Line Interface The Command Line Interface provides a direct interface for the user to exe cute commands and access parameters on the system There are two options to use the command line interface Use the Terminal Window within Motion Perfect and the MC Unit con nected See SECTION 7 Motion Perfect Software Package for details Use a VT100 Terminal to connect to the MC Unit This is similar to using the Terminal Window within Motion Perfect when the MC Unit is discon nected The MC Unit puts the last 10 commands given on the command line in a buffer Pressing the Up and Down Cursor Key will cycle through the buffer to execute the command again 5 5 BASIC Programs
245. m from memory 131 DIR DIR displays a list of the programs held in memory their size 132 and their RUNTYPE EDIT EDIT allows a program to be modified using a 100 Termi 135 nal Command Reference List Section 6 2 Name Description Page EPROM EPROM stores the BASIC programs in the MC Unit in the 136 Flash memory FREE FREE returns the amount of available memory 141 HALT HALT stops execution of all programs currently running 144 LIST LIST prints the lines of a program 154 NEW NEW deletes all the program lines in MC Unit memory 164 PROCESS PROCESS returns the running status and task number for 172 each current task RENAME RENAME changes the name of a program in the MC Unit 177 directory RUN RUN executes a program 180 RUNTYPE RUNTYPE determines if a program is run at start up and 181 which task it is to run on SELECT SELECT specifies the current program 184 STEPLINE STEPLINE executes a single line in a program 186 STOP STOP halts program execution 187 TROFF TROFF suspends a trace at the current line and resumes nor 190 mal program execution TRON TRON creates a breakpoint in a program 190 System Commands and Parameters The table below outlines the system commands and parameters Refer to the specified pages for details Name Description Page Hexadecimal input Comma
246. marker is encountered The demand position is then reset to zero and the measured position corrected so as to maintain the following error The origin input set with the DATUM IN parameter is active low i e the ori gin switch is set when the input is OFF The feedhold reverse jog forward jog forward and reverse limit inputs are also active low Active low inputs are used to enable fail safe wiring ACCEL AXIS AXISSTATUS CREEP DATUM_IN DECEL MOTION_ERROR SPEED Axis Parameter DAT_IN The DATUM_IN axis parameter contains the input number to be used as the datum switch input for the DATUM command The valid input range is given by 0 to 7 If DATUM_IN is set to 1 then no input is used as the datum switch input The origin input is active low i e the origin switch is set when the input is OFF The feedhold reverse jog forward jog forward and reverse limit inputs are also active low Active low inputs are used to enable fail safe wiring AXIS DATUM DATUM IN AXIS 0 5 Command function and parameter description Section 6 3 6 3 50 DECEL Type Description See also Example 6 3 51 DEFPOS Type Syntax Alternative Description Precaution Arguments See also Example 6 3 52 DEL Type Syntax Alternative Axis Parameter The DECEL axis parameter contains the axis deceleration rate The rate is set in units s The parameter can have any positive value including zero ACCEL AXIS UN
247. may have any value The result value will be in the range from 1 to 1 expression Any valid BASIC expression gt gt PRINT SIN PI 2 1 0000 Axis Parameter The SPEED parameter contains the demand speed in units s It can have any positive value including zero The demand speed is the maximum speed for the speed profiled motion commands ACCEL AXIS DATUM DECEL FORWARD MOVE MOVEABS MOVECIRC MOVEMODIFY REVERSE UNITS SPEED 1000 PRINT Set speed SPEED Mathematical Function SQR expression The SQR function returns the square root of the expression The expression must have positive including zero value expression Any valid BASIC expression gt gt PRINT SQR 4 2 0000 Axis Parameter The SRAMP parameter contains the S curve factor The S curve factor con trols the amount of rounding applied to the trapezoidal profiles A value of 0 sets no rounding A value of 10 sets maximum rounding The default value of the parameter is O SRAMP is applied to the FORWARD MOVE MOVEABS MOVECIRC and REVERSE commands Note that using S curves increases the time required for the movement to complete The S curve factor must not be changed while a move is in progress AXIS Program Command Command function and parameter description Section 6 3 Syntax Description Arguments See also Examples 6 3 183 STOP Type Syntax Description Arguments See also Examples
248. me Description Page COS COS returns the cosine of expression 128 EXP EXP returns the exponential value of expression 137 FRAG FRAC returns the fractional part of expression 141 INT INT returns the integer part of expression 152 LN LN returns the natural logarithm of expression 155 MOD MOD returns the expression_2 modulus of an expression 1 156 NOT NOT performs an NOT operation on corresponding bits of the 164 integer part of the expression OR OR performs an OR operation between corresponding bits of 167 the integer parts of two valid BASIC expressions SGN SGN returns the sign of expression 185 SIN SIN returns the sine of expression 186 SQR SQR returns the square root of expression 186 TAN TAN returns the tangent of expression 189 XOR performs function between corresponding bits 195 of the integer parts of two valid BASIC expressions The table below outlines the constants Refer to the specified pages for details Name Description Page FALSE FALSE returns the numerical value 0 137 OFF OFF returns the numerical value 0 165 ON ON returns the numerical value 1 165 PI PI returns the numerical value 3 1416 169 TRUE TRUE returns the numerical value 1 191 Motion Perfect Commands Functions and Parameters The table below outlines the Motion Perfect commands functions and parameters Refer to the specified pages for details Name Description Page SCOPE SCOPE programs the sy
249. mergency stop IF IN e stop 0 THEN Lu GOTO e stop ENDIF GOTO loop SUBROUTINE AREA Variable initialisation init_vars Init local variables programstatus 111 alarm mcw151 112 alarm servodriver 113 force reset 114 Init local variables Program status Initialising system VR programstatus 0 VR alarm mcw151 0 VR alarm_servodriver 0 VR force_reset 0 246 Programming Examples Appendix C Init I O naming resetting 5 start_machine 6 e_stop 7 pos_torque 16 startup_flag 18 servo_alarm_bit 24 rdy 28 RETURN Serial ports initialisation Lu init serial Port i baud rate 9600 data bits 7 stop bits 2 parity 2 Even parity option 6 Host Link Master Port 2 MCW151 E only baud rate 9600 data bits 7 stop bits 2 parity 2 Even parity option 5 Host Link Slave Host Y HLS NODE 3 HLS MODEL FE Link Slave settings Host Link Master settings HLM TIMEOUT 1000 RETURN Motion stop and initialisation 7 stop_all We store in those variable th BASE 0 VR alarm_mcw151 AXISSTATUS VR alarm servodriver DRV STATUS Stops all programs STOP application Stops all possible moves RAPIDSTOP WA 200 FOR i 0 TO 2 Disable the axis WDOG OFF DATUM 0 Reset th
250. meter The ADDAX_AXIS axis parameter returns the number of the axis to which the base axis is currently linked to by ADDAX This parameter is read only AXIS ADDAX gt gt BASE 0 gt gt ADDAX 2 Command function and parameter description Section 6 3 6 3 20 ADDAX 6 3 21 Type Syntax Description NWARNING Arguments See also Example AIN Type Syntax gt gt PRINT ADDAX AXIS 2 0000 Motion Control Command ADDAX axis The ADDAX command takes the demand position changes from the superim posed axis as specified by the axis argument and adds them to any move ment running on the axis to which the command is issued After the ADDAX command has been issued the link between the two axes remains until broken Use ADDAX 1 to cancel the axis link ADDAX allows an axis to perform the moves specified for 2 axes added together Combina tions of more than two axes can be made by applying ADDAX to the superim posed axis as well ADDAX works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Beware that giving several ADDAX commands in a system can create a dan gerous loop when for instance one axis is linked to another and vice versa This may cause instability in the system axis The axis to be set as a superimposed axis Set the argument to 1 to cancel the link and return to normal operation ADDAX AXIS AXIS Pieces are placed onto a continuo
251. meter Checks Displaying MC Unit Table Points Uploading Data from the MC Unit to the Scope 216 Section 7 5 When the Options Button of the General Options is pressed the Advanced Oscilloscope Configuration Window will be displayed Oscilloscope The scope defaults to recording five points per horizontal time Samples per Divi base grid division This value can be adjusted using the adjacent sion scroll bar To achieve the fastest scope sample rate it is necessary to reduce the number of samples per grid division to 1 and increase the time base scale to its fastest value of 1 ms per grid division The trace might not be plotted completely to the right side of the display depending upon the time base scale and number of samples per grid division Oscilloscope The MC Unit records the required parameter data values in the Table Range MC Unit s Table array prior to uploading these values to the scope By default the lowest scope Table value used is zero If this conflicts with programs running on the MC Unit that require this section of the Table then the lower scope table value can be set The lower scope table value is adjusted by clicking into the text box and entering the new value The upper scope table value will be automatically updated and cannot be changed by the user The upper scope table value depends on the number of channels in use and the number of samples per grid division If an attempt is made to enter a lowe
252. mmand allows the three sections to be added by summing the distance link distance link acceleration and link deceleration for each phase producing the following command MOVELINK 1 1 8 0 8 0 8 1 In the program above the acceleration phase is programmed separately This is done to be able to perform some action at the end of the acceleration phase Command function and parameter description Section 6 3 MOVELINK MOVELINK 6 3 120 MOVEMODIFY Type Syntax Alternative Description Arguments See also 6 3 121 MPOS Type Description Note See also Example 6 3 122 MSPEED Type Description Note See also 6 3 123 MTYPE Type Description Motion Control Command MOVEMODIFY position MM position The MOVEMODIFY command changes the absolute end position of the cur rent single axis linear move MOVE or MOVEABS If there is no current move or the current move is not a linear move then MOVEMODIFY is treated as a MOVEABS command The ENDMOVE parameter will contain the posi tion of the end of the current move in user units MOVEMODIFY works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis position The absolute position to be set as the new end of move AXIS MOVE MOVEABS UNITS Axis Parameter The MPOS parameter is the measured position of the axis in user units as derived from the encoder This parameter can be set using the
253. more times Alternative Any alternative form of a command function or parameter is given Description This field describes the purpose and application of the command function or parameter Precautions Specific precautions related to programming are provided Arguments The name of each argument is given in bold italic font followed by the description of the argument See also In this field the related commands functions and parameters are given Example One or more application examples are given for most commands functions and parameters 102 Command Reference List Section 6 2 6 2 Command Reference List 6 2 1 Motion Control Commands The table below outlines the motion control commands Refer to the specified pages for details 6 2 2 Name Description Page ADD_DAC ADD DAC allows a secondary encoder to be used on a servo 115 axis to achieve dual feed back control ADDAX ADDAX sets a link to a superimposed axis All demand posi 117 tion movements for the superimposed axis will be added to any moves that are currently being executed BASE BASE is used to set the base axis to the axis specified with 121 axis CAM CAM moves an axis according to values of a movement pro 123 file stored in the Table variable array CAMBOX CAMBOX moves an axis according to values of a movement 124 profile stored in the Table variable array The motion is linked to th
254. mputes the radius and the angle of rotation Like the linearly interpolated MOVE command the ACCEL DECEL and SPEED variables associated with the base axis determine the speed profile along the circular move Additional to the standard move profiles the MC Unit also provides a way to define a position profile for the axis to move The CAM command will move an axis according to position values stored in the MC Unit Table array The speed of travelling through the profile is determined by the axis parameters of the axis CAM 0 99 100 20 Position Electronic Gearing control allows you to create direct gearbox link or linked move between two axes The MC Unit supports the following opera tions 1 Electronic gearbox 2 Linked CAM 3 Linked move 4 Adding axes 11 Motion Control Concepts Section 1 3 Electronic Gearbox The MC Unit is able to have a gearbox link from one axis to another as if there is a physical gearbox connecting them This can be done using the CON NECT command in the program In the command the ratio and the axis to link to are specified CONNECT Axis Master Axis Axes Ratio CONNECT command 0 1 1 1 1 0 AXIS 1 OO 2 1 CONNECT 2 0 AXIS 1 gA 1 2 CONNECT 0 5 0 AXIS 1 Next to the standard CAM profiling tool the MC Unit also provides a tool to link the CAM profile to another axis The command to create the link is called CAMBOX The travelli
255. n according to required Servo Driver nr Input settings 16 CN1 40 General purpose 1 17 CN1 41 General purpose 2 18 CN1 42 Forward drive prohibit POT General purpose 3 19 CN1 43 Reverse drive prohibit NOT General purpose 4 20 CN1 44 General purpose 5 21 CN1 45 General purpose 6 22 CN1 46 Registration input General purpose 7 Servo Driver Output Signals The relevant Servo Driver output signals can be monitored in the MC Unit The mapping of the output signals is specified in the following table Input Servo Driver Description nr Signal 24 ALM Alarm output 25 WARN Overload or regenerative overload warning output 50 System Functions Section 3 3 Input Servo Driver Description nr Signal 26 VCMP Speed conformity output 27 TGON Servomotor rotation detection output 28 READY Servo ready output 29 CLIMT Current limit detection output 30 VLIMT Speed limit detection output 31 SVON Servo ON complete Print Registration For both the Servo Driver axis 0 as the encoder input output axis 1 the REG IST command can be used to perform print registration on the axis Print reg istration captures an axis position as soon as a registration event occurs The registration event can be defined to be the moment when a registration input or the Z marker has been detected Check the description of the REGIST command for further details on print registration E Pr
256. n process 3 Program STARTUP process 3 stopped at line 23 Ready 4 100 Log Off Channel 0 MCw151 COM1 IC Application Application prj Desktop Appearance Section 7 4 7 4 1 Control Panel Motion Perfect is equipped with a Control Panel that is used to control pro gram execution and the MC Unit while editing and debugging the programs The Control Panel will appear after the initial opening window on the left of the main Motion Perfect Window Controller status 3 Store Programs in EPROM DrvesEnabed AS 58108 Program OK _JMIMASTERSHELL BSTARTUP v aj amp E zi r Selected Program INIT DRIVER 2 T e F Free Memory 110972 M Motion Stop Controller Status The Store Programs in EPROM button writes the programs from RAM into Flash memory The programs from Flash memory will be updated to RAM during start up The Drives enabled button toggles the state of the enable watchdog relay on the controller which controls the drivers See 6 3 204 WDOG for details The Axis status error button monitors the Motion errors of the MC Unit This button is normally greyed out unless a motion error occurs on the controller When an error does occur you can use this button to clear the error condition This is equivalent to using the DATUM 0 command See 6 3 48 DATUM for details Program List Box The Pr
257. n user units This parameter is read only AXIS UNITS To change the speed to a slower value 5mm from the end of a move start SPEED L REMAIN 5 E 45 WAIT UNTI SPEED 1 WAIT IDLE Program Command 6 RENAME program name new program name The RENAME command changes the name of a program in the MC Unit directory The program names can also be specified without quotes This command is implemented for an offline VT100 terminal Within Motion Perfect users can select the command from the Program menu old program name The current name of the program new program name The new name of the program COPY DEL NEW RENAME car voiture Axis Parameter The REP DIST parameter contains the repeat distance which is the allow able range of movement for an axis before the demand position DPOS and measured position MPOS are corrected REP DIST is defined in user units The exact range is controlled by REP OPTION The REP DIST can have any non zero positive value When the measured position has reached its limit the MC unit will adjust the absolute positions without affecting the move in progress or the servo algo 177 Command function and parameter description Section 6 3 6 3 157 REP_OPTION See also Type Description See also rithm Not that the demand position can be outside the range because the measured position is used to t
258. nciples for a description of servo sys tem operation The direct connection of the MC Unit to the Servo Driver provides a safe inter face without the risk of disconnected or faulty wiring The interface provides the MC Unit good monitoring operation to check the state of the Servo Driver at any given time The Servo Driver Alarms and Warnings can be quickly dis tinguished and appropriate action can be taken If the communications between the MC Unit and Servo Driver fail this is detected by either of the Units The system will be halted into a fail safe state For any details about the MC Unit and Servo Driver error handling and alarm definitions refer to SECTION 8 Troubleshooting In a servo system employing a Servomotor an unforeseen event may cause the Servomotor to run out of control Therefore careful attention must be paid to include sufficient safety measures into the system design To guarantee fail safe operation for any circumstances or occurrences the following precautions must be taken Following Error Limit Setting An important motion control safety precaution of the MC Unit is the following error limit checking When the Servomotor is controlled to follow a specific demanded motion profile this will always produce a following error between the demanded and actual measured position The maximum allowable value for this following error can be set with the FE_LIMIT axis parameter When the following error at one moment exceed
259. nd assigns a hexadecimal number to a variable 114 g AXIS AXIS sets the axis for a command axis parameter read or 120 assignment to a particular axis BASICERROR BASICERROR is used to run a specific routine when an error 122 occurs in a BASIC command CHECKSUM CHECKSUM contains the checksum for the programs in 126 RAM CLEAR CLEAR clears all global variables and the local variables on 126 the current task CLEAR_BIT CLEAR_BIT clears the specified bit of the specified VR vari 126 able COMMSERROR COMMSERROR contains all the communications errors that 127 have occurred since the last time that it was initialised CONTROL CONTROL contains the type of MC Unit in the system 128 ERROR_AXIS ERROR_AXIS contains the number of the axis which caused 136 the motion error FLASHVR FLASHVR is used to store VR or Table variable data into the 139 Flash memory LAST AXIS LAST AXIS contains the number of the last axis processed 153 by the system LOCK LOCK prevents the programs from being viewed or modified 155 MOTION ERROR MOTION ERROR contains an error flag for axis motion 156 errors NIO NIO contains the number of inputs and outputs connected to 164 the system READ BIT READ BIT returns the value of the specified bit in the speci 174 fied VR variable RESET RESET resets all local variables on a task 179 105 Command Reference List 6 2 6 106 Section 6 2
260. nd will be converted into float MAT ing point VR DATA WRITE Writes the specified MC Unit s VR data The data is 78 THREE WORD FOR three word format and will be converted into float MAT ing point VR DATA WRITE Writes the specified MC Unit s VR data in words 79 ONE WORD FOR MAT RESET Will perform a software reset of both the MC Unit 80 and the Servo Driver Data Formats The MC Unit explicit messaging supports two data format types One word format The data is transferred word by word from each PC memory location to each variable in the MC unit and vice versa The value in the MC Unit is always the integer equivalent of the hexadecimal value in the PC no 2 s complement From the floating point data in the MC unit only the integer part will be trans ferred The valid range is 0 65535 72 DeviceNet MCW151 DRT E only Section 4 2 Three word format The data in the PC is represented by three memory elements in total three words The following is the configuration of a BCD position data item 0 0 0 0 Decimal point 0 Indicates 1 i1 3 5 0 1 Indicates 0 1 xt0 x10 10 x10 2 Indicates 0 01 j 2 x107 106 105 x104 3 Indicates 0 001 4 Indicates 0 0001 3 2 1 0 bit 7 S x10 Sign bit s 0 positive 1 negative Example 1 The three word format of value 56143 is
261. nd writes a specific value to the specified Pn type parameter of the Servo Driver For some parameters the system needs to be powered OFF and turned ON again Also the DRV RESET command can be used The Servo Driver Pn parameters are divided into two groups Selection parameters which contain hexadecimal value One example is for instance the 50 input signal selection 1 Value parameters which contain integer values One example is for instance the Pn205 absolute encoder multi turn limit setting Please note that executing a DRV WRITE will temporarily disable the Servo Driver Front Panel display Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Driver when executing this command Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed parameter The number of the Pn parameter to be written Note that the parameter num bers are hexadecimal value The value to write to the parameter READ DRV RESET hexadecimal input Writing the Input signal selection 2 parameter which contains a hexadeci mal selection value gt gt DRV WRITE 50B 8883 Reading the Speed loop integration constant parameter which contains an integer value DRV WRITE 101 4000 Program Command EDIT ine number ED line number The EDIT command starts the built in screen editor allowing a program in the MC Uni
262. nectors With a Phillips screwdriver tighten all screws in the external wiring Are any crimp terminals for external wiring too close together There must be sufficient dis Do a visual check and separate the tance between them terminals as required Are any external cables discon nected Do a visual check and connect or replace cables as required There must be no external abnormalities Required Tools The following tools materials and equipment are required when performing an inspection Phillips screwdriver Voltage tester or digital voltage meter Industrial alcohol and a clean cotton cloth Synchroscope Oscilloscope Thermometer Hydrometer 9 2 Replacing a MC Unit Precautions 1 2 3 The application and communication network are affected when part of a Unit is faulty so a faulty Unit must be repaired or replaced quickly We recommend having a spare Unit available to restore operation as quickly as possible Observe the following precautions when replacing a faulty Unit After replacement make sure that there are no errors with the new Unit When returning a faulty Unit for repair make a detailed record of the problem and return the Unit to your nearest OMRON office or sales repre sentative If there is a faulty contact put some industrial alcohol on a clean cotton cloth and wipe the surface Use the following procedure when it is necessary t
263. ng speed through the profile is not determined by the axis parameters of the axis but by the position of the linked axis This is like connecting two axes through a cam Linked CAM control CAMBOX 0 99 100 20 0 AXIS 1 CAMBOX Axis 1 Position E Master Axis 0 Position Linked Move The MOVELINK command provides a way to link a specified move to a mas ter axis The move is divided into an acceleration deceleration and constant 12 Motion Control Concepts Section 1 3 speed part and they are specified in master link distances This can be partic ularly useful for synchronizing two axes for a fixed period MOVELINK 50 60 10 10 1 AXIS 0 Speed Master Axis 1 Synchronized MOVvELINK Axis 0 Time Adding Axes It is very useful to be able to add all movements of one axis to another One possible application is for instance changing the offset between two axes linked by an electronic gearbox The MC Unit provides this possibility by using the ADDAX command The movements of the linked axis will consists of all movements of the actual axis plus the additional movements of the master axis Speed axis 0 BASE 0 ADDAX 2 FORWARD MOVE 100 AXIS 2 MOVE 60 AXIS 2 Time Speed axis 2 Speed axis 0 Time Time 1 3 4 Other Operations Canceling Moves In normal operation or in case of emergency it can be necessary to cancel the current movement from the bu
264. nits of each axis The speed of movement along the circular arc is set by the SPEED ACCEL and DECEL parameters of the base axis MOVECIRC works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis The MOVECIRC computes the radius and the total angle of rotation from the centre and end point If the endpoint does not lie on the calculated path the move simply ends at the computed end and not the specified end point It is the responsibility of the programmer to ensure that the two points correspond to correct points on a circle For MOVECIRC to be correctly executed the two axes moving in the circular arc must have the same number of encoder pulses per linear axis distance If they do not it is possible to adjust the encoder scales in many cases by adjusting with STEP axis parameters for the axis end 1 The end position for the base axis end 2 The end position for the next axis centre 1 The position around which the base axis is to move 159 Command function and parameter description Section 6 3 6 3 119 MOVELINK 160 See also Example Type Syntax Alternative Description centre_2 The position around which the next axis is to move direction A software switch that determines whether the arc is interpolated in a clock wise or counterclockwise direction Value O or 1 Direction 0 2 Direction 1 1 1 If the two axes involved in the movement form
265. nly Section 4 2 DeviceNet Output The table below specifies the output data allocation of the status of the MC Unit Output Bit Name Function word 1 00 to User defined Contents is set at VR 1 15 2 00 to User defined Contents is set at VR 4 15 3 see 00 User defined Contents is set at VR 5 note 15 4 see 00 User defined Contents is set at VR 6 note 15 Note The output words no 3 and 4 will only be transferred when I O Slave messag ing mode Il is selected 4 2 2 Explicit DeviceNet Messages Explicit DeviceNet messages commands can be sent from the Master to write and read data to and from both the VR and Table memory of the MC Unit This section presents the explicit messages supported by the MC Unit and provides usage examples For further details on using explicit messages on the Master Unit refer to the Master Unit s Operation Manual MC Unit Explicit Message List Explicit message Function Page TABLE DATA READ _ Reads the specified MC Unit s Table data The data 75 THREE WORD FOR converted into three word format MAT VR DATA READ Reads the specified MC Unit s VR data The data is 76 THREE WORD FOR converted into three word format MAT VR DATA READ Reads the specified MC Unit s VR data in words 76 ONE WORD FOR MAT TABLE DATA WRITE Writes the specified MC Unit s Table data The data 77 THREE WORD FOR is three word format a
266. nput Allo 8 Always disabled Switch is controlled by the MC cation Unit Pn50A 3 POT Signal Input Alloca 2 Assigned to CN1 pin 42 valid for tion low input 8 Always disabled Pn50B 0 Signal Input Alloca 3 Assigned to CN1 pin 43 valid for tion low input 8 Always disabled Pn50B 1 RESET Signal Input Allo 8 Always disabled Switch is controlled by the MC cation Unit 50 3 TVSEL Signal Input Allo 8 Always disabled Switch is controlled by the MC cation Unit Pn511 0 l 8 Always disabled Pn511 1 8 Always disabled Pn511 2 8 Always disabled Pn511 3 Print Registra 6 Assigned to pin 46 valid for Print registration on rising tion Signal Input Alloca low input edge tion F Assigned to CN1 pin 46 valid for Print registration on falling high input edge 237 Appendix B Device Protocol MCW151 DRT E only specifications Volume II Release 1 3 mdutcadognumr 7 Productrevision gt Physical conformance Network current consumption 30mAmax at24vDC dal Physical ayer insulation Supported LEDs MAC ID setting Deawmmaco p _ oO E Baudrateseting Supported baud rates 125 kbps 250 kbps and 500 kbps Communications data Predefined Master Slave Group 2 only server connection set Dynamic connection support No UCMM Explicit message fragmentation Yes support Object Mounting Identity O
267. ns RD RD for port 2 Pin 3 Selection OFF Termination disabled default ON Termination enabled Pin 4 is not used Switch SW3 Pin 1 through 3 enable the termination resistor for the encoder channel A B and Z Pin 3 Pin 2 Pin 1 Selection channel Z channel B channel A OFF Termination disabled for channel default ON Termination enabled Pin 4 is not used 27 Installation Section 2 2 2 2 Installation 2 2 1 Installation Conditions Follow the procedure below to install multiple Servo Drivers side by side in a control panel EON Fan yo I Fan 50 mm min o o o E o Bo ol EZ S E lake E E E Bo 1 Bo 00 RS 00 LB Do Le So LI 69 484 30 10 mm min 50 mm min
268. ntains the demand position generated by the move 132 commands ENCODER ENCODER contains a raw copy of the encoder hardware reg 136 ister ENDMOVE ENDMOVE holds the position of the end of the current move 136 ERRORMASK ERRORMASK contains the mask value which determines if a 137 Motion Error occurs depending on the axis status FAST JOG FAST JOG contains the input number to be used as the fast 137 jog input FE FE contains the following error 138 FE LIMIT FE LIMIT contains the maximum allowable following error 138 FE RANGE FE RANGE contains the following error warning range limit 139 FHOLD IN FHOLD contains the input number to be used as the feed 137 hold input FHSPEED FHSPEED contains the feedhold speed 139 FS LIMIT FS LIMIT contains the absolute position of the forward soft 142 ware limit FWD IN FWD contains the input number to be used as a forward 142 limit input FWD JOG FWD JOG contains the input number to be used as a jog for 142 ward input GAIN GAIN contains the integral control gain 150 JOGSPEED JOGSPEED sets the jog speed 153 LINK AXIS LINK AXIS contains the axis number of the link axis during 154 any linked move MARK MARK contains TRUE when a registration event has 155 occurred MERGE MERGE is a software switch that can be used to enable or 156 disable the merging of consecutive moves MPOS MPOS is the position of the axis as measured by the encoder 163 MSPEED MSPEED re
269. ntegral out put contribution is calculated by multiplying the sums of the following errors with the value of the GAIN parameter The default value is zero Adding integral gain to a servo system reduces positioning error when at rest or moving steadily It can produce or increase overshooting and oscillation and is therefore only suitable for systems working on constant speed and with slow accelerations See section 1 4 1 Servo System Principles for more details In order to avoid any instability the servo gains should be changed only when the SERVO is OFF D GAIN OV GAIN P GAIN VFF GAIN IF THEN ELSE ENDIF Type Syntax Description Precautions Arguments Examples Structural Command IF condition THEN commands ELSE commands ENDIF IF condition THEN commands The IF THEN ELSE ENDIF structure controls the flow of the program based on the results of the condition If the condition is TRUE the commands follow ing THEN up to ELSE or ENDIF if not included will be executed If the condi tion is FALSE the commands following ELSE will be executed or the program will resume at the line after ENDIF in case no ELSE is included The ENDIF is used to mark the end of the conditional block IF THEN ELSE ENDIF sequences can be nested without limit For a multi line IF THEN construction there must not be any statement after THEN A single line construction must not use ENDIF
270. o force the program to be saved on the computer hard disk Motion Perfect saves the file automatically when the Editor Window is closed or the program is compiled This will print the code of the program Windows style cut copy paste operation can be performed using the mouse and or the keyboard Use the following procedure to cut or copy text Select the text and cut or copy it to the clipboard Move the cursor to the insert point and paste the text on the clipboard A list of all labels in the program in the current Editor Window will be dis played To jump to a specific label click the desired label in the display to enter it in the text box at the bottom of the window and press the OK button The cursor will move to the specified label in the program Alternatively a specific line number can be selected by entering the value of the line number text box at the bottom of the window and the pressing the OK button The program in the current Editor Window can be searched for a specific text string One can specify the search to be case sensitive and the search direc tion The user can continue the program while the Find Window is displayed by simply clicking back to the Editor Window The Find Window will remain on the display until the Cancel Button is clicked Motion Perfect Tools Replacing Text Run Step and Stop Add breakpoint Compiling Debugging Stepping Through a Program Breakpoints Section 7 5 Text f
271. o replace an MC Unit 1 Make a note of the switch settings of the MC Unit to be replaced 2 Use Motion Perfect to check the project of the Unit and to make a local copy saved on the Personal Computer Turn OFF the system power supply Replace the MC Unit and reconnect the wiring as before Set the switch settings for the MC Unit Turn ON the system power supply Clear all the programs in the MC Unit Download all of the programs to the MC Unit save the programs in flash memory and set the correct program to run at power up 907 SLOT Ox BS 235 Servo Driver Parameter List Appendix A The following Servo Driver parameter settings are required for operation with the MC Unit Refer to the OMNUC W series user s manual 1531 for details Param Parameter Name Required Explanation Remark eter No 000 1 Control Mode Selection 0 Speed Control 9 Torque Speed Control Pn002 0 Torque command input 0 Not used during speed control 1 Use TREF as analog torque limit input 002 1 Speed command input 0 Not used during torque control 1 Use S REF as analog speed limit input Pn003 0 Monitor 1 2 Torque Reference Monitor 003 1 Monitor 2 0 Motor Speed Monitor Pn50A 0 Input Signal Allocation 1 User defined Mode Pn50A 1 RUN Signal Input Alloca 8 Always disabled Switch is controlled by the MC tion Unit Pn50A 2 MING Signal I
272. of the actual error The table below shows a list of the different types of BASIC run time errors which are detected Error No Message Displayed Error No Message Displayed Command not recognized 42 UNTIL without previous REPEAT 2 Invalid transfer type 43 Variable expected 3 Error programming Flash 44 TO expected after FOR 4 Operand expected 45 Too many nested FOR NEXT 5 Assignment expected 46 NEXT without FOR 6 QUOTES expected 47 UNTIL IDLE expected after WAIT 7 Stack overflow 48 GOTO GOSUB expected 8 Too many named variables 49 Too many nested GOSUB 9 Divide by zero 50 RETURN without GOSUB 10 Extra characters at end of line 51 LABEL must be at start of line 11 expected in PRINT 52 Cannot nest one line IF commands 12 Cannot modify a special program 53 Label not found 13 THEN expected in IF ELSEIF 54 LINE NUMBER cannot have decimal point 223 Error Handling Section 8 2 Error No Message Displayed Error No Message Displayed 14 Error erasing Flash 58 Program already exists 15 Start of expression expected 59 Process already selected 16 expected 60 Duplicate axes not permitted 17 expected 61 PLC type is invalid 18 Command line broken by ESC 62 Evaluation error 19 Parameter out of range 63 oe keyword not available on this control er 20 No process availa
273. of the follow ing settings in the Servo Driver Param Parameter Name Required Explanation eter No Setting 000 1 Control Mode 0 Speed Control Selection 9 Torque Speed Control The following BASIC parameters need to be considered to set up the applica tion in the MC Unit Parameter Description WDOG The WDOG parameter is the software switch used to control the Driver s Servo ON input which enables the driver SERVO The SERVO parameter determines whether the base axis runs under position control ON or open loop OFF When in open loop the output speed reference voltage is determined by the 5 REF parameter S REF The S REF parameter contains the speed reference value which is applied to the Servo Driver when the base axis is in open loop P GAIN The P GAIN parameter contains the proportional gain for the axis GAIN The I GAIN parameter contains the integral gain for the axis D GAIN The D GAIN parameter contains the derivative gain for the axis VFF GAIN The VFF GAIN parameter contains the speed feed forward gain for the axis OV GAIN The OV GAIN parameter contains the output speed gain for the axis 47 System Functions Section 3 3 Speed Reference The Servomotor rotational speed is proportional to the speed reference value resulting from either servo control or open loop S REF parameter The speed reference characteristics are given in
274. ogram List Box in the middle of the Control Panel will show a list of the programs in the project There are two buttons next to each program name to control the execution of this program The Run Stop button red shows that the program is stopped and can be clicked to start program execution When a program is being executed the program name in the Program List Box will appear in italics the MC Unit task number on which the program is running will appear alongside the program name and the color of the Run Stop button will change into green To stop the program click the Run Stop button again to stop the program A program cannot be edited while it is being executed The Step button yellow can be used to step through the program The Run Stop Button will turn yellow and one line of the program will be executed each time the Run Stop button is clicked When the Step button is clicked again the program will be run normally When a program is being stepped a green bar will appear in the Editor Win dow highlighting the line of the program about to be executed 202 Desktop Appearance Shortcut Buttons Selected Program Box Free Memory Motion Stop Section 7 4 Programs are compiled before execution If there are any compilation errors in the program a window will appear briefly describing the error and giving the number of the line containing the error You can correct the error and repeat the process Underneath the Prog
275. oint control 8 positioning continuous path 10 electronic gearing 11 point to point 8 power connector 31 precautions general xii Motion Perfect 217 safety xii servo system 39 using parameter unit 45 wiring 40 precedence 89 print registration delay times 36 description programming example Host Link Master 252 programming examples controlling I O 250 coordinating two moving objects 251 coordinating with mark detection 252 high speed profiles 251 master shell program 245 product detection 250 rotary table 250 Servo Driver parameter setting program 248 synchronising cutter 251 proportional gain 16 protocol general purpose 67 Host Link Master 60 Host Link Slave 65 PTP control See point to point control Q R registration See print registration relative moves 8 remote I O communications 68 259 Index S troubleshooting BASIC programs 207 unit conversion factor 7 8 S curve factor 186 unit settings 24 semi closed loop system 14 sequencing 90 V Z serial port connectors 31 variables servo axis 44 global 87 192 local 87 table 87 188 serial communication protocols 60 Servo Driver alarm 225 enable switch 195 virtual axis 45 limit switches 51 VR variables See variables global parameter access 57 required settings 46 software reset 57 V T100 Emulation 205 wiring DeviceNet connector 36 iod 46 92 servo period 46 9
276. oject Ch Change project for comparison mange Erase controller programs and create a new project Resolve project and controller mismatches New The window enables the user to select the required option to resolve the dis crepancy The options available include Function Purpose Save Save controller programs to new project Create a new project on the computer and save the programs to this project Load Load a different project Select a new project on the computer and load this project into the controller Change Change project for comparison Select a different project on the computer with which to perform the programs consistency check New Erase controller programs and create a new project Create a new empty project on the computer and delete all programs on the controller Resolve Resolve project and controller mismatches Continue to check the project enabling the user to resolve each individual program inconsistency by either saving the project version into the con troller or loading the controller version into the project Cancel Run Motion Perfect without connection to the controller You can force Motion Perfect to verify that the two copies are identical at any time by selecting Check project from the File Menu Desktop Appearance Section 7 4 7 3 2 Creating a Project for the First Time New Project Window 1 2 3 If this is the first time the MC Uni
277. ollowing errors are displayed at the LED indicators at the top of the MC MCW151 DRT E Error Remedy Normal The MC Unit is defective Replace the MC Unit A motion error has occurred The Servo Driver has been disabled Check what caused the error correct the problem and restart application RUN STS ON OFF Flashing Flashing Flashing An error occurred in the com munication with the Servo Driver Check what caused the error correct the problem and cycle the power DeviceNet Indicators MCW151 DRT E only The following table lists probable causes and remedies for errors that occur in the Slave Unit Display Indicator Network status Probable cause and remedy status MS NS ON ON Remote or message communi Remote I O communications and or message communications green green cation in progress normal status are active on the Network ON OFF Checking for node address dupli Checking whether the Unit s node address has been set on green cation another node ON Flashing Waiting for connection The Unit is waiting for a connection from the Master Unit green green ON red OFF Watchdog timer error A watchdog timer error occurred in the Unit Replace the Unit Flashing OFF Incorrect switch settings A mistake has been made in the switch settings Check the red settings and restart
278. om the perspective of the Master Allocating Input and The MC Unit s input and output areas are allocated to the Unit as a DeviceNet Output Areas to the Slave in the Master s I O memory Master Fixed Allocation With fixed allocation words in the CPU Unit are allocated in the order of node numbers starting from node 00 The words are divided into an output area and an input area The specific words that are allocated depend on the model of PC being used Each node address is allocated one input and one output word If a Slave requires more than one input or one output word then it is assigned more than one node address If a Slave requires less than one word it simply uses the rightmost bits in the word allocated to it The MC Unit will occupy the number of words number of node numbers set for the input and output areas using the external DIP switch pin 7 Pin7 Mode Description OFF Mode default Input 2 words Output 2 words ON Mode Il Input 4 words Output 4 words For example when the MC Unit has been selected to Mode II and the node number is set to 5 the input area will occupy the words for nodes 5 through 8 and the output area will also occupy the words for nodes 5 through 8 Free Allocation A Configurator can be used to allocate a total of 4 blocks blocks 1 and 2 in the output area and input blocks 1 and 2 in the input area in any order Slaves and blocks can be allocated in any order T
279. on end Any valid BASIC expression increment Any valid BASIC expression REPEAT WHILE Command function and parameter description Section 6 3 Examples 6 3 80 FORWARD Type Syntax Alternative Description Precautions See also Example 6 3 81 FRAC Type Syntax Description Arguments Example 6 3 82 FREE Type Example 1 The following loop turns ON outputs 8 to 13 FOR opnum 8 TO 13 OP opnum ON NEXT opnum Example 2 The STEP increment can be positive or negative loop FOR dist 5 TO 5 STEP 0 25 MOVEABS dist GOSUB pick_up NEXT dist Example 3 FOR NEXT statements can be nested up to 8 levels deep provided the inner FOR and NEXT commands are both within the outer FOR NEXT loop loopl FOR 11 1 TO 8 loop2 FOR 12 1 TO 6 MOVEABS 11 100 12 100 GOSUB 1000 NEXT 12 NEXT 11 Motion Control Command FORWARD FO The FORWARD command moves an axis continuously forward at the speed set in the SPEED axis parameter The acceleration rate is defined by the ACCEL axis parameter FORWARD works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis The forward motion can be stopped by executing the CANCEL or RAPID STOP command or by reaching the forward limit AXIS CANCEL RAPIDSTOP REVERSE UNITS start FORWARD WAIT UNTIL 0 Wait for stop signal CANCEL Mathematical Function FRAC expression
280. on Error When during start up or operation the MC Unit detects an error in the commu nication interface to the Servo Driver the AXISSTATUS bit 2 is set and a motion error is generated if ERRORMASK bit 2 is set When the interface to the Servo Driver is lost the following data and opera tions are invalid and therefore should not be used Servo Driver analog monitor signals AINO AIN1 AIN2 and AIN3 Servo Driver digital inputs inputs 16 to 31 Commands READ and WRITE will give BASIC error Commands RESET CLEAR Although the MC Unit will attempt to re establish the communication after detecting the error during operation it is strongly advisable to put the system in a fail safe halt When the communication is re established the user has the possibility to exe cute the DRV RESET or DRV CLEAR command to clear the error However if the communication is still down this will hang the program task Run time BASIC Errors Run time BASIC errors will stop the program or will go into the error routine as defined by BASICERROR The following parameters are relevant when checking a run time error Parameter Description BASICERROR The BASICERROR command traps the error and allows the control of the program to go to an error handling routine ERROR LINE The ERROR LINE parameter which shows which line in the program has encountered the error RUN ERROR The RUN ERROR shows the identity number
281. on is smaller than below RS_LIMIT See also AXIS FS_LIMIT UNITS 6 3 164 RUN Type Program Command Syntax RUN program name task number Description The RUN command executes the program in the MC Unit as specified with program name RUN with the program name specification will run the current selected program The program name can also be specified without quotes The task number specifies the task number on which the program will be run If the task number is omitted the program will run on the highest available task RUN can be included in a program to run another program Precautions Execution continues until one of the following occurs There are no more lines to execute HALT is typed at the command line to stop all programs STOP is typed at the command line to stop a single program Arun time error is encountered Arguments program name Any valid program name task number Any valid task number Range 1 3 See also HALT STOP Examples Example 1 The following example executes the currently selected program gt gt SELECT PROGRAM PROGRAM selected gt gt RUN Example 2 The following example executes the program named sausage RUN sausage Example 3 The following example executes the program named sausage on task 3 RUN sausage 3 6 3 165 RUN_ERROR Type Task Parameter Description The RUN_ERROR parameter contains the number of the last BASIC run time er
282. ooth High speed Profiles It is often desirable to generate a smooth profiled move for the maximum operational speed in high speed machines An optimal profile for this is a sine squared y mx n sin x In this example we work in radians The axis no 1 is the master axis start GOSUB filltable BASE 0 loop CAMBOX 0 36 1 100 1 WAIT IDLE WA 1000 GOTO loop filltable num p 37 scale 2000 FOR p 0 TO num p TABLE p SIN PI 2 p num p PI 2 p num p scale NEXT p RETURN Example 7 Coordinating Two Moving Objects Two conveyors run in parallel conveyor A axis 0 carries a product that must be transferred into boxes evenly spaced on conveyor B external encoder on axis 1 The transfer operation requires the products to be aligned at the end of the conveyor 251 Programming Examples Appendix C A registration process checks the position of the product on the conveyor and calculates the amount that con veyor A must be advanced or retarded in order to align with conveyor B Input 1 indicates that the registration process has been completed and the correction amount loaded serially into VR 1 setup BASE 0 CONNECT 1 1 ADDAX 2 BASE 2 loop IF IN 1 ON THEN WAIT UNTIL IN 1 OFF WAIT UNTIL IN 1 ON correction VR 1 MOVE correction WAIT IDLE GOSUB do transfer GOTO loop do transfer OP 15 WA 500 OP 15 OFF RETURN Example 8 Coordinatin
283. or male CSB 7 J MC Unit CSA 8 Signal gt Power D sub 9 pin Terminal Block Supply m connector male 5V 1 1 Connections Using RS 422A 485 Port 2 MCW151 E only Programming Terminal PT MC Unit Programmable Terminal PT Signal Pin Signal RD 1 p SDA RS 422A RD 2 SDB RS 422A Interface FG 3 Interface SD 4 RDA SD 5 c RDB COMBICON Terminal Block Plug Note MC Unit Communication Mode Host Link Slave PC Serial Communication Board MC Unit PC Signal Pin Pin Signal RD 1 1 SDA RS 422A RD 2 2 SDB Rs 422A Interface FG 3 Shell FG Interface SD 4 6 RDA SD 5 d 8 RDB COMBICON D sub 9 pin Plug connector male Note MC Unit Communication Mode Host Link Master 34 Wiring Section 2 3 1 N 4 wire Connections Using RS 422A 485 Port 2 MCW151 E only MC Unit DIP switch SW2 Signal Pin Pint OFF Pin2 OFF Pin3 OFF RD 1 RS 422A 2 MC Unit Interface FG 3 Pin Signal SD 4 1 IRD SD 5 2 RD RS 422A 4 t COMBICON DIP switch Sw2 a gt 3 IFG epee Plug 1 OFF 2 1 4 SD Pin 3 ON 4 5 SD COMBICON Plug MC Unit Pin Signal 1 RD COMBICON DIP switch SW2 2 RD Plug Pini OFF Boies Pin 2 OFF 3 FG nterface Pin3 ON 4 SD 5 SD Note MC Unit Communication Modes Host Link Master and Slave 1
284. ound in an Editor Window can be replaced with a specified text string Enter both strings in the appropriate fields The following buttons are available in the Find and Replace Window Button Function FindNext simple search will be made for the specified string Replace specified search string will be replaced with a replace string ReplaceAll All occurrences of the search string will be replaced from the current cursor position to the beginning or end of the program depending upon the search direction These operations are used to run the program run a single line in the pro gram and stop the program These operations can also be found on the con trol panel same buttons In the Editor Window breakpoints can be added to enable easy debugging Debugging is explained in the Debugging part of this section below This operation forces the program to be compiled The Motion Perfect debugger allows you to run a program directly from the Editor Window in a special trace mode executing one line at a time known as stepping whilst viewing the line in the window It is also possible to set break points in the program and run it at normal speed until it reached the break point Any open Editor Windows will automatically enter the Debug Mode Read Only when programs are running on the Motion Controller Hence break points are set in the Editor Window and the code viewed in the same window in debug mode
285. outputs a series of characters to a serial port Refer to SECTION 6 BASIC Motion Control Programming Language for fur ther details on the commands Consider a MCW151 E connected to a general purpose device using port 2 RS 422A The following problem will receive a series of data elements and write it to VR variables Set up General purpose protocol for port 2 SETCOM 9600 7 2 2 2 0 Receive input FOR i 0 to 99 INPUT42 VR i NEXT i 67 DeviceNet MCWISI DRT E only Section 4 2 4 2 DeviceNet MCW151 DRT E only Accessing MC Unit memory through remote I O areas Accessing MC Unit memory with Explicit Message Communications The MCW151 DRT E is connected to the DeviceNet network as a DeviceNet Slave This allows data from any area in the MC Unit to be read or written from the Master Through the DeviceNet the MC Unit memory can be accessed using one of the following two methods Remote I O communication enables automatic exchange of I O data between the MC Unit and a PC with DeviceNet Master Unit without special program ming in the PC For the MC Unit the input and output areas can each contain up to 4 words Once the MC Unit s memory input and output areas have been set the MC Unit memory can be read and written The input area is regularly read by the Master and the output is regularly written from the Master This process main tains consistency between the Slave s input and output areas and the
286. ports the following operations Linear interpolation Circular interpolation CAM control In applications it can be required for a set of motors to perform a move opera tion from one position to another in a straight line Linearly interpolated moves can take place among several axes The commands MOVE and MOVEABS are also used for the linear interpolation In this case the commands will have multiple arguments to specify the relative or absolute move for each axis Consider the following three axis move in a 3 dimensional plane MOVE 50 50 50 Axis 2 Speed Time Axis 0 Motion Control Concepts Circular Interpolation CAM Control 1 3 3 EG Control Section 1 3 The speed profile of the motion along the path is given in the diagram The three parameters SPEED ACCEL and DECEL which determine the multi axis movement are taken from the corresponding parameters of the base axis The MOVE command computes the various components of speed demand per axis It may be required that a tool travels from the starting point to the end point in an arc of acircle In this instance the motion of two axes is related via a circu lar interpolated move using the MOVECIRC command Consider the following diagram 100 0 50 0 0 Axis 1 50 50 50 Axis 0 The centre point and desired end point of the trajectory relative to the start point and the direction of movement are specified The MOVECIRC command co
287. presents the change in the measured position 163 the last servo period MTYPE MTYPE contains the type of move currently being executed 163 NTYPE NTYPE contains the type of the move in the Next Move buffer 165 OFFPOS OFFPOS contains an offset that will be applied to the demand 165 position without affecting the move in any other way OPEN WIN OPEN WIN defines the beginning of the window in whicha 167 registration mark is expected OUTLIMIT OUTLIMIT contains the limit that restricts the speed reference 168 output from the MC Unit OV GAIN OV GAIN contains the output velocity control gain 168 P GAIN P GAIN contains the proportional control gain 169 PP STEP PP STEP contains an integer value that scales the incoming 169 raw encoder count 108 Command Reference List Section 6 2 Name Description Page REG_POS REG POS contains the position at which a registration event 174 occurred REMAIN REMAIN is the distance remaining to the end of the current 177 move REP DIST REP DIST contains sets the repeat distance 177 REP OPTION REP OPTION controls the application of the REP DIST axis 178 parameter REV IN REV IN contains the input number to be used as a reverse 179 limit input REV JOG REV JOG contains the input number to be used as a jog 179 reverse input RS LIMIT RS LIMIT contains the absolute position of the reverse soft 180 ware limit
288. priorities when power is turned ON If required the computer can be left connected as an operator interface or may be removed and the programs run stand alone Programs are set in Motion Perfect to run automatically at start up using the Set Power Up Mode selection under the Program Menu This operation Section 5 6 Task Operation Sequence sets which program to run automatically and at which priority This can also be accomplished by the RUNTYPE BASIC command The current status can be seen using the DIR command 5 6 Task Operation Sequence Motion Sequence Program task execution Note The allocation of the system tasks and the program tasks with the different priorities over the available processing time is explained in the following sec tion The MC Unit generates a fixed interrupt every 250 us which result in 4 routines to be executed each millisecond Each interrupt will start the next routine Depending on the setting of the Servo Period using the SERVO_PERIOD parameter the motion sequence is executed every 500 us or every 1000 us Routine 1 Routine 2 Routine 3 Routine 4 250 250 250 250 Time us Servo Period 500 us Servo Period 1000 us gt The tasks simplified of each individual routine is shown in the next table Routine 1 Routine 2 Motion Sequence Low level serial communication Program task execution low pri Program task execution high ority prio
289. put is ON 0 Input is OFF 02 Input 2 1 Input is ON 0 Input is OFF 03 Input 3 1 Input is ON 0 Input is OFF 04 Input 4 1 Input is ON 0 Input is OFF 05 Input 5 1 Input is ON 0 Input is OFF 06 Input 6 1 Input is ON 0 Input is OFF 07 Input 7 1 Input is ON 0 Input is OFF 08 Output 8 1 Output is ON 0 Output is OFF 09 Output 9 1 Output is ON 0 Output is OFF 10 Output 10 1 Output is ON 0 Output is OFF 11 Output 11 1 Output is ON 0 Output is OFF 12 Output 12 1 Output is ON 0 Output is OFF 13 Output 13 1 Output is ON 0 Output is OFF 14to Reserved 15 2 Servo Driver I O Mapping 00 Input CN1 40 1 Input is ON 0 Input is OFF 01 Input CN1 41 1 Input is ON 0 Input is OFF 02 Input CN1 42 1 Input is ON 0 Input is OFF 03 Input CN1 43 1 Input is ON 0 Input is OFF 04 Input CN1 44 1 Input is ON 0 Input is OFF 05 Input CN1 45 1 Input is ON 0 Input is OFF 06 Input CN1 46 1 Input is ON 0 Input is OFF 07 Reserved 08 ALM 1 Servo Driver alarm occurred 0 No Servo Driver alarm 09 WARN 1 Servo Driver warning occurred 0 No Servo Driver warning 10 VCMP 1 Speed match 0 No speed match 11 TGON 1 Servomotor rotating 0 Servomotor not rotating 12 READY 1 Servo ready 0 Servo not ready 13 CLIMT 1 Torque limit 0 No torque limit 14 VLIMT 1 Speed limit 0 No speed limit 15 SVON 1 Servo ON complete 0 Servo ON not complete 71 DeviceNet MCWISI DRT E o
290. r Than gt EEA E NON es 113 6 3 11 Is Greater Than or Equal To gt 113 6 3 12 Hexadecimal input 8 114 6 3 13 Statement separator 2 114 6 3 14 Comment field 114 653519 ABS ies Saas haat pen 114 6 3 16 ACCEL ee See ee es 115 673 17 Ses kg Pe cet ae DIU UR Ne ae Sees 115 6 3 18 ADD DAC Onde Meas 115 623219 ADDAX AXIS eee petet boc dcm 116 6 3 20 ADDAX oo eoe oc Rete E NO URDU NEUE ACRI 117 6 3221 AIN e eoe 117 623 22 a BAR bare RES 118 6 3 23 ASIN 119 6 324 ATAN 119 6 3 25 ATAN NC E PEE uS 119 653326 ALY PE tene ane on ERR 119 6327 AUTORUN ies cour etus Fu ye ig EORR NUS 120 6 53 28 AXIS oo Hau 120 6 3 29 AXISSTATUS 121 623 301 BASE ee tate er eh 121 97 98 6 3 31 6 3 32 6 3 33 6 3 34 6 3 35 6 3 36 6 3 37 6 3 38 6 3 39 6 3 40 6 3 41 6 3 42 6 3 43 6 3 44 6 3 45 6 3 46 6 3 47 6 3 48 6 3 49 6 3 50 6 3 51 6 3 52 6 3 53 6 3 54
291. r as a reference pulse within each revolution By properly decoding and counting these encoder signals the direction of motion speed and relative position can be determined For the MC Unit encoder input the pulse ratio is 4 Every encoder edge pulse edge for either A or B phase is one internal count Forward rotation CW Reverse rotation CCW Phase A Phase 012 45567 765 4 2 10 Counts x4 nnnmmmnn The signals A B Z appear physically as A and B and B 2 Z These appear as differential signals on twisted pair wire inputs ensuring that common modes are rejected and that the noise level is kept to a mini mum When using encoders by other makers check carefully the encoder specifica tion for phase advancement If the definition differs from the ones given above reverse the B phase wiring between the MC Unit and the Servo Driver In most case this should resolve the problem 17 Control System Configuration Section 1 4 Encoder output For encoder output the pulse ratio is 64 For every 16 internal counts one encoder edge for one of the two phases will be produced Phase A Phase Phase 4 16 32 48 64 80 96 Internal Counts TLL The Z phase signal has the following specification The Z marker has a period of 4096 generated edges The puls
292. r signals definition 17 input 17 output 18 error processing 94 errors BASIC error code list 223 BASIC run time errors 223 Host Link Master 224 indicators 220 motion error 221 Servo Driver communication error 223 explicit messages error response 74 FINS command 73 one word format 72 programming example 81 RESET 80 TABLE DATA READ THREE WORD FORMAT 75 TABLE DATA WRITE THREE WORD FORMAT 77 three word format 73 VR DATA READ ONE WORD FORMAT 76 VR DATA READ THREE WORD FORMAT 76 VR DATA WRITE ONE WORD FORMAT 79 VR DATA WRITE THREE WORD FORMAT 78 F features 2 feedhold input 139 speed 139 floating point comparison 89 definition 88 following error limit 138 limit setting 39 range 139 functional specifications 19 G I gain derivative 16 integral 16 output speed 16 proportional 16 speed feedforward 16 general specifications 19 general purpose protocol commands 67 programming example 67 global variables 87 Host Link Master commands 60 end codes 62 precautions 63 programming examples 64 252 set up 62 status 63 timeout 63 Host Link Slave commands 65 end codes 66 programming example 67 set up 66 IO mapping 50 print registration I O connector 30 I O specifications 36 indicators 24 installation conditions 28 method 28 integer definition 88 integral gain 16 interpolation circular 11 linear 10 J L jogging
293. r table value which causes the upper table value to exceed the maximum permitted value on the MC Unit then the original value will be used by the scope It is possible to plot MC Unit Table ranges directly with the Oscilloscope Select Table in the parameter box of the Axis Specific Controls to display the Table elements Table Graph The scope defaults to recording fifty points per horizontal time Points per division base grid division This value can be adjusted using the adjacent scroll bar Table Graph The Table Limit Text Boxes are used to enter the Table ranges Table Range for the four possible channels of the Oscilloscope There is a maximum Table size on the MC Unit and it is not possible to enter Table channel values beyond this value It is also not possible to enter a lower scope table value or increase the samples per grid division to a value which causes the upper scope Table value to exceed the MC Unit maximum Table value If the number of samples per grid division is increased and subsequently the time base scale is set to a faster value causing an unobtainable resolution the scope will automatically reset the number of samples per grid division If the scope is configured for both Table and motion parameters then the number of points plotted across the display is determined by the time base and samples per division If the number of points to be plotted for the table parameter is great
294. r the program spec ified by program name The program name can also be specified without quotes If the program name is omitted the current selected program will be listed This command is implemented for an offline VT100 terminal Within Motion Perfect users can use the Program Editor program name The program to be printed SELECT Mathematical Function LN expression The LN function returns the natural logarithm of the expression The input expression value must be greater than zero expression Any valid BASIC expression PRINT LN 10 2 3026 System Command LOCK code UNLOCK code The LOCK command prevents the program from being viewed modified or deleted by personnel unaware of the security code The UNLOCK command allows the locked state to be unlocked The code number can be any integer and is held in encoded form LOCK is always an immediate command and can be issued only when the system is UNLOCKED The security code must be remembered it will be required to unlock the sys tem Without the security code the system can not be recovered code Any valid integer with maximum 7 digits gt gt LOCK 561234 The programs cannot be modified or seen gt gt UNLOCK 561234 The system is now unlocked Axis Parameter The MARK parameter contains value TRUE when a primary registration event has occurred to indicate that the value in the REG_POS axis parameter is valid MARK is set to FALSE when the
295. r to the Master s manual for details on registering the values 232 SECTION 9 Maintenance and Inspection This section explains the maintenance and inspection procedures that must be followed to keep the MC Unit operating in optimum condition It also includes proper procedures when replacing an MC Unit 9 1 Routine 234 9 2 Replacinga MC Unit 235 233 Routine Inspections Section 9 1 9 1 Inspection Points Routine Inspections In order for your MC Unit to continue operating at optimum condition periodic inspections are necessary The main components of the Unit are semicon ductors and have a long service life but depending on the operating environ ment there may be more or less deterioration of these and other parts A standard inspection schedule is once every six months to one year More fre quent inspections may be advisable depending on the operating environment Maintain the inspection schedule once it has been set Check to be sure that the power supply ambient temperature humidity and other specifications are within the specifications Be sure that there are no loose screws and that all battery and cable connections are secure Clean any dust or dirt that has accumulated Are the cable connectors properly inserted and locked Are there any loose screws in the external wirin
296. ram List Box you can find four shortcut buttons which are used for from left to right Controller configuration Full controller directory Create new program Halt all programs The Select Program box displays the current selected program and the avail able buttons which can be performed on the selected program These five available functions are from left to right Run Step Stop Edit Set power up mode Refer to 5 5 3 Program Execution and 6 3 166 RUNTYPE for details on set ting the power up mode The Free Memory field indicates the remaining free memory available on the controller The Motion Stop button stops all programs and cancels all moves in case of emergency 7 4 2 Editing and Running Simple Programs Example 1 1 2 3 Note This section provides a couple of typical examples of a simple programming session using Motion Perfect The following procedure assumes that the MC Unit is already on line with Motion Perfect and a new project has been cre ated 1 Create a new program in the new project by selecting New from the Pro gram Menu or by clicking on the Control Panel s shortcut button Create New Program 2 Name your program OP1 and click the OK Button 3 Using the editor enter a simple program to flash output 8 Type the pro gram in lower case When you press the Return Key Motion Perfect will update the program on the computer and in the MC Unit and will replace the BASIC keywor
297. re to set up the Host Link Master pro tocol by using the SETCOM command 2 The Host Link Master commands are required to be executed from one program task only to avoid any multi task timing problems command The selection of the Host Link operation to perform HLM MREAD This performs the Host Link PC MODEL READ MM or value 0 command to read the CPU Unit model code The result is written to the MC Unit variable specified by mc area and mc offset HLM TEST This performs the Host Link TEST TS command to or value 1 check correct communication by sending string MCW151 TEST STRING and checking the echoed string Check the HLM STATUS parameter for the result HLM ABORT This performs the Host Link ABORT XZ command to or value 2 abort the Host Link command that is currently being processed The ABORT command does not receive a response HLM INIT This performs the Host Link INITIALIZE command or value 3 to initialize the transmission control procedure of all Slave Units HLM STWR This performs the Host Link STATUS WRITE SC or value 4 command to change the operating mode of the CPU Unit Command function and parameter description Section 6 3 See also Examples port The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node for HLM_MREAD HLM_TEST HLM_ABORT and HLM_STWR The Slave node number to send the Host Link command to Range 0 31 mode for HLM_STWR The specified
298. reo DP Oe ie 6 3 115 MOTION 6 3 T16 MOVE EIE IURIS I REP RE equ 63 117 MOVEABS etn pe Ea ERR DER 6 3 118 RE bene bee 63 119 MOV ELINK eR Rete ete e teres 6 3 120 6 3 I2T MPOS sr eR ERL RU bI UE ERE 6 3 122 Se URE SER eS ENRE 6 3 123 ok a Be Ewe 623 124 NEW ee hei E pres 6 3 125 NIO RS 6 3 126 NOT 1t sioe obtu Te ete eee Beas rS C IER EIS 623 127 ec tn ER AD RSEN PIE REPERTA 6 3 128 ORF ia i cse ope P eS P ede idet S 6232129 OFEPOS E AE 6 3 130 ox ce obere RR Den pene ere 6 9 I13 T ON ettet tied oi eet e eue es 6 3 132 PISPRPERDRPEUUSEICISPPISQFPISG 6 3 133 OBEN WIN ERR Ne Oats wi ea E OC e 6 3 134 OR ke u tenes enu PY EU PENSIERI 6 3 135 OUTDEVICE eene RR mee RR RE ESSA 142 142 142 143 143 144 144 146 147 147 148 149 149 150 150 151 151 152 152 153 153 153 154 154 154 155 155 155 156 156 156 156 157 158 159 160 163 163 163 163 164 164 164 165 165 165 165 166 166 167 167 168 99 100 6 3 137 6 3 138 6 3 141 6 3 143 PP STEP ED ERR une iw
299. returns the size of the Table array which is one more than the currently highest defined table element TSIZE is reset to zero when the Table array is deleted using DEL TABLE or NEW TABLE on the command line This parameter is read only DEL NEW TABLE The following example assumes that no location higher than 1000 has been written to the Table array TABLE 1000 3400 gt gt PRINT TSIZE 1001 0000 Axis Parameter The UNITS parameter contains the unit conversion factor The unit conver sion factor enables the user to define a more convenient user unit like m mm or motor revolutions by specifying the amount of encoder edges to include a user unit Axis parameters like speed acceleration deceleration and the motion control commands are specified in these user units The UNITS parameter can be any non zero value but it is recommended to design systems with an integer number of encoder pulses per user unit Changing UNITS will affect all axis parameters which are dependent on UNITS in order to keep the same dynamics for the system AXIS PP STEP A leadscrew arrangement has a 5mm pitch and a 1 000 pulse rev encoder The units must be set to allow moves to be specified in mm The 1 000 pulses rev will generate 1 000 x 4 4 000 edges rev One rev is equal to 5mm Therefore there are 4 000 5 800 edges mm UNITS is thus set as following gt gt UNITS 1000 4 5 System Parameter The VERSION parameter retu
300. rigger the adjustment For every occurrence DEFPOS OFFPOS MOVEABS MOVEMODIFY which defines a position outside the range the end position will be redefined within the range The default value for axis 0 1 and 2 are respectively 2147483648 5000000 and 5000000 AXIS DPOS MPOS REP_OPTION UNITS Axis Parameter The REP_OPTION parameter controls the application of the REP_DIST axis parameter and the repeat option of the CAMBOX and MOVELINK motion control commands The default value is 0 Bit Description 0 The repeated distance range is controlled by bit O of the REP_OPTION parameter If REP OPTION bit 0 is OFF the range of the demanded and measured positions will be between REP DIST and REP DIST f REP OPTION bit 0 is ON the range of the demanded and measured positions will be between 0 and REP DIST 1 The automatic repeat option of the CAMBOX and MOVELINK com mands are controlled by bit 1 of the REP OPTION parameter The bit is set ON to request the system software to end the automatic repeat option When the system software has set the option OFF it automatically clears bit 1 of REP OPTION AXIS CAMBOX MOVELINK REP DIST 6 3 158 REPEAT UNTIL 178 Type Syntax Description Precautions Arguments See also Example Structural Command REPEAT commands UNTIL condition The REPEAT UNTIL structure allows the program segment between the REPEAT and the UN
301. rithmetic Operation expression 1 expression 2 The multiply operator multiplies any two valid expressions expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression factor 10 2 1 9 The parentheses are evaluated first and then the result 11 1 is multiplied by 10 Therefore factor would contain the value 111 Arithmetic Operation expression 1 expression 2 The power operator raises expression 1 to the power of expression 2 This operation uses floating point algorithms and may give small deviations for integer calculations expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression thirtytwo 2 5 This sets the variable thirtytwo to 32 Arithmetic Operation expression 1 expression 2 The add operator adds any two valid expressions expression 1 Any valid BASIC expression expression 2 Any valid BASIC expression result 10 2 1 9 The parentheses are evaluated first and the result 18 9 is added to 10 Therefore result would contain the value 28 9 111 Command function and parameter description 6 3 4 6 3 5 6 3 6 6 3 7 112 Subtract Type Syntax Description Arguments Example Divide Type Syntax Description Arguments Example Is Less Than Type Syntax Description Arguments Example Section 6 3 Arithmetic Operation expression 1 expression 2 The subtract operator
302. rity Routine 3 Routine 4 Motion Sequence if period is Communications DeviceNet 500 us Host Link LEDs update Program task execution high priority The motion sequence which will be executed at the beginning of each Servo Period will contain the following elements 1 Transfer any moves from BASIC process buffers to motion buffers see 5 3 Motion Execution Read digital inputs Load moves See note Calculate speed profile See note Calculate axis positions See note Execute position servo For axis 0 this also includes the Servo Driver com munications See note 7 Update outputs Each of these items will be performed for each axis turn before moving on to the next item There are three slots available for the BASIC tasks execution The slots will be allocated to the different tasks based on the task priorities Tasks 3 and 2 have high priority and task 1 and 0 command line have low priority For each period 1 ms the high priority tasks are always allocated the two time slots for high priority routine 2 and 3 Use this task for programs which 93 Error Processing Section 5 7 have higher execution requirements for demanding calculations or processing and which task may not vary in execution speed The lower priority task 1 and 0 command line will be allocated to the single time slot of routine 1 These tasks get less execution time and also the execu
303. rm Code Outputs ALM Output ALO1 ALO2 ALO3 OFF ON ON OFF Note OFF Output transistor is OFF alarm state ON Output transistor is ON 226 Problems and Countermeasures Section 8 3 Status and Remedy for Alarm MC Unit detection error A B Cause Remedy A The MC Unit is not mounted properly rectly Check that MC Unit mounted cor B The MC Unit is not mounted Execute Fn014 option unit detection result clear and then cycle the power 8 3 Problems and Countermeasures 8 3 1 General Problem Solving The following table shows possible problems which may occur and the possi ble solution No Problem Probable causes Items to check Remedy 1 None of the MC Power supply lines are wired Check the power supply wiring Correct the power supply wir Unit s indicators incorrectly ing 2 arelitwhenthe The power supply voltage is Check the power supply volt Check the power supply power is turned age capacity and correct the ON power supply 3 The power supply is defective Check the power supply Replace the power supply 4 None of the Power supply lines are wired Check the power supply wiring Correct the power supply wir Servo Driver s incorrectly ing 5 indicators are lit The power supply voltage is Check the power supply volt Check the power supply low
304. rminal PT MC Unit Programmable Terminal PT Signal Pin Pin Signal RS 1 2 f 2 SD Rs 232C SD 1 6 3 RS 232C Interface 7 4 RS Interface RD 1 8 5 cS FG 7 9 56 mini DIN 8 D sub 9 pin connector male connector male Note MC Unit Communication Mode Host Link Slave PC MC Unit PC Signal Pin Pin Signal RS 1 2 f 2 SD Rs 232C SD 1 6 3 RD Interface 7 4 RS RD 1 8 l 5 cs FG Shel 9 56 Shell FG mini DIN 8 pin connector male D sub 9 pin connector male Note MC Unit Communication Mode Host Link Master 33 Wiring Section 2 3 E 1 N Connections Using RS 232C Port 1 Use the NT ALOO1 E Converter Link Adapter NT ALOO1 MC Unit General Device Signal Pin Pin Signal Signal Pin Signal Asi 2 U 2 SD FG 1 Frame ground Rs 232C SD 1 6 3 RD SG 2 Signal ground Interface 561 7 4 RS aree SDB 3 Receive data 8 H4 5 CS Monee SDA 4 Receive data FG Shell H 6 5V RDB 5 Send data mini DIN 8 pin 9 SG RDA 6 Send data connect
305. rn data Pn205 Servomotor rotations When the value is other than the default setting the maximum value sup ported by the MC Unit is 32767 The absolute encoder position will be determined at start up by retrieving the following information Absolute Encoder Data Variable Description M Number of rotations R Resolution of the encoder Incremental position within one rotation P Current position read by the encoder and updated in MC Unit at start up P Incremental position within one rotation read at setup to be determined by user P Current position required for system 1 0 1 2 M 3 P lp 1 0 1 2 3 4 Position 55 System Functions Section 3 3 At start up the internal measured position of the MC Unit will be determined by using the following formula P M R P As the relevant position for the application is the current position read by the encoder relative to the origin point determined at setup the following opera tion needs to be applied P Absolute Encoder Setup Perform the setup operation for the absolute encoder in the following cases Procedure When using the machine for the first time When the backup alarm A 81 is generated When the Servo Driver s power is turned OFF and the encoder cable is removed The operation can be done by using the Parameter Un
306. rns the current firmware version number of the current system installed in the MC Unit 191 Command function and parameter description Section 6 3 Example Note 6 3 197 VFF_GAIN Type Description Precautions See also 6 3 198 VP_SPEED Type Description See also Example 6 3 199 VR Type Syntax Description Precautions Arguments See also Examples 192 Note This parameter is read only gt gt PRINT VERSION 1 6100 Axis Parameter The VFF_GAIN parameter contains the speed feed forward gain The speed feed forward output contribution is calculated by multiplying the change in demand position with the VFF_GAIN parameter value The default value is zero Adding speed feed forward gain to a system decreases the following error during a move by increasing the output proportionally with the speed See section 1 4 1 Servo System Principles for more details In order to avoid any instability the servo gains should be changed only when the SERVO is OFF AXIS D GAIN I GAIN OV GAIN P GAIN Axis Parameter The VP SPEED parameter contains the speed profile speed in user units s The speed profile speed is an internal speed which is accelerated and decel erated as the movement is profiled This parameter is read only AXIS MSPEED UNITS Wait until at command speed MOVE 100 WAIT UNTIL SPEED VP SPEED System Command VR address The VR
307. rocessor that perform a certain action but do not return a value For example PRINT is a recognized word that will cause the value of the following functions or variables to be printed on a certain output device Functions are words recognized by the processor that perform a certain action and return a value related to that action For example ABS will take the value of its parameter and return the absolute value of it to be used by some other function or command For example ABS 1 will return the value 1 which can be used by the PRINT command for example to generate a string to be output to a certain device Parameters are words recognized by the processor that contain a certain value This value can be read and if not read only written Parameters are used to determine and monitor the behavior of the system For example ACCEL determines the acceleration rate of a movement for a certain axis 5 2 1 Axis System and Task Statements Axis Statements 86 The commands functions and parameters apply either to one of the axes the tasks running or the general system The motion control commands and the axis parameters apply to one or more axes Axis parameters determine and monitor how an axis reacts on com mands given and how it reacts to the outside world Every axis has a set of parameters so that all axes can work independently of each other The motion control commands are able to control one or more of the axes simulta neou
308. roduct in the right direction Not doing so may result in malfunction Provide the specified clearance between the Servo Driver and the control panel or with other devices Not doing so may result in fire or malfunction Do not apply any strong impact Doing so may result in malfunction Be sure to wire correctly and securely Not doing so may result in motor runaway injury or malfunction Be sure that all mounting screws terminal screws and cable connector screws are tight ened securely Incorrect tightening may result in malfunction Use crimp terminals for wiring Do not connect bare stranded wires directly to terminals Connection of bare stranded wires may result in fire Always use the power supply voltages specified in the manual An incorrect voltage may result in malfunction or burning Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied Be particularly careful in places where the power supply is unsta ble An incorrect power supply may result in malfunction Install external breakers and take other safety measures against short circuiting in exter nal wiring Insufficient safety measures against short circuiting may result in burning Take appropriate and sufficient countermeasures when installing systems in the following locations Not doing so may result in damage to the product Locations subject to static electricity or other sources of noise Locations
309. rofile in the MC Unit and the actual measured posi tion feedback from the Servomotor according to the control gain settings In open loop a set speed reference value is outputted to the Servo Driver The torque control is achieved by outputting a set torque reference value to the Driver The axis is capable of switching between torque and speed control during operation The servo axis for axis 1 can provide a second servo control loop to enable dual feed back control More details can be found at the ADD DAC command description Encoder Input Axis The encoder input axis provides an axis which counts the position data from a connected pulse generator such as a Servo Driver or an external encoder The encoder input axis can be used for for measurement registration and or synchronisation functions Item Specification Input pulse multiplication x4 Encoder Output Axis The encoder output axis provides a way of generating an encoder signal which is cascaded to another device The encoder signal is controlled by the internal position of this axis All move commands and axis parameters available for the servo axis are available Item Specification Output pulse ratio 64 1 internal counts output encoder pulses Z marker period 4096 generated encoder edges B Virtual Axis A virtual axis is used for computational purposes to create a move profile with out physical movement on any actu
310. ror that occurred on the specified task 180 Command function and parameter description Section 6 3 See also Example Note 6 3 166 RUNTYPE Type Syntax Description Arguments See also Example 6 3 167 S RATE Type Description Note Note Each task has its own RUN ERROR parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed This parameter is read only BASICERROR ERROR LINE PROC gt gt PRINT RUN ERROR PROC 5 9 0000 Program Command RUNTYPE program auto run task number The RUNTYPE command determines whether the program specified by program name is run automatically at start up or not and which task it is to run on The task number is optional if omitted the program will run at the high est available task The current RUNTYPE status of each programs is displayed when a DIR command is executed If one program has compilation errors no programs will be started at power up To set the RUNTYPE using Motion Perfect select Set Power up mode from the Program Menu The execution of the EPROM command is required to store the new RUNTYPE settings into Flash memory Otherwise the new settings will be lost when the power is switched off program name The name of the program whose RUNTYPE is being set autorun 0 Running manually on command 1 Automatically execute on power up All non zero values
311. ry for the error states are required to be Error Processing Host Link Slave DeviceNet Section 5 7 programmed in BASIC See 4 1 2 Host Link Slave for details on Host Link error handling The Host Link Slave protocol will respond with the proper end code to the Master when some error has been detected No programmed error routine in BASIC is necessary all error handling is done by the Host Link Master Although most error handling will be at the DeviceNet master the MC Unit as DeviceNet slave has a status parameter The FB_STATUS will return the sta tus of the Remote I O Communication with the Master Please refer to Appendix C Programming Examples to find an implementation of the master shell program The master shell program is used for the config uration of the MC Unit and Servo Driver for the control of the application pro gram tasks and for the continuous checking any error event that may occur It is strongly recommended to use this program or a similar program for every application 95 SECTION 6 BASIC Motion Control Programming Language This section describes all commands functions and parameters required for programing the motion control application using the MC Unit 6 OVErVIEW AGO EVEI 102 6 2 Command Reference 5 103 6 2 1 Motion Control Commands 103 6 2 2 I O Commands and Functions
312. s See also 6 3 150 READ_BIT Type Syntax Description Arguments See also 6 3 151 REG_POS Type Alternative Description See also Note 6 3 152 REG_POSB Type Description See also 6 3 153 REGIST Type Syntax Description 174 Note Section 6 3 The RAPIDSTOP command cancels the current move on all axes from the current move buffer MTYPE Moves for speed profiled move commands MOVE MOVEABS MOVEMODIFY FORWARD REVERSE MOVECIRC will decelerate to a stop with the deceleration rate as set by the DECEL parameter Moves for other commands will be immediately stopped RAPIDSTOP cancels only the presently executing moves If further moves are buffered in the next move buffers NTYPE or the task buffers they will then be loaded During the deceleration of the current moves additional RAPIDSTOPs will be ignored CANCEL MTYPE NTYPE System Command READ bit number vr number The READ BIT command returns the value of the specified bit in the speci fied VR variable either 0 or 1 bit number The number of the bit to be read Range 0 23 vr number The number of the VR variable for which the bit is read Range 0 250 CLEAR BIT SET BIT VR Axis Parameter RPOS The REG POS parameter stores the position in user units at which the mary registration event occurred This parameter is read only AXIS MARK REGIST UNITS Axis Paramet
313. s Refer to the specified pages for details Name Description Page FOR TO STEP FOR NEXT loop allows a program segment to be repeated 140 NEXT with increasing decreasing variable GOSUB RETURN GOSUB jumps to a subroutine at the line just after label The 143 program execution returns to the next instruction after a RETURN is given GOTO GOTO jumps to the line containing the abel 143 IF THEN ELSE IF controls the flow of the program base on the results of the 150 ENDIF condition ON GOSUB or ON GOSUB or ON GOTO enables a conditional jump to 166 GOTO of several labels REPEAT UNTIL REPEAT UNTIL loop allows the program segment to be 178 repeated until the condition becomes TRUE WHILE WEND WHILE WEND loop allows the program segment to be 195 repeated until the condition becomes FALSE Program Commands and Functions The table below outlines commands used for general programming purposes Refer to the specified pages for details Name Description Page Statementseparator The statement separator enables more statements on one 114 EU line Comment field The single quote enables a line not to be executed 114 AUTORUN AUTORUN starts all the programs that have been set to run at 120 start up COMPILE COMPILE compiles the current program 127 COPY COPY copies an existing program in memory to a new pro 128 gram DEL DEL deletes a progra
314. s the limit a Motion Error will occur The Servo Driver will be disabled and all motion will come to a halt The user must be sure that this does not have an adverse effect on the machine Determine the value of following error limit carefully according to the operating conditions of the application See 6 3 74 FE_LIMIT for details External Limit Switches The second safety precaution which is required is the use of limit switches Monitoring sensors are installed at the edges of the workpiece s range of movement to detect abnormal workpiece movement and stop operation if a runaway occurs Although the limit switches can be connected either to the MC Unit as to the Servo Driver it is strongly recommended to connect the limit switches to the 39 Wiring Precautions Section 2 5 Servo Driver This will achieve a fast response of both the Servo Driver and MC Unit For the Servo Driver the limit switches should be connected to pins CN1 42 FWD and CN1 43 REV When using the MC Unit the switches can be con nected to any of the inputs In both cases the axis parameters FWD_IN and REV_IN for axis 0 are used to assign the limit switch inputs for the MC unit When the Servo Driver inputs are used define FWD_IN 18 and REV_IN 19 When the limits are connected to the Servo Driver and the correct settings are set the Driver will apply the dynamic brake to stop the Servomotor Also the appropriate bit of the AXISSTATUS axis parameter will be se
315. s 1 ACCEL 5000 Set acceleration rate for axis 1 BASE 2 UNITS 2000 Set unit conversion factor for axis 2 SPEED 125 Set speed for axis 2 ACCEL 10000 Set acceleration rate for axis 2 Example 2 In the example below axes 0 1 and 2 will move to the specified positions at the speed and acceleration set for axis 0 BASE 0 sets the base axis to axis 0 which determines the three axes used by MOVE and the speed and acceleration rate BASE 0 MOVE 100 23 1 1250 Example 3 On the command line the base group order can be shown by typing BASE BASE 0 2 1 gt gt BASE 0 2 1 Example 4 Use the PROC modifier to show the base group order of a certain task gt gt RUN PROGRAM 3 gt gt BASE PROC 3 0 2 1 Example 5 Printing BASE will return the current selected base axis gt gt BASE 2 gt gt PRINT BASE 2 0000 BASICERROR Type System Command Description The BASICERROR command can be used to run a routine when a run time error occurs in a program BASICERROR can only be used as part of an ON GOSUB or GOTO command This command is required to be exe cuted once in the BASIC program If several commands are used only the one executed last is effective See also ERROR_LINE ON RUN_ERROR Example If an error occurs in a BASIC command in the following example then the error routine will be executed ON BASICERROR GOTO error routine no error 1 STOP error routine IF no error 0 THEN Comm
316. s called OV GAIN The speed feedforward gain produces an output that is propor tional to the change in demand position and minimizes the following error at high speed Ky AP The parameter can be set to minimise the following error at a constant machine speed after other gains have been set The speed feed forward gain axis parameter is called GAIN Control System Configuration Section 1 4 Default Values The default settings are given below along with the resulting profiles Frac tional values are allowed for gain settings Gain Default Proportional Gain 0 1 Integral Gain 0 0 Derivative Gain 0 0 Output Speed Gain 0 0 Speed Feedforward Gain 0 0 1 4 2 Encoder Signals Encoder input Standard OMRON equipment is designed for an advanced phase A for for ward rotation and an advanced phase B for reverse rotation For the encoder input and output signals the MC Unit is designed to comply with this phase definition allowing the MC Unit to be connected to other equipment without problems With this arrangement the direction of rotation can be easily detected by monitoring the relative phase of both signals If channel A leads channel B indicating clockwise CW movement the counter will increment Conversely if channel B leads channel A indicating counterclockwise CCW movement the counter will decrement Typically rotary encoders also provide an additional Z marke
317. s parameter will also be set This input is active low AXIS AXISSTATUS FWD IN Axis Parameter The REV JOG parameter contains the input number to be used as a jog reverse input The input can be from 0 to 7 As default the parameter is set to 1 no input is selected This input is active low AXIS FAST JOG FWD JOG JOGSPEED Motion Control Command REVERSE RE The REVERSE command moves an axis continuously in reverse at the speed set in the SPEED parameter The acceleration rate is defined by the ACCEL axis parameter REVERSE works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis The reverse motion can be stopped by executing the CANCEL or RAPID STOP command or by reaching the reverse limit inhibit or origin return limit AXIS CANCEL FORWARD RAPIDSTOP back REVERSE WAIT UNTIL 0 Wait for stop signal CANCEL 179 Command function and parameter description Section 6 3 6 3 163 RS_LIMIT Type Axis Parameter Alternative RSLIMIT Description The RS_LIMIT parameter contains the absolute position of the reverse soft ware limit in user units A software limit for reverse movement can be set from the program to control the working range of the machine When the limit is reached the MC Unit will decelerate to zero and then cancel the move Bit 10 of the AXISSTATUS axis parameter will be turned ON while the axis positi
318. s soon as the TRIGGER command is executed period The number of servo periods between data samples table start The address of the first element in the Table array to start storing data table stop The address of the last element in the Table array to be used PO First parameter to store P1 Optional second parameter to store P2 Optional third parameter to store Optional fourth parameter to store SCOPE_POS TABLE TRIGGER Example 1 SCOPE 10 0 1000 AXIS 1 DPOS AXIS 1 This example programs the SCOPE function to store the MPOS parameter for axis 1 and the DPOS parameter for axis 1 every 10 servo cycles The MPOS parameter will be stored in table locations 0 to 499 the DPOS parameters in table locations 500 to 999 The SCOPE function will wrap and start storing at the beginning again unless stopped Sampling will not start until the TRIG GER command is executed Example 2 SCOPE OFF This above line turns the scope function off Motion Perfect Parameter 183 Command function and parameter description Description See also 6 3 172 SELECT Type Syntax Description Precautions See also Example 6 3 173 SERVO Type Description See also Example Note Section 6 3 The SCOPE_POS parameter contains the current Table position at which the SCOPE command is currently storing its first parameter This parameter is read only SCOPE Program Command
319. scribes the different Motion Control features of the MCW151 Also the functionality of the Servo Driver related commands are explained Section 4 describes the communication components of the MCW151 E and MCW151 DRT E The functionality of the serial communication protocols and the DeviceNet interface are explained Section 5 provides an overview of the fundamentals of multitasking BASIC programs and the methods by which programs are managed in the MC Unit Section 6 describes all commands functions and parameters required for programing the motion con trol application using the MC Unit Section 7 describes the operation of the Motion Perfect programming software package Motion Per fect provides the user a tool to program monitor and debug motion based applications for the MC Unit Section 8 describes error processing and troubleshooting procedures needed to keep the system operating properly Section 9 explains the maintenance and inspection procedures that must be followed to keep the MC Unit operating in optimum condition It also includes proper procedures when replacing an MC Unit The Appendices provide the required parameter settings for the Servo Driver the DeviceNet protocol specification and some general programming examples N WARNING Failure to read and understand the information provided in this manual may result in per sonal injury or death damage to the product or product failure Please read each section in its entirety and
320. se B Input Output 5 Z Encoder phase 2 Input Output 6 Z Encoder phase Z Input Output 7 Encoder 0V common 8 5V ENC Encoder 5V power supply output 9 10 RO Registration Input 0 10 FG Frame Ground 11 12 Input 2 12 H R1 Registration Input 1 13 14 Input 4 14 I3 Input 3 15 16 Input 6 16 I5 Input 5 17 OV IN Inputs OV common 18 17 Input 7 19 08 Output 8 20 O9 Output 9 21 O10 Output 10 22 O11 Output 11 23 O12 Output 12 24 O13 Output 13 25 0V OP Outputs common 26 24V_OP Outputs 24V power supply input 30 Wiring Connector Wiring Instructions Power Connector Connector pin arrangement Power Connector Type 2 3 2 Serial Port Connections RS 232C Connections PORTO 1 Section 2 3 Weidm ller B2L 3 5 26 SN SW included in package abt The Power Connector is used to connect the 24V power supply to the MC Unit 24V Pin Name Function dv 1 24V Power Supply 24V oh 2 OV Power Supply OV P 3 FG Frame Ground Phoenix MSTB 2 5 3 ST 5 08 included in package The MC Unit has two serial RS 232C ports for communication with external devices Pin Symbol Name Port Direction 1 Not used s 2 RS 1 Request to send 1 Output 3 SD 0 Send data 0 Output 4 SG 0 Signal ground 0 5 RD 0 Receive data 0 Input 6 SD 1 Send data 1 Output
321. sition and the AXISSTA TUS status will be cleared Note that the status can not be cleared if the cause of the problem is still present 1 The axis moves at creep speed forward until the Z marker is encoun tered The demand position is then reset to zero and the measured position is corrected to maintain the following error 2 The axis moves at creep speed reverse until the Z marker is encoun tered The demand position is then reset to zero and the measured position is corrected to maintain the following error 3 The axis moves at the demand speed forward until the datum switch is reached The axis then moves reverse at creep speed until the datum switch is reset The demand position is then reset to zero and the measured position corrected so as to maintain the following error 4 The axis moves at the demand speed reverse until the datum switch is reached The axis then moves forward at creep speed until the datum switch is reset The demand position is then reset to zero and the measured position corrected so as to maintain the following error 5 The axis moves at demand speed forward until the datum switch is reached The axis then reverses at creep speed until the Z marker is encountered The demand position is then reset to zero and the measured position corrected so as to maintain the following error 6 The axis moves at demand speed reverse until the datum switch is reached The axis then moves forward at creep speed until the Z
322. sly while every axis has its own behavior The axis parameters are reset to their default values for each startup The commands and parameters work on some base axis or group of axes specified by the BASE command The BASE command is used to change this base axis group and every task has its own group which can be changed at any time The default base axis is O Individual axis dependent commands or parameters can also be programmed to work on a temporary base axis by including the AXIS function as a modifier BASIC Programming Task Statements System Statements Section 5 2 in the axis dependent command A temporary base axis is effective only for the command or parameter after which AXIS appears The task parameters apply to a single task The task parameters monitor the task for example for error handling The PROC modifier allows the user to access a parameter of a certain task Without PROC the current task is assumed The BASE command see above is task specific and can be used with the PROC modifier These statements govern the overall system features which are basically all statements which do not belong to the first two groups 5 2 2 Data Structures and Variables Table Variables Global Variables Precautions for using Table and VR variables Local Variables Labels BASIC programs can store numerical data in various types of variables Some variables have predefined functions such as the axis parameters and sys
323. specify a temporary base axis start point The address of the first element in the Table array to be used Being able to specify the start point allows the Table array to hold more than one profile and or other information end point The address of the end element in the Table array table multiplier The Table multiplier value used to scale the values stored in the Table As the Table values are specified in encoder edges use this argument to set the val ues for instance to the unit conversion factor set by UNITS parameter distance A factor given in user units that controls the speed of movement through the Table The time taken to execute CAM depends on the current axis speed and this distance For example assume the system is being programmed in mm and the speed is set to 10 mm s and the acceleration sufficiently high If a distance of 100 mm is specified CAM will take 10 seconds to execute The SPEED parameter in the base axis allows modification of the speed of movement when using the CAM move ACCEL AXIS CAMBOX SPEED TABLE Assume that a motion is required to follow the following position equation t x x 25 10000 1 cos x Here x is in degrees This example is for a Table that provides a simple oscil lation superimposed with a constant speed To load the Table and cycle it continuously the following code would be used GOSUB camtable loop 123 Command function and parameter description Section 6 3 6 3
324. ss or put excessive stress or heavy objects on the cables Doing so may result in electric shock stopping operation of the product or burning General Warnings and Safety Precautions 3 NWARNING NWARNING NWARNING NWARNING NWARNING Caution Caution Caution Caution Do not touch the rotating parts of the Servomotor in operation Doing so may result in injury Do not modify the product Doing so may result in injury or damage to the product Provide safety measures in external control circuits i e not in the MC Unit to ensure safety in the system if an abnormality occurs due to malfunction of the MC Unit incorrect or unintended configuration and programming of the MC Unit or external factors affecting the operation of the MC Unit Not providing sufficient safety measures may result in seri ous accidents or property damage The MC Unit outputs may remain ON or OFF due to deposits on or burning of the out put relays or destruction of the output transistors As a counter measure for such prob lems external safety measures must be provided to ensure safety in the system Provide an external emergency stopping device that allows an instantaneous stop of operation and power interruption Not doing so may result in injury Emergency stop circuits interlock circuits limit circuits and similar safety measures must be provided in external control circuits When the 24 VDC output service power suppl
325. stem can be determined using the DEFPOS command This command re defines the current position to zero or any other value A move is defined in either absolute or relative terms An absolute move takes the axis to a specific predefined position with respect to the origin point A rel ative move takes the axis from the current position to a position that is defined relative to this current position The following diagram shows gives an exam Motion Control Concepts Section 1 3 ple of relative command MOVE and absolute command MOVEABS linear moves MOVEABS 50 MOVE 50 MOVE 30 100 Axis position 1 3 1 PTP control In point to point positioning each axis is moved independently of the other axis The MC Unit supports the following operations Relative move Absolute move Continuous move forward Continuous move reverse Relative and Absolute Moves To move a single axis either the command MOVE for a relative move or the command MOVEABS for an absolute move is used Each axis has its own move characteristics which are defined by the axis parameters Suppose a control program is executed to move from the origin to an axis no 0 coordinate of 100 and axis no 1 coordinate of 50 If the speed parame ter is set to be the same for both axes and the acceleration and deceleration rate are set sufficiently high the movements for axis 0 and axis 1 will be as illustrated below Axis 1 MOVEAB
326. stem to automatically store up to 4 182 parameters every sample period to the Table variable array SCOPE POS SCOPE POS contains the current Table position at which the 183 SCOPE command is currently storing its first parameter TRIGGER TRIGGER starts a previously set SCOPE command 190 Axis Parameters The table below outlines the axis parameters Refer to the specified pages for details Name Description Page ACCEL ACCEL contains the axis acceleration rate 115 ADDAX AXIS ADDAX AXIS returns the number of the axis to which the 116 base axis is currently linked to by ADDAX ATYPE ATYPE contains the axis type 119 AXISSTATUS AXISSTATUS contains the axis status 121 CLOSE WIN CLOSE WIN defines the end of the window in which a regis 126 tration mark is expected 107 Command Reference List Section 6 2 Name Description Page CLUTCH_RATE CLUTCH RATE defines the change in connection ratio when 126 using the CONNECT command CREEP CREEP contains the creep speed 129 D GAIN D GAIN contains the derivative control gain 129 DATUM IN DATUM contains the input number to be used as the ori 130 gin input DECEL DECEL contains the axis deceleration rate 131 DEMAND EDGES DEMAND EDGES contains the current value of the DPOS 132 axis parameter in encoder edges DPOS DPOS co
327. subject to strong electromagnetic fields Locations subject to possible exposure to radiation Locations near power supply lines Do not reverse the polarity of the battery when connecting it Reversing the polarity may damage the battery or cause it to explode Before touching a Unit be sure to first touch a grounded metallic object in order to dis charge any static build up Not doing so may result in malfunction or damage Operation and Adjustment Precautions 6 6 7 8 Operation and Adjustment Precautions Caution Caution Caution Caution Caution Caution Caution Caution Caution Caution Caution Confirm that no adverse effects will occur in the system before performing the test opera tion Not doing so may result in damage to the product Check the modified user programs newly set parameters and switches for proper execu tion before actually running them Not doing so may result in damage to the product Do not make any extreme adjustments or setting changes Doing so may result in unsta ble operation and injury Separate the Servomotor from the machine check for proper operation and then con nect to the machine Not doing so may cause injury When an alarm occurs remove the cause reset the alarm after confirming safety and then resume operation Not doing so may result in injury Do not come close to the machine immediately after resetting momentary power interrup tion
328. t 2 5 Wiring Precautions 40 Electronically controlled equipment may malfunction because of noise gener ated by power supply lines or external loads Such malfunctions are difficult to reproduce and determining the cause often requires a great deal of time The following precautions will aid in avoiding noise malfunctions and improving system reliability Use electrical wires and cables of the designated sizes as specified in the operation manual for the Servo Driver Use larger size cables for FG lines of the Servo Driver and ground them over the shortest possible distances Separate power cables AC power supply lines and motor power supply lines from control cables encoder lines and external input signal lines Do not group power cables and control cables together or place them in the same conduit Use shielded cables for control lines Use the ready made cables designed for MC Unit to reduce connectivity problems Connect a surge absorbing diode or surge absorber close to relays Use a surge absorbing diode with a voltage tolerance of at least five times greater than the circuit voltage DC relay AC relay Surge AC absorbing diode Surge absorber Solenoid SOL Surge absorber Noise may be generated on the power supply line if the same power sup ply line is used for an electric welder or electrical discharge unit Connect Wiring Precautions Section 2 5 an insu
329. t Floating point numbers have a valid range of 5 9 10 to 134 1075 Integers are essentially floating point numbers with a zero exponent This implies that the integers are 24 bits wide The integer range is therefore given from 16777216 to 16777215 Numeric values outside this range will be float ing point All mathematical calculations are done in floating point format This implies that for calculations of with larger values the results may have limited accu racy The user should be aware of this when developing the motion control application The MC Unit supports assigning and printing hexadecimal values A hexadec imal number is inputted by proceeding the number by character Valid range is from 0 0 to OXFFFFFF Example Motion Execution Positioning Floating point comparison Precedence Section 5 3 gt gt VR 0 SFF gt gt PRINT VR 0 255 0000 A value can be printed in hexadecimal by using the HEX function Negative values result in the 2 s complement hexadecimal value 24 bit Valid range is from 8388608 to 16777215 Example TABLE 0 10 65536 gt gt PRINT 0 TABLE 1 FFFFF6 10000 For positioning the Unit will round up if the fractional encoder edge distance calculated exceeds 0 9 Otherwise the fractional value will be rounded down The internal measured and demanded position of the axes represented by the MPOS and DPOS axis parameters have 32 bit counters
330. t gt 2000 THEN RV WRITE 101 2000 DIF Pn103 Inertia ratio DRV_READ 5103 lt gt 300 TH RV_WRITE 5103 300 DIF 2 249 Programming Examples Appendix C General Examples Example 1 Turning an Output ON and OFF Every 100ms The following code controls output 10 to go on and off every 100 ms loop OP 10 ON WA 100 OP 10 OFF WA 100 GOTO loop Example 2 Flashing MC Unit Outputs The following code will sequentially step through all available outputs on the MC Unit and flash them for 0 5 seconds each ON NEXT a GOTO start Example 3 Positioning a Rotary Table A rotary table must stop at one of 8 equally spaced positions according to the value of a thumbwheel input inputs 4 to 7 The table will not move until a start button is pressed input 10 start WAIT UNTIL IN 10 ON WAIT UNTIL IN 10 OFF GOSUB get_tws MOVEABS 45 tw_value WAIT IDLE GOTO start get_tws tw_value IN 4 7 RETURN Example 4 Positioning with Product Detection A ballscrew is required to move forward at a creep speed until it reaches a product at which point a microswitch IN 2 is turned ON The ballscrew is stopped immediately the position at which the product was sensed is indicated and the ballscrew is returned at a rapid speed back to the start position start IF IN 1 ON THEN WAIT UNTIL IN 8 OFF WAIT UNTIL IN 1 ON SPEED 10
331. t check if the MC Unit memory data is within range of the three word format VR DATA READ ONE WORD FORMAT will read VR data The data will be converted in one word format DeviceNet MCWISI DRT E only Section 4 2 TABLE DATA WRITE THREE WORD FORMAT Command Block 28 01 34 00 8A 00 01 2 N 4 Command Class ID Instance ID Length L code Service code Address H Length H Destination node address Address L Response Block 28 01 00 00 B4 Command Response No of bytes Word data L code code received Word data H Service code Source node address Read data Maximum 240 bytes Parameters Service code command response In the command 34 Hex is specified In the response the leftmost bit is turned ON and B4 Hex is returned Address H Address L command The address in hexadecimal of the first word of data to be read Address H Leftmost 2 digits of the address in 4 digit hexadecimal ignored for MC Unit Address L Rightmost 2 digits of the address in 4 digit hexadecimal For the VR memory the maximum value is 250 FA Hex Length H Length L command The number of VR memory elements to read Length H Leftmost 2 digits of the length in 4 digit hexadecimal ignored for MC Unit Length L Rightmost 2 digits of the length in 4 digit hexadecimal When an OMRON Master is being used the m
332. t has been used with Motion Perfect and you do not have any programs on the MC Unit click the New Button in the Check Project Options Window and then click the Yes Button when asked The New Project Window will open enabling you to enter the required name of the new project and specify the directory on your computer in which to store the project 1 Type a suitable project name in the Project Name text box and then use the Disk Directory box to move to the directory in which to store the project 2 f you wish to create a new directory on your computer then move to the parent directory and click on the Create Directory button Type the name of the new directory in the New Directory Window 3 After selecting the required directory and entering the new project name click the Create Button 4 fthe project path and name already exist a window will appear asking whether to overwrite the existing project If you confirm the previous project will be overwritten and lost 5 When anew project has been created the Check Project Window will be displayed with empty MC Unit Program and Project Program List Boxes and a Project check OK message Click the Ok Button to continue You have now created a new project on your computer the Motion Perfect desktop will open and all its facilities will be available 7 4 Desktop Appearance Control Panel Controller Messages Window fq Motion Perfect 2 Project Controller Program Tools Onc
333. t memory to be modified using a VT100 Terminal The currently selected program will be edited The editor commands are as follows Quit Editor CTRL K and D Delete Line CTRL Y This command is implemented for an offline VT100 terminal Within Motion Perfect users can select the command from the Program menu line number The number of the line at which to start editing SELECT 135 Command function and parameter description Section 6 3 6 3 62 ENCODER Type Axis Parameter Description The ENCODER axis parameter contains a raw copy of the encoder The MPOS axis parameter contains the measured position calculated from the ENCODER value automatically allowing for overflows and offsets Note This parameter is read only See also AXIS MPOS 6 3 63 ENDMOVE Type Axis Parameter Description The ENDMOVE axis parameter holds the position of the end of the current move in user units If the SERVO axis parameter is ON the ENDMOVE parameter can be written to produce a step change in the demand position DPOS Note As the measured position is not changed initially the following error limit FE LIMIT should be considered If the change of demanded position is too big the limit will be exceeded See also AXIS DPOS FE LIMIT UNITS 6 3 64 EPROM Type Program Command Syntax EPROM Description The EPROM command stores the BASIC programs in the MC Unit in the Flash memory At each start up the program data from the Flas
334. tatement separator Type Syntax Description Example Program command statement statement REI The statement separator represented by the colon gt can be used to sepa rate BASIC statements on a multi statement line This separator can be used both on the command line as in programs PRINT THIS LINE GET low PRINT DOES THREE THINGS Comment field Type Syntax Description Example ABS Type Syntax Description Arguments Program command Comment fields amp ok The single quote can be used in a program to mark a line as being com ment which will not be executed The single quote can be put at the beginning of a line or after any valid statement This line will not be printed PRINT Start Mathematical Function ABS expression The ABS function converts a negative number into its positive equal Positive numbers are unaltered expression Any valid BASIC expression Command function and parameter description Section 6 3 6 3 16 6 3 17 6 3 18 Example ACCEL Type Description See also Example ACOS Type Syntax Description Arguments Example ADD_DAC Type Description IF ABS VR 0 gt 100 THEN PRINT VR 0 Outside 100 Axis parameter The ACCEL axis parameter contains the axis acceleration rate The rate is set in units s The parameter can have any positive
335. tem Specification Circuit Configuration Type PNP Motion Control Unit Current capacity 100 mA each output 600 mA total for group of 6 External power supply 24V 20 E 08 Maximum voltage 24 V 10 Equivalent circuit isolated from system Protection Over current over temperature and 2 A fuse on common Internal Circuitry galvanically roy To other output circuits Encoder Input Output response times The response times given in the following table are the times between a change in the OP parameter and the corresponding change in the digital out put circuit These times are mainly depending on the MC Unit s Servo Period and they include the physical delays in the output circuit Servo Period Response time 0 5 ms 0 8 ms max 1 0 ms 1 3 ms max Item Specification Circuit Configuration Signal level EIA RS 422A Stan dards Motion Control Unit Input impedance 48 min Phase A axis 1 Response frequency 1500 kp s Phase B axis 1 Termination Yes 2200 select able by switch Phase Z axis 1 Galvanic isolation No Line receiver 37 Wiring Encoder Output Section 2 3 Item Specification Circuit Configuration Signal level EIA RS 422A Stan dards Maximum frequency 500 kp s Galvanic isolation
336. tem parameters other variables are available for the programmer to define as required in programming The MC Unit s Table global and local variables are explained in this section Furthermore also the use of labels will be specified The Table is an array structure that contains a series of numbers These num bers are used for instance to specify positions in the profile for a CAM or CAMBOX command They can also be used to store data for later use for example to store the parameters used to define a workpiece to be processed The Table is common to all tasks on the MC Unit i e the values written to the Table from one task can be read from other tasks Table values can be written and read using the TABLE command The maxi mum length of the array is 8000 elements from TABLE 0 to TABLE 7999 The Table array is initialized up to the highest defined element The global variables also called VR variables are common to all tasks on the MC Unit This means that if a program running on task 2 sets VR 25 to a cer tain value then any other program running on a different task can read that same value from VR 25 This is very useful for synchronizing two or more tasks but care must be taken to avoid more than one program writing to the same variable at the same time The controller has 251 global variables VR 0 to VR 250 The variables are read and written using the VR command 1 The Table and VR data can be accessed from the different r
337. ter Programs on the MC Unit must be held in Flash memory when power is turned OFF Similar to the Table and VR variable data the data will be lost when the Unit is powered OFF When a session will be ended the current programs in RAM must be copied to Flash memory by using the EPROM command The Motion Perfect package provides a button on the control panel to perform the operation It will also prompt the user when the program is closed At each start up before operation the program data in Flash memory will be copied to RAM The MC Unit has a number of BASIC commands to allow creation manipula tion and deletion of programs Motion Perfect provides buttons which also perform these operations Command Function SELECT Selects a program for editing deleting etc NEW Deletes the current selected program a specified program or all programs DIR Lists the directory of all programs COPY Duplicates a specified program RENAME Renames a specified program DEL Deletes the current selected program or a specified program LIST Lists the current selected program or a specified program 5 5 2 Program Compilation The MC Unit system compiles programs automatically when required It is not normally required to force the MC Unit to compile programs but programs can be compiled under the Program Menu in Motion Perfect The MC Unit automatically compiles programs at the following times The selected pro
338. tes code code received Service code Source node address DeviceNet MCWISI DRT E only Parameters Service code command response Section 4 2 In the command 05 Hex is specified In the response the leftmost bit is turned ON and 85 Hex is returned 4 2 2 3 Sample Programs Using the CMD 490 instruction to read data In the following example the CMD 490 instruction is used to read data one word format from VR 200 to VR 203 4 words on the Slave Unit and store them to the Master CS1 PCs from D02000 onwards For more information on explicit messages refer to the DeviceNet Master Unit Operation Manual or for information on the CMD 490 instruction refer to the PCs Operation Man ual Example Conditions Master node address 0 Slave network address 1 Slave node address 2 Example Using CMD 490 CMD S D Command Words 5 First Command word Word Contents Hex Meaning S 28 01 EXPLICIT MESSAGE SEND command code 28 01 Hex S41 02 34 Slave node address 2 VR DATA READ ONE WORD FORMAT command service code 34 Hex 5 2 008 Class ID 008A Hex 5 3 0001 Instance ID 0001 5 4 00 C8 Read start address VR 200 00C8 Hex 5 5 00 04 Number of Table elements to write 0004 Hex D Response Words D First Response Word Results are stored as shown in the following table Word Contents Hex M
339. the Bar recorded data only part of the trace will be displayed if the time base is changed to a faster value The remainder can be viewed by moving the thumb box on the horizontal scroll bar Additionally If the scope is configured to record both motion parameters and plot table data then the number of points plotted across the display can be determined by the motion parameter If there are additional table points not visible these can be brought into view by scrolling the table trace using the horizontal scroll bar The motion parameter trace will not move 213 Motion Perfect Tools Section 7 5 Channel specific Controls 214 One shot Con tinuous Trigger Mode The One shot Continuous Trigger Mode Button toggles between these two modes One Shot Trigger Mode Button raised In One shot Mode the scope runs until it has been triggered and one set of data recorded by the MC Unit retrieved and displayed Continuous Trigger Mode Button pressed In Continuous Mode the scope continues running retrieving data from the MC Unit each time it is re triggered and new data is recorded The scope continues to run until the Trigger Button is pressed for a second time to stop the scope Manual Pro gram Trigger Mode The Manual Program Trigger Mode Button toggles between these two modes Manual Mode Button raised pointing hand In Manual Mode the MC Unit is triggered and starts to record data immediate
340. the Slave ON ON red Node address duplication The Slave Unit s node address has been set on another node green Change settings to eliminate the duplication and restart the Slave ON ON red Bus Off error detected The communications controller detected a Bus Off status and green communications have been stopped Check the following and restart the Slave Master Slave baud rates for loose or broken cables for noise cable lengths and Terminating Resistors ON Flashing Communications timeout The connection with the Master Unit timed out green red Check the following and restart the Slave Master Slave baud rates for loose or broken cables for noise cable lengths and Terminating Resistors 220 Error Handling Servo Driver Indicators as Section 8 2 The Servo Driver provides a Display Area and two LED indicators OOO00 CHARGE POWER ervo Driver Display Area as The Servo Driver Display Area displays among others status alarm signals parameters in five digits 7 segment LED A summary of the symbol display contents is given in the following table Symbol display Contents bb Base block no power to Servomotor Servo Driver is not enabled run Operating power to Servomotor Servo Driver is enabled Pot Forward rotation prohibited POT Forward limit switch is OFF Not Reverse rotation prohibited NOT Rev
341. ther MC Unit The MCW151 DRT E can be connected easily in an existing DeviceNet net work The DeviceNet network has a maximum communication distance of 500 m so an MC Unit in a remote location can be controlled from the Master The MC Unit supports both remote I O and explicit message communications Remote I O communications Remote I O communications can exchange data 4 input words and 4 out put words max with the MC Unit at high speed and without program ming just like regular I O Explicit message communications Large data transfers to and from the MC Unit memory can be performed by sending explicit messages from the Master when required The MC Unit has three MCW151 E or two MCW151 DRT E serial ports for communication to several external devices Next to the connection to the Per sonal Computer for configuring the MC Unit can be connected with PCs Pro gramming Terminals PTs and other MC Units The serial ports support the Host Link Master and Slave protocols By using a Servomotor with absolute encoder the motor position is updated automatically in the MC Unit at start up of the system No origin search sequence will be necessary in the system initiation phase 1 Motion Perfect is a product of Trio Motion Technology Limited Features Virtual Axes Hardware based Registration Inputs General purpose Input and Output Signals Reduced Machine Wear Section 1 1 The MC Unit contains a total of 3 axes of
342. this argument is omitted the port as speci fied by INDEVICE will be used 0 RS 232C programming port 0 RS 232C serial port 1 RS 422A 485 serial port 2 Motion Perfect port 0 user channel 5 Motion Perfect port 0 user channel 6 Motion Perfect port 0 user channel 7 OM variable The name of the variable to receive the ASCII code Channel 0 is reserved for the connection to Motion Perfect and or the com mand line interface Please be aware that this channel may give problems for this function INDEVICE INPUT KEY LINPUT The following line be used to store the ASCII character received on the Motion Perfect port channel 5 in k GET 5 k 6 3 87 GOSUB RETURN Type Syntax Description Precautions Arguments See also Example 6 3 88 GOTO Type Syntax Description Structural Command GOSUB label RETURN The GOSUB structure enables a subroutine jump GOSUB stores the position of the line after the GOSUB command and then jumps to the specified abel Upon reaching the RETURN statement program execution is returned to the stored position Labels can be character strings of any length but only the first 15 characters are significant Subroutines on each task can be nested up to 8 levels deep label A valid label that occurs in the program An invalid label will give a compilation error before execution GOTO main GOSUB routine GOTO main routine PRINT Measured position
343. tible Motion Perfect Motion Perfect Version 2 0 or later Note The MC Unit must be used with a Servo Driver with software version 14 or DeviceNet Configuration MCW151 DRT E only later The MC Unit cannot be used with software version 8 A DeviceNet system can be constructed in two ways fixed allocation or free allocation Fixed Allocation A DeviceNet system can be constructed easily without the Configurator With fixed allocation predetermined words are allocated to each node for the Slave s I O An OMRON Master must be used in order to perform fixed allocation More over with fixed allocation only one Master Unit can be used in a DeviceNet network and only one Master Unit may be mounted to a PC Master Unit CPU Unit Slave Slave MC Unit Free Allocation The Configurator can be used to freely allocate the words used by each Slave With free allocation more than one Master Unit can be connected in a DeviceNet network and each Master s Slave I O can be set independently More than one Master Unit may be mounted to each PC and those Masters can be used independently Furthermore other companies Masters can be Motion Control Concepts Section 1 3 used For details refer to the DeviceNet Configurator Operation Manual W328 Master Unit Master Unit Master Unit Configurator CPU Unit B ISA Board Message
344. tion Error No MC Unit has been mounted m A EO A E0 No MC Unit Display and Outputs Alarm Outputs Alarm Code Outputs ALM Output ALO1 ALO2 ALO3 OFF ON ON OFF Note OFF Output transistor is OFF alarm state ON Output transistor is ON Status and Remedy for Alarm At power on A Cause Remedy A The MC Unit is defective Replace the MC Unit m A E1 A E1 MC Unit Timeout 225 Error Handling Section 8 2 Display and Outputs Alarm Outputs Alarm Code Outputs ALM Output ALO1 ALO2 ALO3 OFF ON ON OFF Note OFF Output transistor is OFF alarm state ON Output transistor is ON Status and Remedy for Alarm At power on A Cause Remedy The MC Unit is defective Replace the MC Unit m A E2 A E2 WDC Error of MC Unit Display and Outputs Alarm Outputs Alarm Code Outputs ALM Output ALO1 ALO2 ALO3 OFF ON ON OFF Note OFF Output transistor is OFF alarm state ON Output transistor is ON Status and Remedy for Alarm At power on A Cause Remedy A The MC Unit is defective Replace the MC Unit m A E7 A E7 MC Unit Detection Error when Servo Driver is turned ON A E7 occurs when Servo Driver is used after disconnection of MC Unit without clearing the unit detection Display and Outputs Alarm Outputs Ala
345. tion is depending on how many other low priority task are running If all running tasks have the same priority the tasks will be allocated to all available slots The following examples show the different allocations of the tasks Example 1 Tasks 1 amp 3 and command line task 0 running 1ms 1ms Task 0 Task 3 Task 3 Task 1 Task 3 Task 3 The task 3 is allocated two time slots each millisecond The other time slot is equally allocated to the other tasks over multiple cycles Example 2 Tasks 1 2 amp 3 and command line task 0 running 1ms 1ms Task 0 Task 3 Task 2 Task 1 Task 3 Task 2 Both high priority tasks 3 and 2 are allocated to the two time slots The other time slot is equally allocated to the other tasks over multiple cycles 5 7 Error Processing BASIC Errors Motion Error Host Link Master 94 Caution For the safety of the application it is very important that proper safety mea sures are taken for the different problems which may occur in the system For safe operation at all times the user must make use of the several options to check for these errors in both the MC Unit and Servo Driver As for the MC Unit the BASIC programming language provide the program mer with the freedom to include a lot of safety measures or not This requires a sensible solution which covers all possible behaviour of the system This section will present the poss
346. tnformation Wax number ofinstances Object instance 2 Attribute Instance type Transport type 241 Device Protocol MCW151 DRT E only Appendix B Value 0100 hexadecimal 82 hexadecimal 2 0 S 0000 hexadecimal 0000 hexadecimal N 0000 hexadecimal 0000 hexadecimal DeviceNet service Parameter option Object instance 2 05 Reset No 1 hexadecimal OE Gel Alrbuie Sing 10 Set Attribute Single Note The number of bytes for the consumed and the produced size depends on the Slave Messaging mode of the MC Unit The mode set by pin 7 of the DeviceNet switch settings Pin 7 Slave Connection size Messaging Mode OFF Mode Produced connection size Read area bytes default 0004 hexadecimal Consumed connection size Write area bytes default 0004 hexadecimal Mode II Produced connection size Read area bytes default 0008 hexadecimal Consumed connection size Write area bytes default 0008 hexadecimal MCW151 Object 0x8A Object class Attribute Not supported Not supported Get Set Value read write Yes Yes Need to perform ser vices on Object instance 1 Attribute 242 Device Protocol MCWISI DRT E only Appendix B E Object instance 1 Service 05 Reset 32 Table_Memory_Read_3W E Ric avn memory VR Memory 36 Table Memory Wie SW memory wesw J Memory wiew 243 Append
347. to a position specified as absolute position i e in reference to the origin In multi axis moves the movement is interpolated and the speed acceleration and deceleration are taken from the base axis The specified distances are scaled using the unit conversion factor in the UNITS axis parameter If for example an axis has 4 000 encoder edges mm then the number of units for that axis would be set to 4000 and MOVE ABS 12 5 would move to a position 12 5 mm from the origin MOVEABS works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis Argument pos 1 is applied to the base axis pos 2 is applied to the next axis etc By changing the axis between individual MOVE commands uninterpolated unsynchronised multi axis motion can be achieved Absolute moves can be merged for profiled con tinuous path movements by turning ON the MERGE axis parameter Considering a 2 axis movement the individual speeds are calculated using the equations below Given command MOVE ax ax the current position ay and the profiled speed v as calculated from the SPEED ACCEL and DECEL parameters from the base axis and the total multi axes distance 2 2 L X where x The individual speed v for axis 7 at any time of the movement is calculated as pos i The position to move every axis to in user units starting with the base axis Command function and parameter description
348. trol Axis 1 is run open loop 6 3 174 SERVO PERIOD Type Description Caution 184 System Parameter The SERVO PERIOD parameter sets the servo cycle period of the MC Unit The timing of the execution of the program tasks and the refreshing of the control data and I O of the Unit are all depending on this setting The parame ter is defined in microseconds The MC Unit can be set in either 0 5 ms or 1 0 ms servo cycle Value Description 500 0 5 ms 1000 1 0 ms When the parameter has been set a power down or software reset using DRV RESET must be performed for the complete system Not doing so may result in undefined behaviour Command function and parameter description Section 6 3 See also 6 3 175 SET_BIT Type Syntax Description Arguments See also 6 3 176 SETCOM Type Syntax Description Arguments 6 3 177 SGN Type Syntax Description DRV_RESET System Command SET_BIT bit_number vr_number The SET_BIT command sets the specified bit in the specified VR variable to one Other bits in the variable will keep their values bit_number The number of the bit to be set Range 0 23 vr_number The number of the VR variable for which the bit is set Range 0 250 CLEAR_BIT READ_BIT VR Command SETCOM baud_rate data_bits stop_bits parity port_number mode The SETCOM command sets the serial communications for the serial ports T
349. trol signals occurring atthe ated control signals are too long Separate the control signal same frequency Check whether the control sig lines and the power lines a application nal lines and power lines are Usea low impedance power bundled together supply for the control signal lines 36 The control signals are not Check whether the control sig Correct the wiring properly grounded nal shield is properly grounded at the Servo Driver Check whether the control sig nal lines are in contact with ground 37 Twisted pair or shielded cable Check whether twisted pair Use twisted pair and shielded is not being used between the cables are used for the encoder cable as in the wiring exam MC Unit and other devices signals and speed references ples and whether the cables are shielded 229 Problems and Countermeasures Section 8 3 No Problem Probable causes Items to check Remedy 38 The motor axis is The gain adjustment is insuffi Perform autotuning vibrating cient The gain is too low Manually adjust increase unsteadily the gain 39 The gain cannot be adjusted This particularly tends to occur Increase the mechanical rgid because the mechanical rigidity systems with vertical axes ity is too weak scalar robots palletisers and Re adjust the gain so on which p
350. unning tasks When using either VR or Table variables be sure to use only one task to write to one particular variable This to avoid problems of two program tasks writing unexpectedly to one variable 2 The Table and VR data in RAM are not backed up and will be lost when the power of the MC Unit is switched OFF If valid data needs to be recov ered during start up write the data into Flash memory using the FLASHVR command Named variables or local variables can be declared in programs and are local to the task This means that two or more programs running on different tasks can use the same variable name but their values can be different Local vari ables cannot be read from any task except for the one in which they are declared Local variables are always cleared when a program is started The local variables can be cleared by using either the CLEAR or the RESET com mand A maximum of 255 local variables can be declared Only the first 16 charac ters of the name are significant Undefined local variables will return zero Local variables cannot be declared on the command line The BASIC programs are executed in descending order through the lines Labels can be used to alter this execution flow using the BASIC commands 87 BASIC Programming Using Variables and Labels Section 5 2 GOTO and GOSUB To define a label it must appear as the first statement on a line and it must be ended by a colon Labels can be character strings
351. usly moving belt and further along the line are picked up A detection system gives an indication as to whether a piece is in front of or behind its nominal position and how far In the example below axis 0 is assumed to be the base axis and it executes a continuous forward movement and a superimposed move on axis 2 is used to apply offsets according to the offset calculated in a subroutine FORWARD Set continuous move ADDAX 2 Add axis 2 for correction REPEAT GOSUB getoffset Get offset to apply MOVE offset AXIS 2 UNTIL IN 2 ON Until correction is done System Parameters AINO AIN1 AIN2 AIN3 117 Command function and parameter description Section 6 3 Description See also Example 6 3 22 AND Type Syntax Description Arguments Examples 118 The AIN parameters provide four analog channels which contain the Servo Driver monitor data signals The channels return a decimal representation of the internal Servo Driver data The following data can be accessed Param Description Range eter AINO Servo Driver analog input 26214 26213 gt 12 V 12 V REF connected to CN1 pin 5 and 6 AIN1 Servo Driver torque command 15000 15000 gt max torque max signal torque AIN2 Servomotor rotation speed sig 15000 15000 gt overspeed over nal speed AIN3 Servo Driver torque monitor sig 15000 15000 gt max torque max nal
352. ut allocated to CN1 42 DRV_READ 50A lt gt 2881 THEN RV_WRITE 550 52881 R force_reset TRUE DIF Pn50B Input signal selection 2 Pn50B 0 3 NOT Signal Input allocated to CN1 43 Pn50B 1 8 RESET Signal Input always disabled Pn50B 2 8 PCL Signal Input always disabled Pn50B 3 2 NCL Signal Input always disabled DRV_READ 50B lt gt 8883 THEN RV_WRITE 50B 8883 R force_reset TRUE DIF Pn50C Input signal selection 3 Pn50C 0 8 RDIR Signal Input always disabled Pn50C 1 8 SPD1 Signal Input always disabled Pn50C 2 8 SPD2 Signal Input always disabled Pn50C 3 8 TVSEL Signal Input always disabled DRV_READ 50C lt gt 8888 THEN RV_WRITE 50C 8888 R force_reset TRUE DIF Pn511 Registration Input signal selection Pn511 0 8 Always disabled Pn511 1 8 Always disabled Pn511 2 8 Always disabled Pn511 3 6 EXT3 Print Registration Input allocated a to CN1 46 rising edge selected Pn511 3 F EXT3 Print Registration Input allocated eL to CN1 46 falling edge DRV 5511 lt gt 58888 THEN RV WRITE 511 8888 R force reset TRUE DIF Initialisation parameters II no re start reset required 100 Speed loop gain DRV_READ 100 lt gt 80 TH RV_WRITE 100 80 DIF 2 101 Speed loop integration constant DRV_READ 101 l
353. uted in the MC Unit 3 2 System Set up Servo Driver Settings The Servo Driver is required to have the following settings Refer to the Reading and writing Servo Driver parameters Clearing the alarm status of the Servo Driver OMNUC W series User s manual 1531 for details Param Parameter Name Required Explanation Remark eter No Setting 000 1 Control Mode 0 Speed Control Selection 9 Torque Speed Control Pn002 0 Torque command 0 Not used input during 1 Use TREF as analog torque speed control limit input 002 1 Speed command 0 Not used input during 1 Use S REF as analog speed torque control limit input Pn003 0 Monitor 1 2 Torque Reference Monitor 003 1 Monitor 2 0 Motor Speed Monitor Pn50A 0 Input Signal Allo 1 User defined cation Mode 50 1 RUN Signal Input 8 Always disabled Switch is controlled by the MC Allocation Unit Pn50A 2 MING Signal Input 8 Always disabled Switch is controlled by the MC Allocation Unit Pn50A 3 POT Signal Input 2 Assigned to CN1 pin 42 valid Allocation for low input 8 Always disabled Pn50B 0 NOT Signal Input 3 Assigned to CN1 pin 43 valid Allocation for low input 8 Always disabled Pn50B 1 RESET Signal 8 Always disabled Switch is controlled by the MC Input Allocation Unit Pn50C 3 TVSEL Signal 8 Always disabled Switch is controlled by the MC Input Allocation
354. value 3 1416 A constant is read only circum 100 PRINT Radius circum 2 PI Task Parameter The PMOVE parameter contains the status of the task buffers The parameter will return TRUE if the task buffers are occupied and FALSE if they are empty When the task executes a movement command the task loads the movement information into the task move buffers The buffers can hold one movement instruction for any group of axes PMOVE will be set to TRUE when loading of the buffers has been completed When the next servo interrupt occurs the motion generator will load the movement into the next move NTYPE buffers of the required axes if they are available When this second transfer has been completed PMOVE will be cleared to zero until another move is executed in the task Each task has its own PMOVE parameter Use the PROC modifier to access the parameter for a certain task Without PROC the current task will be assumed This parameter is read only NTYPE PROC Axis Parameter The PP STEP parameter contains an integer value that scales the incoming raw encoder count The incoming raw encoder count will be multiplied by PP STEP before being applied Scaling can be used to match encoders to high resolution motors for position verification or for moving along circular arcs on machines where the number of encoder edges distance is not the same on the axes The valid range is 1023 1 and 1 1023 Default is value 1 169
355. value including zero AXIS DECEL UNITS BASE 0 ACCEL 100 Set acceleration rate PRINT Acceleration rate ACCEL mm s s ACCEL AXIS 2 100 Sets acceleration rate for axis 2 Mathematical Function ACOS expression The ACOS function returns the arc cosine of the expression The expression value must be between 1 and 1 The result in radians will be between 0 and PI Input values outside the range will return zero expression Any valid BASIC expression gt gt PRINT ACOS 1 3 1416 Motion Control Command The ADD DAC command can provide dual feedback control by allowing a secondary encoder axis 1 to be used on the servo axis axis 0 The com mand allows the output of 2 servo loops to be summed to determine the speed reference to the servo driver This command is typically used in applications such as a roll feed where a secondary encoder would be required to compensate for slippage Axis 0 Axis 1 For using ADD DAC it is necessary for the two axes with physical feedback to link to a common axis on which the required moves are executed Typically this would be achieved by running the moves on one of the two axes and using ADDAX or CONNECT to produce a matching demand position DPOS for both axes The servo loop gains need to be set for both axes The servo 115 Command function and parameter description Section 6 3 6 3 19 ADDAX AXIS 116 Note Arguments See also Examples
356. viously written to the table is location 1000 The total Table size is indicated by the TSIZE Command function and parameter description Section 6 3 Precautions Arguments See also Examples 6 3 188 TAN Type Syntax Description Arguments Example 6 3 189 TICKS Type Description parameter Note that this value is one more than the highest defined element address The table can be deleted with by using DEL TABLE or NEW TABLE on the command line 1 Applications like the CAM command CAMBOX command and the SCOPE command in Motion Perfect all use the same Table as the data area Do not use the same data area range for different purposes 2 The Table and VR data can be accessed from all different running tasks To avoid problems of two program tasks writing unexpectedly to one global variable write the programs in such a way that only one program writes to the global variable at a time 3 The Table and VR data in RAM will be lost when the power is switched OFF If valid data needs to be recovered during start up write the data into Flash memory using the FLASHVR command address The first location in the Table to read or write Range 0 7999 value The value to write at the given location and at subsequent locations CAM CAMBOX DEL FLASHVR NEW SCOPE TSIZE VR Example 1 TABLE 100 0 120 250 370 470 530 550 The above line loads the following internal table Table Entry Value
357. w is next opened This removes the need to set each individ ual control again every time the scope window is opened The Reset Scope Configuration Button can be pressed to reset the scope configuration clearing all controls to their default values Status Indicator The Status Indicator is located between the Options Button and the Reset Scope Configuration Button This indicator changes color according to the current status of the scope as follows Red Scope stopped Black Waiting for MC Unit to complete recording data Yellow Retrieving data from the MC Unit Each scope channel has the following channel specific controls organized in each of four channel control blocks surrounded by a colored border The color of the border is the same as the color for the channel trace on the display VP_SPEED o 71 AS Each channel has the following Motion Perfect Tools Section 7 5 Parameter Box The parameters which the scope can record and display are selected using a pull down list box in the upper left corner of each channel control block Depending upon the parameter chosen the next label will switch between axis or channel It is also possible to plot the points held in the MC Unit Table array directly by selecting the Table parameter followed by the number of a channel whose first last points have been configured using the Advanced Options Window which is described later in this section If
358. w paper through servo driven rollers and then stop it while it is cut The paper is printed with a registration mark This mark is detected and the length of the next sheet is adjusted by scaling the CAM profile with the third argument table multiplier of the CAM command Set window open and close length 200 OPEN WIN 10 CLOSE WIN length 10 GOSUB Initial loop TICKS 0 Set servo cycle counter to 0 IF MARK THEN offset REG_POS Next line makes offset ve if at end of sheet IF ABS offset length offset THEN offset offset length ENDIF PRINT Mark seen at offset 5 1 ELSE offset 0 PRINT Mark not seen ENDIF Command function and parameter description Section 6 3 6 3 154 REMAIN Type Description Note See also Example 6 3 155 RENAME Type Syntax Description Precautions Arguments See also Example 6 3 156 REP_DIST Type Description Reset registration prior to each move EFPOS 0 REGIST 2 768 Allow mark at first 10 mm or last 10 mm of sheet 0 50 length offset 0 5 cf 1000 WAIT UNTIL TICKS gt 500 GOTO loop The variable cf is a constant which would be calculated depending on the machine draw length per encoder edge Axis Parameter The REMAIN parameter contains the distance remaining to the end of the current move It can be checked to see how much of the move has been com pleted REMAIN is defined i
359. when the program is running The next line in a program can be executed by doing one of the following Use the Step button yellow alongside the required program name in the Program List box on the Control Panel f the required program is currently selected see Selected Program box of the Control Panel then push the Step button of this box Push the Step button of the Editor Window toolbar Selecting Start Stepping from the Program menu If one program is exe cuting on several tasks then the task number can also be specified The next program line to be executed will be highlighted in the Editor Window with a green background The operation can be repeated to step multiple lines Breakpoints are special place markers in the code which allow us to identify a particular section or sections of the program when debugging the code At the point on which the breakpoint is inserted the program will pause and return control to Motion Perfect This is enabling to check the current state of the controller or single step through the code of the program Breakpoints are indicated in the program using the TRON command Breakpoints can be set by moving the cursor to the required line and then either Typing command TRON on this line Pushing the Add Breakpoint button on the Editor Window toolbar Selecting Toggle Breakpoint from the Program Menu Pressing Ctrl B from the keyboard A TRON command will be inserted at the current lin
360. which two can be configured as vir tual axis The virtual axes are internal axes and are used for computational purposes They act as perfect servo axes and are very useful for creating pro files They can be linked directly to the servo axes There is a high speed registration input for the encoder input and output axis On the rising or falling edge of a registration input the MC Unit will store the current position in a register The registered position can then be used by the BASIC program as required The registered positions are captured in hard ware Starting stopping limit switching origin searches and many other functions can be controlled by the MC Unit The general I O can have specific functions such as the registration limit switches but also can be freely used The traditional trapezoidal speed profile is provided to generate smooth start ing and stopping The trapezoidal corners can be rounded off to S curves Trapezoidal Speed Profile with Trapezoidal Speed Profile with Square Corners S curve Corners Speed Speed Time Time System Configuration 1 2 System Configuration Basic Configuration W series Servo Driver MCW151 Section 1 2 Personal Computer running Motion Perfect Personal Computer p ERE Typical applicable Units for Serial Comm Ports PC
361. y 011 2 Encoder type Fn011 E 3 Driver specification Fn011 Y The format of the data can be found in the Servo Driver manual selection The selection of the parameter type of the Servo Driver to be read 0 Pn parameter 1 Un parameter 2 Fn011 function information Servomotor specification If the selection argument is omitted the Pn parameter will be read See also DRV WRITE HEX PRINT hexadecimal input 133 Command function and parameter description Section 6 3 6 3 58 6 3 59 134 Examples Example 1 Reading the Input signal selection 1 parameter which contains a hexadeci mal selection value gt gt VR 0 DRV_READ 50A gt gt PRINT HEX VR 0 2881 Reading the Speed loop gain parameter which contains an integer value gt gt PRINT DRV_READ 100 80 Example 2 Monitoring cumulative load ratio Un009 parameter gt gt PRINT DRV_READ 009 1 Example 3 Reading the capacity of the connected Servomotor from Fn011 P gt gt PRINT DRV_READ 1 2 3 0000 Apparently this is a 30 W Servomotor DRV_RESET Type Servo Driver Command Syntax DRV_RESET Alternatives EX INITIALISE Description The DRV_RESET command will software reset both the Servo Driver as the MC Unit Execution of DRV_RESET will have the following actions The Servo Driver parameter changes are initiated Programs will read again from Flash memory and run depending on the RUNTY
362. y beginning with the designated word RD DM AREA READ Reads the specified number of words from Table memory beginning with the designated word memory writing WR CIO AREA WRITE Writes the specified data in word units to VR memory beginning with the designated word WD DM AREA WRITE Writes the specified data in word units to Table mem ory beginning with the designated word 65 Serial Communications Section 4 1 Type Header Name Function Code Testing TS TEST Returns unaltered a single block that was sent from the Master PC model code MM PC MODEL READ Reads the model code of the MC Unit as specified by reading the HLS_MODEL parameter memory area QQMR REGISTER MEMORY Registers the I O table with the contents of the actual registration and configuration reading QQIR READ I O MEMORY Reads the registered I O memory words bits all at once Host Link communi XZ ABORT command only Aborts the operation being performed by a Host Link cations processing command and returns to the initial status INITIALIZE command only Initializes the transfer control procedures for all Host Link Units IC Undefined command This is the response when the command header code response only is invalid End Code Summary These are the response end codes that can be returned in the response frame End Contents Probably cause
363. y result in an unexpected operation or damage to the prod uct Conformance to EC Directives Applicable Directives EMC Directives Low Voltage Directive XV Conformance to EC Directives 8 1 8 1 1 xvi Concepts Note 1 2 3 EMC Directives OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or ma chines The actual products have been checked for conformity to EMC standards see the following note Whether the products conform to the standards in the system used by the customer however must be checked by the customer EMC related performance of the OMRON devices that comply with EC Directives will vary depending on the configuration wiring and other conditions of the equipment or control panel in which the OMRON devices are installed The customer must therefore perform final checks to confirm that devices and the over all machine conform to EMC standards Applicable EMC Electromagnetic Compatibility standards are as follows EMS Electromagnetic Susceptibility 61000 6 2 EN50082 2 EMI Electromagnetic Interference EN55011 Class A Group 1 Low Voltage Directive Always ensure that devices operating at voltages of 50 to 1 000 VAC or 75 to 1 500 VDC meet the required safety standards Conformance to EC Directives The W series Servo Driver complies with EC Directives To ensure that the machine or device
364. y to the Unit is overloaded or short cir cuited the voltage may drop and result in the outputs being turned OFF As a counter measure for such problems external safety measures must be provided to ensure safety in the system It is the nature of high speed motion control and motion control language programming and multi tasking systems that it is not always possible for the system to validate the inputs to the functions or to validate the combination of functions It is the responsibility of the programmer to ensure that the various BASIC statements are invoked correctly with the correct number of parameters and inputs that the values are correctly validated prior to the actual calling of the functions and that the BASIC pro gram s provide the desired functionality for the application Failure to do so may result in unexpected behaviour loss or damage to the machinery When the SERVO PERIOD parameter has been set to change the servo cycle period of the MC Unit a power down or software reset using DRV RESET must be performed for the complete system Not doing so may result in undefined behaviour Use the Servomotors and Servo Drivers in a specified combination Using them incor rectly may result in fire or damage to the product Do not operate the control system in the following locations Locations subject to direct sunlight Locations subject to temperatures or humidity outside the range specified in the speci fications

Download Pdf Manuals

image

Related Search

OMRON R88A MCW151 E/R88A MCW151 DRT E Manual omron r87f-a1a15hp omron r88a-bat01g omron r88d-1sn omron r87f-a4a15hp omron r87t-a1a05h r88a-mcw151-e omron r87f-a1a13hp omron r88d-1sn08h-ect r88a-mcw151-drt-e omron g8w 1c6t r dc12 omron servo drive r88d-1sn manual pdf

Related Contents

        MAXIM MAX1920/MAX1921 handbook          WiMAX modem User Manual : Free Download, Borrow, and Streaming : Internet Archive  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.