background image

Trajexia machine control system

TJ2-MC64

PROGRAMMING MANUAL

Austria 

Tel: +4

3 (0) 2236 377 800

www.industrial.omron.at

Be

lgium 

Tel: +32 (0) 2 4

66 24 80

www.industrial.omron.be 

Czec

h Re

public 

Tel: +420 2

34 602 60

2

www.industrial.omron.cz

 

Denmark 

Tel: +45 4

3 44 00 11

www.industrial.omron.dk

Finland 

Tel: +358 (0) 20

7 46

4 200

www.industrial.omron.fi

Franc

Tel: +3

3 (0) 1 56

 63

 70

 00

www.industrial.omron.fr

Germany 

Tel: +4

9 (0) 2173 680 00

www.industrial.omron.de 

Hung

ary 

Tel: +36 1 39

9 30 50

www.industrial.omron.hu

Ita

ly 

Tel: +39 0

2 326 81

www.industrial.omron.it

Netherlands 

Tel: +31 (0) 2

3 5

68 11 00

www.industrial.omron.n

l

Norw

ay 

Tel: +47 (0) 22 65 7

5 00

www.industrial.omron.no 

Poland 

Tel: +48 (0) 22 6

45 78 60

www.industrial.omron.pl

Port

ugal

 

Tel: +35

1 21 942 94 00

www.industrial.omron.pt

Russia 

Tel: +

7 4

95 648 94 50

www.industrial.omron.ru 

South-Africa 

Tel: +2

7 (0)11 57

9 2600

www.industrial.omron.c

o.za

Sp

ain 

Tel: +34 91

3 777 900

www.industrial.omron.es

 

Sweden 

Tel: +4

6 (0) 8 632 35 00

www.industrial.omron.se 

Switz

erland 

Tel: +4

1 (0) 41 7

48 13

 13

www.industrial.omron.c

Turk

ey 

Tel: +90 2

16 474 00 40

www.industrial.omron.c

om.tr

United Kingdom 

Tel: +44 (0) 8

70

 75

2 08 6

1

www.industrial.omron.c

o.uk

OMRON EUROPE B.V .

   W

eg

alaan 6

7-6

9, NL

-2

132 JD

, Hoofddorp, 

The Netherlands.   

Tel: +31 (0) 2

3 5

68 13

 00   Fax: +31 (0) 2

3 5

68 13

 88   www.indust

rial.omron.eu

Authorised

 Distributor:

Note:

Although we do strive for per

fection, Omron Europe BV

 and/or its su

bs

idiary

 and affiliated c

ompanies do not

 warr

ant or m

ak

e any

 representation

s reg

arding the c

orrectnes

s or c

ompleteness

 

of inform

ation described in this

 ca

talogue. Product

 information in thi

s c

atalogue i

s pro

vided ‚a

s i

s‘ without

 warr

anty of

 any k

ind, either express

 or implied, including, but

 not limited to, the 

implied warr

anties of

 merch

antability

, fit

ness

 for a particul

ar purpose, or non-infring

ement. In a jurisdiction where the ex

clus

ion of implied w

arranties

 is

 not v

alid, the exclus

ion shal

l be 

deemed to be replac

ed by suc

h v

alid exclus

ion, which most

 closely m

atc

hes the intent

 and purpose of the origin

al ex

clusion. Omr

on Europe BV

 and/or its sub

sidi

ary

 and affiliated companies

 

reserve the right

 to ma

ke

 any c

hang

es

 to the products, their specific

ations, dat

a at

 its sole di

scretion at any

 time without

 prior notic

e. The m

aterial

 cont

ained in this

 ca

talogue m

ay

 be out of

 

date and Omron Europe BV

 and/or its sub

sidi

ary

 and affiliated companies

 m

ak

e no c

ommitment to update suc

h m

aterial.

Ca

t. N

o. 

I58E-EN-01

Traje

xia machine contr

ol sy

stem

 PROGR

AMMING 

MANUAL

Cat. No.
I58E-EN-01

Cat. No

.

I58E

-EN-01

Summary of Contents for SMARTSLICE GRT1-ML2

Page 1: ...ular purpose or non infringement In a jurisdiction where the exclusion of implied warranties is not valid the exclusion shall be deemed to be replaced by such valid exclusion which most closely matches the intent and purpose of the original exclusion Omron Europe BV and or its subsidiary and affiliated companies reserve the right to make any changes to the products their specifications data at its...

Page 2: ...s company names logos or other designations mentioned herein are trademarks of their respective owners i WARNING Indicates a potentially hazardous situation which if not avoided could result in death or serious injury Caution Indicates a potentially hazardous situation which if not avoided may result in minor or moderate injury or property damage OMRON 2010 All rights reserved No part of this publ...

Page 3: ... Describes the installation and operation of Sigma V Servo Drives JUNMA series servo drive manual TOEP C71080603 01 OY Describes the installation and operation of JUNMA Servo Drives V7 Inverter TOEP C71060605 02 OY Describes the installation and operation of V7 Inverters F7Z Inverter TOE S616 55 1 OY Describes the installation and operation of F7Z Inverters G7 Inverter TOE S616 60 Describes the in...

Page 4: ...he terminal window and type the following commands Type PRINT VERSION in the terminal window The version parameter returns the current firmware version number of the motion controller Type PRINT FPGA_VERSION SLOT 1 in the terminal window The parameter returns the current FPGA version number of the TJ2 MC64 WARNING Failure to read and understand the information provided in this manual may result in...

Page 5: ...troduction 6 2 2 Multitasking BASIC programming 8 2 3 BASIC programming 9 2 4 Motion execution 14 2 5 Command line interface 15 2 6 BASIC programs 15 3 BASIC commands 17 3 1 Categories 17 3 2 All BASIC commands 26 4 Communication protocols 204 4 1 Available interfaces 204 4 2 Ethernet 204 4 3 Serial protocol 212 4 4 PROFIBUS 221 4 5 DeviceNet 226 4 6 CANopen 232 4 7 MECHATROLINK II 237 4 8 GRT1 ML...

Page 6: ...ubleshooting 341 6 1 Voltage and analysis tools 341 6 2 TJ2 MC64 341 6 3 TJ1 PRT 344 6 4 TJ1 DRT 345 6 5 TJ1 CORT 345 6 6 TJ1 ML__ 346 6 7 GRT1 ML2 346 6 8 TJ1 FL02 349 A GRT1 ML2 timing 350 A 1 Timing concepts 350 A 2 Examples 352 Revision history 355 ...

Page 7: ...erminal blocks while power is being supplied Doing so may result in electric shock WARNING Never short circuit the positive and negative terminals of the bat teries charge the batteries disassemble them deform them by applying pressure or throw them into a fire The batteries may explode combust or leak liquid WARNING Fail safe measures must be taken by the customer to ensure safety in the event of...

Page 8: ...l Loose screws may result in burning or malfunction Caution Do not operate the Unit in any of the following locations Doing so may result in malfunction electric shock or burning Locations subject to direct sunlight Locations subject to temperatures or humidity outside the range specified in the specifications Locations subject to condensation as the result of severe changes in temperature Locatio...

Page 9: ...g Caution Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied Be particularly careful in places where the power supply is unstable An incorrect power supply may result in malfunction Caution Install external breakers and take other safety measures against short circuiting in external wiring Insufficient safety measures against short circuit...

Page 10: ...on of wiring to ensure proper heat dissipation Leaving the dust protective label attached may result in malfunc tion Caution Use crimp terminals for wiring Do not connect bare stranded wires directly to terminals Connection of bare stranded wires may result in burning Caution Double check all the wiring before turning on the power supply Incorrect wiring may result in burning Caution Wire correctl...

Page 11: ...all twisted pair cables in locations that are subject to high humidity Do not install twisted pair cables in locations subject to excessive dirt and dust or to oil mist or other contaminants Caution Use the dedicated connecting cables specified in operation manu als to connect the Units Using commercially available RS 232C computer cables may cause failures in external devices or the Motion Contro...

Page 12: ... set makes programming intuitive and easy You can select from a wide choice of best in class rotary linear and direct drive Servo systems as well as Inverters The system is scalable up to 64 axes and 8 Inverters I O modules The TJ2 MC64 also contains an IEC 61131 3 compliant soft PLC capable of controlling I O and performing motion 2 1 1 Trajexia hardware The Trajexia hardware is described in the ...

Page 13: ...Trajexia system PROGRAMMING MANUAL 7 Revision 1 0 messaging over Ethernet and through MECHATROLINK II to provide full transparency down to the actuator level and making remote access possible ...

Page 14: ...s under one motion bus PROFIBUS DP The PROFIBUS DP slave allows connectivity to the PROFIBUS network in your machine DeviceNet The DeviceNet slave allows connectivity to the DeviceNet network in your machine CANopen The CANopen master allows connectivity to the CANopen network in your machine Modbus Both ModbusRTU via serial and ModbusTCP via Ethernet are supported to be able to connect to masters...

Page 15: ...or The axis parameters are reset to their default values for each startup The commands and parameters work on some base axis or group of axes specified by the BASE command The BASE command is used to change this base axis group and every task has its own group which can be changed at any time The default base axis is 0 Individual axis dependent commands or parameters can also be programmed to work...

Page 16: ... read using the TABLE x command where x is the index of the TABLE memory slot An attempt to read an undefined TABLE memory slot results in an error reported by the TJ2 MC64 The first 65 536 TABLE memory entries are held in the battery powered RAM memory and is preserved during power off This part of the TABLE memory is also preserved when changing the battery if this is done quickly 2 3 3 Data str...

Page 17: ...f you need to hold data in common between two or more programs VR variables should be used Or alternatively if the large amount of data is to be held the TABLE memory can be used To make a program more readable when using a global VR variable two approaches can be taken The first is using a named local variable as a constant in the VR variable The local constant variable however must be declared i...

Page 18: ...rajexia system PROGRAMMING MANUAL 12 Revision 1 0 i The declaration in start up program GLOBAL length 3 In other programs executed after the start up program start length x start MOVE length PRINT length ...

Page 19: ...on Negative values result in the 2 s complement hexadecimal value 53 bit Valid range is from xxx to xxx Example TABLE 0 10 65536 PRINT HEX TABLE 0 HEX TABLE 1 1FFFFFFFFFFFF6 10000 Positioning For positioning the TJ2 MC64 will round up if the fractional encoder edge distance calculated exceeds 0 9 Otherwise the fractional value will be rounded down The internal measured position and demanded positi...

Page 20: ...h its own axis parameters for example speed acceleration and moving independently and simultaneously or they can be linked together using special commands When a move command is being processed the motion generator waits until the move is finished and the buffer for the required axis has become empty and then loads these buffers with the next move information fig 2 Move Loading Sequencing Axis Tas...

Page 21: ...n store up to 32 programs in memory provided the capacity of memory is not exceeded The TJ2 MC64 supports simple file handling instructions for managing these program files rather like the DOS filing system on a computer The Trajexia Studio software package is used to store and load programs to and from a computer for archiving printing and editing It also has several controller monitor and debugg...

Page 22: ...omputer can be left connected as an operator interface or may be removed and the programs run stand alone Programs are set in Trajexia Studio to run automatically at start up by setting the startup priority with the Priority property in the Properties window If you click the ellipsis button in the edit field of this property the StartUp Priority window shows To set the program to run at power up s...

Page 23: ...stored in the TABLE variable array The motion is linked to the measured motion of another axis to form a continuously variable software gear box CANCEL Cancels the move on an axis CONNECT Connects the demand position of an axis to the measured move ments of an other axis to produce an electronic gearbox DATUM Performs one of 7 origin search sequences to position an axis to an absolute position or ...

Page 24: ...me Description Name Description ACCEL Contains the axis acceleration rate ADDAX_AXIS Contains the number of the axis to which the base axis is cur rently linked to by ADDAX ATYPE Contains the axis type AXIS_DISPLAY Selects information that are represented by the LEDs on the front cover of the TJ1 FL02 AXIS_ENABLE Enables and disables particular axis independently of other axis AXISSTATUS Contains ...

Page 25: ... MOTION_ERROR occurs depending on the axis status FAST_JOG Contains the input number to be used as the fast jog input Name Description FASTDEC Defines ramp to zero deceleration ratio when an axis limit switch or position is reached FE Contains the Following Error FE_LATCH Contains the FE value which caused the axis to put controller in MOTION_ERROR state FE_LIMIT Contains the maximum allowable Fol...

Page 26: ...imit input REV_JOG Contains the input number to be used as a jog reverse input RS_LIMIT Contains the absolute position of the reverse software limit S_REF Contains the speed reference value which is applied when the axis is in open loop S_REF_OUT Contains the speed reference value being applied to the Servo Drive for both open as closed loop Name Description SERVO Determines whether the axis runs ...

Page 27: ... LINPUT Waits for a string and puts it in VR variables OUTDEVICE Defines the default output device PRINT Outputs a series of characters to a serial port SETCOM Sets the serial communications Name Description FALSE Equal to the numerical value 0 OFF Equal to the numerical value 0 ON Equal to the numerical value 1 PI Equal to the numerical value 3 1416 TRUE Equal to the numerical value 1 Name Descri...

Page 28: ... floating point number in IEEE format represented by 4 bytes IEEE_OUT Returns single byte extracted from the floating point number in IEEE format INT Returns the integer part of an expression LN Returns the natural logarithm of an expression MOD Returns the modulus of two expressions Name Description NOT Performs a NOT operation on corresponding bits of the integer part of the expression OR Perfor...

Page 29: ...e con dition becomes TRUE WHILE WEND Loop allows the program segment to be repeated until the con dition becomes FALSE Name Description Name Description ALL Is a modifier that specifies that all items in the controller are con cerned COMMSTYPE Contains the type of unit in a controller slot FPGA_VERSION Returns the FPGA version of unit with unit_number in a control ler system SLOT Is a modifier tha...

Page 30: ...sets all local variables on a task SCOPE Programs the system to automatically store up to 4 parameters every sample period to the TABLE variable array Name Description SET_BIT Sets the specified bit in the specified VR variable to one TABLE Writes and reads data to and from the TABLE variable array TABLEVALUES Returns list of values from the TABLE memory TIME Prints the current time as a string TR...

Page 31: ...connected to the system POS_OFFSET Applies a positive offset to the DAC signal from the servo loop SCOPE_POS Contains the current TABLE position at which the SCOPE com mand is currently storing its first parameter SERVO_PERIOD Sets the servo cycle period of the TJ2 MC64 SYSTEM_ERROR Contains the system errors since the last initialization TIME Returns the current time held by the real time clock T...

Page 32: ...ression1 Arguments expression1 Any valid BASIC expression expression2 Any valid BASIC expression Example result 10 2 Assigns the value 8 to the variable result See also N A Type Mathematical function Syntax expression1 expression2 Description The operator multiplies two expressions Arguments expression1 Any valid BASIC expression expression2 Any valid BASIC expression Example result 3 7 Assigns th...

Page 33: ...n2 Any valid BASIC expression Example IF a 10 THEN GOTO label1 If variable a contains a value equal to 10 program execution continues at label label1 Otherwise program execution continues with the next statement See also N A Type Mathematical function Syntax variable expression Description The operator assigns the value of the expression to the variable Arguments variable A variable name expressio...

Page 34: ...GOTO label1 If variable a contains a value greater than or equal to 10 program execution continues at label label1 Otherwise program execution continues with the next statement See also N A Type Mathematical function Syntax expression1 expression2 Description The operator returns TRUE if expression1 is less than expression2 otherwise it returns FALSE Arguments expression1 Any valid BASIC expressio...

Page 35: ...am is run You can use at the beginning of a line or after a valid statement Arguments N A Example This line is not printed PRINT Start See also N A Type Program command Syntax Description The statement separator separates multiple BASIC statements on one line You can use it on the command line and in programs Arguments N A Example PRINT THIS LINE GET low PRINT DOES THREE THINGS See also N A Type S...

Page 36: ...in units s2 You can define the units with the UNITS axis parameter Example ACC 100 Sets ACCEL and DECEL to 100 units s2 See also ACCEL DECEL UNITS Type Axis parameter Syntax ACCEL expression Description The ACCEL axis parameter contains the axis acceleration rate The rate is set in units s2 The parameter can have any positive value including zero Arguments N A Example BASE 0 ACCEL 100 Set accelera...

Page 37: ...is Use ADD_DAC 1 to cancel the sum ADD_DAC works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note 1 Be aware that the control loop gains for both axes need to be determined with care As different encoders with different resolutions are used the gains are not identical 2 Set the OUTLIMIT parameter to the same value for both linked axes 3 This command...

Page 38: ...ded together When the axis parameter is set to OFF on an axis with an encoder interface the measured position MPOS is copied into the demanded position DPOS This allows ADDAX to be used to sum encoder inputs After the ADDAX command has been issued the link between the two axes remains until broken Use ADDAX 1 to cancel the axis link ADDAX allows an axis to perform the moves specified for 2 axes ad...

Page 39: ... commands PROGRAMMING MANUAL 33 Revision 1 0 fig 2 i Example UNITS AXIS 0 1000 UNITS AXIS 1 20 Superimpose axis 1 on axis 0 ADDAX 1 AXIS 0 MOVE 1 AXIS 0 MOVE 2 AXIS 1 Axis 0 will move 1 1000 2 20 1040 edges ...

Page 40: ...sition BASE 0 ADDAX 1 CONNECT 1 2 continuous geared connection to flighted belt REPEAT GOSUB getoffset get offset to apply MOVE offset AXIS 1 make correcting move on virtual axis UNTIL IN 2 OFF repeat until stop signal on input 2 RAPIDSTOP ADDAX 1 clear ADDAX connection STOP getoffset sub routine to register the position of the piece and calculate the offset BASE 0 REGIST 3 WAIT UNTIL MARK seenat ...

Page 41: ...s 0 WHILE IN 2 ON REGIST 3 registration input detects a box on the conveyor WAIT UNTIL MARK OR IN 2 OFF IF MARK THEN CONNECT 1 2 AXIS 0 connect axis 0 to the moving belt BASE 3 1 set the drawing motion to axis 3 and 1 Draw the M MOVEABS 1200 0 move A B MOVEABS 600 1500 move B C MOVEABS 1200 3000 move C D MOVEABS 0 0 move D E WAIT IDLE BASE 0 CANCEL stop axis 0 from folowing the belt WAIT IDLE MOVE...

Page 42: ...0 mod ules on the MECHATROLINK II bus Arguments analogue_chan Analogue input channel number 0 31 Example MOVE 5000 REPEAT a AIN 1 IF a 0 THEN a 0 SPEED a 0 25 UNTIL MTYPE 0 The speed of a production line is governed by the rate at which material is fed onto it 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 se...

Page 43: ...S 0 0 AND MPOS AXIS 1 0 THEN GOTO cycle1 If measured positions MPOS of both axis 1 and axis 2 are greater than zero program execution continues at label cycle1 Otherwise program execution continues with the next statement See also N A Type I O command Syntax AOUT analogue_chan Description The AOUT command sets the output value of the analogue output channels that are provided by connecting GRT1 ML...

Page 44: ...RINT ATAN2 0 1 0 0000 See also N A Type Axis parameter Syntax ATYPE value Description The ATYPE axis parameter indicates the axis type for the axis The valid val ues depend on TJ1 module the Servo Drive controlling the axis is connected to See the table below AXIS type ATYPE value Applicable TJ1 unit Virtual 0 All MECHATROLINK II Position 40 TJ1 ML__ MECHATROLINK II Master Unit MECHATROLINK II Spe...

Page 45: ...mand instead Arguments axis_number Any valid BASIC expression specifying the axis number Example BASE 0 PRINT VP_SPEED AXIS 2 Example MOVE 300 AXIS 0 Example REP_DIST AXIS 1 100 See also BASE Type Axis parameter Syntax AXIS_DISPLAY value Description The AXIS_DISPLAY axis parameter enables different data to be displayed by the LEDs on the front cover of the TJ1 FL02 unit LEDs affected by this param...

Page 46: ... assigned at system start up The offsets are stored in Flash ROM of the TJ2 MC64 and will only become active after the next start up The offset specified will be added to the node address of a MECHATROLINK II Servo Drive or will be used as a starting point to search for an unused axis in case of Flexible axes Arguments unit_number Unit numbers are 0 to 6 with 0 being the unit immediately to the ri...

Page 47: ... profile 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 Bit number Description Value Character as used in Trajexia Studio Arguments type Reserved for future expansion Always set this to 1 data_in Location in the TABLE where the source profile is stored number_in Number of points in the source...

Page 48: ...RANS_DPOS parameter which is equal to DPOS backlash compensa tion Arguments ON OFF Either ON or OFF distance The offset distance expressed in user units speed The speed of the compensation move expressed in user units accel The acceleration or deceleration rate of the compensation move expressed in user units Example BACKLASH ON 0 5 10 50 AXIS 0 BACKLASH ON 0 4 8 50 AXIS 1 This applies backlash co...

Page 49: ...y arguments should only be used on the Command Line Terminal Arguments The command can take up to 64 arguments axis_i The number of the axis set as the base axis and any subsequent axes in the group order for multi axis moves Example BASE 1 UNITS 2000 Set unit conversion factor for axis 1 SPEED 100 Set speed for axis 1 ACCEL 5000 Set acceleration rate for axis 1 BASE 2 UNITS 2000 Set unit conversi...

Page 50: ...Example BREAK_RESET simpletest Will remove all break points from program simpletest See also N A Type Axis command Syntax CAM start_point end_point table_multiplier distance Description The CAM command is used to generate movement of an axis following a position profile which is stored in the TABLE variable array The TABLE val ues are absolute positions relative to the starting point and are speci...

Page 51: ...nt to set the values for instance to the unit conversion factor set by UNITS parameter distance A factor given in user units that controls the speed of movement through the Table The time taken to execute CAM depends on the current axis speed and this distance For example assume the system is being pro grammed in mm and the speed is set to 10 mm s and the acceleration sufficiently high If a distan...

Page 52: ...ntinuously the program would be FOR deg 0 TO 360 STEP 20 loop to fill in the table rad deg 2 PI 360 convert degrees to radians x deg 25 10000 1 COS rad TABLE deg 20 x place value of x in table NEXT deg WHILE IN 2 ON repeat cam motion while input 2 is on CAM 0 18 1 200 WAIT IDLE WEND TABLE position Degree Value 1 0 0 2 20 1103 3 40 3340 4 60 6500 5 80 10263 6 100 14236 7 120 18000 8 140 21160 9 160...

Page 53: ...BASIC commands PROGRAMMING MANUAL 47 Revision 1 0 16 300 12500 17 320 10340 18 340 9103 19 360 9000 TABLE position Degree Value ...

Page 54: ...we want the profile to be com plete in 0 25 seconds So multiplying the axis speed by the required comple tion time 10000 x 0 25 gives the distance parameter equals 2500 GOSUB profile_gen WHILE IN 2 ON WAIT UNTIL KEY 1 Waits for character on port 1 GET 1 k IF k 47 AND k 58 THEN check for valid ASCII character position k 48 400 convert to absolute position multiplier position offset calculate relati...

Page 55: ... to 80000 distance speed x time The return trip can be completed in 0 5 seconds and so the distance value of 5000 is fixed for the return movement The Multiplier is set to 1 to reverse the motion GOSUB profile_gen loads the cam profile into the table SPEED 10000 ACCEL SPEED 1000 DECEL SPEED 1000 WHILE IN 2 ON OP 15 ON turn on suction load AIN 0 capture load value distance 100 load calculate the di...

Page 56: ...he TABLE array to be used to hold more than one profile and or other information The TJ2 MC64 moves continuously between the values in the TABLE to allow a number of points to define a smooth profile Two or more CAMBOX com mands can be executed simultaneously using the same or overlapping values in the TABLE array Note that CAMBOX command allows traversing the TABLE backwards as well as forwards d...

Page 57: ...link distance must be specified as a positive distance link_axis The axis to link to link_option See the table below link_option value Description 1 Link starts when registration event occurs on link axis 2 Link starts at an absolute position on link axis see link_position 4 CAMBOX repeats automatically and bidirectionally This option is can celled by setting bit 1 of REP_OPTION parameter REP_OPTI...

Page 58: ...pos 0 num_p scale is distance travelled scale factor profile_gen num_p 30 scale 2000 FOR p 0 TO num_p TABLE p SIN PI 2 p num_p PI 2 p num_p scale NEXT p RETURN This graph plots TABLE contents against table array position This corre sponds to motor POSITION against link POSITION when called using CAMBOX The SPEED of the motor will correspond to the derivative of the position curve above ...

Page 59: ... ON WEND CANCEL CANCEL AXIS 1 WAIT IDLE The arguments of the CAMBOX command are 0 is the start of the profile shape in the TABLE 30 is the end of the profile shape in the TABLE 800 scales the TABLE values Each CAMBOX motion therefore totals 800 2000 encoder edges steps 80 is the distance on the product conveyor to link the motion to The units for this parameter are the programmed distance units on...

Page 60: ... The system software resets bit 1 of REP_OPTION after the repeating mode has been cancelled Setting bit 3 value 8 of the link options parameter enables the CAMBOX pat tern mode This mode enables a sequence of scale values to be cycled auto matically This is normally combined with the automatic repeat mode so the options parameter must be set to 12 This diagram shows a typical repeating pattern whi...

Page 61: ...0 CURRENT POSITION R The current position within the TABLE of the pattern sequence This value should be initialised to the START PATTERN number 1 FORCE POSITION R W Normally this value is 1 If at the end of a SHAPE the user program has written a value into this TABLE position the pat tern will continue at this position The system software will then write 1 into this position The value written must...

Page 62: ...peats is specified with a negative direction link the first control block will produce one repeat less than expected This is because the CAMBOX loads a zero link posi tion which immediately goes negative on the next servo cycle triggering a REPEAT COUNT This effect only occurs when the CAMBOX is loaded not on transitions from CONTROL BLOCK to CONTROL BLOCK This effect can easily be com pensated fo...

Page 63: ...on control block TABLE 200 160 1 160 160 0 1000 300 Set up running control block TABLE 300 1000 1 1000 4999 0 1 1 Run whole lot with single CAMBOX Third parameter is pointer to first control block CAMBOX 100 150 200 5000 1 20 WAIT UNTIL IN 7 OFF TABLE 305 0 Set zero repeats This will stop at end of pattern Note The axis to which the CAMBOX is linked can run in a positive or nega tive direction In ...

Page 64: ...unit 14 node_ID VR_address Reads the EMCY emergency message from a node into the VR array Each byte of the eight bytes occupies one VR address Description The CAN_CORT commands where the second argument is 4 through 10 are normally used in a BASIC program that is run at startup The sequence of the CAN_CORT commands that configure a CANopen network is important Arguments unit The sequence number of...

Page 65: ...stopped Other moves will be immediately stopped The CANCEL command cancels the contents of the current move buffer MTYPE The command CANCEL 1 cancels the contents of the next move buffer NTYPE without affecting the current move in the MTYPE buffer CANCEL works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note CANCEL cancels only the presently executi...

Page 66: ... solution for modifying end points of moves in this case Example Two axes are connected with a ratio of 1 2 Axis 0 is cancelled after 1 second then axis 1 is cancelled when the speed drops to a specified level After the first cancel axis 1 decelerates at the DECEL rate When the CONNECT of axis 1 is cancelled axis 1 stops instantly BASE 0 SPEED 10000 FORWARD CONNECT 0 5 0 AXIS 1 WA 1000 CANCEL WAIT...

Page 67: ...HANGE_DIR_LAST 90 Example MOVESP 100 100 PRINT START_DIR_LAST START_DIR_LAST 2 PI 360 0 Deg PRINT CHANGE_DIR_LAST CHANGE_DIR_LAST 2 PI 360 0 Deg PRINT END_DIR_LAST END_DIR_LAST 2 PI 360 0 Deg PRINT MOVESP 100 100 PRINT START_DIR_LAST START_DIR_LAST 2 PI 360 0 Deg PRINT CHANGE_DIR_LAST CHANGE_DIR_LAST 2 PI 360 0 Deg PRINT END_DIR_LAST END_DIR_LAST 2 PI 360 0 Deg Results in START_DIR_LAST 45 Deg CHA...

Page 68: ... CHR 65 A See also N A Type System command Syntax CLEAR Description The CLEAR command resets all global VR variables to 0 and sets local varia bles on the process on which the command is run to 0 When you use it in a program it resets all local variables defined to 0 Arguments N A Example VR 0 22 VR 20 44 3158 VR 300 12 PRINT VR 0 VR 20 VR 300 22 0000 44 3158 12 0000 CLEAR PRINT VR 0 VR 20 VR 300 ...

Page 69: ...e is defined as amount of ratio per second The default value is set to a high value 1000000 in order to ensure compati bility with previous TJ2 MC64 units Note The operation using CLUTCH_RATE is not deterministic in position If required use the MOVELINK command instead to avoid unnecessary phase difference between base axis and linked axis Arguments N A Example CLUTCH_RATE 4 This setting will impl...

Page 70: ... TJ1 FL02 34 TJ1 PRT 35 TJ1 DRT 36 TJ1 ML04 38 TJ1 CORT Arguments unit_number Unit numbers are 0 to 6 with 0 being the unit immediately to the right of the TJ2 MC64 Example No example See also N A Type Program command Syntax COMPILE Description The COMPILE command forces the compilation of the currently selected pro gram to intermediate code Program are compiled automatically by the sys tem softwa...

Page 71: ...is axis set with BASE unless AXIS is used to specify a temporary base axis CONNECT 1 1 CONNECT 0 5 1 CONNECT 2 1 Arguments ratio The connection ratio of the gearbox The ratio is specified as the encoder edge ratio not units It holds the number of edges the base axis is required to move per edge increment of the driving axis The ratio value can be either positive or negative and has sixteen bit fra...

Page 72: ...N 0 2 CONNECT gear 0 WEND RAPIDSTOP cancel the FORWARD and the CONNECT Example Axis 0 is required to run a continuous forward Axis 1 must connect to axis 0 If CONNECT is called it results in a step change Therefore CLUTCH_RATE is used together with an initial and final connect ratio of zero to get the required motion FORWARD AXIS 0 BASE 1 CONNECT 0 0 set intitial ratio to zero CLUTCH_RATE 0 5 set ...

Page 73: ...length of the name of the GLOBAL is 32 characters Arguments name Any user defined name containing lower case alpha numerical or under score characters value The value assigned to name Example CONSTANT nak 15 CONSTANT start_button 5 IF IN start_button ON THEN OP led1 ON IF key_char nak THEN GOSUB no_ack_received See also LIST_GLOBAL Type System parameter read only Syntax CONTROL Description The CON...

Page 74: ...ed when a change in angle of two consecutive moves is between the angles defined by DECEL_ANGLE and STOP_ANGLE Bit 2 allows RAISE_ANGLE and CORNER_STATE interaction Bit 3 allows FULL_SP_RADIUS It is possible to use combinations of these Arguments N A Angle Change Speed 1 rad 0 2 rad 1 4PI 0 78 rad 100 27 5 DECEL_ANGLE 0 2 STOP_ANGLE 1 Example CORNER_MODE 2 In the following example the system will ...

Page 75: ...IUS 60 MERGE ON FORCE_SPEED 1000 ENDMOVE_SPEED 1000 MOVECIRCSP 150 0 75 0 1 MOVECIRCSP 120 0 60 0 0 MOVECIRCSP 80 0 40 0 1 MOVECIRCSP 40 0 20 0 0 MOVECIRCSP 20 0 10 0 1 See also CORNER_STATE DECEL_ANGLE RAISE_ANGLE STOP_ANGLE FULL_SP_RADIUS Type Axis parameter Syntax CORNER_STATE Description Allows a BASIC program to interact with the move loading process to facilitate knife rotation at sharp corn...

Page 76: ...6 bit CRC of data stored in contiguous Table Memory or VR Memory locations Arguments mode Specifies the mode of the command 0 Initialises the command with the Polynomial 1 Returns the CRC Will return 0 if Initialise has not been run poly Polynomial used as seed for CRC check range 0 65535 or 0 FFFF data_source Defines where the data is loaded 0 TABLE memory 1 VR memory start Start location of firs...

Page 77: ...servo gain must only be changed when the SERVO is off Note Servo gains have no affect on stepper output axis ATYPE 46 Arguments N A Example D_GAIN 0 25 See also AXIS I_GAIN OV_GAIN P_GAIN VFF_GAIN Type System parameter Syntax D_ZONE_MAX value Description This parameter works in conjunction with D_ZONE_MIN to clamp the DAC output to zero when the demand movement is complete and the magnitude of the...

Page 78: ...the DAC output signal This is useful in case if e g absolute SSI encoder used has no capability of changing default CW CCW rotation direction and the default direction is opposite to the one of the Servo Drive used Note When the SERVO is OFF for a given axis the magnitude of DAC_SCALE is not important as the voltage applied is controlled by the DAC parameter The polarity is still reversed however ...

Page 79: ...nt DATUM 0 must only be used after the WDOG is set to OFF other wise there will be unpredictable errors on the motion 1 The axis moves at creep speed forward until the Z marker is encountered The demand position is then reset to 0 and the measured position corrected so as to maintain the Following Error 2 The axis moves at creep speed in reverse until the Z marker is encountered The demand positio...

Page 80: ...ORWARD start production line WHILE IN 2 ON IF MOTION_ERROR 0 THEN OP 8 ON green light on line is in motion ELSE OP 8 OFF GOSUB error_correct ENDIF WEND CANCEL STOP error_correct REPEAT OP 10 ON WA 250 OP 10 OFF flash red light to show crash WA 250 UNTIL IN 1 OFF DATUM 0 reset axis status errors SERVO ON turn the servo back on WDOG ON turn on the watchdog OP 9 ON sound siren that line will restart ...

Page 81: ...turn speed DATUM 1 register on Z mark and sets this to datum WAIT IDLE MOVEABS 0 moves to datum position Example A machine must return to its home position defined by the limit switch which is found at the rear of the move before operation This can be achieved through using DATUM 4 which moves in reverse to find the switch SERVO ON WDOG ON REV_IN 1 temporarily turn off the limit switch function DA...

Page 82: ...r as the datum This is done with DATUM 5 which moves forward at SPEED to locate the switch then reverses at CREEP to the Z marker If required a move is made to the datum Z marker SERVO ON WDOG ON DATUM_IN 7 sets input 7 as home switch SPEED 5000 set speed for quick location of switch CREEP 500 set creep speed for slow move to find edge of switch DATUM 5 start the homing sequence WAIT IDLE See also...

Page 83: ...reverse limit inputs are also active low Active low inputs are used to enable fail safe wir ing Arguments N A Example DATUM_IN AXIS 0 5 See also AXIS DATUM Type System parameter read only Syntax DAY Description Returns the current day as a number 0 6 Sunday is 0 Arguments N A Example DAY 3 0000 See also N A Type System command Syntax DAY Description Prints the current day as a string Arguments N A...

Page 84: ... param eter can be used to perform a relative adjustment of the current position DEFPOS works on the default basis axis or axis sequence group set with BASE unless AXIS is used to specify a temporary base axis Note The changes to the axis position made using DEFPOS or OFFPOS are made on the next servo update This can potentially cause problems when a move is initiated in the same servo period as t...

Page 85: ...ed to change the DPOS values so that the home positions are not zero but some defined posi tions instead DATUM 5 AXIS 1 home both axes At the end of the DATUM DATUM 4 AXIS 3 procedure the positions are 0 0 WAIT IDLE AXIS 1 WAIT IDLE AXIS 3 BASE 1 3 set up the BASE array DEFPOS 10 35 define positions of the axes to be 10 and 35 ...

Page 86: ...re the axis has updated the position before loading the MOVEABS DEFPOS 10 0 WAIT UNTIL OFFPOS 0 Makes sure that DEFPOS is complete before next line MOVEABS 25 03 BEFORE AFTER Example From the Command Line of the Terminal window quickly set the DPOS val ues of the first four axes to 0 BASE 0 DP 0 0 0 0 See also AXIS DATUM DPOS OFFPOS MPOS UNITS ...

Page 87: ...e units Arguments N A Example No example See also AXIS DPOS Type System command Syntax DEVICENET unit_number 2 1 VR_start_outputs no_outputs VR_start_inputs no_inputs DEVICENET unit_number 4 0 Description DEVICENET function 2 configures the TJ1 DRT for data exchange with the DeviceNet master unit and defines areas in the VR memory where I O exchange takes place DEVICENET function 4 returns the dat...

Page 88: ...This command is implemented for the Command Line Terminal only Arguments N A Bit Value Description Example No example See also FREE PROCESS RUNTYPE SELECT Type Axis command Syntax DISABLE_GROUP 1 DISABLE_GROUP axis_1 axis_2 Description The DISABLE_GROUP is used to create a group of axes which will be disa bled if there is a motion error in any or more axes in the group After the group is made when...

Page 89: ...roup GOSUB group_enable0 GOSUB group_enable1 WDOG ON FORWARD AXIS 0 FORWARD AXIS 1 WHILE TRUE IF AXIS_ENABLE AXIS 0 0 THEN PRINT motion error axis 0 reset_0_flag 1 ENDIF IF AXIS_ENABLE AXIS 1 0 THEN PRINT motion error axis 1 reset_1_flag 1 ENDIF IF reset_0_flag 1 AND IN 0 ON THEN GOSUB group_enable0 FORWARD AXIS 0 reset_0_flag 0 ENDIF IF reset_1_flag 1 AND IN 1 ON THEN GOSUB group_enable1 FORWARD ...

Page 90: ...N checks if reset button is pressed GOSUB group_enable clear errors and enable axis FORWARD restarts the motion ENDIF ENDIF WEND STOP stop program running into sub routine group_enable Clear group errors and enable axes DATUM 0 clear any motion errors WA 10 FOR axis_no 0 TO 2 AXIS_ENABLE AXIS axis_no ON enable axes SERVO AXIS axis_no ON start position loop servo NEXT axis_no RETURN See also N A Ty...

Page 91: ...s with all the other axis commands and parameters This command waits for the response from the axis The execution of the command can be slow and variable in time If you require a quick response do not use this command Arguments VR The alarm value is stored on the VR address on successful execution Example IF NOT DRIVE_ALARM 10 AXIS 2 THEN PRINT Failed to readalarm for Servo Drive ELSE IF VR 10 0TH...

Page 92: ...used by the HW_PSWITCH command The command is executed on the Drive for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters Arguments N A Example DRIVE_CONTROL AXIS 2 256 In this example OUT 0 is switched on for axis 2 connected using the TJ1 FL02 See also N A Type Axis parameter Syntax DRIVE_INPUTS Description This param...

Page 93: ...ch SERVO_PERIOD The command is executed on the Drive for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters Arguments N A Example No example See also N A Type Axis command Syntax DRIVE_READ parameter size VR Description The DRIVE_READ function reads the specified parameter of the Servo Drive connected to the Trajexia sys...

Page 94: ...IVE_RESET command resets the Servo Drive connected via the MECHATROLINK II bus The command is executed on the Drive for the base axis set by BASE The base axis can be changed with the AXIS modifier as with all the other axis commands and parameters Arguments N A Example No example See also N A Caution Be sure that no Parameter Unit or Personal Computer Software is connected to the Servo Drive when...

Page 95: ...SE 3 ATYPE 44 IF DRIVE_STATUS AND 32 32 THEN PRINT REG 0 input is ON for axis 3 ENDIF See also AXIS MARK MARKB REGIST Type Axis command Syntax DRIVE_WRITE parameter size value mode Description The DRIVE_WRITE function writes to the specified parameter of the Servo Drive via the MECHATROLINK II bus Upon successful execution this com mand returns 1 If the command cannot be executed the value 0 is re...

Page 96: ...only Syntax ENCODER Description The ENCODER axis parameter contains a raw copy of the encoder hardware register or the raw data received from the drive via MECHATROLINK II On axes with absolute encoders the ENCODER parameter contains a value using a number of bits programmed with ENCODER_BITS The MPOS axis parameter contains the measured position calculated from the ENCODER value automatically all...

Page 97: ...olute Tamagawa axis with ATYPE value 46 It returns ENID parameter from the encoder which is set to 17 For more information see Tamagawa absolute encoder interface specification If applied to axis of ATYPE value other than 46 this parameter returns 0 Arguments N A Example PRINT ENCODER_ID AXIS 1 17 0000 This command will print absolute encoder ID value for axis 1 See also AXIS ENCODER ENCODER_BITS ...

Page 98: ...to read Example VR 100 ENCODER_READ A10D AXIS 7 This command will read the number of encoder bits and put that value in VR 10 memory location See also AXIS ENCODER ENCODER_BITS Type Axis parameter read only Syntax ENCODER_STATUS Description This parameter returns the status of the absolute encoder This parameter is applicable only to Flexible axis absolute Tamagawa axis with ATYPE value 46 It retu...

Page 99: ...parameter with this command the ENCODER_CONTROL parameter must be set to 1 encoder parameter read write mode Arguments address Specifies the EnDat MRS field to write to value Any valid BASIC expression Example No example See also AXIS ENCODER ENCODER_BITS ENCODER_CONTROL Type Axis parameter Syntax END_DIR_LAST Description Allows the program to examine the end direction in radians of the last pro g...

Page 100: ... VECTOR_BUFFERED Type Axis parameter Syntax ENDMOVE_SPEED value Description The ENDMOVE_SPEED parameter is used to directly control the the ramp to exit speed when forced speed moves MOVESP MOVEABSSP MOVECIRCSP MHELICALSP are loaded The ENDMOVE_SPEED param eter should be set to the required value at the time of loading the move into the buffer If two forced speed move types are merged the speed at...

Page 101: ...s the enable switch WDOG will be turned off the MOTION_ERROR parameter will have value different than 0 and the ERROR_AXIS parameter will contain the number of the first axis to have the error Check the AXISSTATUS parameter for the status bit allocations The default setting of ERRORMASK is 268 Arguments N A Example No example See also AXIS AXISSTATUS MOTION_ERROR WDOG Caution It is up to the user ...

Page 102: ...e also N A Type System command Syntax EX option Description Resets the controller as if it were being powered up again There are two types of reset performed by the EX command EX without the argument or EX 0 does the software reset of the controller EX 1 does the hardware reset of the controller also resetting the communication interface This e g is necessary to make a changed IP address effective...

Page 103: ...xis parameter contains the position error in user units This is calcu lated by the demand position DPOS axis parameter minus the measured position MPOS axis parameter The value of the Following Error can be checked by using the axis parameters FE_LIMIT and FE_RANGE Arguments N A Example No example See also AXIS DPOS FE_LIMIT FE_RANGE MPOS UNITS Type Axis parameter read only Syntax FE_LATCH Descrip...

Page 104: ...ee also AXIS AXISSTATUS ERRORMASK FE UNITS Type Axis parameter Syntax FHOLD_IN FH_IN Description The FHOLD_IN axis parameter contains the input number to be used as the feedhold input The valid input range is 0 to 31 Values 0 to 15 represent phys ically present inputs of TJ2 MC64 I O connector and are common for all axes Values 16 to 31 are mapped directly to Drive inputs that are present on the C...

Page 105: ... Network Service is a Proprietary OMRON communi cation protocol A subset of this protocol has been implemented in Trajexia The FINS protocol has been implemented with the intention of enabling seamless communication with other OMRON devices PLCs HMIs etc and software CX Drive CX Server etc For more information on FINS commu nication protocol see section 4 2 3 and the Communication Commands Ref ere...

Page 106: ...lues 0x00 Integer VR value 0x01 Integer TABLE value 0x02 float TABLE value local_offset The offset of the first value in the local source memory area The range depends upon the VR or TABLE array size and value for the length argu ment timeout The number of milliseconds to wait for a response from the destination FINS server before timing out IP1 IP2 IP3 IP4 Optional parameters that define the remo...

Page 107: ...ression commands One or more BASIC commands Example FOR opnum 8 TO 13 OP opnum ON NEXT opnum This loop turns on outputs 8 to 13 Example loop FOR dist 5 TO 5 STEP 0 25 MOVEABS dist GOSUB pick_up NEXT dist The STEP increment can be positive or negative Example loop1 FOR l1 1 TO 8 loop2 FOR l2 1 TO 6 MOVEABS l1 100 l2 100 GOSUB 1000 NEXT l2 NEXT l1 FOR TO STEP NEXT statements can be nested up to 8 le...

Page 108: ...AXIS is used to specify a temporary base axis Note The forward motion can be stopped by executing the CANCEL or RAPIDSTOP command or by reaching the forward limit If stopped by execu tion of the CANCEL or RAPIDSTOP command the axis decelerates to a stop at the programmed DECEL rate Arguments N A IN 12 NC AXIS 0 Example Move an axis forward until it hits the end limit switch then move it in the rev...

Page 109: ...CT command to this virtual axis to run the conveyor Axis 1 controls a vacuum roller that feeds the lids on to the cartons using the MOVELINK control BASE 4 ATYPE 0 Set axis 4 to virtual axis REP_OPTION 1 SERVO ON FORWARD starts line shaft BASE 0 CONNECT 1 4 Connects base 0 to virtual axis in reverse WHILE IN 2 ON BASE 1 Links axis 1 to the shaft in reverse direction MOVELINK 4000 2000 0 0 4 2 1000...

Page 110: ...inted 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 Frame transformations to perform functions such as these need to be com piled from C language source and loaded into the controller system software Contact OMRON if you need to do this A machine system can be specified with several different f...

Page 111: ...cel the move Bit 9 of the AXISSTATUS axis parameter will be turned on while the axis position is greater than FS_LIMIT FS_LIMIT is disabled when it has a value greater than REP_DIST Arguments N A Example No example See also AXIS AXISSTATUS REP_DIST UNITS Type Axis parameter Syntax FULL_SP_RADIUS Description This sets the full speed radius in user UNITS for fixed speed moves when function is enable...

Page 112: ...e speeds of the following circular moves are reduced to 60 40 60 30 20 60 and 15 20 60 because the radius is propor tionally lower than that stored in FULL_SP_RADIUS BASE 0 CORNER_MODE 8 Enable use of FULL_SP_RADIUS bit 3 ON FULL_SP_RADIUS 60 MERGE ON FORCE_SPEED 1000 ENDMOVE_SPEED 1000 MOVECIRCSP 150 0 75 0 1 MOVECIRCSP 120 0 60 0 0 MOVECIRCSP 80 0 40 0 1 MOVECIRCSP 40 0 20 0 0 MOVECIRCSP 20 0 10...

Page 113: ...31 As default the parameter is set to 1 no input is selected Note This input is active low Arguments N A Example No example See also AXIS FAST_JOG JOGSPEED REV_JOG Type Communication command Syntax GET n variable Description The GET command assigns the ASCII code of a received character to a varia ble If the serial port buffer is empty program execution will be paused until a character has been re...

Page 114: ... A maximum of 256 GLOBALs can be declared The maximum length of the name of the GLOBAL is 32 characters Arguments name Any user defined name containing lower case alpha numeri cal or underscore characters vr_number The number of the VR to be associated with name Example GLOBAL srew_pitch 12 GLOBAL ratio1 534 ratio1 3 56 screw_pitch 23 0 PRINT screw_pitch ratio1 See also LIST_GLOBAL Type Program co...

Page 115: ...port node mc_area mode mc_offset Description The HLM_COMMAND command performs a specific Host link command operation to one or to all Host Link Slaves on the selected port Program execution will be paused until the response string has been received or the timeout time has elapsed The timeout time is specified by using the HLM_TIMEOUT parameter The status of the transfer can be monitored with the H...

Page 116: ... command value Description Example HLM_COMMAND HLM_MREAD 1 12 MC_VR 233 This command reads the CPU Unit model code of the Host Link Slave with node address 12 connected to the RS 232C port The result is written to VR 233 If the connected Slave is a any OMRON CJ CS PLC model the VR 233 will contain value 30 hex after successful execution Example HLM_COMMAND HLM_TEST 2 23 PRINT HLM_STATUS PORT 2 Thi...

Page 117: ...Slave node number to send the Host link command to Range 0 31 plc_area The PLC memory selection for the Host link command See the table below pc_area value Data area Host link command PLC_DM or value 0 DM area RD PLC_IR or value 1 CIO IR area RR PLC_LR or value 2 LR area RL PLC_HR or value 3 HR area RH PLC_AR or value 4 AR area RJ PLC_EM or value 6 EM area RE plc_offset The address of the specifie...

Page 118: ...ponse has been received within the timeout time This indicates communication has been lost 9 Command not recognized This status indicates that the Slave did not recognize the com mand and has returned a IC response The HLM_STATUS will have value 0 when no problems did occur In case of a non 0 value any appropriate action such as a re try or emergency stop needs to be programmed in the user BASIC p...

Page 119: ... send the command and receive the response from the Slave is longer than the time speci fied with this parameter The parameter applies for the HLM_READ HLM_WRITE and HLM_COMMAND commands The HLM_TIMEOUT parameter is specified in servo periods Arguments N A Example HLM_TIMEOUT 2000 Consider the servo period of the TJ2 MC64 is set to 1 ms SERVO_PERIOD 1000 For both serial ports the Host Link Mas ter...

Page 120: ...st Link Master commands are required to be executed from one program task only to avoid any multi task timing problems Arguments port The specified serial port 1 RS 232C serial port 1 2 RS 422A serial port 2 node The Slave node number to send the Host link command to Range 0 31 plc_area The PLC memory selection for the Host link command See the table below pc_area value Data area Host link command...

Page 121: ...nd on execution of the HW_PSWITCH command are stored in FIFO queue This command is applicable only to Flexible axis axes with ATYPE values 43 44 and 45 The command can be used with either 1 or 5 parameters Only 1 parameter is needed to disable the switch or clear FIFO queue All five parameters are needed to enable switch After loading FIFO and going through the sequence of positions in it if the s...

Page 122: ...atical function Syntax IEEE_IN byte0 byte1 byte2 byte3 Description The IEEE_IN function returns the floating point number represented by 4 bytes which typically have been received over a communications link such as ModbusTCP or FINS Note byte0 is the high byte of the 32 bit IEEE floating point format Arguments byte0 byte3 Any combination of 8 bit values that represents a valid IEEE floating point ...

Page 123: ...op ON THEN OP 8 ON VR cycle_flag 0 ELSEIF IN start_cycle ON THEN VR cycle_flag 1 ELSEIF IN step1 ON THEN VR cycle_flag 99 ENDIF Example IF key_char 31 THEN GOSUB char_1 ELSEIF key_char 32 THEN GOSUB char_2 ELSEIF key_char 33 THEN GOSUB char_3 ELSE PRINT Character unknown ENDIF See also N A Type I O function Syntax IN input_number final_input_number IN Description The IN function returns the value ...

Page 124: ...ported values are listed in the table below Value Description 0 Programming port 0 default 1 RS 232C serial port 1 2 RS 422A 485 serial port 2 5 Trajexia Studio port 0 user channel 5 6 Trajexia Studio port 0 user channel 6 7 Trajexia Studio port 0 user channel 7 Arguments N A Example No example See also GET INPUT LINPUT KEY Type System command Syntax INITIALISE Description Sets all axes parameters...

Page 125: ...mposed on the program ming port 0 when using Trajexia Studio Note Channel 0 is reserved for the connection to Trajexia Studio and or the Command Line Terminal interface Please be aware that this channel may give problems for this function Arguments n The specified input device When this argument is omitted the port as specified by INDEVICE will be used variable The variable to write to Example Con...

Page 126: ...per motor may lose position by one step when changing direction Note This parameter is applicable only to Flexible axis stepper output axes with ATYPE 46 With other types of axes this parameter has no effect Arguments N A Example No example See also N A Type System command Syntax INVERTER_COMMAND module station 1 alarm_number INVERTER_COMMAND module station 8 mode INVERTER_COMMAND module station 7...

Page 127: ...nverter is set into normal Inverter mode Bit Value Command Description Arguments module The number of the TJ1 ML__ that the Inverter is connected to station The MECHATROLINK II station number of the Inverter alarm_number The number of the alarm See the Inverter manual operation_signals A bitwise value to control the operation signals See the table below mode The mode to set the Inverter to 0 Inver...

Page 128: ...The number of the parameter to read See the Inverter manual param_size The size of the parameter to read 2 or 4 bytes Most of the Inverter parameters are 2 bytes long See the Inverter manual VR The address in the VR memory of the TJ MC__ where the read informa tion is put When the function is 4 the result is returned as a bitwise value See the table below Bit Value Command Description 0 Hex 1 Run ...

Page 129: ...ew value that is written Example INVERTER_WRITE 1 23 2 3500 INVERTER_READ 1 23 2 100 PRINT VR 100 3500 0000 See also N A Note If you have to transfer many parameters at the same time the most efficient way is to use MODE 0 for all but the last parameter and MODE 1 for the last parameter MODE 0 is executed faster than MODE 1 Type Axis parameter Syntax JOGSPEED Description The JOGSPEED parameter set...

Page 130: ...st axis for which an AXIS or BASE command has been processed whichever of the two is larger Arguments N A Example No example See also AXIS BASE Type System parameter Syntax LIMIT_BUFFERED Description This parameter controls the maximum number of move buffers available in the controller The maximum value is 64 default value is 1 TJ1 MC__ compati ble Arguments N A Example LIMIT_BUFFERED 10 will set ...

Page 131: ... is used as an immediate command line command only and must not be used in programs The LIST command prints the current selected program or the program spec ified by program_name The program name can also be specified without quotes If the program name is omitted the current selected program will be listed Note This command is implemented for an offline Command Line Terminal Within Trajexia Studio...

Page 132: ...tudio users can select LOCK and UNLOCK commands from the Online menu Arguments code Any valid integer with maximum 7 digits Example LOCK 561234 The programs cannot be modified or seen UNLOCK 561234 The system is now unlocked See also N A Caution The security code must be remembered it will be required to unlock the system Without the security code the system can not be recovered Type Axis paramete...

Page 133: ...MECHATROLINK II stations corresponds with the expected MECHATROLINK unit 5 station VR Reads and clears missed message count A Non Axis MECHATROLINK II device does not report automatically a network problem so use this command to poll the Inverter and IO modules for checking that the network is alive Note You can use the command MECHATROLINK unit 5 station VR to mon itor the status of a device duri...

Page 134: ...s will be merged if possible See also AXIS Type Axis command Syntax MHELICAL end1 end2 centre1 centre2 direction distance3 mode MH end1 end2 centre1 centre2 direction distance3 mode Description Performs a helical move that is moves 2 orthogonal axes in such a way as to produce a circular arc at the tool point with a simultaneous linear move on a third axis The first 5 parameters are similar to tho...

Page 135: ... perpendicular to the prod uct The UNITS for axis 3 are set such that the axis is calibrated in degrees REP_DIST AXIS 3 360 REP_OPTION AXIS 3 ON all 3 axes must be homed before starting MERGE ON MOVEABS 360 AXIS 3 point axis 3 in correct starting direction WAIT IDLE AXIS 3 MOVE 0 12 MHELICAL 3 3 3 0 1 90 MOVE 16 0 MHELICAL 3 3 0 3 1 90 MOVE 0 6 MHELICAL 3 3 3 0 1 90 MOVE 2 0 MHELICAL 3 3 0 3 1 90 ...

Page 136: ...axis equal when cutting curves mode 1 is applied to the helical command BASE 0 1 2 MERGE ON merge moves into one continuous movement MOVE 50 0 MHELICAL 0 6 0 3 1 180 1 MOVE 22 0 WAIT IDLE MOVE 90 AXIS 2 rotate the knife after stopping at corner WAIT IDLE AXIS 2 MOVE 0 50 MHELICAL 6 0 3 0 1 180 1 MOVE 0 50 WAIT IDLE pause again to rotate the knife MOVE 90 AXIS 2 WAIT IDLE AXIS 2 MOVE 22 0 MHELICAL ...

Page 137: ...VECIRC distance3 The distance to move on the third axis in the BASE array axis in user units mode 0 Interpolate the third axis with the main two axis when calculating path speed true helical path 1 Interpolate only the first two axes for path speed but move the third axis in coordination with the other 2 axes circular path with following third axis Example In a series of buffered moves using the l...

Page 138: ...leration and deceleration are taken from the base axis The specified distances are scaled using the unit conversion factor in the UNITS axis parameter If for example an axis has 4 000 encoder edges mm then the number of units for that axis would be set to 4000 and MOVE 12 5 would move 12 5 mm Note that the electronic gear ratio parameters of the Servo Drive can be used to adjust the number of enco...

Page 139: ...rammed SPEED ACCEL and DECEL etc setup axis speed and enable BASE 3 SPEED 5000 ACCEL 100000 DECEL 150000 SERVO ON BASE 4 SPEED 5000 ACCEL 150000 DECEL 560000 SERVO ON BASE 5 SPEED 2000 ACCEL 320000 DECEL 352000 SERVO ON WDOG ON MOVE 10 AXIS 5 start moves MOVE 10 AXIS 4 MOVE 10 AXIS 3 WAIT IDLE AXIS 5 wait for moves to finish WAIT IDLE AXIS 4 WAIT IDLE AXIS 3 ...

Page 140: ...ts working envelope Indi vidual characters are defined as a sequence of moves relative to a start point Therefore the same commands can be used regardless of the plot origin The command subroutine for the letter M is write_m MOVE 0 12 move A B MOVE 3 6 move B C MOVE 3 6 move C D MOVE 0 12 move D E RETURN See also AXIS MOVEABS UNITS ...

Page 141: ...OVEABS works on the default basis axis group set with BASE unless AXIS is used to specify a temporary base axis Argument distance_1 is applied to the base axis distance_2 is applied to the next axis etc By changing the axis between individual MOVE commands uninterpolated unsynchronised multi axis motion can be achieved Absolute moves can be merged for profiled continuous path movements by turning ...

Page 142: ...ition_1 2000 position_2 3000 WHILE IN run_switch ON IF IN 6 ON THEN switch 6 selects position 2 MOVEABS position_2 WAIT IDLE ELSEIF IN 7 ON THEN switch 7 selects position 1 MOVEABS position_1 WAIT IDLE ELSE MOVEABS home WAIT IDLE ENDIF WEND Example An X Y plotter has a pen carousel The position of this carousel is fixed rela tive to the absolute zero position of the plotter To change pens an absol...

Page 143: ...DLE GOSUB pick call pick up subroutine PRINT Move to Position x 6 y 1 MOVEABS x 185 y 185 move to position in grid WAIT IDLE GOSUB place call place down subroutine NEXT y NEXT x See also AXIS MOVE MOVEABS UNITS Type Axis command Syntax MOVEABSSP position_1 position_2 position_3 Description Forced speed version of the MOVEABS command When the command is loaded into the move buffer the FORCE_SPEED a...

Page 144: ...rom the current position The arguments end_1 and centre_1 apply to the BASE axis and end_2 and centre_2 apply to the following axis All arguments are given in user units of each axis The speed of movement along the circular arc is set by the SPEED ACCEL and DECEL parameters of the BASE axis The first four dis tance parameters are scaled according to the current unit conversion factor for the BASE ...

Page 145: ...tch that determines whether the arc is interpolated in a clockwise or counterclockwise direction Value 0 or 1 If the two axes involved in the movement form a right hand axis set direction to 0 to produce positive motion about the third possibly imagi nary orthogonal axis If the two axes involved in the movement form a left hand axis set direction to 0 to produce negative motion about the third pos...

Page 146: ... responsibility of the programmer to ensure that the two points corre spond to correct points on a circle Note Neither axis may cross the set absolute repeat distance REP_DIST dur ing a MOVECIRC Doing so may cause one or both axis to jump or for their FE value to exceed FE_LIMIT E C D H G B F A Example The following command sequence plots the letter O MOVE 0 6 Move A B MOVECIRC 3 3 3 0 1 Move B C ...

Page 147: ... most efficient motion for the nozzle is to move in an arc between the test tubes BASE 0 1 MOVEABS 0 5 move to position above first tube MOVEABS 0 0 lower for first drop WAIT IDLE OP 15 ON apply dropper WA 20 OP 15 OFF FOR x 0 TO 5 MOVECIRC 5 0 2 5 0 1 arc between the test tubes WAIT IDLE OP 15 ON Apply dropper WA 20 OP 15 OFF NEXT x MOVECIRC 5 5 5 0 1 move to rest position See also AXIS ENCODER_R...

Page 148: ...e MOVELINK command creates a linear move on the base axis linked via a software gearbox to the measured position of a link axis The link axis can move in either direction to drive the output motion The parameters show the distance the BASE axis moves for a certain dis tance of the link axis link_distance The link axis distance is divided into three phases that apply to the movement of the base axi...

Page 149: ..._deceleration The positive incremental distance in user units on the link axis over which the base axis will decelerate Note If the sum of parameter 3 and parameter 4 is greater than parame ter 2 they are both reduced in proportion until their sum equals parame ter 2 link axis The axis to link to link_option See the table below Link option Description 1 Link starts when registration event occurs o...

Page 150: ...paper then decelerate WAIT LOADED wait until acceleration movelink is finished OP 8 ON activate cutter MOVELINK 1 0 8 4 0 5 0 5 7 retract cutter back to start WAIT LOADED OP 8 OFF deactivate cutter at end of outward stroke WEND In this program the controller waits for the roll to feed out 150 m in the first line After this distance the shear accelerates to match the speed of the paper moves at the...

Page 151: ...match the acceleration MOVELINK 0 3 0 6 0 0 6 1 all decel The movements of each phase can be added to give the total movement MOVELINK 1 1 6 0 6 0 6 1 Same as 3 moves above But in the example above the acceleration phase is kept separate MOVELINK 0 3 0 6 0 6 0 1 MOVELINK 0 7 1 0 0 0 6 1 This allows the output to be switched on at the end of the acceleration phase Example MOVELINK can be used to cr...

Page 152: ...3 linkax OP motor ON Switch spindle motor on FOR layer 1 TO 10 MOVELINK 50 25 0 0 1 MOVELINK 50 25 0 0 1 NEXT layer WAIT IDLE OP motor OFF See also AXIS UNITS REP_OPTION Type Axis command Syntax MOVEMODIFY position MM position Description The MOVEMODIFY command changes the absolute end position of the cur rent single axis linear move MOVE MOVEABS If there is no current move or the current move is ...

Page 153: ...m after the leading edge is sensed by a proximity switch The proximity switch is con nected to the registration input MOVE 10000 Start a long move on conveyor REGIST 3 set up registration WAIT UNTIL MARK MARK becomes TRUE when sensor detects glass edge OFFPOS REG_POS set position where mark was seen to 0 WAIT UNTIL OFFPOS 0 wait for OFFPOS to take effect MOVEMODIFY 250 change move to stop at 250mm...

Page 154: ... on top of a van It must align correctly to the satellite from data processed in a computer This information is sent to the controller through the serial link and sets VR 0 and VR 1 This information is used to control the two axes MOVEMODIFY is used so that the position can be continuously changed even if the previous set position is not achieved bearing 0 set lables for VRs elevation 1 UNITS AXIS...

Page 155: ...parameters When the command is loaded into the move buffer the FORCE_SPEED and ENDMOVE_SPEED is copied into the buffer with the move FORCE_SPEED defines the speed of the motion command ENDMOVE_SPEED defines the ramp to exit speed If two forced speed move types are merged the speed at the merge point is controlled by the ENDMOVE_SPEED of the outgoing move If a forced speed move follows one or more ...

Page 156: ..._SPEED of the first move FORCE_SPEED 500 ENDMOVE_SPEED 500 MOVESP 400 FORCE_SPEED 1000 ENDMOVE_SPEED 0 MOVESP 400 SPEED 500 SPEED 1000 0 500 1000 Example In the following example the first move is finished with the speed of the sec ond move by setting ENDMOVE_SPEED to the FORCE_SPEED of the sec ond move FORCE_SPEED 500 ENDMOVE_SPEED 1000 MOVESP 400 FORCE_SPEED 1000 ENDMOVE_SPEED 0 MOVESP 400 See a...

Page 157: ...mand will not stop but the endpoint will become the new absolute position Arguments absolute_position The absolute position to be set as the endpoint of the move Value must be within the range PI to PI in the units of the rotary axis For example if the rotary axis has 4000 pulses turn the UNITS value 1 and the angle required is PI 2 90 deg the position value would be 1000 link_axis An optional lin...

Page 158: ...age several readings if a stable value is required at low speeds Arguments N A Example No example See also AXIS SERVO_PERIOD VP_SPEED UNITS Type Axis command Syntax MSPHERICAL end_x end_y end_z mid_x mid_y mid_z mode Description Moves the three axis group defined in BASE along a spherical path with a vector speed determined by the SPEED set in the X axis There are 2 modes of operation with the opt...

Page 159: ...30 0 30 8 7868 0 21 2132 0 30 30 45º Example A similar move that follows a spherical path but at 45 degrees to the Y axis which ends 30mm above the XY plane BASE 0 1 2 MSPHERICAL 21 2132 21 2132 30 6 2132 6 2132 21 2132 0 See also N A Type Axis parameter read only Syntax MTYPE Description The MTYPE parameter contains the type of move currently being executed The possible values are given in the ta...

Page 160: ...be at 0 speed part way along a move or interpolating with another axis without moving itself Arguments N A Example No example See also AXIS NTYPE Type System parameter read only Syntax N_ANA_IN Description This parameter returns the number of analogue input channels connected on the MECHATROLINK II expansion bus For example a TJ2 MC64 will return 8 if there are 2 x AN2900 Units connected as each h...

Page 161: ...lete all programs The command can also be used to delete the TABLE memory NEW TABLE The name TABLE must be in quotes Note This command is implemented for a Command Line Terminal Within Trajexia Studio users can select the command from the Program menu Arguments N A Example No example See also COPY DEL RENAME SELECT TABLE Type System parameter Syntax NIO Description Returns the number of inputs out...

Page 162: ...so N A Type Axis parameter Syntax OFFPOS Description The OFFPOS parameter contains an offset that will be applied to the demand position DPOS without affecting the move which is in progress in any other way The measured position will be changed accordingly in order to keep the Following Error OFFPOS can therefore be used to effectively datum a system at full speed The value set in OFFPOS will be r...

Page 163: ...easured position seen in MPOS reflects the absolute dis tance from the start of the box The mechanism that applies the label can take advantage of the absolute position start mode of the MOVELINK or CAMBOX commands to apply the label BASE conv REGIST 3 WAIT UNTIL MARK OFFPOS REG_POS Leading edge of box is now zero See also AXIS DEFPOS DPOS MPOS UNITS Type Constant read only Syntax ON Description T...

Page 164: ...n label Any valid label in the program Example REPEAT GET 1 char UNTIL 1 char and char 3 ON char GOTO mover stopper change See also N A Type I O command Syntax OP output_number value OP binary_pattern OP Description The OP command sets one or more outputs or returns the state of the first 24 outputs OP has three different forms depending on the number of argu ments Command OP output_number value s...

Page 165: ...ow inside or outside which a registration event is expected The value is in user units Arguments N A Example only look for registration marks between 170 and 230 OPEN_WIN 170 CLOSE_WIN 230 REGIST 256 3 WAIT UNTIL MARK See also CLOSE_WIN REGIST UNITS Type Mathematical operation Syntax expression1 OR expression2 Description The OR operator performs the logical OR function between corresponding bits ...

Page 166: ... MECHA TROLINK II speed axis has a 32 bit maximum demand Note OUTLIMIT only makes sense for Axis types using speed reference Arguments N A Example OUTLIMIT AXIS 1 16384 The above will limit the voltage output to a 5V output range from the TJ1 FL02 unit This will apply to the DAC command if SERVO OFF or to the volt age output by the servo loop if SERVO ON See also AXIS S_REF S_REF_OUT SERVO Type Ax...

Page 167: ... the task buffers The parameter returns TRUE if the task buffers are occupied and FALSE if they are empty When the task executes a movement command the task loads the movement information into the task move buffers The buffers can hold one movement instruction for any group of axes PMOVE will be set to TRUE when loading of the buffers has been completed When the next servo interrupt occurs the mot...

Page 168: ...long then the field will be filled with asterisks to signify that there was not sufficient space to display the number The maximum field width allowable is 127 characters The backslash command can be used to print a single ASCII character Arguments n The specified output device When this argument is omitted the port as specified by OUTDEVICE will be used See the table below Value Description 0 Pro...

Page 169: ...ogram command Syntax PROCESS Description The PROCESS command displays the running status of all current tasks with their task number Arguments N A Example No example See also HALT RUN STOP Type Task parameter read only Syntax PROCNUMBER Description The PROCNUMBER parameter contains the number of the task in which the currently selected program is running PROCNUMBER is often required when multiple ...

Page 170: ... when a predefined position is reached and turns off the output when a second position is reached The positions are specified as the measured absolute positions There are 16 position switches each of which can be assigned to any axis Each switch has 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 ...

Page 171: ... the TJ2 MC64 to count There are thus 3 600 edges rev or 10 edges degree If you set the unit conversion factor to 10 you can work in degrees Next you have to determine a value for all the PSWITCH arguments sw The switch number can be any switch that is not in use In this example you will use number 0 en The switch must be enabled to work set the enable to 1 axis The shaft is controlled by axis 0 o...

Page 172: ...OVESP MOVEABSSP MOVECIRCSP moves exceeds RAISE_ANGLE the system will set axis parameter CORNER_STATE accord ing to the following sequence 1 System sets CORNER_STATE to 1 to indicate move ready to be loaded with large angle change 2 BASIC program raises knife 3 BASIC program sets CORNER_STATE to 3 4 System will load following move but with speed overridden to zero This allows the direction to be ob...

Page 173: ... stopped Notes RAPIDSTOP cancels only the presently executing moves If further moves are buffered in the next move buffers NTYPE or the task buffers they will then be loaded During the deceleration of the current moves additional RAPIDSTOPs will be ignored Arguments N A Example This example shows the implementation of a stop override button that cuts out all motion CONNECT 1 0 AXIS 1 axis 1 follow...

Page 174: ...WAIT IDLE for MOVEABS to be accurate the axis must stop MOVEABS 3000 Example This example shows the use of RAPIDSTOP to break a CONNECT and stop the motion The connected axis stops immediately on the RAPIDSTOP com mand The forward axis decelerates at the DECEL value BASE 0 CONNECT 1 1 FORWARD AXIS 1 WAIT UNTIL VPSPEED SPEED let the axis get to full speed WA 1000 RAPIDSTOP WAIT IDLE AXIS 1 wait for...

Page 175: ...fference between first_output_no and last_output_no must be less than 24 Note Outputs 0 to 7 do not physically exist on the TJ2 MC64 They cannot be written Their return value is always 0 Note READ_OP checks the state of the output logic READ_OP can return the value 1 even if no actual output is present Arguments output_no The number of the output first_output_no The number of the first output of t...

Page 176: ...second counter to 0 IF MARK THEN offset REG_POS This next line makes offset ve if at end of sheet IF ABS offset length offset THEN offset offset length PRINT Mark seen at offset 5 1 ELSE offset 0 PRINT Mark not seen ENDIF Reset registration prior to each move DEFPOS 0 REGIST 3 768 Allow mark at first 10mm last 10mm of sheet CAM 0 50 length offset 0 5 cf 1000 WAIT UNTIL TICKS 500 GOTO Loop Note var...

Page 177: ... input is associated to logical latch EXT1 EXT2 and EXT3 but the corresponding locations on the CN1 connector are fixed so no settings of Servo parameters are necessary For G5 Series Servo Drives the registration signals EXT1 EXT2 and EXT3 must be allocated to CN1 inputs with the Drive parameters Pn400 to Pn407 Unlike the other Servo Drives G5 Series Servo Drives can capture two regis tration posi...

Page 178: ...EG 1 input 11 AUX IN input 2 Set this bit to use primary registration event 3 Primary registration event occurs on signal 0 rising edge 1 falling edge 5 4 Secondary registration occurs for 00 Z mark of the encoder 01 REG 0 input 10 REG 1 input 11 AUX IN input 6 Set this bit to use secondary registration event 7 Secondary registration event occurs on signal 0 rising edge 1 falling edge Bit Function...

Page 179: ...s registration to the Z marker before it can start to print The example code locates to the Z marker and then sets it as the zero position REGIST 1 set registration point on Z mark FORWARD start movement WAIT UNTIL MARK CANCEL stops movement after Z mark WAIT IDLE MOVEABS REG_POS relocate to Z mark WAIT IDLE DEFPOS 0 set zero position ...

Page 180: ...DIST 120 sets repeat distance to pitch of belt flights REP_OPTION ON OPEN_WIN 30 sets window open position CLOSE_WIN 90 sets window close position REGIST 4 256 R input registration with windowing FORWARD start the belt box_seen 0 REPEAT WAIT UNTIL MPOS 60 wait for centre point between flights WAIT UNTIL MPOS 60 so that actuator is fired between flights IF box_seen 1 THEN was a box seen on the prev...

Page 181: ... rising edge R rising edge Z REGIST reg FORWARD WHILE IN 2 OFF IF MARKB THEN on a Z mark mpos is reset to zero OFFPOS REG_POSB REGIST reg ELSEIF MARK THEN on R input output 8 is toggled IF reg 6 THEN select registration mode 8 falling edge R rising edge Z reg 8 OP 8 ON ELSE reg 6 OP 8 OFF ENDIF REGIST reg ENDIF WEND CANCEL See also AXIS MARK MARKB REG_POS REG_POSB OPEN_WIN CLOSE_WIN Type Axis para...

Page 182: ... master or a slave axis is moved by a motion command that is not MOVELINK or CAMBOX REMAIN is expressed in user units set by UNITS The CONNECT command moves an axis without a defined end For this command REMAIN has the fixed value of 1000 Arguments N A Example To change the speed to a slower value 5mm from the end of a move start SPEED 10 MOVE 45 WAIT UNTIL REMAIN 5 SPEED 1 WAIT IDLE See also AXIS...

Page 183: ...lso AXIS DPOS MPOS REP_OPTION UNITS Type Axis parameter Syntax REP_OPTION Description The REP_OPTION parameter controls the application of the REP_DIST axis parameter and the repeat option of the CAMBOX and MOVELINK Axis commands The default value is 0 See the table below Bit Description 0 The repeated distance range is controlled by bit 0 of the REP_OPTION parameter If REP_OPTION bit 0 is off the...

Page 184: ...en repeat the cycle until an external counter signals to stop by turning on input 4 cycle SPEED 1000 REPEAT MOVE 100 WAIT IDLE WA 500 UNTIL IN 4 ON See also FOR TO STEP NEXT WHILE WEND Type System command Syntax RESET Description The RESET command sets the value of all local variables of the current BASIC task to 0 Arguments N A Example No example See also CLEAR Type Axis parameter Syntax REV_IN ...

Page 185: ...ive inputs are mapped into inputs 16 to 31 As default the parameter is set to 1 no input is selected If an input number is set and the limit is reached any reverse motion on that axis will be stopped Bit 5 of the AXISSTATUS axis parameter will also be set Note This input is active low Arguments N A Example No example See also AXIS AXISSTATUS FWD_IN Type Axis parameter Syntax REV_JOG Description Th...

Page 186: ...d by the ACCEL axis parameter REVERSE works on the default basis axis set with BASE unless AXIS is used to specify a temporary base axis Note The reverse motion can be stopped by executing the CANCEL or RAPIDSTOP command or by reaching the reverse limit inhibit or origin return limit Arguments N A Example Run an axis in reverse When an input signal is detected on input 5 stop the axis back REVERSE...

Page 187: ...to show that speed is now slow Example A joystick is used to control the speed of a platform A deadband is required to prevent oscillations from the joystick midpoint This is done with the REVERSE command which sets the correct direction relative to the operator Then the joystick adjusts the speed through analog input 0 REVERSE WHILE IN 2 ON IF AIN 0 50 AND AIN 0 50 THEN sets a deadband in the inp...

Page 188: ...n If the task number is omitted the program will run on the highest available task RUN can be included in a program to run another program Note Execution continues until one of the following occurs There are no more lines to execute HALT is typed at the command line to stop all programs STOP is typed at the command line to stop a single program The STOP command in the program is encountered A run ...

Page 189: ...T without FOR 23 Remote axis is in use 47 UNTIL IDLE expected after WAIT 24 Command is command line only 48 GOTO GOSUB expected Number Message Number Message 49 Too many nested GOSUB 69 Scope period should exceed number of AIN parameters 50 RETURN without GOSUB 70 Value is incorrect 51 LABEL must be at start of line 71 Invalid I O channel 52 Cannot nest one line IF 72 Value cannot be set Use CLEAR...

Page 190: ...133 Command only allowed when running Trajexia Studio 107 Number expected 134 expected 108 AS expected 135 FOR expected 109 STRING VECTOR or ARRAY expected 136 INPUT OUTPUT APPEND expected Arguments N A Example PRINT RUN_ERROR PROC 5 9 0000 See also BASICERROR ERROR_LINE PROC Type Program command Syntax RUNTYPE program_name auto_run task_number Description The RUNTYPE command determines whether th...

Page 191: ...ins the speed reference value being applied to the Servo Drive for both open and closed loop In closed loop SERVO ON the motion control algorithm will output a speed reference signal determined by the control gain settings and the Following Error The position of the servo motor is determined using the Axis com mands In open loop SERVO OFF the speed reference signal is deter mined by the S_REF axis...

Page 192: ...ample SCOPE OFF This above line turns the scope function off See also SCOPE_POS TABLE TRIGGER Type System parameter read only Syntax SCOPE_POS Description The SCOPE_POS parameter contains the current TABLE position at which the SCOPE command is currently storing its parameters Arguments N A Example No example See also SCOPE Type Program command Syntax SELECT program_name Description The SELECT com...

Page 193: ...0ms servo cycle See the table below The controller must be reset before the new servo period will be applied Value Description 250 0 25ms 500 0 5ms 1000 1 0ms 2000 2 0ms Arguments N A Example No example See also EX Caution When the parameter has been set a power down or software reset using EX must be performed for the complete system Not doing so may result in undefined behaviour Type System comm...

Page 194: ... Modbus registers 1 Transfer of TABLE memory as Modbus register comms_timeout Timeout for ModbusRTU communication defaults to 4ms Example SETCOM 19200 7 2 2 1 6 This sets RS 232C port to 19200 baud rate 7 data bits 2 stop bits even par ity for communication as a Host Link Master See also N A Type Mathematical function Syntax SGN expression Description The SGN function returns the sign of a number ...

Page 195: ...og speed reference out put is 10V 10V The positive reference voltage corresponds to forward movements in which case DPOS and MPOS increment The negative refer ence voltage corresponds to reverse movements in which case DPOS and MPOS decrement OFF is the default setting at power on If SPEED_SIGN ON the voltage range of the analog speed reference out put is 0V 10V The OUT1 signal of the TJ1 FL02 for...

Page 196: ...e trapezoidal profiles A value of 0 sets no rounding A value of 10 sets maximum rounding The default value of the parameter is 0 SRAMP is applied to the FORWARD MOVE MOVEABS MOVECIRC MHELICAL and REVERSE commands Notes Using S curves increases the time required for the movement to com plete The S curve factor must not be changed while a move is in progress Arguments N A Example No example See also...

Page 197: ...ion axis so as to maintain the best accuracy for both axes Axis 0 500 counts per mm 31 25 steps per mm Axis 1 800 counts per mm 50 00 steps per mm BASE 0 STEP_RATIO 500 800 UNITS 800 BASE 1 UNITS 800 See also N A Type Program command Syntax STEPLINE program_name task_number Description The STEPLINE command executes one line i e steps in the program specified by program_name The program name can al...

Page 198: ...P_ANGLE and DECEL_ANGLE the system will slow down to an intermediate speed Arguments N A Example Stop above 25 deg 0 4363 rad STOP_ANGLE 0 4363 See also RAISE_ANGLE Type System parameter read only Syntax SYSTEM_ERROR Description The SYSTEM_ERROR parameter contains system errors that occurred in the TJ2 system since the last time it was initialized The bits in the SYSTEM_ERROR parameter are given i...

Page 199: ... by address The sequence can have a maximum length of 20 elements TABLE address returns the TABLE value at the entry specified by address 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 The to...

Page 200: ...is loaded into TABLE location 1000 and is setup on axis 0 and is linked to a master axis 1 A copy of the CAM table is added at location 100 The Analogue input is then read and the CAM TABLE value is updated when the table pointer is on the next value Table entry Value CAM Pointer demo store the live table points TABLE 1000 0 0 8808 6 5485 19 5501 39 001 60 999 80 4499 93 4515 TABLE 1008 99 1192 10...

Page 201: ...omma delimited text Example No example See also N A Type Mathematical function Syntax TAN expression Description The TAN function returns the tangent of the expression The expression is assumed to be in radians Arguments expression Any valid BASIC expression Example print TAN PI 4 1 0000 See also N A Type Axis parameter Syntax TANG_DIRECTION Description When used with a 2 axis X Y system this para...

Page 202: ...t task will be assumed Arguments N A Example delay TICKS 3000 OP 9 ON test IF TICKS 0 THEN OP 9 OFF ELSE GOTO test ENDIF See also N A Type System parameter Syntax TIME Description Sets and returns the time from the real time clock The time returned as an integer is the number of seconds since midnight 00 00 00 Arguments N A Example Sets the real time clock in 24 hour format hh mm ss Set the real t...

Page 203: ...uments N A Example No example See also SCOPE Type Program command Syntax TROFF program_name Description The TROFF command suspends a trace at the current line and resumes nor mal program execution for the program specified with program_name The program name can also be specified without quotes If the program name is omitted the selected program will be assumed Arguments program_name The name of th...

Page 204: ...nient user unit like m mm or motor revolutions by specifying the amount of encoder edges to include in a user unit Axis parameters like speed acceleration deceleration and the Axis com mands are specified in these user units Note The UNITS parameter can be any non zero value but it is recom mended to design systems with an integer number of encoder pulses per user unit Changing UNITS will affect a...

Page 205: ...Type Axis parameter read only Syntax VP_SPEED Description The VP_SPEED parameter contains the speed profile speed in user units s The speed profile speed is an internal speed which is accelerated and decel erated as the movement is profiled Arguments N A Example Wait until at command speed MOVE 100 WAIT UNTIL SPEED VP_SPEED See also AXIS MSPEED UNITS Type System command Syntax VR address Descripti...

Page 206: ...am here could be designed to store the state of the machine when the power is off It would of course be necessary to provide a means of resetting completely following manual intervention Example loop Assign VR 65 to VR 0 multiplied by axis 1 measured position VR 65 VR 0 MPOS AXIS 1 PRINT VR 65 GOTO loop See also CLEAR_BIT READ_BIT SET_BIT TABLE Type System command Syntax VRSTRING vr_start Descript...

Page 207: ...e it has finished See also AXIS WAIT LOADED Note WAIT IDLE is a command specifically designed to wait until the previous movement has been finished so it handles the delay from when the previous command is executed in the program until the command is correctly loaded in the motion buffer Type System command Syntax WAIT LOADED Description The WAIT LOADED command suspends program execution until the...

Page 208: ..._ERROR parameter will have value different than 0 and the ERROR_AXIS parameter will contain the number of the first axis to have the error Note The WDOG parameter can be executed automatically by Trajexia Stu dio when the Drives Enabled check box is clicked on the control panel Arguments N A Example No example See also AXISSTATUS ERROR_AXIS ERRORMASK MOTION_ERROR SERVO Type Program control command...

Page 209: ... 0 0 0 0 1 1 1 0 1 1 1 0 Arguments expression1 Any valid BASIC expression expression2 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 N A ...

Page 210: ...r example PLC or another Trajexia unit ModbusTCP To respond to any ModbusTCP request for example a PLC unit EtherNet IP To respond to any EtherNet IP request Serial Host Link Master To communicate with any Host Link slave for example an OMRON PLC Host Link Slave To communicate with any Host Link master HMI typically ModbusRTU slave To communicate with any Mod busRTU master User defined This protoc...

Page 211: ...is protocol is implemented in Trajexia Refer to the Communication Commands Reference manual W342 E1 The FINS protocol enables seamless communication with other OMRON devices such as PLCs HMIs and CX Drive The FINS server protocol requires no configuration settings By default this connection uses port 9600 If this port is not accessible you can change the port with the command Ethernet 1 1 12 new_p...

Page 212: ...E floating point format B0 VR memory in 16 bit integer format F0 VR memory in 32 bit IEEE floating point format start_address 0 start_address number of variables 1 FFFF element_count 1 element_count number of variables start_address Condition Response code hex Description All elements valid 0000 OK Var_type invalid 1101 No area type Start_address invalid 1103 Address range designation error Number...

Page 213: ...ddress 0 start_address number of variables 1 FFFF total_words 1 total_words memory size start_address 1 total_bits 1 bit 00 or 01 Condition Response code hex Description All elements valid 0000 OK Var_type invalid 1101 No area type Start_address invalid 1103 Address range designation error Bit_number invalid 1103 Address range designation error Number of elements invalid totals 1104 Address out of...

Page 214: ... range Maximum length exceeded 110B Reply response exceeds the maxi mum response length Parameter error 110C Invalid var_type 20 01 00 00 command_code response_code byte_1 byte_2 Note The returned words and dwords are in big endian format Axis parameters offsets Offset Axis parameter 0 UNITS 1 ACCEL 2 ATYPE 3 AXIS_ENABLE 4 AXISSTATUS 5 CREEP 6 D_GAIN 7 DAC 8 DATUM_IN 9 DECEL 10 DEMAND_SPEED 11 DPO...

Page 215: ... 36 P_GAIN 37 REG_POS 38 REMAIN 39 REP_DIST 40 REP_OPTION 41 REV_IN 42 RS_LIMIT 43 SERVO 44 SPEED 45 TRANS_DPOS 46 VFF_GAIN 47 VP_SPEED 20 02 00 00 xx yy zz command_ code parameter var_ type start_address total_bytes write_data Axis parameters offsets Offset Axis parameter Parameter Values hex command_code 20 02 parameter 00 00 var_type See table below start_address See definition below total_byte...

Page 216: ...the communication itself A subset of the Modbus communication functions is implemented in Trajexia The functions supported are shown in the table below i When the Modbus Discrete Input functions are used Trajexia accesses the digital inputs When the Modbus Coil functions are used Trajexia accesses the digital outputs When the Modbus Holding Registers functions are used Trajexia accesses the VR or ...

Page 217: ...ch allows cyclic communications with EtherNet IP devices Data can be exchanged at high speed between Controllers and devices TJ2 MC64 can exchange a maximum of 512 bytes per end point The meaning of the data is defined when the connection between the client and server end points is established The client opens a connection with an endpoint on the server the Controller The type of data exchanged is...

Page 218: ...ve 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 You can use these BASIC commands i Note The serial port port 1 CANNOT be used for programming the unit BASIC command Description HLM_COMMAND HLM_COMMAND executes a specific Host Link command to the slave HLM_READ HLM_READ reads data from th...

Page 219: ...RITE Writes the specified data in word units beginning with the designated LR word WH HR AREA WRITE Writes the specified data in word units beginning with the designated HR word WD DM AREA WRITE Writes the specified data in word units beginning with the designated DM word WJ AR AREA WRITE Writes the specified data in word units beginning with the designated AR word WE EM AREA WRITE Writes the spec...

Page 220: ...Not valid Valid Valid WJ AR AREA WRITE HLM_WRITE Not valid Valid Valid WE EM AREA WRITE HLM_WRITE Not valid Valid Valid SC STATUS CHANGE HLM_COMMAND Valid Valid Valid TS TEST HLM_COMMAND Valid Valid Valid MM PC MODEL READ HLM_COMMAND Valid Valid Valid XZ ABORT command only HLM_COMMAND Valid Valid Valid INITIALIZE command only HLM_COMMAND Valid Valid Valid IC Undefined command response only Valid V...

Page 221: ...top in the user BASIC program Each port has an HLM_STATUS parameter You need the PORT modifier to specify the port 14 Format error The command format is wrong A command that cannot be divided has been divided The frame length is smaller than the minimum length for the applicable command Check the format and transfer the command again 15 Entry number data error The data is outside the specified ran...

Page 222: ...slave 13WL0014070107025F From Host Link slave to Host Link master 13WL0059 Result LR address 0 value 701 hex LR address 1 value 702 hex Example Send TS test command to PC using HLM_COMMAND BASIC code HLM_COMMAND HLM_TEST 2 13 Host Link communication From Host Link master to Host Link slave 13TSMCW151 TEST STRING2A From Host Link slave to Host Link master 13TSMCW151 TEST STRING2A Result HLM_STATUS ...

Page 223: ...mory begin ning with the designated word RD DM AREA READ Reads the specified number of words from TABLE memory beginning with the designated word I O memory writing WR CIO AREA WRITE Writes the specified data in word units to VR memory beginning with the designated word WD DM AREA WRITE Writes the specified data in word units to TABLE memory begin ning with the designated word Testing TS TEST Retu...

Page 224: ...me length error The maximum frame length of 131 bytes is exceeded Check the data and transfer the command again 19 Not executable An I O memory batch was exe cuted when items to read were not registered Register items to read before attempting batch read A3 Aborted due to FCS error in transmission data An FCS error occurred in the second or later frame Correct the command data and transfer the com...

Page 225: ...SETCOM 19200 8 1 2 2 4 set up the RS485 port at 19200 baud The protocol can be de selected by setting the option to 0 in the SETCOM command SETCOM 19200 8 1 2 2 0 set the RS485 port to normal mode Functions The following Modbus functions are supported i Code Function name Action 1 Read Coil Status Read I O 2 Read Input Status Read I O 3 Read Holding Registers Read VR variables or TABLE memory in b...

Page 226: ...J Clear buffer GOSUB clear_buffer Send command to the serial port according to VR 10 IF vision_command v_measure THEN PRINT 1 M PRINT M ELSEIF vision_command v_date THEN PRINT 1 DATE PRINT DATE ELSEIF vision_command v_scene THEN PRINT 1 SCENE scene_n PRINT SCENE ENDIF Check response GOSUB read_buffer GOTO loop read buffer count 0 resp_status 0 k 1 TICKS 5000 REPEAT IF KEY 1 THEN count count 1 GET ...

Page 227: ... You must assign an address to the TJ1 PRT before you set the power of the Trajexia system on To initialise the TJ1 PRT use the BASIC PROFIBUS command PROFIBUS unit_number 2 1 output_start output_count input_start input_count where 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 t...

Page 228: ...number 2 The system sends seven output words from the master to the VR s 10 to 16 and three input words from the VR s 150 to 152 to the master 4 If the configuration is successful the RUN LED lights and the COMM LED lights Communication is now active To configure the CJ1 PRM21 with the CX PROFIBUS do these steps fig 2 1 Start the CX PROFIBUS software tool 2 Right click the MyNetwork tree 3 Select ...

Page 229: ...evice Catalogue from the View menu fig 5 7 Click Install GSD Files The GSD file is on the Trajexia Tools CD It can also be found in the Download Center on the OMRON website 8 Click Update The TJ1 PRT shows in the list 9 Select the OMRON TJ1 PRT from the list and click Add Device ...

Page 230: ...he node number in the Station Address field 12 Add Insert input and output modules to the configuration list below 13 Make sure that the quantity of input words and output words in the selected modules are equal to the quantity selected with the PROFIBUS command 14 Click OK To configure the CJ1W PRM21 with the CX PROFIBUS do these steps ...

Page 231: ...UAL 225 Revision 1 0 fig 7 1 Double click the master module in the MyNetwork tree 2 Set the Station Address and Unit Number fig 8 3 Select the Slave area tab 4 Set the Start Address field of Output Area 1 and Input Area 1 5 Save the project ...

Page 232: ...The result provides the following information i 4 5 DeviceNet 4 5 1 Introduction DeviceNet is an international open fieldbus standard based on the CAN protocol The TJ1 DRT enables the Trajexia system to communicate to a DeviceNet network It exchanges data between a DeviceNet master and the TJ2 MC64 For this it uses the Trajexia VR variables Bit Value Description 0 0 Failed configuration of I O dat...

Page 233: ..._count where unit_number is the number of the TJ1 DRT 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 maximum 32 variables input_start is the start address of the input data range of VR variables input_count is the number of VR variables in the input data range maximum 32 variables After you have ex...

Page 234: ...8 to 32767 or fragments Configure the DeviceNet network To configure the OMRON CJ1W CS1W DRM21 DeviceNet master to exchange VR variables with the Trajexia system do these steps fig 10 1 Start the CX Integrater in the CX ONE software tool 2 Select Network from the Insert menu 3 Select DeviceNet from the Select Network screen The Network view shows fig 11 4 Select CJ1W DRM21 from the OMRON Communica...

Page 235: ...protocols PROGRAMMING MANUAL 229 Revision 1 0 fig 12 5 Drag and drop the CJ1W DRM21 to the Network window fig 13 6 Install the EDS file from the CX Integrator 7 Select No from the dialog window The icon is not needed ...

Page 236: ...ig 15 11 Click Advanced Setup 12 Click Connection tab 13 Click User Setup 14 Click Use Poll Connection 15 Select Con Path 16 Select the number of variables that has been selected for the DeviceNet communication 17 Click OK to confirm all dialog boxes 18 Select Work Online from the Network menu 19 Select Parameter from the Component menu 20 Right click on the Master icon 21 Select Parameter Downloa...

Page 237: ...et parameters You can set the TJ1 DRT DeviceNet parameters using a DeviceNet configurator The default level is 11V Bit Value Description 0 0 DeviceNet unit_number 2 not executed yet 1 DeviceNet unit_number 2 executed without error 1 0 No DeviceNet I O connection 1 DeviceNet I O connection running 2 0 VR variables in the output data range have been updated 1 VR variables in the output data range ha...

Page 238: ...RT is set with the two node number selectors To initialize the TJ1 CORT execute the CAN_CORT commands given below 1 Initialize the TJ1 CORT execute the command CAN_CORT unit 5 bit_rate 2 Add the slave nodes to the network To add a slave node to the TJ1 CORT execute the command CAN_CORT unit 6 node_ID mandatory_flag 3 Add the TPDOs Transmit PDOs and RPDOs Receive PDOs and map them to the TJ2 MC64 m...

Page 239: ...nd for each CANopen object that must be configured Do the configuration for the TJ1 CORT first before the configuration of the CANopen slaves Group the configuration commands for the CANopen slaves together per node It is possible that certain non default settings are required for the TJ1 CORT or the CANopen slaves in the network An example is to initialize the heartbeat consumption and production...

Page 240: ...he following script tot_result TRUE result TRUE Initialise result CAN_CORT 0 5 4 tot_result tot_result AND result IF tot_result FALSE THEN PRINT Initialise Fail STOP ENDIF Add Nodes Node ID 2 result CAN_CORT 0 6 2 1 tot_result tot_result AND result Node ID 63 result CAN_CORT 0 6 63 1 tot_result tot_result AND result Slave 1 node 2 Slave 2 node 63 TJ1 MC__ TJ1 CORT node 9 1 2 Connection PDO COB ID ...

Page 241: ... VR 0 result CAN_CORT 0 7 0 1 0 1e3 5 tot_result tot_result AND result IF tot_result FALSE THEN PRINT Add TPDO RPDO Fail STOP ENDIF Slave Config Settings Node 9 TJ1 CORT Set Heartbeat consumption result CAN_CORT 0 9 9 1016 1 0 2 0 D0 tot_result tot_result AND result result CAN_CORT 0 9 9 1016 1 0 63 0 D0 tot_result tot_result AND result Node 2 Set Heartbeat production result CAN_CORT 0 9 2 1017 0 ...

Page 242: ...ation use the BASIC command CAN_CORT unit 4 0 The result value of this command is given in the table below i Bit Value Description 0 0 Mandatory slave is in correct state 1 Mandatory slave is in unexpected state 1 0 Optional slave is in correct state 1 Optional slave is in unexpected state 2 0 Input data does not contain valid data 1 Input data contains valid data 3 0 No emergency messages receive...

Page 243: ...I 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 For 9 to 16 devices the cycle time is 2 ms The cyclic transmission has two stages The TJ1 ML__ sends the reference command to the MECHATROLINK II slaves The slaves send feedback and status information to the TJ1 ML__ The MECHATROLINK I...

Page 244: ...ta of a GRT1 ML2 unit with address 68 hex The TJ2 MC64 allocates digital I O points in blocks of 32 points Note The GRT1 ML2 does not support the on line configuration of SmartSlice I O Units However other communications units can change the parameters of a SmartSlice I O Unit and store this con figuration in the SmartSlice I O Unit Note If the GRT1 ML2 configuration contains non supported SmartSl...

Page 245: ...al outputs 0 is the start address of the analog inputs 2 is the number of analog inputs 0 is the start address of the analog outputs 2 is the number of analog outputs 67 hex GRT1 ML2 1 ID4 3 ID4 2 AD2 4 DA2 5 OD4 6 ROS2 In 32 33 34 35 36 37 38 39 Out 32 33 34 35 36 37 38 39 Analog Inputs 0 1 Analog Ouputs 0 1 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 Out 40 41 42 43 4...

Page 246: ...e 67 is the GRT1 ML2 address hexadecimal 64 is the start address of the digital I O 0 is the number of digital inputs 16 is the number of digital outputs 0 is the start address of the analog inputs 2 is the number of analog inputs 6 is the start address of the analog outputs 4 is the number of analog outputs GRT1 ML2 69 96 12 8 2 4 10 0 where 69 is the GRT1 ML2 address hexadecimal 96 is the start ...

Page 247: ...above the range of distributed digital inputs and outputs is 32 127 but there are gaps in the digital inputs in the ranges 40 95 and 108 127 and there are gaps in the digital outputs in the ranges 32 63 80 95 and 104 127 These digital inputs and outputs are virtual Virtual digital inputs always have value 0 OFF Virtual outputs can be set ON or OFF and they can be used in programming but they do no...

Page 248: ...L2 set with the rotary switches value is the value of the status error mask that must be set The status error mask value can be read back by means of the command MECHATROLINK unit 39 station vr where the arguments of the command are the same as for the command MECHATROLINK unit 36 station vr The default value of the status error mask after the controller is turned on or reset is 4000 hex This trig...

Page 249: ...dipswitch 1 REGS is set to OFF before the power is turned on In this case the GRT1 ML2 automatically detects the actual I O configuration and starts the communication Create a new registration table To register the table make sure the power of the GRT1 ML2 and the SmartSlice I O Units is on and set unit dipswitch 1 REGS on the GRT1 ML2 from OFF to ON If the registration table is refreshed the old ...

Page 250: ...Unit a verification error occurs In this case the concerned SmartSlice I O Units do not participate in the I O communication The I O communication starts with the other SmartSlice I O Units fig 19 The tables above give an example of a mismatch between the registered table and the actual configuration The I O data sizes of the third unit do not match Therefore a verification error occurs and the th...

Page 251: ...ligent axis window Sets the mode Run or Commisioning How to set a startup program fig 1 When you add a new TJ2 MC64 to the solution in Trajexia Studio 2 programs are created by default the SHELL program and an application program called APPLICATION A TJ2 MC64 can execute a program at startup when the device is switched on it executes the program fig 2 You can set the startup priority for a program...

Page 252: ...ck detected slaves Unit 0 IF NOT MECHATROLINK 0 3 0 THEN PRINT Error getting slave count for unit 0 STOP ELSE IF VR 0 3 THEN PRINT Incorrect slave count for unit 0 STOP ENDIF ENDIF Note The SHELL program by default runs at startup at priority 0 Note OMRON recommends that the statement RUN APPLICATION is used in the Startup program to start your application program The application program starts wh...

Page 253: ...Error getting address for unit 0 station 1 STOP ELSE IF VR 0 66 THEN PRINT Incorrect address for unit 0 station 1 STOP ENDIF ENDIF IF NOT MECHATROLINK 0 4 2 0 THEN PRINT Error getting address for unit 0 station 2 STOP ELSE IF VR 0 67 THEN PRINT Incorrect address for unit 0 station 2 STOP ENDIF ENDIF Set axis types Unit 0 ATYPE AXIS 0 40 ATYPE AXIS 1 40 ATYPE AXIS 2 40 Set drives into run mode Unit...

Page 254: ...L alarm_status 101 GLOBAL action 102 Initialize variables VR 0 0 project_status 0 alarm_status 0 action 0 Start APPLICATION program RUN APPLICATION 2 STOP 5 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 These concepts are described in the Hardware Reference Manual in the ...

Page 255: ...te for 13 bit encoders i i Speed mode examples Drive Parameter value Description Pn103 716 Inertia ratio Pn110 0012 No autotuning Pn202 1 Gear ratio numerator Pn203 1 Gear ratio denominator Motion Parameter values Description UNITS 1 Working in encoder counts SPEED 200000 Speed setting ACCEL 1000000 Acceleration setting DECEL 1000000 Deceleration setting MOVEMENT 81920 10 Turns ...

Page 256: ... Speed axis parameter is sent to the Servo Driver and reads the position feedback BASE 0 ATYPE 44 Servo axis encoder mode SERVO 1 WDOG 1 DEFPOS 0 loop MOVE 81920 WAIT IDLE WA 100 DEFPOS 0 GOTO loop Following Error Demanded Position Measured Position Speed Command Encoder Signal Position loop 10V _ _ TJ1 MC__ TJ1 FL02 DRIVE SERVO OFF SERVO OFF Profile generator M E ...

Page 257: ...ins the same but the ripple the speed stability and overshoot are better The parameter values for the example are i 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 Units is 50 units ms divi sion Blue FE Following Error Units is depending on the graph Green MPOS Measured Axis positio...

Page 258: ...he parameter values for the example are i Example 4 fig 7 The value of the parameter P_GAIN two times the value in example 1 The Following Error is half but there is vibration due to the excessive gains The parameter values for the example are i Motion Parameter values P_Gain 200000 VFF_GAIN 0 Fn001 6 Motion Parameter values P_Gain 262144 VFF_GAIN 0 Fn001 6 ...

Page 259: ... Following Error is proportional to the acceleration and smaller than with just proportional gain the scaling is 20 units division The Following Error approaches zero during constant speed The negative effect of this set of values is the overshoot and undershoot when the acceleration changes this can be reduced but not eliminated by increasing the speed loop gain if the mechanical system can cope ...

Page 260: ...e P_GAIN where the higher the better the limit is when the mechanical system starts vibrating for the VFF_GAIN there is an optimum value the one in test 6 values higher than this value has an error proportional to the speed acceleration but with different sign The required correction is too large The parameter values for the example are i Motion Parameter values P_Gain 131072 VFF_GAIN 1573500 Fn00...

Page 261: ...op gain at the same time using just proportional position gain The results are similar to the MECHATROLINK II Speed mode with the advantages 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 There is no sample time delay between T...

Page 262: ...ing Error reduces as the rigidity increases The parameter values for the example are i Note The colours and scale of the oscilloscope for position mode are as follows Red MSPEED Measured Axis speed Units is 50 units ms divi sion Blue DRIVE_MONITOR set as Following Error in the Servo Driver Units is depending on the graph Green MPOS Measured Axis position 50000 units division Motion Parameter value...

Page 263: ...e that in MECHATROLINK II Speed mode The parameter values for the example are i Example 4 fig 16 The effect of the Feedforward gain is that the Following Error is reduced and the effect is proportional to the acceleration The parameter values for the example are i Motion Parameter values Fn001 8 Pn109 0 Motion Parameter values Fn001 6 Pn109 95 ...

Page 264: ...mation about axis positions is also expressed in encoder counts When writing programs in BASIC to achieve movements or a sequence of movements a user can prefer to work with user defined units such as millimeter centimeter meter degree of angle product rotation stations The UNITS axis parameter contains the conversion factor between encoder counts and user defined units All axis parameters related...

Page 265: ...nversion between encoder counts and user defined units Two very important parameters of the Servo Drivers for conversion of encoder counts into user units are the electronic gear ratio numerator and the electronic gear ratio denominator The table below gives these parameters for the Servo Drivers i If a servo motor with an absolute encoder is used setting parameter Pn205 Multiturn limit for Sigma ...

Page 266: ...nd Pn203 encoder pulses and mechanical measurement units is where y is the number of encoder counts and x is the amount in user units Example 1 fig 19 The mechanical system consists of a simple rotary table A servo motor with 13 bit incremental encoder is used The gear ratio of the gearbox is 1 10 The desired user units are degree of angle This system can be described with the following equations ...

Page 267: ...rrors 3 For reasons of stability it is necessary to avoid situations where Pn202 Pn203 is less than 0 01 or greater than 100 It is recommended that Pn202 Pn203 is approximately 1 We can now rewrite the last equation to One solution to this equation is When we consider the third recommendation from the above list avoid situations where Pn202 Pn203 is less than 0 01 or greater than 100 we can rewrit...

Page 268: ...ne turn the fraction from 0 to and excluding 1 When the MECHATROLINK II connection is established with the drive the absolute encoder position is read from the drive and the value is written in MPOS after the conversion UNITS Pn202 Pn203 When the mechanical system has a limited travel distance to move like in a ball screw the value of the parameter Pn205 should be set large enough to have an overf...

Page 269: ... last equation to the above we get Simplification of this equation gives This results in We calculate the parameters as we did in example 1 This gives To guarantee the correct overflow both in Trajexia and in the Servo Driver we must set two additional axis parameters REP_DIST 60 and REP_OPTION 1 With these settings the command MOVE 35 rotates the table 35 degrees in positive direction The range o...

Page 270: ... reset the multiturn counter but it is not possible to reset the position within one turn the fraction from 0 to and exclud ing 1 To adjust zero offset use the parameter Pn808 For more details see the NS115 MECHATROLINK II Interface Unit manual Caution At power up the absolute encoder position is read from the motor and written to MPOS using the following conversion For MPOS This is correct if If ...

Page 271: ...le 1 the equation expressing the relationship between user units and encoder counts is Therefore One solution is Caution To make sure that the absolute position is always correct you must make sure that and that Note that this is not obvious for the high resolution encoders of the Sigma V motors Pn205 1 encoder_resolution 2 32 Pn205 1 Pn202 Pn203 encoder_resolution 2 32 17 bit absolute encoder 1 6...

Page 272: ...3 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 With these settings executing MOVE 38 moves the moving part 38 mm in forward direction The range of possible MPOS and DPOS values is 0 mm to 4160 mm 9 UNITS 2 512 Pn202 631 Pn203 125 m motor_revolution n machine_cyc...

Page 273: ...ause the greatest common divisor of Pn202 and Pn203 must be 1 we get Pn202 17 and Pn203 500 Therefore the parameters are To calculate the multiturn limit setting Pn205 we have 1 12 24 Gear 17 bit absolute encoder M r Full turn 360 3600 x tenth of degree Pn202 Pn203 UNITS 2 17 encoder_counts 1 motor_revolution 1 machine_revolution 12 24 motor_revolution 3600 tenth of degree 1 pulley_revolution 3600...

Page 274: ...e pulley equals 144 stations on the main wheel The distance between two stations is 50 mm The mechanical measurement units must mm Total repeat distance must be the distance between two stations 50mm With the same procedure as in example 1 we have Therefore if we use the mechanical system to set the electronic gear ratio we have One possible solution is M 17 bit absolute encoder 1 10 Gear Pulley 1...

Page 275: ...box is 1 3 The screw pitch of the ball screw is 10mm per revolution The total travel distance of the ball screw is 540 mm The mechanical measurement units must be mm With the same procedure as in example 1 we have Therefore Pn202 Pn203 UNITS 50 12 10 17 2 17 2 600 10 17 2 60 1 15 2 1 2 2 15 15 1 17 2 UNITS 2 32768 15 Pn202 1 Pn203 15 Pn205 4 REP_DIST 50 REP_OPTION 1 17 bit absolute encoder M 1 3 G...

Page 276: ... this value large enough to have the overflow of the counter out of the effective position Also because of the axis is finite it is not important to set the REP_OPTION parameter because REP_DIST must be set large enough so it is outside of the maximum effective position 540 mm One solution is REP_DIST 1000 and REP_OPTION 0 With these setting executing MOVE 17 moves the ball screw 17 mm in forward ...

Page 277: ... outputs Digital outputs 16 31 These outputs are software outputs only They do not physically exist on the TJ2 MC64 but you can write them and read their correct status You use these outputs mostly in BASIC programs to accomplish some control sequences that require outputs which do not need to be physical Use the command OP to write and read these outputs Digital outputs 32 255 These outputs are p...

Page 278: ...them You use them mostly in BASIC programs to accomplish some control sequences that require inputs which do not need to be physical Use the command IN to read these inputs Digital inputs 32 255 These inputs are physically present only if additional digital I O units are connected to the TJ2 MC64 via the MECHATROLINK II bus If you read them if they do not physically exist the I O units are not con...

Page 279: ... It is not supported for Flexible Axis Servo Drivers i Trajexia input Servo Driver input signal Description Sigma II Sigma V Junma G Series Accurax G5 16 P_OT P_OT P_OT P_OT Forward limit switch 17 N_OT N_OT N_OT N_OT Reverse limit switch 18 DEC DEC DEC DEC Zero point return decelera tion 19 PA PA Not used Not used Encoder A phase signal 20 PB PB Not used Not used Encoder B phase signal 21 PC PC N...

Page 280: ...CN1 I O connector To do this you must set the appropriate parameter of the Servo Driver The table below shows the possible settings and parameter values 29 IO13 IO13 Not used NCL General input 13 Sigma II and Sigma V Torque limit input in negative direction G Series and Accurax G5 30 IO14 IO14 Not used SI0 General input 14 Sigma II and Sigma V General input 0 G Series and Accurax G5 31 IO15 IO15 N...

Page 281: ...46 SI6 12 SI6 7 Always ON 8 Always OFF P_OT active low Pn50A 3 N_OT active low Pn50B 0 DEC active low Pn511 0 9 40 SI0 13 SI0 A 41 SI1 7 SI1 B 42 SI2 8 SI2 C 43 SI3 9 SI3 D 44 SI4 10 SI4 E 45 SI5 11 SI5 F 46 SI6 12 SI6 EXT1 active low Pn511 1 EXT2 active low Pn511 2 EXT3 active low Pn511 3 0 3 Always OFF 4 44 SI4 10 SI4 5 45 SI5 11 SI5 6 46 SI6 12 SI6 7 Always ON 8 9 C Always OFF EXT1 active high ...

Page 282: ...nector The table below shows the input signals and pin numbers BRK active low Pn50F 2 0 Always OFF 1 25 1 2 27 23 3 29 25 IO12 Pn81E 0 IO13 Pn81E 1 IO14 Pn81E 2 IO15 Pn81E 3 0 Always OFF 1 40 SI0 13 SI0 2 41 SI1 7 SI1 3 42 SI2 8 SI2 4 43 SI3 9 SI3 5 44 SI4 10 SI4 6 45 SI5 11 SI5 7 46 SI6 12 SI6 Input signal Parameter name Parameter setting CN1 pin number Sigma II Sigma V Input signal CN1 pin numbe...

Page 283: ...ve high 22 SI1 active high 23 SI2 active high 6 PCL active high 7 NCL active high 8 Parameter number Parameter name Description Pn400 Input Signal Selection 1 Set the IN1 input function allocation Pn401 Input Signal Selection 2 Set the IN2 input function allocation Pn402 Input Signal Selection 3 Set the IN3 input function allocation Pn403 Input Signal Selection 4 Set the IN4 input function allocat...

Page 284: ...is parameters DATUM_IN FHOLD_IN FWD_IN and REV_IN The inputs of the axis Servo Driver are used depending on the axis of which the parameters are set Signal name Symbol Set value NO NC Disabled 00h Setting not available Forward drive prohibition input POT 01h 81h Reverse drive prohibition input NOT 02h 82h Emergency Stop Input STOP 14h 94h External Latch Input 1 EXT1 20h Setting not available Exter...

Page 285: ...o axis 0 is used but for axis 3 the input on CN1 41 of the Junma driver assigned to axis 3 is used Therefore we say that those inputs are accessed per axis they are not unique for the whole controller In general these two inputs have a different status at the same time Also note that neither of these two inputs can be accessed using the command IN For example the command IN 22 returns the status o...

Page 286: ...ure because the exact positions are transferred directly to the system For other encoder types a movement is necessary since there is no knowledge of the exact position within the Note If a forward limit reverse limit and origin input signal are used for an axis it is strongly recommended to use the following settings for the axis BASE axis_number DAT_IN 18 DEC input in the corresponding Servo Dri...

Page 287: ...e there are several different origin search sequences They are different in these areas The means used to detect limit positions of the moving part sensors switches etc Origin home position or reference Possible positions of the moving part related to limit positions and origin position Trajexia includes some pre defined basic homing sequences DATUM 0 This is not really an origin search This comma...

Page 288: ...n search forcing a position from a user reference Static origin search forcing a position from an absolute encoder fig 25 The figure shows a general origin search scenario This simple origin search sequence has 3 steps 1 Search for a signal 2 Search for another signal 3 Move the axis to a predefined position It is important to note that before any homing procedure is executed it is necessary to se...

Page 289: ... position The example for this homing procedure is shown in the figure fig 27 The figure shows the possible scenarios for absolute origin search plus limit switches These scenarios depend on the position of the moving part when the power comes on The program example that does this origin search sequence is given below Absolute origin switch IN0 Left limit switch IN1 Right limit switch IN2 BASE 0 D...

Page 290: ...this homing procedure is shown in the figure fig 29 The possible scenarios for origin search against limit switches depending on the position of the moving part on power on are shown in the figure The program example that does this origin search sequence is given below Origin and left limit switch IN0 Right limit switch IN1 BASE 0 DATUM_IN 0 SERVO ON WDOG ON DATUM 4 WA 1 WAIT IDLE ON OFF ON OFF mi...

Page 291: ...he 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 The program example that does this origin search sequence is given below BASE 0 DRIVE_CONTROL 11 Monitor torque with DRIVE_MONITOR SERVO ON WDOG ON SPEED CREEP REVERSE WA 1 WAIT UNTIL DRIVE_MONITOR 100 Wait for p...

Page 292: ... reference pulse Zero Mark depending on the position of the moving part on power on are shown in the figure The program example that does this origin search sequence is given below Origin and left limit switch IN0 Right limit switch IN1 REV_IN 1 BASE 0 DATUM_IN 0 SERVO ON WDOG ON DATUM 6 WA 1 WAIT IDLE Static origin search forcing a position from a user reference This origin search procedure perfo...

Page 293: ... axis is stored This information can be used like other parameters or values in a program The registration information is available to a program immediately after the registration The advantage of registration is that it is done very quickly Therefore the axis position that is stored is very accurate To achieve this speed and accuracy registration is implemented with hardware and the registration ...

Page 294: ...ch so only one input can be used at a time For Sigma II Servo Drivers the physical inputs are in pins CN1 44 CN1 45 and CN1 46 on the 50 pins CN1 connector For Sigma V Servo Drivers the physical inputs are in pins CN1 10 CN1 11 and CN1 12 on the 26 pins CN1 connector Trajexia uses logical inputs EXT1 EXT2 and EXT3 to associate the physical inputs to logical ones This association is done by setting...

Page 295: ...nce the motor speed cannot change much during 62 5 µs the resulting accuracy is very high The delays in transmission of the information are Delay in triggering the registration 0 625 ms to 4 ms Delay in receiving the registration 3 5 ms Delay in capturing the registration 3 µs It is also possible to use the encoder Z mark to register an axis position This is also done with the argument of the REGI...

Page 296: ... are necessary Only the rising signal edge can be used for registration In contrast with other types Servo Drivers the G series Servo Drivers do not support executing registration while it is in base block state The registration can be executed on G Series Servo Drivers only when WDOG is set to ON If registration is required when the G Series Servo Driver is in base block state this workaround can...

Page 297: ...egistration inputs and two latch circuits per encoder input which can be used independently Therefore two independent registration inputs can be used at the same time For more information on how to use both registration inputs of the TJ1 FL02 at the same time refer to sections 3 2 183 3 2 184 3 2 239 3 2 240 and 3 2 241 The delay in the capture is 0 5 µs Because the encoder position is read contin...

Page 298: ...depend on the axis type Refer to section 3 2 241 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 183 and 3 2 184 REG_POS holds the captured axis position Only if the MARK flag signals that the position was captured successfully you can regard ...

Page 299: ...thin the specified window of axis positions With this windowing function registration events are ignored if the axis measured position is less than the OPEN_WIN axis parameter or greater than the CLOSE_WIN parameter Exclusive windowing allows the registration to occur only outside the specified window of axis positions With this windowing function the registration events are ignored if the axis me...

Page 300: ...ing There are delays between these events Trajexia receives the latch Trajexia decides to trigger the latch again The latch is triggered 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 notable for axes connected to the system via the MECHATROLINK II bus due to bus delays To compensate for these delays a user must set...

Page 301: ...then it is shaped into the tube by a mechanical mandrel and at the same time the tube is sealed vertically The feeder movement is intermittent and the feed length corresponds with the bag length Once the bag is fed the horizontal sealer closes the bag so it can be filled with the product After that the process starts again feeding the new bag Mandrel for bag forming Vertical sealer External encode...

Page 302: ...point incremental movement without correction an error of 0 1 mm per bag is accumulated With a small number of bags the difference is not visible but after 500 bags the error is 50 mm which is a 25 of the bag length fig 39 When working with registration marks the motion controller executes an incremental movement to a certain position If during the positioning the registration mark is detected the...

Page 303: ...ement of the flying shear starts to be synchronized with the right position on the wood If the movement is started by the program upon detecting a signal from the photocell there is always at least one SERVO_PERIOD of time of uncertainty Instead the movement is started using the MOVELINK command with link_option 1 which means that the link to the master axis starts when the registration event occu...

Page 304: ...system For more information on the software oscilloscope and its features and capabilities refer to the Trajexia Studio manual You can trigger the oscilloscope to start tracing given axis and system parameters in two ways manually or by a program Triggering manually is done using the data trace The parameters are stored in the Table memory of the controller The range of the Table memory where the ...

Page 305: ...able memory the oscilloscope can be configured to show a range of Table memory locations instead of axis and system parameters The exact moment when the tracing is started can be exactly determined because it is controlled by the TRIGGER command This means the start of tracing is synchronized with the movement There is no limitation of 200 samples per channel the oscilloscope shows as many samples...

Page 306: ... values VR end_pos 15 current_end_pos VR end_pos FOR i 0 TO 999 TABLE i VR end_pos 1 COS 2 PI i 999 2 NEXT i loop IF VR end_pos current_end_pos THEN Recalculate the CAM Table FOR i 0 TO 999 TABLE i VR end_pos 1 COS 2 PI i 999 2 NEXT i current_end_pos VR end_pos ENDIF GOTO loop The VR end_pos value can be changed from some other program or externally from another controller using FINS messaging In ...

Page 307: ...tored in TABLE 3000 to TABLE 3999 MSPEED AXIS 1 is stored in TABLE 4000 to TABLE 4999 The capture covers 1000 samples 2ms sample 2seconds SCOPE ON 2 1000 4999 MPOS AXIS 0 DPOS DRIVE_MONITOR MSPEED FORWARD AXIS 0 Move the master axis forward TRIGGER Start tracing and storing of parameters WHILE NOT MOTION_ERROR Cambox that will start in AXIS 0 position 1 CAMBOX 0 999 UNITS 10 0 2 1 WAIT UNTIL MPOS ...

Page 308: ...e 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 There is one peak at the start and another peak at the stop because there is a discontinuity in the acceleration There is also a high frequency oscillation in the torque curve suggesting a reso...

Page 309: ...d to analyze when you do not know what happens The only thing that the user sees is that the slave axis has an error once every few hours or even less often But the oscilloscope can clearly show where the problem is In order to be able to use the oscilloscope all desired parameters must be captured at the time of an error This can be achieved by arranging the application programs in a certain way ...

Page 310: ...e cause because there is no discontinuity on it We discard a mechanical problem as well because the torque given in green has low values An the moment of the problem the speed of the slave axis given in yellow was smooth and low therefore this is no problem either The next step is to analyze the CAM table to see which values were used for demanding the position of the slave axis To do that we chan...

Page 311: ...ter has been changed during the execution of the CAMBOX command The solution is simple A change of the end_pos parameter during CAMBOX execution must be prevented To do this either modify the programs in Trajexia or in some other controller if the parameter is changed outside of the scope of the application programs for example by a FINS message Note The time base of the CAM TABLE points is not th...

Page 312: ...tomatically selected to start at POWER ON in low priority task 1 Example The example program below is a typical SHELL program created by Trajexia Studio This SHELL program is an example that OMRON provide as recommended This program should be modified for the particular user application Reserved symbol area for SHELL program handling Do not use these areas in your application programs VR 900 statu...

Page 313: ...OLINK initialisation Bit0 Could not get the ML slave number Bit1 Slave number is uncorrect Bit15 Detection OK VR 904 VR diag02 gives feedback of the MECHATROLINK Slaves Bitn Slave n not detected VR 905 VR diag03 gives feedback forUnit detection Bitn Unit n detected VR 906 VR system01 used in system detection VR 907 VR signal_state gives feedback on signal state VR 908 sys_error system error detect...

Page 314: ...ype 2 GLOBAL machine_speed 3 GLOBAL status_word 900 SHELL GLOBAL action 902 SHELL GLOBAL sys_error 908 SHELL GLOBAL first_error 909 SHELL Omron Auto Generated Constants CONSTANT max_axis 15 SHELL CONSTANT status_bits 901 SHELL CONSTANT diag01 903 SHELL CONSTANT diag02 904 SHELL CONSTANT diag03 905 SHELL CONSTANT system01 906 SHELL CONSTANT signal_state 907 SHELL CONSTANT servo_status 910 SHELL CON...

Page 315: ...nt 0 stop_bit 0 Omron Auto Generated Local Variables End VR signal_state 0 This subroutine tests whether the detected hardware is the expected one or not If the right hardware is detected it sets the right values to the axes and servo drives At least the right system needs to be properly detected once GOSUB system_detection This subroutine stops all possible running programs and movements Stop all...

Page 316: ...T to restart IF status_word 2 THEN PRINT Stop with Alarm GOSUB stop_all status_word 2 Programs stopped with error ENDIF IF res_bit 1 THEN action 2 Resetting PRINT Resetting GOSUB reset_all status_word 1 Programs stopped NO error ENDIF ELSE action 3 OK IF run_bit 1 THEN PRINT Start application GOSUB start_app status_word 3 Application running ENDIF IF stop_bit 1 AND status_word 3 THEN PRINT Stop by...

Page 317: ...s in servodrive GOSUB warning_seq GOTO loop sequence Define here your signals to STOP START RESET This example uses the following signals Rising edge of bit 0 of VR signal_state as RUN signal Rising edge of bit 1 of VR signal_state as STOP signal Rising edge of bit 2 of VR signal_state as RESET signal RUN run_ant run_act run_act READ_BIT 0 signal_state run_bit run_act AND NOT run_ant STOP stop_ant...

Page 318: ...BIT 0 status_bits Motion error flag first_error ERROR_AXIS ENDIF alarm_bit 1 ENDIF MECHATROLINK axis alarm monitoring FOR i 0 TO max_axis BASE i VR servo_status i 2 AXISSTATUS if stopped by alarm notify the alarm code IF ATYPE 40 AND ATYPE 42 THEN IF status_word 2 THEN if no response notify communication alarm IF AXISSTATUS AND 4 0 THEN VR servo_alarm i 2 E6 ELSEIF NOT DRIVE_ALARM servo_alarm i 2 ...

Page 319: ...ROR RETURN stop_all In this example if the application program is stopped suddenly all the movements are cancelled and all the axes are set to BaseBlock Modify this section if you require a different STOP procedure STOP APPLICATION WDOG 0 FOR i 0 TO max_axis BASE i IF MARK 0 THEN REGIST 1 AXIS_ENABLE 0 SERVO 0 CANCEL 1 Cancel NTYPE WA 1 CANCEL 1 Cancel possible program buffer NEXT i RAPIDSTOP Canc...

Page 320: ...HATROLINK axes reset sequence FOR i 0 TO max_axis BASE i IF ATYPE 40 AND ATYPE 42 THEN Reset sequence for MECHATROLINK communication error IF AXISSTATUS AND 4 0 THEN PRINT Resetting ML alarm GOSUB system_detection ENDIF Reset sequence for DRIVE errors IF AXISSTATUS AND 8 0 THEN IF VR servo_alarm i 2 81 OR VR servo_alarm i 2 CC THEN GOSUB absencoder ELSE Pending to handle diferently those alarms th...

Page 321: ...ted ML IO Warning Automated code section any manual code changes will be lost Omron Auto Generated ML IO End Same with the other IO devices ELSEIF SYSTEM_ERROR 0 THEN Other system error needs initialisation of the system EX ENDIF RETURN warning_seq IF READ_BIT 15 diag01 THEN Clear servodrive warning if any IF res_bit 1 THEN FOR i 0 TO max_axis BASE i IF ATYPE 40 AND ATYPE 42 THEN IF DRIVE_STATUS A...

Page 322: ...ng depending on the application RETURN absencoder To be implemented in the future RETURN system_detection status_word 0 action 0 VR status_bits 0 Omron Auto Generated Units Warning Automated code section any manual code changes will be lost Unit Variables reset VR diag01 0 VR diag02 0 VR diag03 0 VR system01 0 ...

Page 323: ...tion for ML04 unit 0 IF READ_BIT 0 diag03 0 THEN Initialise Mechatrolink MECHATROLINK 0 0 Device count IF NOT MECHATROLINK 0 3 system01 THEN PRINT Error getting device count for ML04 unit 0 SET_BIT 0 diag01 ELSEIF VR system01 2 THEN PRINT Incorrect device count for ML04 unit 0 SET_BIT 1 diag01 ENDIF Check SJDE 02ANA OY address IF NOT MECHATROLINK 0 4 0 system01 THEN PRINT Error getting address for...

Page 324: ...ML04 unit 0 station 1 SET_BIT 1 diag02 ENDIF ENDIF Stop Mechatrolink Section Detection OK IF VR diag01 0 AND VR diag02 0 AND VR diag03 0 THEN SET_BIT 15 diag01 Invert input channels INVERT_IN 16 OFF POT INVERT_IN 17 OFF NOT Omron Auto Generated Units End Start Standard Section IF READ_BIT 15 diag01 1 THEN Drive Parameters BASE 2 Parameter data param_n param_v mask size TABLE 0 20E 32 FFFFFF 4 TABL...

Page 325: ...OT DRIVE_WRITE TABLE i TABLE i 3 TABLE i 1 1 THEN SET_BIT 1 diag02 ELSE res 1 ENDIF ENDIF ELSE Parameter set using Mask IF VR system01 AND NOT TABLE i 2 TABLE i 1 THEN VR system01 VR system01 AND TABLE i 2 OR TABLE i 1 IF NOT DRIVE_WRITE TABLE i TABLE i 3 VR system01 1 THEN SET_BIT 1 diag02 ELSE res 1 ENDIF ENDIF ENDIF ENDIF i i 4 WEND Reset drive if necessary IF res 1 THEN IF NOT DRIVE_RESET THEN...

Page 326: ...IVE_READ TABLE i TABLE i 3 system01 THEN SET_BIT 0 diag02 ELSE IF TABLE i 2 FFFFFF THEN IF VR system01 TABLE i 1 THEN IF NOT DRIVE_WRITE TABLE i TABLE i 3 TABLE i 1 1 THEN SET_BIT 1 diag02 ELSE res 1 ENDIF ENDIF ELSE Parameter set using Mask IF VR system01 AND NOT TABLE i 2 TABLE i 1 THEN VR system01 VR system01 AND TABLE i 2 OR TABLE i 1 IF NOT DRIVE_WRITE TABLE i TABLE i 3 VR system01 1 THEN SET...

Page 327: ...00 0000 REP_OPTION 0 ERRORMASK 268 AXIS_ENABLE 0 DRIVE_CONTROL 0 P_GAIN 1 0000 I_GAIN 0 0000 D_GAIN 0 0000 OV_GAIN 0 0000 VFF_GAIN 0 0000 SPEED 50 0000 ACCEL 100 0000 DECEL 100 0000 CREEP 100 0000 JOGSPEED 100 0000 FE_LIMIT 10 0000 SERVO 0 FWD_IN 1 0000 REV_IN 1 0000 DATUM_IN 1 0000 FHOLD_IN 1 0000 FS_LIMIT 20000000 0000 RS_LIMIT 20000000 0000 FASTDEC 0 0000 FHSPEED 1000 0000 OUTLIMIT 1 0000 FE_RA...

Page 328: ...AIN 1 0000 I_GAIN 0 0000 D_GAIN 0 0000 OV_GAIN 0 0000 VFF_GAIN 0 0000 SPEED 50 0000 ACCEL 100 0000 DECEL 100 0000 CREEP 100 0000 JOGSPEED 100 0000 FE_LIMIT 10 0000 SERVO 0 FWD_IN 1 0000 REV_IN 1 0000 DATUM_IN 1 0000 FHOLD_IN 1 0000 FS_LIMIT 20000000 0000 RS_LIMIT 20000000 0000 FASTDEC 0 0000 FHSPEED 1000 0000 OUTLIMIT 1 0000 FE_RANGE 0 0000 DAC 0 0000 BASE 2 Axis Name Down ATYPE 40 Axis Type Mecha...

Page 329: ...D 100 0000 FE_LIMIT 90 0000 SERVO 0 FWD_IN 16 0000 REV_IN 17 0000 DATUM_IN 1 0000 FHOLD_IN 1 0000 FS_LIMIT 20000000 0000 RS_LIMIT 20000000 0000 FASTDEC 0 0000 FHSPEED 1000 0000 OUTLIMIT 1 0000 FE_RANGE 0 0000 BASE 3 Axis Name Up ATYPE 40 Axis Type Mechatro_Position UNITS 32 0000 REP_DIST 360 0000 REP_OPTION 1 ERRORMASK 268 AXIS_ENABLE 0 DRIVE_CONTROL 0 SPEED 3600 0000 ACCEL 36000 0000 DECEL 36000 ...

Page 330: ...0 OUTLIMIT 1 0000 FE_RANGE 0 0000 ENDIF Variables TABLE DATA Stop Standard Section RETURN 5 2 2 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 EXAMPLE OF INITIALIZATION PROGRAM THIS VERSION IS DESIGNED FOR MECHATROLINK II SERVOS Note Refer to the Servo Driver and the mot...

Page 331: ...x speed EXAMPLE 2 SGMAH 01A1A61D OY motor data enc_resolution 2 16 16 bit encoder max_speed 5000 5000 rpm max speed WRITE PARAMETERS IN THE SERVO DRIVE_WRITE 103 2 inertia_ratio Write inertia ratio DRIVE_READ 110 2 10 IF VR 10 0012 THEN DRIVE_WRITE 110 2 0012 1 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 ...

Page 332: ...RESET Initial gains For MECHATROLINK_SPEED By experience this setting is a good starting point P_GAIN INT 214748 3648 max_speed enc_resolution This is the optimum value Set if needed VFF_GAIN INT 60000 1073741824 enc_resolution max_speed Initial gains For MECHATROLINK_POSITION mode Change the rigidity Fn001 according to the mechanical system Change feedforward gain Pn109 if required Initial parame...

Page 333: ...100 GOTO loop The units are degrees in this example therefore 13 bit encoder Pn202 32 Pn203 45 UNITS 32 The graph in the figure is typical for this point to point movement with linear acceleration Note the following During linear acceleration the graph of the position is parabolic because the speed is a derivative of the position During constant speed the graph of the position is straight During l...

Page 334: ...al to the acceleration according to the formula Torquetotal Jtotal α Torquefriction where Torquefriction is usually small α is the angular acceleration and J the inertia of the system 5 2 4 Position with product detection fig 49 A ballscrew moves forward at a creep speed until it reaches a product a microswitch IN 2 turns on The ballscrew is stopped immediately the position at which the product is...

Page 335: ...lette has sides 1m long It is divided into a 5 x 5 grid and each of the positions on the grid contains a box which must be filled using the same square pattern of 100mm by 100mm A dispensing nozzle controlled by digital output 8 must be turned on when filling the box and off at all other times speed Forward Moveabs IN 1 IN 2 t CANCEL WAIT IDLE PRINT Product position SPEED 100 MOVEABS 0 WAIT IDLE S...

Page 336: ... 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 MOVE 100 0 MOVE 0 100 MOVE 100 0 WAIT IDLE WA 1000 RETURN t t y x speed y speed Square_rel x X 0 Y 0 X 1 Y 0 X 0 Y 1 X 0 Y 2 X 0 Y 3 X 0 Y 4 X 4 Y 4 200 100 Square_rel MOVEABS 0 200 MOVEABS 0 400 OP nozzle ...

Page 337: ...that is set by the operator The figure shows a typical bag feeder that is part of the machine Bag feeder machines have two modes Without mark Forward feeds the film a set distance for films of a flat colour With mark Forward feeds the film to a printed mark on the film The program in this section shows the typical code for a bag feeder machine ...

Page 338: ...ogram_alarm 0 failed 0 feeder_axis 2 BASE feeder_axis Position counter MPOS DPOS goes from 0 to 999999 and 0 again UNITS 27 SPEED 100 ACCEL 1000 DECEL 1000 REP_DIST 1000000 REP_OPTION 1 SERVO ON WDOG ON Main program loop Define current position as zero DEFPOS 0 Wait for rising edge in Digital Input start_signal Time Time Position Speed IN start_signal REG_POS MOVEABS REGIST 1 MOVEABS REGIST 1 MARK...

Page 339: ...D MARK THEN REGIST 1 WAIT UNTIL MARK 0 ENDIF Wait until movement finished or mark detected WAIT UNTIL MTYPE 0 OR MARK AND work_with_mark Working with mark IF work_with_mark THEN IF MARK THEN If the mark has been detected the position is corrected MOVEMODIFY bag_distance expected_pos REG_POS failed 0 ELSE If the mark has not been detected PRINT Mark not detected failed failed 1 IF failed max_fail T...

Page 340: ...ram 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 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 341: ...s from 0 to 11999 and then back to 0 again REP_OPTION 1 REP_DIST 12000 SPEED 200 FORWARD BASE 1 loop CAMBOX in_tbl end_tbl 1 lnk_dst master opt start WAIT IDLE GOTO loop filltable The shape of the CAM is stored in TABLE 0 to TABLE 360 npoints 360 in_tbl 0 end_tbl in_tbl npoints Distance of the master to make the CAM lnk_dst 10000 Master axis master 0 The CAM start exactly when the master reaches p...

Page 342: ...end_tbl TABLE i k COS PI i npoints 1 2 NEXT i RETURN 5 2 8 Flying shear program fig 56 An example of the Flying shear program In this application there are three axes Axis 0 shear_axis the advancement of the shear Axis 1 flying_axis is the flying shear Axis 2 line_axis transports the material Axis 1 Axis 0 Axis 2 ...

Page 343: ...is ON SERVO AXIS shear_axis ON WDOG ON FIRST CYCLE Make a first material cut MOVEABS end_pos AXIS shear_axis WAIT UNTIL MTYPE AXIS shear_axis 2 WAIT IDLE AXIS shear_axis First time we have a certain wait time because the material has been just been cut wait_distance cut_lenght l_acc 2 1 2 3 4 5 Flying shear axis slave Material feeder Master ZERO POSITION Initial situation material to cut and shear...

Page 344: ...is 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 Fast speed to return WAIT LOADED AXIS shear_axis SPEED AXIS shear_axis return_speed cut_counter cut_counter 1inch Return back synchro...

Page 345: ...e product and the shear remains the same The cut in the material is made This gives a new material edge 4 The deceleration part the material continues and the shear stops 5 Move back at high speed the distances are calculated such that when the slave reaches it original position the edge of the product is in the correct position to start a new cut A A new movement starts step 2 5 2 9 Correction pr...

Page 346: ... updated accordingly Example fig 59 conveyor 0 labeller 1 virtual 15 SERVO AXIS conveyor 1 SERVO AXIS labeller 1 WDOG 1 BASE labeller CONNECT 1 conveyor ADDAX virtual FORWARD AXIS conveyor REGIST 1 WAIT UNTIL MARK 0 loop WAIT UNTIL MARK correction REG_POS expected_pos MOVE correction AXIS virtual WAIT IDLE AXIS virtual OFFPOS label_length correction REGIST 1 WAIT UNTIL MARK 0 GOTO loop t speed 0 0...

Page 347: ... is a risk of conduction due to the return circuit Caution If the encoder signal is lost the servo motor can run away or an error can be generated Make sure that you disconnect the motor from the mechanical system before you check the encoder signal Caution When you troubleshoot make sure that nobody is inside the machine facilities and that the facilities are not damaged even if the servo motor r...

Page 348: ...l to determine the cause of the error and solve the error 2 Reset the controller or click the Axis status error button in the Axis Configuration window Monitoring tab 6 2 3 Unit errors Unit errors show on the LED display of the TJ2 MC64 as Unn i Defective unit The error code U0n shows on the display where n ranges from 0 to 6 and is the number of the unit that causes the error To solve the problem...

Page 349: ...oblem check the number of connected units No more than 7 units are supported 6 2 4 Configuration errors Configuration errors show on the LED display of the TJ2 MC64 as Cnn i 6 2 5 Replace the battery To replace the backup battery do these steps 1 Make sure the Power Supply Unit is set to on for at least five minutes If not the capacitor that backs up the memory of the TJ2 MC64 while the battery is...

Page 350: ...ff and BF LED is on The PROFIBUS configuration is incorrect there is no communica tion with the master Check that the TJ1 PRT has the same station address as in the configuration of the master Check that no station address is used twice The PROFIBUS wiring is not cor rect Check that the correct pins of the CN1 connector are connected Check that there are no short circuits or line interrup tion Che...

Page 351: ...the TJ1 DRT ERH LED is on Communication failure between TJ2 MC64 and TJ1 DRT Reset the TJ2 MC64 If this does not help replace the TJ2 MC64 ERC LED is on Unit error The TJ1 DRT is defec tive Replace the TJ1 DRT Indication Problem Solution Indication Problem Solution NOK is flashing and NF LED is off The DeviceNet master is not com municating with the TJ1 DRT Configure and start the DeviceNet master...

Page 352: ...Bus OFF state Possible cause Network cable short circuit Check the network cabling Indication Problem Solution All LEDs are off The power is off Turn the power on The TJ1 ML__ is defective Replace the TJ1 ML__ Indication Problem Solution Indication Problem Solution BF LED is on Cable failure on the MECHATRO LINK II bus Check MECHATROLINK II cables between stations connected to the unit for interru...

Page 353: ... I O connected to the SmartSlice I O Units is enough to drive the external outputs on the individual units i 6 7 3 Unit errors The GRT1 ML2 starts the initialization when the power is turned on During the initialization the RUN LED and the ALARM LED are off When the initialization completes the RUN LED goes on Possible errors during the initialization are in the table below UNIT PWR Probable cause...

Page 354: ... TS LED on the not correctly connected units are off Check the connection between slices at the point where the first unit is located with its TS LED off Make sure that all slices are con nected correctly to each other The last unit is not or not prop erly connected The SmartSlice communication does not start up The TS LED on all SmartSlice I O Units are flashing Check the connection of the last u...

Page 355: ...ation failed1 Reinstall the unit in which the restore operation was in progress and turn the power on again SmartSlice I O Unit configura tion error Check these items Are more than 64 I O units con nected Are more than 128 bytes of I O data used Has the I O configuration changed since the I O configu ration table was registered Green The Slice bus operates normally N A 1 The TS LED is lit for 2 se...

Page 356: ...on The TJ2 MC64 and the GRT ML2 have no error indications The I O configuration is properly registered All filter functions in the SmartSlice I O Units are disabled A 1 Timing concepts A 1 1 Refresh cycles There are two refresh cycles involved in the timing issues The refresh cycle between the TJ2 MC64 and the GRT1 ML2 The refresh cycle between the GRT1 ML2 and the SmartSlice I O Units Note To reg...

Page 357: ...ansferred in multiple servo periods The transferred I O data is only used when all pages are transferred The contribution of the individual slices to the I O data size is described in section 2 2 2 of the GRT1 Series SmartSlice I O Units Operation Manual W455 To display the number of pages used execute the command MECHATROLINK unit 38 station vr This command reads the paging data and stores it in ...

Page 358: ... 0 001 ms TCU The data processing and synchronisation time of the SmartSlice I O Units PDsize The Process Data size in bytes which is the number of bytes needed to trans fer all input or output data Pages The number of pages used to transfer all data The minimum is 1 TML The total MECHATROLINK II communication time for all data TML equals Pages TSERVO TSYNC The servo interval synchronisation time ...

Page 359: ...RVO 1 ms GRT ML2 Smart Slice I O Unit Ton off Ton off TSL TSL TSL TCUin TCUout TMLin Tservo Input Output TMLout TMLin out Tsync TJ1 ML__ TJ1 MC__ Smart Slice I O Unit Smart Slice I O Unit MECHATROLINK II bus SmartSlice bus SmartSlice I O Unit TON OFF GRT1 ID4 0 ms TON OFF 1 5 ms GRT1 OD4 0 ms TON 0 5 ms 0 ms TOFF 1 5 ms GRT1 AD2 0 ms TON OFF 2 ms GRT1 DA2 0 ms TON OFF 2 ms ...

Page 360: ...004 0 1 1 1 3 104 ms Tin 1 5 1 004 1 104 1 1 5 608 ms GRT1 AD2 input response time Tin TON OFF TSL TCUin TMLin TSERVO 0 1 004 0 1 1 1 3 104 ms Tin 2 0 1 004 1 104 1 1 6 108 ms GRT1 OD4 output response time Tout TSYNC TMLout TCU TSL TON OFF 0 2 0 0 1 1 004 0 3 104 ms Tout 1 0 2 0 1 104 1 004 1 5 6 608 ms GRT1 DA2 output response time Tout TSYNC TMLout TCU TSL TON OFF 0 2 0 0 1 1 004 2 5 104 ms Tout...

Page 361: ...ry PROGRAMMING MANUAL 355 Revision 1 0 Revision history A manual revision code shows as a suffix to the catalogue number on the front cover of the manual i Revision code Date Revised content 01 February 2010 Original ...

Page 362: ... uk OMRON EUROPE B V Wegalaan 67 69 NL 2132 JD Hoofddorp The Netherlands Tel 31 0 23 568 13 00 Fax 31 0 23 568 13 88 www industrial omron eu Authorised Distributor Note Although we do strive for perfection Omron Europe BV and or its subsidiary and affiliated companies do not warrant or make any representations regarding the correctness or completeness of information described in this catalogue Pro...

Reviews: