Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual

Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual

Hide thumbs Also See for TJ1-MC04 - PROGRAMMING 1:
Table of Contents

Advertisement

Cat. No.
I52E-EN-03
Trajexia motion control system
TJ1-MC04
TJ1-MC16
programming manual

Advertisement

Table of Contents
loading

Summary of Contents for Omron TJ1-MC04 - PROGRAMMING 1

  • Page 1 Cat. No. I52E-EN-03 Trajexia motion control system TJ1-MC04 TJ1-MC16 programming manual...
  • Page 2 © OMRON, 2007 All rights reserved. No part of this publication may be reproduced, stored in a retrieval sys- Trademarks and Copyrights tem, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
  • Page 3: Sibp-C730600

    LINK interface manual operation of Sigma-III servo Control System. drives with MECHATRO- Please read this manual and the related manuals listed in the following table LINK interface carefully and be sure you understand the information provided before V7 Inverter TOEP C71060605 02-OY Describes the installation and attempting to install or operate the Trajexia Motion Control units.
  • Page 4 During the development of Trajexia new functionality was added to the controller unit after market release. This functionality is implemented in the firmware, and/or the FPGA of the controller unit. In the table below, the overview of the applicable functionality is shown related to the firmware and FPGA version of the TJ1-MC__.
  • Page 5: Table Of Contents

    Trajexia system ......................................22 Introduction ..............................................22 2.1.1 Trajexia hardware ..........................................23 2.1.2 This manual ............................................23 Multitasking BASIC programming ........................................23 BASIC programming............................................24 2.3.1 Axis, system and task statements ....................................24 2.3.2 Memory areas...........................................24 2.3.3 Data structures and variables......................................25 2.3.4 Mathematical specifications......................................27 Motion execution.............................................28 2.4.1 Motion generator ..........................................28...
  • Page 6 = (Assignment) ..........................................42 3.2.8 <> (Is not equal to) ...........................................42 3.2.9 > (Is greater than) ..........................................43 3.2.10 >= (Is greater than or equal to)......................................43 3.2.11 < (Is less than) ..........................................43 3.2.12 <= (Is less than or equal to)......................................43 3.2.13 $ (Hexadecimal input)........................................44 3.2.14...
  • Page 7 Contents 3.2.38 BASICERROR..........................................52 3.2.39 BATTERY_LOW..........................................53 3.2.40 BREAK_RESET ..........................................53 3.2.41 CAM..............................................53 3.2.42 CAMBOX ............................................55 3.2.43 CANCEL ............................................56 3.2.44 CHECKSUM .............................................56 3.2.45 CHR..............................................56 3.2.46 CLEAR..............................................57 3.2.47 CLEAR_BIT ............................................57 3.2.48 CLEAR_PARAMS ..........................................57 3.2.49 CLOSE_WIN ............................................57 3.2.50 CLUTCH_RATE ..........................................57 3.2.51 COMMSERROR..........................................58 3.2.52 COMMSTYPE ..........................................58 3.2.53...
  • Page 8 3.2.95 ENCODER_CONTROL ........................................74 3.2.96 ENCODER_ID ..........................................75 3.2.97 ENCODER_RATIO...........................................75 3.2.98 ENCODER_READ..........................................75 3.2.99 ENCODER_STATUS ........................................76 3.2.100 ENCODER_TURNS .........................................76 3.2.101 ENCODER_WRITE ..........................................76 3.2.102 ENDIF...............................................76 3.2.103 ENDMOVE ............................................77 3.2.104 EPROM ............................................77 3.2.105 ERROR_AXIS ..........................................77 3.2.106 ERROR_LINE...........................................77 3.2.107 ERRORMASK ..........................................78 3.2.108 ETHERNET ............................................78 3.2.109 EX..............................................79 3.2.110 EXP ..............................................79...
  • Page 9 Contents 3.2.118 FE_RANGE ............................................81 3.2.119 FHOLD_IN............................................81 3.2.120 FHSPEED............................................82 3.2.121 FINS_COMMS..........................................82 3.2.122 FLAG ..............................................84 3.2.123 FLAGS..............................................84 3.2.124 FOR..TO..STEP..NEXT ........................................85 3.2.125 FORWARD ............................................86 3.2.126 FPGA_VERSION..........................................86 3.2.127 FRAC..............................................86 3.2.128 FRAME .............................................86 3.2.129 FREE ..............................................87 3.2.130 FS_LIMIT............................................87 3.2.131 FWD_IN............................................87 3.2.132 FWD_JOG ............................................88 3.2.133 GET ..............................................88 3.2.134 GLOBAL ............................................89...
  • Page 10 3.2.184 MTYPE ............................................116 3.2.185 NAIO...............................................117 3.2.186 NEG_OFFSET..........................................117 3.2.187 NEW ...............................................117 3.2.188 NEXT ..............................................117 3.2.189 NIO ..............................................117 3.2.190 NOT ..............................................118 3.2.191 NTYPE............................................118 3.2.192 OFF ..............................................118 3.2.193 OFFPOS............................................118 3.2.194 ON ..............................................119 3.2.195 ON.. GOSUB ..........................................119 3.2.196 ON.. GOTO.............................................119 3.2.197 OP ..............................................119 PROGRAMMING MANUAL...
  • Page 11 Contents 3.2.198 OPEN_WIN ............................................120 3.2.199 OR ..............................................120 3.2.200 OUTDEVICE...........................................121 3.2.201 OUTLIMIT............................................121 3.2.202 OV_GAIN............................................121 3.2.203 P_GAIN ............................................122 3.2.204 PI ..............................................122 3.2.205 PMOVE............................................122 3.2.206 POS_OFFSET..........................................123 3.2.207 POWER_UP ...........................................123 3.2.208 PRINT.............................................123 3.2.209 PROC .............................................124 3.2.210 PROC_STATUS ..........................................124 3.2.211 PROCESS ............................................125 3.2.212 PROCNUMBER..........................................125 3.2.213 PROFIBUS .............................................125 3.2.214 PSWITCH ............................................126...
  • Page 12 Contents 3.2.238 SCOPE_POS ..........................................137 3.2.239 SELECT............................................137 3.2.240 SERVO ............................................137 3.2.241 SERVO_PERIOD ...........................................137 3.2.242 SET_BIT ............................................138 3.2.243 SETCOM ............................................138 3.2.244 SGN..............................................139 3.2.245 SIN..............................................139 3.2.246 SLOT ..............................................139 3.2.247 SPEED ............................................139 3.2.248 SQR..............................................140 3.2.249 SRAMP............................................140 3.2.250 STEP ..............................................140 3.2.251 STEP_RATIO ..........................................140 3.2.252 STEPLINE ............................................141 3.2.253 STOP..............................................141...
  • Page 13 3.2.283 WDOG ............................................151 3.2.284 WHILE..WEND ..........................................151 3.2.285 XOR..............................................152 Communication protocols ..................................153 Available interfaces............................................153 Ethernet ..............................................153 4.2.1 Communicate with Trajexia directly from your computer ...............................154 4.2.2 Communicate with Trajexia remotely .....................................155 4.2.3 Trajexia Tools protocol ........................................156 4.2.4 FINS server protocol ........................................156...
  • Page 14 Help Menu .............................................224 Examples and tips ....................................225 How-to’s................................................225 6.1.1 Startup program ..........................................225 6.1.2 Gain settings ..........................................229 6.1.3 Setting the UNITS axis parameter and gear ratio................................239 6.1.4 Mapping Servo Driver inputs and outputs ..................................251 6.1.5 Origin search ..........................................253 6.1.6 Registration ............................................259 6.1.7 Tracing and monitoring........................................269...
  • Page 15 Contents 7.3.1 System errors ..........................................302 7.3.2 I/O data communication problems....................................303 TJ1-DRT ...............................................304 7.4.1 System errors ..........................................304 7.4.2 I/O data communication problems....................................304 TJ1-ML__..............................................304 7.5.1 System errors ..........................................304 7.5.2 Bus errors ............................................304 TJ1-FL02 ..............................................305 7.6.1 System errors ..........................................305 PROGRAMMING MANUAL...
  • Page 16: Safety Warnings And Precautions

    Not doing so may result in serious accidents. WARNING WARNING Do not attempt to take the Unit apart and do not touch any of the When the 24-VDC output (I/O power supply to the TJ1) is over- internal parts while power is being supplied.
  • Page 17: Operating Environment Precautions

    Caution The TJ1 will turn off the WDOG when its self-diagnosis function Pay careful attention to the polarity (+/-) when wiring the DC power detects any error.As a countermeasure for such errors, external supply.A wrong connection may cause malfunction of the system.
  • Page 18: Application Precautions

    Caution The numbers of the Flexible axes will change if MECHATROLINK- Do not apply voltage to the Input Units in excess of the rated input II network errors occur during start-up or if the MECHATROLINK-II voltage.
  • Page 19 Safety warnings and precautions Caution Caution Always connect to a class-3 ground (to 100Ω or less) when install- Remove the dust protective label after the completion of wiring to ing the Units. ensure proper heat dissipation. Not connecting to a class-3 ground may result in electric shock.
  • Page 20 Use the dedicated connecting cables specified in operation manu- Caution als to connect the Units.Using commercially available RS-232C When replacing parts, be sure to confirm that the rating of a new computer cables may cause failures in external devices or the part is correct.
  • Page 21: Unit Assembly Precautions

    Install the unit properly. Improper installation of the unit may result in malfunction. Caution Be sure to mount the Termination Unit supplied with the TJ1- MC__ to the right most Unit. Unless the Termination Unit is properly mounted, the TJ1 will not function properly.
  • Page 22: Trajexia System

    CJ-series PLC CX-one Trajexia is a stand-alone modular system that allows maximum Trajexia Tools NS-series HMI flexibility and scalability. At the heart of Trajexia lies the TJ1 multi- PROFIBUS-DP DEVICENET Master Master tasking motion coordinator. Powered by a 32-bit DSP, it can do...
  • Page 23: Trajexia Hardware

    Trajexia hardware Drives and Inverters A wide choice of rotary, linear and direct-drive servos as well as inverters are The Trajexia hardware is described in the Trajexia Hardware Reference available to fit your needs in compactness, performance and reliability. The manual.
  • Page 24: Basic Programming

    The PROC modifier allows the user to the value of its parameter and return the absolute value of it to be used by access a parameter of a certain task. Without PROC the current task is some other function or command.
  • Page 25: Data Structures And Variables

    TJ1-MC__ are explained in this section. Furthermore also the use of same time. The size of this memory is 1024 slots with indexes 0 to 1023. A labels will be specified.
  • Page 26 GOTO and GOSUB. To define a label it must appear as the first statement length = 3 length = 3 on a line and it must be ended by a colon (:). Labels can be character strings RETURN RETURN of any length, but only the first 15 characters are significant.
  • Page 27: Mathematical Specifications

    The single precision floating point format is internally a 32 bit value. It has an The comparison function considers a small difference between values as 8 bit exponent field, a sign bit and a 23 bit fraction field with an implicit 1 as equal to avoid unexpected comparison results. Therefore any two values for −39...
  • Page 28: Motion Execution

    Trajexia system Motion execution Every task on the TJ1-MC__ has a set of buffers that holds the information from the motion commands given. 2.4.1 Motion generator The motion generator has a set of two motion buffers for each axis. One buffer called MTYPE, holds the Actual Move, which is the move currently executing on the axis.
  • Page 29: Sequencing

    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 specified axes is loaded from the task buffers into the NTYPE buffers and the corresponding task buffers are marked as idle.
  • Page 30: Command Line Interface

    Trajexia Tools automatically creates a project which contains the programs COPY Duplicates a specified program. to be used for an application. The programs of the project are kept both in RENAME Renames a specified program. the controller and on the computer. Whenever a program is created or Deletes the current selected program or a specified program.
  • Page 31: Program Compilation

    Program execution The TJ1-MC__ system compiles programs automatically when required. It is The timing of the execution for the different tasks and the refreshing of the I/ not normally required to force the TJ1-MC__ to compile programs, but O of the TJ1-MC__ revolves around the servo cycle period of the system.
  • Page 32 Trajexia system 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, it is assigned the highest available task priority. Setting programs to run at start-up Programs can be set to run automatically at different priorities when power is turned on.
  • Page 33: Basic Commands

    Changes the ACCEL and DECEL at the same time. ENCODER_READ Reads a parameter of the EnDat absolute encoder. ADD_DAC Sum to the DAC value of one axis to the analogue output of the ENCODER_WRITE Writes to a parameter of the EnDat absolute encoder. base axis.
  • Page 34: Axis Parameters

    DAC_SCALE Sets scale and polarity applied to DAC values. MOVELINK Creates a linear move on the base axis linked via a software gear- DATUM_IN Contains the input number to be used as the origin input. box to the measured position of a link axis.
  • Page 35 Contains the speed reference value being applied to the Servo Driver for both open as closed loop. MERGE Is a software switch that can be used to enable or disable the merging of consecutive moves. SERVO Determines whether the axis runs under servo control or open loop.
  • Page 36: Communication Commands And Parameters

    Waits for a string and puts it in VR variables. HLM_TIMEOUT Defines the Host Link Master timeout time. Sets one or more outputs or returns the state of the first 24 out- HLM_WRITE Writes data to the Host Link Slave from either VR or TABLE var- puts.
  • Page 37: Mathematical Functions And Operands

    Returns the sign of an expression. > (IS GREATER THAN) Checks two expressions to see if the expression on the left is greater than the expression on the right. Returns the sine of an expression.
  • Page 38: Program Control Commands

    Name Description Deletes a program from the motion controller. IF..THEN..ELSE..ENDIF Controls the flow of the program base on the results of the con- dition. Displays a list of the programs in the motion controller, their size and their RUNTYPE on the standard output.
  • Page 39: System Parameters

    Writes and reads data to and from the global (VR) variables. Resets the controller. VRSTRING Combines VR memory values so they can be printed as a string. FLAG Sets and reads a bank of 32 bits. Holds program execution for the number of milliseconds speci- FLAGS Read and sets FLAGS as a block.
  • Page 40: Task Commands And Parameters

    Controls the DAC output in conjunction with the Following Error value. Name Description DATE Sets or returns the current date held by the real time clock. ERROR_LINE Contains the number of the line which caused the last BASIC Sets or returns the current day. program error.
  • Page 41: All Basic Commands

    Any valid BASIC expression. Example result = 3 * 7 • expression2 Assigns the value 21 to the variable result. Any valid BASIC expression. See also Example result = 4 + 3 Assigns the value 7 to the variable result.
  • Page 42: Power)

    Example IF a <> 10 THEN GOTO label1 Any valid BASIC expression. If variable a contains a value not equal to 10, program execution continues at Example IF a = 10 THEN GOTO label1 label label1. Otherwise, program execution continues with the next state- If variable a contains a value equal to 10, program execution continues at ment.
  • Page 43: (Is Greater Than)

    IF a <= 10 THEN GOTO label1 If variable a contains a value greater than or equal to 10, program execution If variable a contains a value less than or equal to 10, program execution con- continues at label label1. Otherwise, program execution continues with the tinues at label label1.
  • Page 44: (Hexadecimal Input)

    Note: Communications Channels greater than 3 will only be used when run- Description ' marks all that follows it on a line as comment and not program code. Com- ning the Trajexia Tools software. ment is not executed when the program is run. You can use ' at the beginning Arguments of a line or after a valid statement.
  • Page 45: Abs

    ACCEL and DECEL axis parameters. Description The ACOS function returns the arc-cosine of the expression. The expression value must be between -1 and 1. The result in radians is between 0 and PI. Arguments • rate Input values outside the range will return 0.
  • Page 46: Add_Dac

    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 loop outputs are summed to the speed reference output of the servo axis. Use ADD_DAC(-1) to cancel the link.
  • Page 47: Addax_Axis

    The material feed is via a lazy loop arrangement which is fitted with an ultra-sonic height sensing device. The output of the ultra-sonic sensor is in Type Axis parameter (read-only) the range 0V to 4V where the output is at 4V when the loop is at its longest. Syntax ADDAX_AXIS See also...
  • Page 48: Aout

    1 AND 0 = 0 Description The ASIN function returns the arc-sine of the argument. The argument must 1 AND 1 = 1 have a value between -1 and 1. The result in radians is between -PI/2 and PI/ Arguments • expression1 2.
  • Page 49: Atype

    Syntax ATYPE = value Type Program command Description The ATYPE axis parameter sets the axis type for the axis. The valid values Syntax AUTORUN depend on TJ1 module the Servo Driver controlling the axis is connected to. Description The AUTORUN command starts all the programs that have been set to run at See the table below.The ATYPE parameters are set by the system at start-up.
  • Page 50: Axis_Display

    This command will disable axis 3 independently of other axes in the system. setting are two yellow LEDs showing axis status. The default value of this See also AXIS, DISABLE_GROUP parameter on start-up for all axes is 0. The valid values are shown in the table below. 3.2.35 AXISSTATUS Arguments...
  • Page 51: B_Spline

    Expands an existing profile stored in the TABLE area using the B-Spline math- ematical function by a configurable expansion factor to another area in the TABLE. This is ideally used where the source CAM profile is too course and needs to be extrapolated into a greater number of points. PROGRAMMING MANUAL...
  • Page 52: Basicerror

    BASIC commands Description The BASE command is used to set the default base axis or to set a specified Example BASE(0) axis sequence group. All subsequent motion commands and axis parameters MOVE(100,-23.1,1250) will apply to the base axis or the specified axis group unless the AXIS com- In this example, axes 0, 1 and 2 will move to the specified positions at the mand is used to specify a temporary base axis.
  • Page 53: Battery_Low

    ENDIF The name of the program from which you want to remove all break STOP points. If an error occurs in a BASIC command in this example, the error routine will Example BREAK_RESET "simpletest" be executed. Will remove all break points from program simpletest.
  • Page 54 12500 Example Assume that a motion is required to follow the position equation t(x) = x*25 + 10000(1-cos(x)). Here, x is in degrees. This example is for a TABLE that pro- 10340 vides a simple oscillation superimposed with a constant speed.
  • Page 55 2 to 64000. Being able to specify • link_axis the start point allows the TABLE array to be used to hold more than one pro- The axis to link to. file and/or other information. The TJ1-MC__ moves continuously between the •...
  • Page 56: Cancel

    If the checksum is incorrect the program will not run. MHELICAL and MOVEMODIFY) will be decelerated at the deceleration rate Arguments as set by the DECEL parameter and then stopped. Other moves will be imme- Example No example.
  • Page 57: Clear

    • vr_number Syntax CLUTCH_RATE The number of the VR variable for which the bit will be reset. Range: 0 - Description The CLUTCH_RATE axis parameter defines the change in connection ratio 1023. when using the CONNECT command. The rate is defined as amount of ratio Example No example.
  • Page 58: Commserror

    Description The COMMSERROR parameter contains the communication errors that Unit numbers are 0 to 6, with 0 being the unit immediately to the right of have occurred since the last time that it was initialized. the TJ1-MC__. The bits in COMMSERROR are given in the table below.
  • Page 59: Connect

    The Master axis which will drive the base axis. IF IN(start_button)=ON THEN OP(led1,ON) Example In a press feed, a roller is required to rotate at a speed one quarter of the IF key_char=nak THEN GOSUB no_ack_received measured rate from an encoder mounted on the incoming conveyor. The See also roller is wired to axis 0.
  • Page 60: Copy

    Description 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 Description The D_GAIN axis parameter contains the derivative gain for the axis. The to 1.
  • Page 61: D_Zone_Max

    The parameter has 2 purposes: See also D_ZONE_MIN. It is set to value 16 on power up on the built-in axes of the system. This scales the values applied to the higher resolution DAC so that the gains 3.2.62 D_ZONE_MIN required on the axis are similar to those required on the other controllers.
  • Page 62: Date

    Syntax DATUM(sequence) Description Returns or sets the current date held by the Trajexia' s real time clock. The Description The DATUM command makes one of 6 origin searches to position an axis to number may be entered in DD:MM:YY or DD:MM:YYYY format.
  • Page 63: Datum_In

    Bit 11 : Cancelling Move. Syntax DATUM_IN DAT_IN Note that the status can not be cleared if the cause of the problem is still present. Description 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 The axis moves at creep speed forward until the Z marker is encountered.
  • Page 64: Day

    ACCEL, AXIS, UNITS. Type System parameter 3.2.73 DEFPOS Syntax Description Returns the current day as a number 0..6, Sunday is 0. DAY can be set by assignment. Type Axis command Arguments Syntax DEFPOS(pos_1 [ , pos_2 [ , pos_3 [ , pos_4 [, ...]]]]) Example >>DAY=3...
  • Page 65: Del

    (using tus of the TJ1-DRT. Refer to the table for the description of the bits in the data SELECT). The program name can also be specified without quotes. DEL ALL exchange status word.
  • Page 66: Devicenet

    In this example, the TJ1-DRT is configured to exchange data with DeviceNet DEVICENET (unit_number, 2, ...) not executed yet master with 16 output words (received from the master) located at VR(10) to VR(25), and 31 input words (sent to the master) located at VR(150) to DEVICENET (unit_number, 2, ...) executed without error...
  • Page 67: Dir

    DISPLAY parameter may be used to select which bank of I/O should be dis- Description This is used to group any list of axes together for error disabling. If a group of played. axes is made, when an error occurs on one they will all have their The values are in the table below.
  • Page 68: Dpos

    VR parameter. If the command cannot be executed, the value 0 is returned. The command is executed on the driver for the base axis set by BASE. The base axis can be changed with the AXIS modifier, as...
  • Page 69: Drive_Clear

    TJ1-FL02, this parameter sets outputs of the TJ1-FL02. Set bit 8 of this parameter to switch on OUT 0 for an axis. Set bit 9 of this parameter to switch on OUT 1 for an axis. Keep in mind that the same outputs are used by the HW_PSWITCH command.
  • Page 70: Drive_Inputs

    This parameter monitors the status of the inputs of the Servo Driver con- BRK Brake output nected via the MECHATROLINK-II bus. The parameter value is updated each SERVO_PERIOD cycle. It is a bit-wise word with the bits as listed in the table Reserved E_STP below.
  • Page 71: Drive_Read

    VR parameter. If the command cannot be executed, the value 0 is returned. The command is executed on the driver for the base axis set with BASE. It can be changed using the AXIS modifier, like Type Axis command with all the other axis commands and parameters.
  • Page 72: Drive_Status

    Those bits can be seen in the Intelligent drives configuration window Latch Completed in Trajexia Tools, and can be used in programs. The explanation of each bit is given in the table below. (Note: Only bits relevant to MECHATROLINK-II axes In Range/Speed Limit are listed.)
  • Page 73: Drive_Write

    Servo Driver is removed. mand returns -1. If the command cannot be executed, the value 0 is returned. The command is executed on the driver for the base axis set with BASE. It 3.2.90 EDIT can be changed using the AXIS modifier, as with all other axis commands and parameters.
  • Page 74: Encoder

    EnDat encoder return their position. The encoder can be set to either cyclically return its position, of it can be set to a parameter read/write mode. The default after initialization is cyclic position return mode.
  • Page 75: Encoder_Id

    Type Axis parameter parameter stored at specified address. Bits 8 -15 of the address are the EnDat MRS field settings and bits 0 - 7 are the offset within the EnDat MRS block. If Syntax ENCODER_RATIO(denominator,numerator) a CRC error occurs, this command will return -1. For more information see...
  • Page 76: Encoder_Status

    Bits 8 -15 of the address are the EnDat MRS encoder error field. The SF field is in bits 0 - 7, while the ALMC filed is in bits 8 field settings and bits 0 - 7 are the offset within the EnDat MRS block. If a - 15.
  • Page 77: Endmove

    RAM memory in the flash EPROM memory. Whether the programs the last BASIC run-time error in the program task. This value is only valid stored in the flash EPROM memory are copied to RAM at start-up is control- when the BASICERROR parameter is TRUE.
  • Page 78: Errormask

    • unit_number setting of ERRORMASK is 268. Arguments • parameter 0 = IP Address; 2 = Subnet Mask; 3 = MAC address; 8 = Gateway; 11 = Example No example. ARP cache (read-only). See also AXIS, AXISSTATUS, MOTION_ERROR, WDOG. •...
  • Page 79: Exp

    The FAST_JOG axis parameter contains the input number to be used as the Arguments • expression fast jog input. The number can be from 0 to 7. As default the parameter is set Any valid BASIC expression. to -1, no input is selected. Example >>...
  • Page 80: Fastdec

    MOTION_ERROR. This value is only set when the FE exceeds the FE_LIMIT and the SERVO parameter has been set to 0. FE_LATCH is reset to 0 when Arguments the SERVO parameter of the axis is set back to 1.
  • Page 81: Fe_Limit_Mode

    The FHOLD_IN axis parameter contains the input number to be used as the If FE_LIMIT_MODE is set to 1, the axis will only generate a feedhold input. The valid input range is 0 to 31. Values 0 to 15 represent phys- MOTION_ERROR when the FE exceeds FE_LIMIT during 2 consecutive ically present inputs of TJ1-MC__ I/O connector and are common for all axes.
  • Page 82: Fhspeed

    The FHSPEED axis parameter contains the feedhold speed. This parameter This command returns one of the following values, depending on outcome of can be set to a value in user units/s at which speed the axis will move when the execution: the feed-hold input turns on.
  • Page 83 FINS frame length and the capabilities of the client and remote servers. VR(309) are placed in memory CIO50 to CIO59 of the PLC. The timeout is set The range for a Trajexia system is from 1 to 700 integer values, or 1 to to 3 seconds.
  • Page 84: Flag

    Example IF (FLAGS and 8) <>0 then GOSUB somewhere If specified this is the state to set the given flag to i.e. on or off. This can Test if Flag 3 is set. also be written as 1 or 0.
  • Page 85: For

    FOR and NEXT commands are both within the outer tion will continue after NEXT. FOR..TO..STEP..NEXT loop. Note: FOR ... NEXT statements can be nested up to 8 levels deep in a BASIC See also REPEAT..UNTIL, WHILE..WEND. program.
  • Page 86: Forward

    An example is a SCARA robot arm with jointed axes. For the end tip of the robot arm to perform straight line movements in X-Y the motors need to move in a pattern determined by the robots geometry.
  • Page 87: Free

    The FWD_IN axis parameter contains the input number to be used user programs and TABLE array elements. as a forward limit input. The valid input range is 0 to 31. Values 0 to Note: Each line takes a minimum of 4 characters (bytes) in memory. This is for...
  • Page 88: Fwd_Jog

    The FWD_JOG axis parameter contains the input number to be Programming port 0 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.
  • Page 89: Global

    For fast startup the program A valid label that occurs in the program. An invalid label will give a compi- should also be the only process running at power-up. lation error before execution.
  • Page 90: Halt

    3.2.139 HLM_COMMAND Arguments • label A valid label that occurs in the program. An invalid label will give a compi- lation error before execution. Labels can be character strings of any length, but only the first 15 char- Type Communication command acters are significant.
  • Page 91: Hlm_Read

    RS-422A port 2. The Slave has node number 4. Example HLM_COMMAND(HLM_STWR,2,0,2) When data has to be written to a PC using Host Link, the CPU Unit can not be Type Communication command in RUN mode. The HLM_COMMAND command can be used to set it to...
  • Page 92: Hlm_Status

    (or value 1) Example >> HLM_WRITE(1,28,PLC_EM,50,25,MC_VR,200) PLC_LR LR area >> PRINT HEX(HLM_STATUS PORT(1)) (or value 2) Apparently the CPU Unit is in RUN mode and does not accept the write oper- PLC_HR HR area ation. (or value 3) PROGRAMMING MANUAL...
  • Page 93: Hlm_Timeout

    0 - 7 End code The end code can be either the end code which is defined by The parameter applies for the HLM_READ, HLM_WRITE and the Host Link Slave (problem in sent command string) or an HLM_COMMAND commands.
  • Page 94: Hlm_Write

    BASIC commands 3.2.143 HLM_WRITE Arguments • port The specified serial port. 1 = RS-232C serial port 1; 2 = RS-422A serial port 2 • node Type Communication command The Slave node number to send the Host link command to. Range: [0,...
  • Page 95: Hls_Node

    Table variable array 44 and 45. (or value 8) The command can be used with either or 5 parameters. Only 1 parameter is needed to disable the switch or clear FIFO queue. All five parameters are MC_VR Global (VR) variable array needed to enable switch.
  • Page 96: I_Gain

    The function will See also D_GAIN, I_GAIN, OV_GAIN, P_GAIN, VFF_GAIN. typically be called 4 times to extract each byte in turn. Note: Byte 0 is the high byte of the 32 bit IEEE floating point format. 3.2.147 IDLE Arguments •...
  • Page 97: If..then..else..endif

    ELSE IF condition_1 THEN commands PRINT "Character unknown" Description This structure controls the flow of the program based on the results of the con- ENDIF dition. If the condition is TRUE the commands following THEN up to ELSEIF, See also ELSE or ENDIF is executed.
  • Page 98: Indevice

    BASIC commands Example The following lines can be used to move to the position set on a thumb wheel Value Description multiplied by a factor. The thumb wheel is connected to inputs 4, 5, 6 and 7, RS-422A/485 serial port 2 and gives output in BCD.
  • Page 99: Input

    Arguments • expression If the string is invalid, the user will be prompted with an error message and the Any valid BASIC expression. task will be repeated. The maximum amount of inputs on one line has no limit Example >>...
  • Page 100: Invert_Step

    The electronic logic inside the Trajexia stepper pulse generator assumes inverter connected to the system via the MECHATROLINK-II bus. that the FALLING edge of the step output is the active edge which results in There are two INVERTER_COMMAND functions: motor movement.
  • Page 101: Inverter_Read

    Inverter MV/V7: N3=3; N4=9 • Inverter F7/G7: B1-01=3; B1-02=3. Make you sure that the Inverter firmware supports the MECHATROLINK-II board. The command returns 1 if successfully executed and 0 if failed. The result (if any) is returned in the selected VR. PROGRAMMING MANUAL...
  • Page 102: Inverter_Write

    The number of the parameter to read. See the inverter manual. mode) • param_size INVERTER_WRITE(module, station, 2, value) The size of the parameter to read, 2 or 4 bytes. See the inverter manual. INVERTER_WRITE(module, station, 3, value) • Description INVERTER_WRITE writes the parameter, speed reference or torque refer-...
  • Page 103: Jogspeed

    The size of the parameter to write, 2 or 4 bytes. See the inverter manual. input is low. A forward jog input and a reverse jog input are available for each •...
  • Page 104: Last_Axis

    The string is not echoed by the controller. of time to task the idle moves on all axes that are not in use. To avoid this to Channels 5 to 7 are logical channels that are superimposed on the program- some extent, the TJ1-MC__ will task moves on the axes from 0 to ming port 0 when using Trajexia Tools.
  • Page 105: List

    VR(2)=65A TYPE [ "program_name" ] VR(3)=82R Description For use only with the terminal window. LIST is used as an immediate (com- VR(4)=84T mand line) command only and must not be used in programs. VR(5)=13<CR> The LIST command prints the current selected program or the program spec- See also •...
  • Page 106: Lock

    The UNLOCK command conveyor 5 allows the locked state to be unlocked. The code number can be any integer Constant Value and is held in encoded form. LOCK is always an immediate command and ---------------- ------- can be issued only when the system is UNLOCKED.
  • Page 107: Markb

    Detects and connects devices on MECHATROLINK-II unit unit. It is neces- sary to use it to reset the network from a communication problem and to re- detect servos that have been not detected (EG: when the A letter in the AXISSTATUS word becomes capital red).
  • Page 108: Merge

    When merging multi-axis moves, only the base axis MERGE axis parameter See also needs to be set. Note: If the moves are short, a high deceleration rate must be set to avoid the TJ1-MC__ decelerating in anticipation of the end of the buffered move. Arguments...
  • Page 109: Mhelical

    Any valid BASIC expression. mand. The sixth parameter defines the simultaneous linear move. • expression2 Finish 1 and centre 1 are on the current BASE axis. Finish 2 and centre 2 are Any valid BASIC expression. on the following axis. Example >>...
  • Page 110: Move

    UNITS axis parameter. If, for example, an axis has 4,000 encoder edges/mm, MOVE(3,6) ' C -> D then the number of units for that axis would be set to 4000, and MOVE(12.5) MOVE(0,-12) ' D -> E would move 12.5 mm.
  • Page 111: Moveabs

    3.2.178 MOVEABS Example 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.
  • Page 112: Movecirc

    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 ENCODER_RATIO axis parameters for the axis.
  • Page 113 Note: The MOVECIRC computes the radius and the total angle of rotation from the centre, and end-point. If the end point does not lie on the calculated path, the move simply ends at the computed end and not the specified end SPECIFIED END POINT point.
  • Page 114: Movelink

    [ , link_option [ , link_position ]]) Description 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 • distance move in either direction to drive the output motion.
  • Page 115: Movemodify

    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 Link option Description example.
  • Page 116: Mpos

    The possible values are given in the table below. command. The OFFPOS axis parameter can also be used to shift the origin MTYPE can be used to determine whether a move has finished or if a transi- point. MPOS is reset to 0 at start-up.
  • Page 117: Naio

    Description Returns the number of inputs/outputs fitted to the system, or connected on the that as offset of 65% to 70% of the value required to make the stage move in MECHATROLINK-II expansion bus. A TJ-MC__ with no MECHATROLINK-II an open loop situation is used.
  • Page 118: Not

    Constant (read-only) Syntax NOT expression Syntax Description The NOT operator performs the logical NOT function on all bits of the integer Description The OFF constant returns the numerical value 0. part of the expression. Arguments The logical NOT function is defined as in the table below.
  • Page 119: On.. Gosub

    Description The expression is evaluated and then the integer part is used to select a label from the list. If the expression has the value 1 then the first label is used, 2 Arguments then the second label is used, and so on. If the value of the expression is less...
  • Page 120: Open_Win

    BASIC commands Description The OP command sets one or more outputs or returns the state of the first 24 Example val = 8 ' The value to set outputs. OP has three different forms depending on the number of argu- mask = OP AND NOT(15*256) ' Get current status and mask ments.
  • Page 121: Outdevice

    OUTLIMIT Description The output limit restricts the demand output from a servo axis to a lower value than the maximum. The value required varies depending on the maximum demand output possible. If the voltage output is generated by a 16 bit DAC values an OUTLIMIT of 32767 will produce the full +/-10v range.
  • Page 122: P_Gain

    Adding output velocity gain to a system is mechanically equivalent to adding Type Constant (read-only) damping. It is likely to produce a smoother response and allow the use of a Syntax higher proportional gain than could otherwise be used, but at the expense of Description The PI constant returns the numerical value 3.1416.
  • Page 123: Pos_Offset

    No example. without any spaces between printed items. The width of the field in which a number is printed can be set with the use of See also [w,x] after the number to be printed. The width of the column is given by w and the number of decimal places is given by x.
  • Page 124: Proc

    Description The PROC_STATUS parameter returns the status of the process or task Trajexia Tools port 0 user channel 7 specified. The parameter is used with the PROC modifier and can return val- ues listed in the table below. Arguments Example...
  • Page 125: Process

    PROFIBUS-DP master unit and defines areas in the VR memory where I/O Example No example. exchange takes place. PROFIBUS function 4 returns the data exchange sta- tus of the TJ1-PRT. Refer to the table for the description of the bits in the data See also HALT, RUN, STOP. exchange status word.
  • Page 126: Pswitch

    There are 16 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.
  • Page 127: Rapidstop

    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 a software cam...
  • Page 128: Reg_Pos

    AXIS, MARK, REGIST. using separate registration inputs. When a primary registration event has occurred, the MARK axis parameter is set to on and the position is stored in the REG_POS axis parameter. For the secondary registration event, the 3.2.218 REG_POSB MARKB axis parameter is set to on and the position is stored in the REG_POSB axis parameter.
  • Page 129 10: Inclusive windowing The mode parameter differs between MECHATROLINK-II and Flexible Axis. • 11: Exclusive windowing The functions for each bit in the mode parameter is explained in the tables below. Set this bit to use filtering function PROGRAMMING MANUAL...
  • Page 130: Remain

    The REMAIN parameter contains the distance remaining to the end of the Arguments • old_program_name current move. It can be checked to see how much of the move has been com- The current name of the program. pleted. REMAIN is defined in user units. •...
  • Page 131: Rep_Dist

    The automatic repeat option of the CAMBOX and MOVELINK commands are con- trolled by bit 1 of the REP_OPTION parameter. The bit is set on to request the sys- tem software to end the automatic repeat option. When the system software has set the option off it automatically clears bit 1 of REP_OPTION.
  • Page 132: Reset

    The REV_IN parameter contains the input number to be used as a reverse cycle: limit input. The number can be set from 0 to 7 and 19. The valid input range is SPEED = 1000 0 to 31. Values 0 to 15 represent physically present inputs of TJ1-MC__ I/O REPEAT connector and are common for all axes.
  • Page 133: Rev_Jog

    Description 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 Description The RS_LIMIT parameter contains the absolute position of the reverse soft- -1, no input is selected.
  • Page 134: Run_Error

    >> RUN program_name, is run automatically at start-up or not and which task it is to This example executes the currently selected program. run on. The task number is optional, if omitted the program will run at the Example RUN "sausage"...
  • Page 135: S_Ref

    Description The S_REF_OUT parameter contains the speed reference value being to the Servo Driver when the axis is in open loop (SERVO=OFF). The range applied to the Servo Driver for both open and closed loop. of this parameter is defined by the number of available bits. For MECHATRO-...
  • Page 136: Scope

    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 First parameter to store. displayed on the Trajexia Tools Oscilloscope or written to a file for further •...
  • Page 137: Scope_Pos

    Note: This command is implemented for an offline (VT100) terminal. Trajexia the control data and I/O of the Unit are all depending on this setting. The Tools automatically selects programs when you click on their entry in the list in parameter is defined in microseconds.
  • Page 138: Set_Bit

    When the parameter has been set, a power down or software reset The serial ports have 9,600 baud, 7 data bits, 2 stop bits, even parity and (using EX) must be performed for the complete system. Not doing XON/XOFF enabled for general-purpose communication by default.
  • Page 139: Sgn

    ACCEL, AXIS, DATUM, DECEL, FORWARD, MOVE, MOVEABS, Description The SIN function returns the sine of the expression. Input values are in radi- MOVECIRC, MOVEMODIFY, REVERSE, UNITS. ans and may have any value. The result value will be in the range from -1 to Arguments • expression Any valid BASIC expression.
  • Page 140: Sqr

    Syntax STEP_RATIO(output_count, dpos_count) Any valid BASIC expression. Description This command sets up a ratio for the output of the axis stepper. Every servo- Example >> PRINT SQR(4) period the number of steps is passed through the STEP_RATIO function 2.0000 before it goes to the step pulse output.
  • Page 141: Stepline

    3.2.253 STOP Example Two axes are set up as X and Y but the axes ' steps per mm are not the same. Interpolated moves require identical UNITS values on both axes in order to keep the path speed constant and for MOVECIRC to work correctly.
  • Page 142: System_Error

    The T_REF parameter contains the torque reference value which will be SYSTEM_ERROR parameter are given in the table below. applied to the servo motor. The range of this parameter is defined by the number of available bits. For MECHATROLINK axes, T_REF takes 32 bits, so Arguments N/A.
  • Page 143: Table

    • TABLE(address) 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 previously written to the TABLE is location 1000.
  • Page 144: Tan

    The TICKS parameter contains the current count of the task clock pulses. assumed to be in radians. 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 Arguments •...
  • Page 145: Time

    TIME$ Syntax TRIGGER Description Prints the current time as defined by the real time clock as a string in 24-hour Description The TRIGGER command starts a previously set up SCOPE command. format. Note: Trajexia Tools uses TRIGGER automatically for its oscilloscope func- tion.
  • Page 146: Tron

    Description The TRUE constant returns the numerical value -1. gram execution at the line following the TRON command. The program can Arguments then for example be executed one line at a time using the STEPLINE com- Example test: mand. t = IN(0) AND IN(2)
  • Page 147: Units

    Description The verify axis parameter is used to select different modes of operation on a factor enables the user to define a more convenient user unit like m, mm or stepper encoder axis. motor revolutions by specifying the amount of encoder edges to include a •...
  • Page 148: Vff_Gain

    The VR command reads or writes the value of a global (VR) variable. These feed forward output contribution is calculated by multiplying the change in VR variables hold real numbers and can be easily used as an element or as demand position with the VFF_GAIN parameter value. The default value is 0.
  • Page 149: Vrstring

    VR(101) to VR(110) are used to hold an array of ten 1 ' s and 0 ' s to signal 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...
  • Page 150: Wait Idle

    (set with BASE) unless AXIS is used to specify a temporary base axis. This is useful for activating events at the beginning of a move, or at the end Note: The execution of WAIT IDLE does not necessarily mean that the axis when multiple moves are buffered together.
  • Page 151: Wdog

    WAIT UNTIL DPOS AXIS(2) <= 0 OR IN(1) = ON WEND The above line would wait until the demand position of axis 2 is less than or Description The WHILE ... WEND structure allows the program segment between the equal to 0 or input 1 is on.
  • Page 152: Xor

    Any valid BASIC expression. Example VR(0)=10 XOR 18 The XOR is a bit operator and so the binary action taking place is as follows: 01010 XOR 10010 = 11000. The result is therefore 24. See also Bit 1 Bit 2...
  • Page 153: Communication Protocols

    PLC, HMI, or personal computer. Make sure that the IP address of the PC is in the same range as the TJ1- MC__: if the IP address of the TJ1-MC__ is aaa.bbb.ccc.ddd, the IP address FINS client...
  • Page 154: Communicate With Trajexia Directly From Your Computer

    Communication protocols 4.2.1 Communicate with Trajexia directly from your computer 1. Do not change the Ethernet settings in Trajexia. 2. Set the Trajexia Tools settings as shown. fig. 1 3. Set your computer settings as shown. fig. 2 PROGRAMMING MANUAL...
  • Page 155: Communicate With Trajexia Remotely

    • 10.83.48.1 is the local gateway. • The server assigns an IP address to the computers automatically. 1. Set the IP address, the Subnet Mask, and the gateway from the Terminal window command line in Trajexia with: Ethernet(1,-1,0,10,83,50,70) Ethernet(1,-1,2,255,255,240,0) Ethernet(1,-1,8,10,83,48,1) 2.
  • Page 156: Trajexia Tools Protocol

    Trajexia Tools uses a Telnet protocol. By default, this connection uses port executed at power on. 23. If this port is not accessible, you can change the port number with the command Ethernet(1,-1,4,new_port_n). The FINS commands allow communications between nodes in different networks.
  • Page 157 Address range designation error address Number of elements invalid 1104 Address out of range • If var_type is 30: If var_type is 82 or B0, and the response code is 0000, the TJ1-MC__ responds with: command_ var_ start_ address bit_ total_bits...
  • Page 158: Fins Client Protocol

    If the TJ1-MC__ is the Host Link master, you can send BASIC commands to outcome of the execution: a Host Link slave, for example a PC. When you send a BASIC command to a Host Link slave, the execution of the next BASIC command waits until the Host Link slave sends a response.
  • Page 159 Communication protocols Commands BASIC command Description These Host Link commands are supported for the Host Link Master protocol: HLM_READ HLM_READ reads data from the Host Link slave to either VR or TABLE memory. Type Header code Name Function HLM_STATUS HLM_STATUS gives the status of the last command of the Host Link master.
  • Page 160 LR AREA WRITE Writes the specified data in word units beginning with the designated The following table shows how you can use the Host Link protocol with the LR word. BASIC commands, and for which CPU unit operating mode (RUN, MON or PROG) the command is valid.
  • Page 161 Set up in RUN mode. mand and the PC You need the SETCOM command to set up the serial port of the TJ1-MC__ mode. for the Host Link Master protocol. Set the command as follows: FCS error The FCS is wrong.
  • Page 162 The timeout mechanism is implemented to prevent that the BASIC task • A connection from the serial port of the TJ1-MC__ to the PC. The serial pauses for a long time due to bad or no communication. The port uses RS422 communication.
  • Page 163: Host Link Slave

    Host Link slave Example Send TS (test) command to PC using HLM_COMMAND. If the TJ1-MC__ is the Host Link slave, a Host Link master (for example, a programmable terminal) can read data from the TJ1-MC__ and write data to BASIC code HLM_COMMAND(HLM_TEST,2,13) it.
  • Page 164 Communication protocols End codes Type Header code Name Function These are the response end codes that are returned in the response frame: I/O memory CIO AREA Writes the specified data in word writing WRITE units to VR memory beginning with the designated word.
  • Page 165: User-Defined Protocol

    Set up the Host Link protocols. You need the SETCOM command to set up the serial port of the TJ1-MC__ GET assigns the ASCII code of a received character to a variable. for the Host Link Slave protocol. Set the command as follows:...
  • Page 166 ' Clear buffer NEXT i GOSUB clear_buffer IF TICKS<0 THEN PRINT "Timeout in the communication with the F500" ' Send command to the serial port according to VR(10) resp_status=3 IF vision_command=v_measure THEN ELSEIF TABLE(count-2)=79 AND TABLE(count-1)=75 THEN PRINT #1, "M"...
  • Page 167: Profibus

    • unit_number is the number of the TJ1-PRT unit. • output_start is the start address of the output data range of VR variables. • output_count is the number of VR variables in the output data range. •...
  • Page 168 16-bit integer format. Each word exchanged ranges from -32768 to 32767. A VR variable can hold a 24-bit number, and it can also hold fragments. The exchange with the PROFIBUS master does not support values outside the range -32768..32767 and fragments.
  • Page 169 1. Start the CX-PROFIBUS software tool. fig. 6 2. Right-click the MyNetwork tree. 3. Select Add Device..4. Select the PROFIBUS master board. fig. 7 5. Click OK. 6. Open the Device Catalogue from the View menu. fig. 8 PROGRAMMING MANUAL...
  • Page 170 Communication protocols 7. Click Install GSD Files..The GSD file is on the Trajexia Tools fig. 9 CD. It can also be found in the Download Center on the OMRON website. 8. Click Update. The TJ1-PRT shows in the list.
  • Page 171 1. Double-click the master module in the MyNetwork tree. fig. 11 2. Set the Station Address and Unit Number. 3. Select the Slave area tab. fig. 12 4. Set the Start Address field of Output Area 1 and Input Area 5. Save the project. PROGRAMMING MANUAL...
  • Page 172: Communication Status

    Communication protocols 6. Click the Device Online/Offline (Toggle) toolbar button to go fig. 13 on-line. 7. Click the Device Download toolbar button to download the parameters. 4.4.3 Communication Status TJ1-PRT can provide status information to the TJ1-MC__. You can retrieve the status information in BASIC with the command PROFIBUS (unit_number,4,0).
  • Page 173: Devicenet

    The TJ1-DRT has two node number selectors. You can use the node number selectors to assign a node number to the TJ1-DRT. The DeviceNet node numbers range from 0 to 63. If you select a node number with the node number selectors that exceeds this range, you will select the node number that is set by software.
  • Page 174 16-bit integer format. Each word exchanged ranges from -32768 to 32767. A VR variable can hold a 24-bit number, and it can also hold fragments. The exchange with the DeviceNet master does not support values outside the range -32768 to 32767 or fragments.
  • Page 175 Communication protocols Configure the DeviceNet network To configure the OMRON CJ1W/CS1W-DRM21 DeviceNet master to exchange VR variables with the Trajexia system, do these steps: 1. Start the CX-Integrater in the CX-ONE software tool. fig. 14 2. Select Network from the Insert menu.
  • Page 176 Communication protocols 5. Drag and drop the CJ1W-DRM21 to the Network window. 6. Install the EDS file from the CX-Integrator. fig. 16 7. Select No from the dialog window. The icon is not needed. PROGRAMMING MANUAL...
  • Page 177 Communication protocols 8. Register the slave to the master, right click on the #01TJ1-DRT fig. 17 icon. 9. Double click on the Master Icon. 10. Select the TJ1-DRT device. 11. Click Advanced Setup. fig. 18 12. Click Connection tab. 13. Click User Setup.
  • Page 178: Communication Status

    Communication protocols 4.5.3 Communication Status the level set in the TJ1-DRT DeviceNet parameters. You can set the TJ1- DRT DeviceNet parameters using a DeviceNet configurator. The default TJ1-DRT can provide status information to both the TJ1-MC__ and the level is 11V.
  • Page 179: Mechatrolink-Ii

    The number of MECHATROLINK-II devices determines the data exchange cycle time: • For 1 to 4 devices the cycle time can be 0.5 ms, 1 ms or 2 ms. • For 5 to 8 devices the cycle time can be 1 ms or 2 ms.
  • Page 180: Trajexia Tools Interface

    Servo Drivers. site: www.trajexia.com. The connection to the TJ1-MC__ is via Ethernet. It is necessary to set the communication settings before connecting to a unit. The Trajexia Tools software tool has been designed to work on-line with one TJ1-MC__.
  • Page 181: Install The Trajexia Tools Software

    Trajexia Tools interface 5.2.2 Install the Trajexia Tools software 1. Insert the Trajexia Tools CD into the CD-ROM drive of the PC. 2. The Trajexia Tools Setup program starts automatically. 3. If the Trajexia Tools Setup program does not start automatically, start it manually: execute setup.exe in the root directory of the...
  • Page 182 8. Type your company name in the Company field. 9. Type your user licence number in the Licence fields. Your user licence number is on the label attached to the jewel case of the Trajexia Tools CD. 10. Click Next.
  • Page 183 Trajexia Tools interface 12. Click Next. fig. 6 13. Click Next. fig. 7 PROGRAMMING MANUAL...
  • Page 184 Trajexia Tools interface 14. Click Next. fig. 8 15. Click Next. fig. 9 16. The Trajexia Tools Setup program copies files to your PC. This can take a few minutes. PROGRAMMING MANUAL...
  • Page 185 Trajexia Tools interface 17. Click Finish. The CX-Drive Readme File window shows. Close fig. 10 this window. PROGRAMMING MANUAL...
  • Page 186: Connection To The Tj1-Mc

    TJ1-MC__. 1. Connect the Trajexia system to the mains power supply. 2. If you need to see the IP address and the subnet mask of the TJ1-MC__ again, set the power of the Trajexia system off and then again on.
  • Page 187 Trajexia Tools interface 6. Start the Trajexia Tools program on your PC. Select from the fig. 12 Windows Start menu: Programs OMRON Trajexia Tools Trajexia Tools 7. The Trajexia Tools startup screen shows. Wait until the Cancel button is visible. Then click Cancel.
  • Page 188 Trajexia Tools interface 9. Make sure ENet0 in the list is selected. fig. 14 10. Click Configure. 11. Type 192.168.0.250 in the Server name/IP address field. fig. 15 12. Click OK. 13. Click OK. fig. 16 PROGRAMMING MANUAL...
  • Page 189 Trajexia Tools interface 14. Open the Windows Control Panel on your PC. fig. 17 15. Double-click on the Network Connections icon. 16. Right-click on the Local Area Connection icon. Click on the Properties menu. 17. Click on the General tab. fig. 18 18.
  • Page 190 Trajexia Tools interface 20. Click on the General tab. fig. 19 21. Select Use the following IP address. 22. Type 192.168.0.251 address in the IP address field. 23. Type 255.255.255.0 in the Subnet mask field. 24. Click OK. 25. Click OK.
  • Page 191: Projects

    20 application easier. A hard disk copy of all the programs, parameters and data is available on the PC that is used to program the system. The user defines a project, Trajexia Tools keeps the consistency between the project on the PC and the Trajexia system.
  • Page 192: Check Project Window

    Uploads the project that is in the Trajexia system to the PC. A project of the same name on the PC is overwritten. Before you save to the PC make sure that the program on the PC has a back- up copy first.
  • Page 193 Resolve Compares the project that is on the Trajexia Tools with the project that is on the PC. This option offers the possibility to Save, Load or Examine the differences individually for each individual program inside the project. This option allows a modification of a program off line using the simulator and a download of the same program to the TJ1-MC__.
  • Page 194: Trajexia Tools Application Window

    4. Workspace 5. Status bar 5.4.1 Control panel The control panel allows a quick and easy way of accessing to the most commonly used controls to handle and commission a project. 5.4.2 Menu bar The menu bar has these items: •...
  • Page 195: Toolbar

    Trajexia. Refer to Jog Axis in the "Tools menu" (p. 205). Digital IO Refer to Digital IO Status in the "Tools menu" (p. 205). Analog input Refer to Analog input in the "Tools menu" (p. 205). PROGRAMMING MANUAL...
  • Page 196: Menu Descriptions

    New project Deletes the project that is on the Trajexia system and starts a new project on the PC. Trajexia Tools makes a new directory with the project name that contains the new project file. The name of the directory must be the same as the name of the project, else the project can not open.
  • Page 197 STARTUP program to change a startup program that is made by the Intelligent Drives window. Load table A list of table values can be loaded from an external file with the extension *.lst or *.bas. It imports the values and stores it in TABLE values.
  • Page 198: Controller Menu

    Connect to simulator Not fully implemented for Trajexia. Reset the controller Do a software reset on the Trajexia system. The Trajexia Tools application disconnects from the Trajexia system. Recover project from EPROM Resets the Trajexia system and restores the programs that are on the EPROM to the PC.
  • Page 199 (TJ1-MC__) with 1.64 Dev. 94 software The servo period is 1000μs. Axis: Shows the axes that are available. Comms: The communication capability of the Trajexia Motion Controller. I/O: The type and range of the digital, analog and virtual inputs and outputs. CANIO Not implemented for Trajexia. PROGRAMMING MANUAL...
  • Page 200 Enable features Not implemented for Trajexia. Enable editing Sets the Trajexia to work with the RAM version of the programs. In this mode the programs can be edited. Trajexia keeps the programs stored in RAM (and global variables) using the backup battery. This option changes internally the POWER_UP parameter.
  • Page 201 EPROM are overwritten. This feature changes POWER_UP to 1, the RAM is overwritten with the contents of the EPROM after power up. In this mode the programs cannot be edited. This feature is only available when POWER_UP=0.
  • Page 202 Lock/Unlock Lock the Trajexia system to prevent unauthorised access. When the Trajexia system is locked, it is not possible to list, edit or save any of the Trajexia programs. The Trajexia system is not available through the Trajexia Tools software, although the terminal and unlock dialog boxes are available.
  • Page 203: Program Menu

    Checks the syntax of a program and gives possible solutions. The program is opened in a special trace mode that executes line by line. You can set breakpoints in the program to run the program until the breakpoint is reached. The current line of code is highlighted in the debug window.
  • Page 204 (line by line). Stop The Stop command stops the program in the TJ1-MC__ controller. This is not the same as Motion Stop. The program stops at the end of the CPU cycle. The servo motors maintain position. Stop all The Stop all command stops all programs in the TJ1-MC__ controller.
  • Page 205: Tools Menu

    Mode to open the Run On Power Up dialog window. Select the program you want to run automatically. A small drop down menu appears to the right of the window. If you want Trajexia to allocate the process to run in, choose default as the process number.
  • Page 206 Trajexia system as the system processes commands and monitors the status of external inputs. The separator that divides the two banks of data can be moved by the mouse. When the user changes a unit parameter, all parameters that use this parameter value are re-read and adjusted by this factor.
  • Page 207 Axes: Selects the axes for which the data is displayed. Refresh: To reduce the load on the Trajexia system, the parameters in bank 1 are only read when the screen is first displayed or when the parameter value is set. If a parameter value is changed, the value displayed may be incorrect.
  • Page 208 The intelligent drives tool shows the Trajexia configuration detected at power up. Clicking on the unit, the next tab appear. At the top of the window the TJ1-MC__ with its different units is displayed. In the example: •...
  • Page 209 Trajexia Tools interface • Axis Type selects the ATYPE for this axis. The value here will be included in the STARTUP program. • Drive Mode: Run or Commission. When the axis is set to Run, its Run status and movements are fully controlled by the programs running in the TJ1- MC__.
  • Page 210 Save button: Store the current servo parameters in the Trajexia project (in the *.prj file). Cancel Registration Mode: When the registration in the Servo Driver is active, to obtain a quick and reliable response, it is not possible to write parameters. This is the same as executing REGIST(-1).
  • Page 211 If the channel is not needed, select NONE in the parameter list box. Axis/Channel number: A drop down list box to enable the selection of the axis or channel for a motion parameter or channel for a digital or analog input/output parameter.
  • Page 212 The time base is selected by the up/down scale buttons either side of the current time base value box. If the time base is greater than a pre-defined value, the data is retrieved from the controller in sections and not as a continuous trace of data.
  • Page 213 Trajexia Tools interface The configuration reset button (located at the bottom right hand side of the scope control panel) resets all controls to their default values. The status indicator: The status indicator is located in between the options and configuration reset buttons. This lamp changes colour according to the current status of the scope, as follows: •...
  • Page 214 How- ever, there is a delay between when the data is recorded by the controller and when it is displayed on the oscillo- scope due to the time taken to upload the data via the communication link. PROGRAMMING MANUAL...
  • Page 215 Table Data Graph: It is possible to plot controller table values directly, the table limit text boxes enable the user to enter up to four sets of first/last table indices. Parameter checks...
  • Page 216 Trajexia Tools interface Digital IO status This window allows the user to view the status of all the IO fig. 39 channels and toggle the status of the output channels. It also optionally allows the user to enter a description for each I/O line.
  • Page 217 SPEED axis parameter. Before allowing a jog to be initiated, the jog window checks that all the data set in the jog window and on the Trajexia is valid for a jog to be performed.
  • Page 218 Jog inputs: These are the inputs which will be associated with the forward / reverse jog functions. They must be in the range 8 to the total number of inputs in the system as the input channels 0 to 7 are not bi-directional and so the state of the input cannot be set by the corresponding output.
  • Page 219 In the TABLE view tool the max value displays the highest readable value (this is the system parameter TSIZE). If the range of values is larger than the dialog box can display, then the list will have a scroll bar to enable all the values to be seen. •...
  • Page 220 44 the terminal tool will show a dialog to select the communications channel. Channel 0 is used for the Trajexia command line and channels 5, 6 and 7 are used for communication with programs running on the Trajexia. Select the required channel and press OK to start a terminal tool on the selected channel.
  • Page 221: Options Menu

    Trajexia Tools interface 5.5.5 Options menu In the Options menu the system options for the Trajexia system fig. 45 are set: Communications Allows to set and view the communication settings. The settings fig. 46 can only be changed offline. The different options are: •...
  • Page 222 Trajexia Tools interface General Options Allows to set various options of the system. fig. 47 CAN Drive Not implemented in Options. PROGRAMMING MANUAL...
  • Page 223 Trajexia Tools interface Diagnostics Allow to select the events to be stored in a .log file for diagnostics. fig. 48 Terminal Font Selects the font to be displayed in the terminal window. Very useful for commissioning. Program Compare Allows to compare programs CX-Drive Configuration Allow to select the directory of the CX-Drive Database.
  • Page 224: Windows Menu

    Trajexia Tools interface 5.5.6 Windows Menu • Restore Last desktop/Restore Saved Desktop/Save Desktop/ fig. 49 Clear Desktop: Those are tools to quickly handle and configure your desktop according to the user needs. • Clear Controller Messages: Clear the Controller Messages window. 5.5.7 Help Menu •...
  • Page 225: Examples And Tips

    Practical examples. How-to’s 6.1.1 Startup program The purpose of this program is to compare the detected MECHATROLINK-II configuration with the expected one (the expected configuration is the configuration existing in the moment you create the program). The STARTUP program does these actions: •...
  • Page 226 1 2. Click the Modify STARTUP program button. fig. 2 3. At the end of the section created automatically, put your own application code. Typically variable initialisation and axes parameters. 4. At the end of the STARTUP program, run your application programs.
  • Page 227 If you set an application program to “Run at startup” there is a risk that the machine starts if there is an error on the MECHATROLINK-II bus. Example...
  • Page 228 PRINT "Incorrect address for unit 0, station 0" STOP ENDIF ENDIF IF NOT MECHATROLINK(0,4,1,0) THEN PRINT "Error getting address for unit 0, station 1" STOP ELSE IF VR(0) <> 66 THEN PRINT "Incorrect address for unit 0, station 1" STOP...
  • Page 229: Gain Settings

    'Start SHELL program RUN "SHELL",2 STOP 6.1.2 Gain settings The gain setting is related to the mechanical system to which the motor is attached. There are three main concepts: • Inertia ratio • Rigidity • Resonant frequency.
  • Page 230 MOVEMENT=81920 10 Turns Speed mode examples In this mode the position loop is closed in Trajexia and the Speed fig. 3 loop is closed in the Servo Driver. The Speed axis parameter is sent through the MECHATROLINK-II network to the Servo Driver,...
  • Page 231 Examples and tips Only proportional gain has a set value, the Following Error is fig. 4 proportional to the speed. The parameter values for the example are: Motion Parameter values P_Gain=131072 VFF_GAIN=0 Fn001=4 Note: The colours and scale of the oscilloscope for speed mode are as follows: Red: MSPEED (Measured Axis speed).
  • Page 232 Examples and tips Example 2 The value for rigidity is increased. The error magnitude remains the fig. 5 same but the ripple, the speed stability and overshoot are better. The parameter values for the example are: Motion Parameter values P_Gain=131072...
  • Page 233 Example 4 The value of the parameter P_GAIN two times the value in example fig. 7 1. The Following Error is half, but there is vibration due to the excessive gains. The parameter values for the example are: Motion Parameter values...
  • Page 234 Motion Parameter values P_Gain=131072 VFF_GAIN=1573500 Fn001=6 Example 7 The value of the rigidity is increased from 6 to 8. The overshoot/ fig. 10 undershoot is smaller but the motor has more vibration. The parameter values for the example are: Motion Parameter values...
  • Page 235 Torque Loop Position position loop, so the Following Error that read in the Axis parameter Trajexia Position in Trajexia is not the real one in the Servo-drive. To read the correct Loop is desactivated. Following Error use DRIVE_MONITOR. (Gains are not...
  • Page 236 The tuning is more simple, only the rigidity (Fn001) and, if necessary, the feedforward gain (Pn109) needs to be set. • The position loop in the servo is faster (250µs) than in Trajexia and it is turned together with the speed loop. •...
  • Page 237 The parameter values for the example are: Motion Parameter values Fn001=6 Pn109=0 Example 3 With high gain the motor starts to vibrate but the profile is more fig. 15 stable that in MECHATROLINK-II Speed mode. The parameter values for the example are: Motion Parameter values...
  • Page 238 Examples and tips Example 4 The effect of the Feedforward gain is that the Following Error is fig. 16 reduced and the effect is proportional to the acceleration. The parameter values for the example are: Motion Parameter values Fn001=6 Pn109=95...
  • Page 239: Setting The Units Axis Parameter And Gear Ratio

    This parameter enables the user to define the most convenient units to work with. For example, for a moving part that makes a linear motion, you can prefer mm, or fraction of mm.
  • Page 240 Pn202 and Pn203, encoder pulses and mechanical measurement units is: Motor *Pn202/Pn203 * UNITS encoder Pn202 y·encoder _ counts UNITS = Pn203 x·user _ units where y is the number of encoder counts and x is the amount in user units. PROGRAMMING MANUAL...
  • Page 241 Example 1 The mechanical system consists of a simple rotary table. A servo fig. 19 motor with 13-bit incremental encoder is used. The gear ratio of the gearbox is 1:10. Full turn = 360 The desired user units are degree of angle. This system can be...
  • Page 242 The absolute encoder keeps the current motor position, even if there is no power supplied. The absolute encoder gives the position within one turn (that is, a fraction from 0 to and excluding 1), and it has a multiturn counter. You can set the multiturn behaviour of the absolute encoder with the parameter Pn205 of the Sigma-II Servo Driver.
  • Page 243 Pn205 must guarantee that the overflow always occurs in the same position with respect to the machine. This is called unlimited axis and a typical example of it is a turntable shown in fig. 20. It can be achieved with the following equation: the smallest value of m such...
  • Page 244 20 figure. A servo motor with 16-bit absolute encoder is used. The gear ratio of the gearbox is 1:10. The desired user units are degree Full turn = 360 of angle. The rotary table is divided in six sections of 60 degrees each.
  • Page 245 Examples and tips You must initialize the absolute encoder before you use it for the first time, when the battery is lost during power off and when the multiturn limit setting in the parameter Pn205 is changed. The initialization can be done on the display of the Servo Driver or with the software tool.
  • Page 246 Pn203 = 125 Note that we have not used the pulley radius in the calculation. This is to avoid the use of π, which cannot be expressed as a fractional number). In toothed pulleys, the number of teeth and mm per tooth is commonly used.
  • Page 247 = n 82.03 pulley_revolution 1 pulley_revolution m = n 82.03 The smallest integer m for which this equation is valid is 8203. This results in Pn205 = 8202. In addition, to limit the motion units range to the moving range of the motion part, the following axis parameters must be set: REP_DIST = 4260, and REP_OPTION = 1.
  • Page 248 The evident solution is: n = 100 and m = 1224. Or, when we simplify the factors: n = 25 and m = 306. Therefore: Pn205 = m – 1 = 305. With these settings, executing MOVE(180) moves the moving part 180 tenths of an angle degree or 18 angle degrees in forward direction.
  • Page 249 23 encoder. The mechanical gear ratio of the gearbox is 1:10. The pulley has got 12 teeth, and each two are 50 mm apart. One complete turn of the pulley equals 144 stations on the main wheel. The distance between two stations is 50 mm. The mechanical measurement units must mm.
  • Page 250 24 motor with a 17-bit absolute encoder. The mechanical gear ratio of the gearbox is 1:3. The screw pitch of the ball screw is 10mm per 10mm revolution. The total travel distance of the ball screw is 540 mm.
  • Page 251: Mapping Servo Driver Inputs And Outputs

    All outputs are unique to the controller. They are not accessed per axis. in this case because the ball screw is a system with a fixed (limited) axis. It is enough to set this value large enough to have the overflow of the counter out The digital input range has three parts: of the effective position.
  • Page 252 Note that even though REV_IN parameters for both axes have the same value 29, the real inputs used are not the same. For axis 0 the CN1-41 input of the first driver (assigned to that axis) is used, but for axis 3 the same input PROGRAMMING MANUAL...
  • Page 253: Origin Search

    • DATUM(4) a position to a specific axis. It depends on the encoders used (absolute or Does an origin search in reverse direction using the input selected in relative), on the system used (linear or circular), and on the mechanical DATUM_IN as homing switch.
  • Page 254 ON, and the high signal level is indicated as OFF. It is important to note that, before any homing procedure is executed, it is necessary to set the axis parameters UNITS,...
  • Page 255 Absolute switch origin search plus limit switches The origin search function is performed by searching for an fig. 26 external limit switch that is positioned absolutely and the position of which defines the origin position. The example for this homing procedure is shown in the figure.
  • Page 256 The possible scenarios for origin search against limit switches, fig. 29 depending on the position of the moving part on power on, are shown in the figure. min limit switch The program example that does this origin search sequence is given below.
  • Page 257 The origin position is detected by detecting a particular amount of torque against the blocking objects. An adequate torque limit is required in order not to damage the mechanics during the origin search process. The example for this homing procedure is shown in the figure.
  • Page 258 This origin search procedure performs origin search by searching fig. 31 for the "Zero Mark" signal of the encoder. This signal is also known as "marker" or "reference pulse". It appears one time per full encoder revolution. The example for this homing procedure is shown in the figure.
  • Page 259: Registration

    Static origin search, forcing a position from an absolute encoder This origin search procedure sets the actual position to the position of an absolute encoder. It does not perform any physical move. It is only possible with an axis with an absolute encoder in a control loop.
  • Page 260 MECHATROLINK-II bus. There are three registration inputs on the Sigma-II Servo Driver, but only one hardware latch, so only one input can be used at a time. The physical inputs are in pins CN1-44, CN1-45 and CN1-46 on the 50- pins CN1 connector, but Trajexia uses logical inputs EXT1, EXT2 and EXT3 to associate the physical inputs to logical ones.
  • Page 261 Examples and tips The delay in the capture in the Sigma-II Servo Driver is about 3 μs. fig. 33 As the encoder information is refreshed every 62.5 μs, it is Latch input necessary to make interpolation to obtain the right captured position value (see the picture).
  • Page 262 The available settings depend on the axis type. Refer to section 3.2.219. • MARK is a flag that signals whether the position has been captured or not. For the second registration input of the TJ1- FL02, the parameter MARKB is also available. For more information, refer to sections 3.2.170 and 3.2.171.
  • Page 263 Examples and tips The picture gives the sequence of executing the commands and fig. 34 the registrations of the sample program below. Position BASE(N) REGIST(0) WAIT UNTIL MARK=0 loop: WAIT UNTIL MARK=-1 PRINT "Position captured in: "; REG_POS REGIST(0) WAIT UNTIL MARK=0...
  • Page 264 Registration and windowing function The windowing function enables for registration to occur only within a specified range of axis positions. This function is selected by giving the right value as an argument for the REGIST command. The windowing function is controlled by two axis parameters, OPEN_WIN and CLOSE_WIN.
  • Page 265 • The latch is triggered. CLOSE_WIN Because of these delays, there is an uncertainty in the edges of the window when marks may be detected near the edges. This is more OPEN_WIN notable for axes connected to the system via the MECHATROLINK-II bus due to bus delays.
  • Page 266 Once the bag is fed, the horizontal sealer closes the bag, so it can be filled with the product. After that, the Vertical process starts again, feeding the new bag.
  • Page 267 For example, suppose the bag length that needs to be fed is 200 mm, but the real pattern is 200.1 mm. With simple point-to-point incremental movement without correction, an error of 0.1 mm per bag is accumulated.
  • Page 268 The picture shows a flying shear cutting the "head" of wood tables. fig. 41 When the wood comes, the edge of the wood is detected by the photocell and, at the exact moment, the movement of the flying shear starts to be synchronized with the right position on the wood.
  • Page 269: Tracing And Monitoring

    Examples and tips The picture shows how the position of the slave axis is corrected fig. 42 using the registration event on the master axis to start the movement of the slave axis. The influence of SERVO_PERIOD and the fact that the registration event can happen at any time inside...
  • Page 270 TJ1-MC__. Later, the parameters are given to the oscilloscope for graphical representation. The axis and system parameters are stored in the Table memory. The memory range used is defined by the parameters of the SCOPE command. When the parameters are...
  • Page 271 AXIS(0), and x is the position of the slave AXIS(1). You can link the two axis with the CAMBOX command. For more details, refer to section 3.2.42. Suppose furthermore that the parameter end_pos is not constant, but it can change due to different conditions of the motion system.
  • Page 272 'Scope settings: '1 sample each 2 servo cycles 'Information stored in TABLE(1000) to TABLE(4999) 'Because we capture 4 channels, we have 1000 samples per channel. 'MPOS AXIS(0) is stored in TABLE(1000) to TABLE(1999) 'DPOS AXIS(1) is stored in TABLE(2000) to TABLE(2999)
  • Page 273 WEND HALT fig. 44 To view the capture result in the oscilloscope of Trajexia Tools, you must make the settings in the Oscilloscope Configuration window as given in the figure. You must also disable further capturing to avoid mixing the results of two different captures in the same Table memory entries.
  • Page 274 At high speeds, there are some ripples. The green graph is the torque of the motor for the slave axis set with DRIVE_COMMAND=11 as a percentage of the nominal torque. The torque is proportional to the acceleration. Because the acceleration is a derivative of the speed and the speed is sinusoidal curve, the acceleration (and also the torque) is a cosine curve.
  • Page 275 Suppose that these changes in conditions, which result in a change of the end_pos parameter, happen most of the time when the axes are not linked, i.e. when the CAMBOX command is not executed. Suppose furthermore that very rarely the condition changes when the axes are linked.
  • Page 276 This programming code causes all the programs and tracing to stop fig. 46 when an error happens on any axis. The data is already captured in the Table memory, and we can start using the oscilloscope to see the status of the desired parameters at the moment the error occurred.
  • Page 277 Examples and tips The next step is to analyze the CAM table, to see which values fig. 47 were used for demanding the position of the slave axis. To do that, we change the oscilloscope configuration to show a block of values...
  • Page 278 Examples and tips The time base of the CAM TABLE points is not the same as the capture of the other signals. The discontinuity in the CAM (red graph) coincides in time with the interrup- tion of the movement. To analyze this, check the position values individually with a spreadsheet program.
  • Page 279: Practical Examples

    Start_application Find below an example of a shell program. make sure that you Alarm? modify the program to the specific needs of the application. Check correct operation before you rely on the safe operation of the program.
  • Page 280 'If Error or Stop command IF MOTION_ERROR<>0 OR READ_BIT(1,0) THEN GOSUB alarm_sequence 'Clear the Servo Driver Warning if any IF (DRIVE_STATUS AXIS(0) AND 2)>0 THEN DRIVE_CLEAR AXIS(0) IF (DRIVE_STATUS AXIS(1) AND 2)>0 THEN DRIVE_CLEAR AXIS(1) IF (DRIVE_STATUS AXIS(1) AND 2)>0 THEN DRIVE_CLEAR AXIS(1)
  • Page 281 Examples and tips IF (AXISSTATUS AXIS(0) AND 4)<>0 THEN alarm_status=4 ELSEIF (AXISSTATUS AXIS(1) AND 4)<>0 THEN alarm_status=4 ELSEIF (AXISSTATUS AXIS(1) AND 4)<>0 THEN alarm_status=4 ELSE 'Checking for Axis error alarm_status=ERROR_AXIS+1 ENDIF ELSE project_status=1 ENDIF GOSUB stop_all GOSUB reset_all GOSUB start_application...
  • Page 282 'In case of axis error DATUM(0) WEND project_status=1 'Stopped but no error alarm_status=5 action=3 RETURN start_application: 'Wait for rising edge in bit 0 of VR(0) WHILE READ_BIT(0,0)=0 IF MOTION_ERROR<>0 THEN RETURN WEND WHILE READ_BIT(0,0)=1 IF MOTION_ERROR<>0 THEN RETURN WEND RUN "APPLICATION"...
  • Page 283: Initialization Program

    The Initialization program sets the parameters for the axes. These parameters are dependant upon the Motor Encoder resolution and the motor maximum speed. Note: Refer to the Servo Driver and the motor data sheet for this information. '================================================ 'EXAMPLE OF INITIALIZATION PROGRAM...
  • Page 284 Examples and tips 'Pn110=0012h (autotuning disabled) restart=1 ENDIF DRIVE_READ($202,2,10) IF VR(10)<>1 THEN DRIVE_WRITE($202,2,1,1) 'Pn202=1 (gear ratio numerator in the drive. Default is 4) restart=1 ENDIF DRIVE_READ($511,2,10) IF VR(10)<>$6548 THEN DRIVE_WRITE($511,2,$6548,1) 'Pn511 set the registration inputs in the Servo Driver restart=1...
  • Page 285 Examples and tips '---------------------------- 'If set to 1 (and Pn202=Pn203=1) the UNITS are 'encoder counts UNITS=1 'Theoretical FE we will have running the motor at "max_speed" 'without VFF_GAIN in MECHATROLINK SPEED FE_LIMIT=1073741824/P_GAIN/UNITS 'SPEED is set to 1/3 of "max_speed SPEED=(max_speed73)*enc_resolution/60/UNITS 'ACCEL in 200ms from 0 to "max_speed"...
  • Page 286: Single Axis Program

    Examples and tips 6.2.3 Single axis program This program is a simple program to run one axis only. fig. 50 Example 'GOSUB homing BASE(0) DEFPOS(0) WA(100) loop: MOVE(1440) WAIT IDLE WA(100) GOTO loop The units are degrees in this example, therefore: •...
  • Page 287: Position With Product Detection

    Examples and tips • The Following Error is proportional to the speed if you use only Proportional Gain in the position loop. • The torque, which is given by DRIVE_MONITOR as a percentage of the nominal torque of the motor when you set...
  • Page 288 52 start: WAIT UNTIL IN(1)=ON IN(1) SPEED=10 FORWARD IN(2) WAIT UNTIL IN(2)=ON speed prod_pos=MPOS CANCEL WAIT IDLE PRINT "Product Position : "; prod_pos CANCEL SPEED=100 WAIT IDLE Forward MOVEABS(0) Moveabs WAIT IDLE GOTO start SPEED=10 FORWARD WAIT UNTIL IN(2)=ON...
  • Page 289: Position On A Grid

    Examples and tips 6.2.5 Position on a grid A square palette has sides 1m long. It is divided into a 5 x 5 grid, fig. 53 and each of the positions on the grid contains a box which must be filled using the same square pattern of 100mm by 100mm.
  • Page 290 Examples and tips Example fig. 54 nozzle = 8 start: FOR x = 0 TO 4 FOR y = 0 TO 4 MOVEABS(x*200, y*200) WAIT IDLE OP(nozzle, ON) GOSUB square_rel OP(nozzle, OFF) NEXT y NEXT x GOTO start square_rel: MOVE(0, 100)
  • Page 291: Bag Feeder Program

    Bag feeder program A bag feeder machine feeds plastic film a fixed distance that is set fig. 55 by the operator. The figure shows a typical bag feeder that is part of the machine. Bag feeder machines have two modes.
  • Page 292 Example fig. 56 '================================================ 'BAG FEEDER program '================================================ 'Working with marks, if any mark is missing, feed the Position 'theoretical distance. But if the mark is missing for Bag_distance-expected_pos+REG_POS 'a number of consecutive bags, stop the operation. 'A digital output is activated a certain time to cut Bag_distance 'the bag.
  • Page 293: Cam Table Inside A Program

    CAM table inside a program It shows how to create a CAM table inside a program, and use the CAMBOX motion command. The profile used is the COS square one. This is a quite typical profile for feeder-type applications as: PROGRAMMING MANUAL...
  • Page 294 The motion provides a smooth acceleration without sudden acceleration changes, so the material slip is minimized • It gives a fast deceleration so the cycle time is reduced. During deceleration there is no material slip and the friction helps to the stop to zero.
  • Page 295: Flying Shear Program

    FOR i= in_tbl TO end_tbl TABLE(i,(k*(COS(PI*i/npoints)-1))^2) NEXT i RETURN 6.2.8 Flying shear program An example of the Flying shear program. In this application there fig. 58 are three axes: • Axis 0, shear_axis, the advancement of the shear. • Axis 1, flying_axis, is the flying shear.
  • Page 296 WAIT IDLE AXIS(shear_axis) l_dec / 2 MOVELINK(–l_acc / 2 – synch_dist – l_dec / 2, cut_lenght – synch_dist – l_dec – l_acc, l_acc / 4, l_dec / 4, line_axis) 'First time we have a certain wait time because the 'material has been just been cut...
  • Page 297 SPEED AXIS(line_axis)=line_speed 'Cutting movement at synchronized speed line_cut=synch_dist+l_acc+l_dec shear_cut=synch_dist+l_acc/2+l_dec/2 MOVELINK(shear_cut,line_cut,l_acc,l_dec,line_axis) AXIS(flying_axis) WAIT UNTIL MPOS AXIS(flying_axis)>l_acc/2 'Activate the shear when it is in synchronization with the line 'Slow speed to cut SPEED AXIS(shear_axis)=cut_speed MOVEABS(end_pos) AXIS(shear_axis) MOVEABS(0) AXIS(shear_axis) WAIT UNTIL NTYPE AXIS(shear_axis)=2...
  • Page 298: Correction Program

    The speed-time graph shows the steps of the above example. The fig. 60 steps are: 1. The initial cycle: the slave waits for the right length in the product to cut (cut_length – distance_to_accelerate / 2). It is necessary to divide distance_to_accelerate when we use the...
  • Page 299 Examples and tips The difference between the expected position and the actual position is measured with a photocell. This is the correction factor. Every time a correction is made, the origin position is updated accordingly. Example fig. 61 conveyor=0 labeller=1...
  • Page 300: Troubleshooting

    7.2.2 Axis errors Axis errors show on the LED display of the TJ1-MC__ as Ann, where nn is Caution the number of the axis that caused the error. When you troubleshoot, make sure that nobody is inside...
  • Page 301: Unit Errors

    To remove the error, Defective unit do these steps: The error code U0n shows on the display, where n ranges from 0 to 6 and is 1. Correct the value. the number of the unit that causes the error.
  • Page 302: Configuration Errors

    To replace the backup battery, do these steps: • Reconnect the lost MECHATROLINK-II I/O unit or inverter. 1. Make sure the Power Supply Unit is set to on for at least five minutes. If • Type MECHATROLINK(n, 5, station, -1) in the Trajexia Tools terminal...
  • Page 303: I/O Data Communication Problems

    I/O data communication problems Indication Problem Solution COMM LED is off The PROFIBUS configuration is • Check that you use the cor- and BF LED is incorrect, there is no communica- rect GSD file in the master. Indication Problem Solution flashing tion with the master.
  • Page 304: Tj1-Drt

    Check the power and MECHA- NOK off and NF The node address duplication • Check node address. connected to the unit is lost due to TROLINK-II interface of the sta- LED is on error. power off or MECHATROLINK-II tion that caused the problem.
  • Page 305: Tj1-Fl02

    MECHATROLINK-II bus on the unit on which the error appeared. Type in the Trajexia Tools terminal window: MECHATROLINK(n, 0) where n is the number of the unit to which the unit that caused the error is connected. TJ1-FL02 7.6.1...
  • Page 306 Index Application creation ......................................191 Application window ......................................194 Bag feeder program example ..................................291 BASIC Data structures ......................................25 Mathematical specifications ..................................27 Variables ........................................25 BASIC commands ......................................33 BASIC programming ......................................24 BASIC programs ........................................ 30 Battery ..........................................302 CAM table example ......................................
  • Page 307 Gain settings ......................................229 Homing ........................................253 Initialization program ....................................283 Origin search ......................................253 Position mode ......................................235 Position on a grid ......................................289 Position with product detection ................................... 287 Registration ........................................ 259 Servo driver characteristics ..................................251 Setting units ........................................ 239 Shell program ......................................
  • Page 308 Host Link Basic commands ......................................158 Master protocol ......................................158 Slave protocol ......................................163 Icons ..........................................195 Initialization example ....................................... 283 Installation of software ..................................... 181 Intelligent drives ....................................... 208 Interface DEVICENET ....................................... 173 Ethernet ........................................153 MECHATROLINK ....................................... 179 PROFIBUS .........................................
  • Page 309 Slot ..........................................38 Motion execution ........................................ 28 Multitasking ........................................23 Network connection ......................................187 Operand ..........................................37 Mathematical ........................................ 37 Origin search example ..................................... 253 Oscilloscope ........................................210 Parameter Axis ..........................................34 Communication ......................................36 I/O ..........................................36 Slot ..........................................38 System .........................................
  • Page 310 Remote connection ....................................155 Specification ....................................... 180 Start Trajexia Tools ....................................187 Position mode example ....................................235 Position on a grid example ....................................289 Position with product detection example ................................. 287 PROFIBUS Communication set-up ....................................167 Communication status ....................................172 Errors ..........................................
  • Page 311 Startup example ....................................... 225 STARTUP program Modify ......................................... 208 System overview ........................................ 22 Table viewer ........................................219 Tracing and monitoring example ..................................269 Trajexia compare ......................................192 Trajexia Tools protocol ....................................156 Units example ........................................239 User-defined protocol ...................................... 165 VR editor ..........................................
  • Page 312 Revision history Revision history A manual revision code shows as a suffix to the catalogue number on the front cover of the manual. Revision code Date Revised content August 2006 Original October 2006 DeviceNet update May 2007 Updated with TJ1-MC04 and TJ1-ML04.

This manual is also suitable for:

Tj1-mc16 - programming 1Tj1-mc04 1

Table of Contents