0% found this document useful (0 votes)
27 views

ROBOT Software Programming Instruction Set Manual - (E)

Uploaded by

Long Phan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

ROBOT Software Programming Instruction Set Manual - (E)

Uploaded by

Long Phan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 273

Robot Software Programming

Instruction Set Manual

User Manual

Original Instruction

www.hiwin.tw
INDUSTRIE 4.0 Best Partner

Multi-Axis Robot
Pick-and-Place / Assembly /
Array and Packaging / Semiconductor /
Electro-Optical Industry /
Automotive Industry / Food Industry
• Articulated Robot
• Delta Robot
• SCARA Robot
• Wafer Robot
• Electric Gripper
• Integrated Electric Gripper
• Rotary Joint

Single-Axis Robot Torque Motor


Precision / Semiconductor / Rotary Table
Medical / FPD
Medical / Automotive Industry /
• KK, SK
Machine Tools / Machinery Industry
• KS, KA
• RAB Series
• KU, KE, KC
• RAS Series
• RCV Series
• RCH Series

Ballscrew Linear Guideway


Precision Ground / Rolled Automation / Semiconductor / Medical
• Super S Series • Ball Type--HG, EG, WE, MG, CG
• Super T Series • Quiet Type--QH, QE, QW, QR
• Mini Roller • Other--RG, E2, PG, SE, RC
• Ecological & Economical
Lubrication Module E2
• Rotating Nut (R1)
• Energy-Saving & Thermal-
Controlling (Cool Type)
• Heavy Load Series (RD)
• Ball Spline

Bearing DATORKER®
Machine Tools / Robot Strain Wave Gear
• Crossed Roller Bearing
Robot / Automation Equipment /
• Ballscrew Bearing
Semiconductor Equipment / Machine Tools
• Linear Bearing
• WUT-PO Type
• Support Unit
• WUI-CO Type
• WTI-PH Type
• WTI-AH Type

AC Servo Motor & Drive Medical Equipment


Semiconductor / Packaging Machine Hospital / Rehabilitation Centers /
/ SMT / Food Industry / LCD Nursing Homes
• Drives--D1, D2T/D2T-LM, E1 • Robotic Gait Training System
• Motors--50W~2000W • Robotic Endoscope Holder

Linear Motor Stage Torque Motor &


Automated Transport / Direct Drive Motor
AOI Application / Precision /
Machine Tools
Semiconductor
• Torque Motor--
• Iron-core Linear Motor
TM-2/IM-2, TMRW Series
• Coreless Linear Motor
• Linear Turbo Motor LMT Inspection / Testing Equipment / Robot
• Planar Servo Motor • Direct Drive Motor--
• Air Bearing Platform DMS, DMY, DMN, DMT Series
• X-Y Stage • Gantry Systems
• Single-Axis Linear Motor Stage
C25UE901-2208

Table of Content
0 Warranty Terms and Safety Precautions ................................................ 5
Safety Precautions ............................................................................................. 8
1 Use Command for Manual Getting Started .......................................... 23
1.1 Manual Description of hiwin techonologies corp. ............................... 23
1.2 Description of how to use Command architecture .............................. 25
1.3 summary table of Command sets ....................................................... 27
2 First part: format of Command sets & application note ....................... 31
2.1 Code A, Variable & Function Declare Command ................................. 31
2.1.1 @REAL Floating Point Variable Command ................................................................... 31
2.1.2 @INT Integer Variable Command ................................................................................ 34
2.1.3 @BOOL Declare Boolean Variable Command.............................................................. 37
2.1.4 @CHAR Declare Character Variable Command ........................................................... 38
2.1.5 @E6POS Declare Cartesian Coordinate System Position Variable Command ............. 40
2.1.6 @E6AXIS Declare Joint Coordinate System Angle Variable Command ........................ 42
2.1.7 @E6POINT Cartesian Coordinate System Point Information Position Variable Command
...................................................................................................................................... 44
2.1.8 @FRAME Declare (Coordinate System) Architecture Command ................................. 46
2.1.9 @STRUC Declare Structure Definition Command ....................................................... 48
2.1.10 @DEF... END Declare Subroutine Command ............................................................... 50
2.1.11 @DEFFCT…ENDFCT Declare Feature Function Command ........................................... 53
2.1.12 @EXT Declare External Subroutine .............................................................................. 56
2.1.13 @EXTFCT Declare External Function............................................................................ 59
2.1.14 @STRING Declare String Command ............................................................................. 62
2.1.15 ARRAY Declare Array Command .................................................................................. 63
2.1.16 @UINT Declare Unsigned (Positive) integer variable Command ................................. 66
2.2 code b, motion Command .................................................................. 69
2.2.1 @PTP Point-to-point Move Command ........................................................................ 69
2.2.2 @PTP_REL Point-to-point Move Command with Relative Position Mode .................. 72
2.2.3 @LIN Linear Move Command ...................................................................................... 74
2.2.4 @LIN_REL Linear Move Command with Relative Position Mode ................................ 76
2.2.5 @LIN_REL_TOOL Linear Move Command with Relative Position Mode Reference to
Tool Coordinate ............................................................................................................................ 78
2.2.6 @CIRC Circular Arc Move Command ........................................................................... 80
2.2.7 @CIRC_REL Circular Arc Move Command with Relative Position Mode ..................... 83
2.2.8 @SPLINE Point & Point Fit Spline Command ............................................................... 86
2.2.9 @STOP_MOTION Trigger to Stop Previous Motion According to Signal ..................... 88
2.2.10 @BRAKE Stop & Clear Command in Brake................................................................... 90
2.2.11 @CHECK_LIN Linear Path Singularity Check Command .............................................. 92
1
C25UE901-2208

2.2.12 @P#_EXIST() Check Point Position Existence Command ............................................. 94


2.2.13 @P#() Point Position Variable Replacement Command .............................................. 96
2.2.14 @CT_A6 Infinite Rotation Extreme End Axis Speed Command ................................... 98
2.3 Code C, register instruction .............................................................. 100
2.3.1 @$C[] Count Register Instruction .............................................................................. 100
2.3.2 @$T[] Timing Register Instruction ............................................................................. 102
2.3.3 @$T_STOP[] Timing Register Instruction ................................................................... 104
2.3.4 @$PR[] Position Register Instruction ......................................................................... 106
2.3.5 @$SRR[]、$SRW[] Site Fieldbus Register .................................................................. 110
2.4 code D, input & output signal control instruction ............................. 112
2.4.1 @$DI[ ] Digital Input Signal Command ...................................................................... 113
2.4.2 @$DO[ ] Digital Output Signal Command.................................................................. 115
2.4.3 @$SI[ ] Site Fieldbus Input Signal Command ............................................................. 116
2.4.4 @$SO[ ] Site Fieldbus Output Signal Command ........................................................ 118
2.4.5 @$VO[ ] Solenoid Valve Output Signal Command .................................................... 119
2.4.6 @$RO[ ] Robot Output Signal Command .................................................................. 120
2.4.7 @$RI[ ] Robot Input Signal Command ....................................................................... 121
2.4.8 @SYN Proceeding Output Signal Switch Adjustment Time Command of Conveyor Track
.................................................................................................................................... 123
2.4.9 @PULSE Output Signal Pulse Time Control Command .............................................. 128
2.5 code E, flow control functional Commands ...................................... 130
2.5.1 @IF Command ........................................................................................................... 130
2.5.2 @FOR Command ........................................................................................................ 133
2.5.3 @LOOP Command ..................................................................................................... 135
2.5.4 @WHILE Command.................................................................................................... 137
2.5.5 @REPEAT Command .................................................................................................. 139
2.5.6 @GOTO Command ..................................................................................................... 141
2.5.7 @SWITCH Command ................................................................................................. 143
2.5.8 @WAIT SEC Command ............................................................................................... 146
2.5.9 @WAIT FOR Input Signal Command .......................................................................... 148
2.5.10 @WAIT FOR … TIMEOUT Input Signal Timeout Command........................................ 150
2.5.11 @AND And Logic Gate Command .............................................................................. 152
2.5.12 @OR Logic Gate Command ........................................................................................ 155
2.5.13 @INTERRUPT…WHEN…DO… Declare Interruption Condition Command ................. 158
2.5.14 @INTERRUPT ON/OFF Enable/Stop Interruption Command .................................... 160
2.5.15 @BREAK_POINT Command ....................................................................................... 163
2.6 Code F, motion parameters & system Command setting ................... 164
2.6.1 @SET_OVERRIDE_SPEED Command .......................................................................... 164
2.6.2 @SET_SPEED Command ............................................................................................ 165
2.6.3 @SET_ACC Set Acceleration Command ..................................................................... 167

2
C25UE901-2208

2.6.4 @SET_ROTATION_SPEED Set Posture Rotation Speed Command ............................. 170


2.6.5 @SET_TOOL Coordinate System Command .............................................................. 171
2.6.6 @SET_BASE Coordinate System Commands ............................................................. 173
2.6.7 @SET_PAYLOAD: Set End Payload Weight Data Command ....................................... 175
2.6.8 @GETPOINT: Get Current Coordinate Value Commands .......................................... 176
2.6.9 @GET_MOTION_STATUS Read Current Motion Status Commands .......................... 177
2.6.10 @EXT_TCP_START External TCP Point Position Track Commands ............................. 179
2.6.11 @EXT_TCP_END External TCP Point Position Track Commands ................................ 179
2.6.12 @TL_SET: Set Torque Limit Monitoring Parameter Commands ................................ 181
2.6.13 @SERVO_ON Full-axis Excitation Commands ............................................................ 182
2.6.14 @SERVO_OFF Full-axis De-excitation Commands ..................................................... 183
2.6.15 @SERVO_ON(#) Single-axis Excitation Command ..................................................... 184
2.6.16 @SERVO_OFF(#) Single-axis De-excitation Commands ............................................. 185
2.7 code G, mathematic operation Commands ....................................... 186
2.7.1 @+ Add command of Mathematic Operation ........................................................... 186
2.7.2 @- Subtract Commands of Mathematic Operation ................................................... 187
2.7.3 @* Multiply Instruction of Mathematic Operation ................................................... 188
2.7.4 @/ Divide Instruction of Mathematic Operation....................................................... 189
2.7.5 @sin Sine Function Instruction of Mathematic Operation ........................................ 190
2.7.6 @cos Cosine Function Instruction of Mathematic Operation ................................... 191
2.7.7 @tan Tangent Function Instruction of Mathematic Operation ................................. 192
2.7.8 @ASIN Arcsine Function Instruction of Mathematic Operation................................ 193
2.7.9 @ACOS Arccosine Function Instruction of Mathematic Operation ........................... 194
2.7.10 @ATAN Arctangent Instruction of Mathematic Operation ........................................ 195
2.7.11 @ATAN2 Arctangent Variant Instruction of Mathematic Operation ......................... 196
2.7.12 @FWD Forward Robot Kinematics Convert Command ............................................. 197
2.7.13 @% Find Remainder Command ................................................................................. 199
2.8 code H, communication functional Command .................................. 200
2.8.1 @COPEN Communication Opening Command .......................................................... 200
2.8.2 @CCLOSE Communication Closing Command ........................................................... 202
2.8.3 @CCLEAR Communication Buffer Data Clear Command ........................................... 203
2.8.4 @CREAD Data Receiving Command........................................................................... 205
2.8.5 @CWRITE Data Sending Command ........................................................................... 208
2.8.6 @CINQUIRE Data Quantity Getting Command .......................................................... 210
2.8.7 @CFORMAT Declare Self-defined Communication Format Command ..................... 212
2.9 code I, conveyor Command .............................................................. 215
2.9.1 @CNV_START Start Conveyor Tracking Procedure Command ................................... 215
2.9.2 @CNV_END End Conveyor Tracking Procedure Command ....................................... 216
2.9.3 @CNV_PICK_QUANTITY Quantity of Picked Object Command of Conveyor Tracking217
2.9.4 @CNV_TRIGGER_TIMES Triggering Times of Sensor Command of Conveyor Tracking218

3
C25UE901-2208

2.9.5 @CNV_PICK Move Command for Pick Object of Conveyor Tracking ......................... 219
2.9.6 @CNV_PLACE Move Command for Place Object of Conveyor Tracking .................... 223
2.9.7 @CNV_OBJECT Number Command for Pick Object of Conveyor Tracking ................ 226
2.9.8 @CNV_FULL Count of Object Full Command for Conveyor Tracking ........................ 228
2.9.9 @CNV_EMPTY Count of Object Empty Command of Conveyor Tracking.................. 230
2.9.10 @CNV_SET_DELAY_TIME Tracking Delay End Time of Conveyor Tracking ................ 232
2.9.11 @CNV_QUEUE_SIZE Triggered Queue Quantity Command of Conveyor Tracking ... 234
2.9.12 @CNV_OBJ_CNT_DIST Encoder Deviation Command for Triggered Object Position of
Conveyor Tracking ...................................................................................................................... 236
2.9.13 @CNV_PLACE_BATCH Maximum Times for Place of Conveyor Tracking ................... 237
2.9.14 @CNV_RESET_ENC Clear Count Command for External Encoder of Conveyor Tracking
.................................................................................................................................... 238
2.9.15 @CNV_QUEUE_REMOVE Removed Queue Command of Conveyor Tracking ........... 239
2.9.16 @CNV_PICK_ACC Setting Acceleration Time for Press Down Command of Conveyor
Tracking .................................................................................................................................... 240
2.9.17 @CNV_OFFSET_X X-axis Position Offset Command of Conveyor Tracking ................ 241
2.9.18 @CNV_OFFSET_Y Y-axis Position Offset Command of Conveyor Tracking ................ 242
2.9.19 @CNV_OFFSET_Z Z-axis Position Offset Command of Conveyor Tracking ................ 243
2.9.20 @CNV_SPEED Get Conveyor Speed Command of Conveyor Tracking....................... 244
2.10 code J, message prompt functional Command ................................. 245
2.10.1 @USER_ALARM User Self-defined Alarm Trigger Command .................................... 245
2.11 code K, simulation environment Command ...................................... 246
2.11.1 @ADDTOOL Add New Robot Tool Command in Simulation View ............................. 246
2.11.2 @ADDOBJ Add New Peripheral Object Command in Simulation View ..................... 248
2.11.3 @SHOW_TOOL Show/Hide Robot Tool Command in Simulation View ..................... 251
2.11.4 @SHOW_OBJ Simulation Page for Display Show/Hide Peripheral Object Command253
2.11.5 @MOVEFLOOR Moving Floor Position Command in Simulation View ...................... 254
2.11.6 @AXISON Display Coordinate System (Axis) Command in Simulation View ............. 255
2.11.7 @AXISOFF Hide Coordinate System (Axis) Command in Simulation View ................ 256

APPENDIX1、continuous (CONT)/NON- continuous (FINE) List ...................... 257

Appendix 2、ASCII printable characters ......................................................... 268

4
C25UE901-2208

0 WARRANTY TERMS AND SAFETY PRECAUTIONS


Warranty Terms and Conditions
The period of warranty shall commence at the received date of HIWIN product (hereafter called
“product”) and shall cover a period of 12 months. The warranty does not cover any of the damage and
failure resulting from:

1. The damage caused by using with the production line or the peripheral equipment not
constructed by HIWIN.
2. Operating method, environment and storage specifications not specifically recommended in
the product manual.
3. The damage caused by changing installation place, changing working environment, or
improper transfer after being installed by the professional installer.
4. Product or peripheral equipment damaged due to collision or accident caused by improper
operation or installation by the unauthorized staff.
5. Installing non-genuine HIWIN products.

The following conditions are not covered by the warranty:


1. Product serial number or date of manufacture (month and year) cannot be verified.
2. Using non-genuine HIWIN products.
3. Adding or removing any components into/out the product without authorized.
4. Any modification of the wiring and the cable of the product.
5. Any modification of the appearance of the product; removal of the components inside the
product. e.g., remove the outer cover, product drilling or cutting.
6. Damage caused by any natural disaster. i.e., fire, earthquake, tsunami, lightning, windstorms
and floods, tornado, typhoon, hurricane etc.

HIWIN does not provide any warranty or compensation to all the damage caused by above-mentioned
circumstances unless the user can prove that the product is defective.

For more information towards warranty terms and conditions, please contact the technical stuff or the
dealer who you purchased with.

1. Improper modification or disassemble the robot might reduce the robot function,
stability or lifespan.
2. The end-effector or the cable for devices should be installed and designed by a
professional staff to avoid damaging the robot and robot malfunction.
5
C25UE901-2208

3. Please contact the technical stuff for special modification coming from production line
set up.
4. For the safety reason, any modification for HIWIN product is strictly prohibited.

6
C25UE901-2208

Safety Precautions
1. Safety Information
 Safety Responsibility and Effect
1. This chapter explains how to use the robot safely. Be sure to read this chapter carefully before
using the robot.
2. The user of the HIWIN industrial robot has responsibility to design and install the safety
device meeting the industrial safety regulations in order to ensure personal safety.
3. In compliance with the safety information on industrial robot described in this manual can’t
guarantee that HIWIN robot will not occur any safety problems.
4. This machine is defined as a partly completed machinery, the associated hazards must be
handled by system integrator in accordance with ISO 10218-1/ ISO 10218-2.
5. A safety-related part of control system (SRP/CS) should conform to the requirement of
performance level d and category 3 according to ISO 13849-1.
6. The installation for emergency functions shall be defined by the system integrator in
accordance with ISO 10218-1/ ISO 10218-2.

 Safety Operation Principle


1. Before connecting the power supply for HIWIN industrial robot startup assembly procedure,
check whether the specification of factory output voltage matches the specification of input
voltage of the product. If it does not match, ensure to use the corresponding transformer
(HIWIN optional transformer is recommended).
2. Emergency Stop button (on Teach Pendant or from external emergency stop switch) must be
pressed before turning off the power, and then switch off the power switch.
3. While connecting to the external I/O or the signal, please operate in the condition that the
power switch is turned off to prevent from a shortcut caused by mistaken touch in the
process, and resulting in damage.

7
C25UE901-2208

Safety Precautions
i. General
All personnel involved in the use or setup of the industrial robot arm must read the safety related
literature for the robot arm and Command manual in detail and operate it in accordance with the
specifications.

Safety Symbol

Users must strictly abide by the content description, otherwise it will cause serious casualties.

Users must strictly abide by the content Commands, otherwise it may cause minor injuries or
equipment damage.

User must strictly abide by the content description, otherwise it may cause poor product
performance.

Use Limit
Robotic arm is prohibited for use in the following environments and uses
◼ Personnel carrying purposes
◼ Explosive environment
◼ Environment without safety precautions
◼ Outdoor environment
◼ Environment affected by oil, water, dust, etc.

8
C25UE901-2208

ii. Relevant Personnel


Electrical or mechanical work on industrial robot arms is only permitted by professionals.

All personnel working on industrial robotic arms must read and understand the manual containing
the safety section of the system of the robotic arm.

System Integrator
Refers to the person who integrates the industrial robot arm into a set of equipment according to safety
regulations and puts it into operation.

The system integrator is responsible for the following tasks:


◼ Install industrial robot arm.
◼ Industrial machinery arm related equipment connection work.
◼ Risk assessment of the overall system.
◼ Use safe guard devices.
◼ Confirm that the components used by the safe guard devices are in compliance with regulations.
◼ Placement, replacement, setup, operation, maintenance and repair work is only permitted for
specially trained personnel in accordance with the operating Commands for the components of the
industrial robot arm.

User
Users must be professionally trained, have the knowledge and experience in this area, and be familiar with
the prescribed standards, and thus be able to make a correct judgment of the work to be performed and
identify potential hazards.
Users can be defined into three categories based on operational permissions:
1. Operator
◼ System startup and shutdown
◼ Power on and off
◼ Alarm system status recovery
2. Engineer
◼ Operating personnel usage authority
◼ Programming and changing
◼ Arm teaching operation

3. Expert
◼ Engineer usage authority
◼ Mechanical arm maintenance work

HRSS System Operation


Those who do not use functional safety kits must implement safety-fence guidance.
9
C25UE901-2208

The system operation of personnel is divided into the following three levels
1. Operator
2. Engineer
3. Expert
Its control permissions are shown in the following table.

No. Function Operator Engineer Expert


Function Table
1 File X X O
2 Configuration>User group O O O
3 Display>Input/Output X O O
4 Display>Variable X O O
5 Display>Mileage O O O
6 Display>Utilization O O O
7 Display>Motor Torque O O O
8 Display>Fieldbus X X O
9 Diagnosis>Logbook O O O
10 Start-up>Calibrate X X O
11 Start-up>Master X X O
12 Start-up>Robot data X O O
13 Start-up>Network Config X X O
14 Start-up>RS-232 X X O
15 Start-up>System Setting X X O
16 Track>Setting X O O
17 Track>Vision Setting X O O
18 Track>Vision Object X O O
19 Track>Calibration X O O
20 Track>Monitor O O O
21 Help>About O O O
22 Help>Operating Time O O O
23 Help>Update X X O
24 Help>TP Calibration O O O
25 File O O O
(Continuous)

10
C25UE901-2208

No. Function Operator Engineer Expert


Interface Table
26 Message box O O O
27 Velocity configuration X O O
28 Tool/base coordinate X X O
29 Teach Pendant configuration X O O
30 Change JOG coordinate system X O O
31 JOG X O O
32 On-screen keyboard O O O
33 Remove teach pendant X O O
34 Step execution X X O
35 Program execution O O O
36 Program selection O O O
37 Modify program X X O
38 Tool/base calibration X O O
39 IO operation X O O
40 Functional IO modification X X O
If Remote Operation Software (Caterpillar) refer to next page.

11
C25UE901-2208

Remote Operation Software (Caterpillar) System Operation


The system operation of personnel is divided into the following two levels
1. Operator
◼ Manual mode
◼ Auto mode
2. Monitor
Its control permissions are shown in the following table.
Operator
No. Function Monitor
Manual mode Auto mode
Function Table
1 Interface Languages O O O
2 Permission Selection O O O
3 Mode Selection X O X
4 Velocity Adjustment O O X
5 Tool/Base Selection O X X
6 Update Software O X X
7 Save Database O X X
8 Load Database O X X
9 Program execution O O X
10 Hold Program O O X
11 Stop Program O O X
12 Homing O X X
13 Jog O X X
14 Program Edit O X X
15 Program Update /Download O X X
16 Add Point O X X
17 Counter O X X
18 System I/O O O X
19 RSR Setting O X X
20 Fieldbus O O X
21 Clear Alarm O O X
22 Conveyer Track ->Setting O X X
23 Conveyer Track -> Vision Setting O X X
24 Conveyer Track -> Vision Object Setting O X X
25 Conveyer Track ->Sensor Object Setting O X X
26 Conveyer Track ->Setting Calibration O X X
27 Conveyer Track ->Setting Monitor O O O
(Continuous)

12
C25UE901-2208

Operator
No. Function Monitor
Manual mode Auto mode
28 Axis Zero Position/calibration O X X
29 Tool/Base calibration O X X
30 Logbook O O O
31 Network Config O X X
32 Home Setting O X X
33 Time Setting O X X
34 RS-232 O X X
Interface Table
35 Add Robot O O O
36 Close All O O O
If HRSS Software refer to previous page.

Electrical or mechanical work is only allowed to be carried out by professionals.

Operator Safety Precautions


The manner and scale of the work and the possible hazards must be explained to the relevant personnel
before work, and relevant training courses must be carried out on a regular basis. In the event of an
accident or technical correction, a training course must be re-run.

System Set Up Safety Precautions


The system set up only allows specially trained personnel to perform and work in accordance with the
installation, setup, operation and other relevant documents provided by the original manufacturer.

Maintenance Personnel’s Precautions


Maintenance should only be carried out by specially trained personnel in accordance with the Commands
and operating Commands.

13
C25UE901-2208

iii. Robotic Arm Working Range Definition

⚫ Working area
The working area of the robot is defined as the area of motion under motion constraints, and the
working area must be limited to the minimum required.

⚫ Protective area
Operation must be carried out outside the protected area.
A protected area is an area of the working area that is protected by a safe guard device. Please ensure
the protective area includes working area of the robot. A safety-related part of control system (SRP/CS)
should conform to the requirement of performance level (PL)= d and category 3 according to ISO
13849-1.

❖ Please ensure the emergency stop switch is in reset status before the robot functions.
❖ The external device connected to the emergency stop switch circuit should be dry contact (uncharged)
switch. It is forbidden to use a live circuit to connect to the controller emergency stop switch circuit.

Figure. 1 Circuit of the emergency stop diagram

14
C25UE901-2208

❖ It must use EMO-Emergency stop (EN 60947-5-1 positive opening) with safety module to meet ISO
13849-1 performance level (PL)= d

Figure. 2 Safety module area diagram

Figure. 3 Safety module interlock diagram

15
C25UE901-2208

iv. Description of Safety Functions

Industrial robotic arms must have the following safety features:


◼ Selection of operating mode of the robot arm
◼ Safe guard devices
◼ Emergency stop device
◼ Teach pendant enable switch
The safety function of the robot arm system is to prevent loss of personnel or property. If the function is
not complete or in failure state, the industrial robot arm must be prohibited from operating.

Manual Operation Mode


The manual operation mode is used for program design, program operation check or teaching, etc.
When performing manual operation, pay attention to the followings:
◼ All actions must be operated within the protection area.
◼ Do not damage or potentially damage the relevant equipment due to operates the robotic arm.
◼ Operation must be carried out outside the protected area as much as possible.
Both manual and automatic modes of operation in the protected area are not permitted unless the
arm is equipped with a certified speed monitoring accessory from the manufacture.

Automatic Mode
The automatic mode startup should include the following conditions:
◼ The safe guard devices have been set up and confirmed that their functions are working properly.
◼ All suspended security should restore its full functionality.
◼ Confirm that there are no people in the protected area.
◼ Relevant workflow rules are complied.
To enter the protection area in this mode, the emergency stop function must be activated before
entering.

Safe Guard Devices Description


The safe guard device must use the components approved by the safety regulations and set
and plan according to the relevant regulations.
The robotic arm system must be automatically activated to receive the safety signal. In the
event of a connection failure during automatic mode operation, an emergency stop must be
triggered. When reconnecting after disconnection, the device cannot be automatically started
directly and must be started manually.

16
C25UE901-2208

A method must be provided to confirm that no personnel are in the protected area when the
automatic mode is activated. Users must strictly abide by the content description, otherwise it will
cause serious casualties.
Temporary fences can be used during system installation and can be set according to ISO
10218-2 regulations.

Stop Functions
Emergency Stop Description
Emergency stop related precautions
◼ Confirm that the function is functioning normally every six months.
◼ System integrators should provide emergency stop devices to ensure that the machine is operational
or that a hazardous situation exists.
◼ At least one external emergency stop device is installed. Make sure that additional emergency stop
devices are available for use without or losing the teach pendant.
◼ Provide interface to connect external emergency stop devices.
◼ The emergency stop function can be triggered when the safety control system connected to the robot
arm is cut off.
◼ The risk assessment should assess whether the emergency stop is not triggered when the robotic arm
control system is turned off and provides a response.
◼ If a tool or other device connected to the robot is dangerous, it must be connected to the emergency
stop circuit on the equipment side.

17
C25UE901-2208

v. Warnings and Precautions


General considerations

1. All operating procedures should be assessed by professional and in compliance with related industrial
safety regulations.
2. When operating robot, operator needs to wear safety equipment, such as workwear for working
environment, safety shoes and helmets.
3. When encountering danger or other emergency or abnormal situation, please press the emergency
stop button immediately. After danger is eliminated, move the robot away with low speed in manual
mode.
4. When considering safety of the robot, the robot and the system must be considered at the same time.
Be sure to install safety fence or other safety equipment and the operator must stand outside the
safety fence while operating the robot.
5. A safety zone should be established around the robot with an appropriate safety device to stop the
unauthorized personnel from access.
6. While installing or removing mechanical components, be aware of a falling piece which may cause
injury to operator.
7. Ensure the weight of workpiece does not exceed the rated load or allowable load moment at wrist.
Exceeding these values could lead to the driver alarm or malfunction of the robot.
8. Do not climb on manipulator.
9. Do not store the machine in the environment with corrosion and flammable gas or close to the
flammable object.
10. Do not operate the machine in the environment with moisture, water or grease.
11. Do not operate the machine at the place where vibration or the strong impact occurs.
12. Do not immerse the electric wires into grease or water.
13. Do not connect or operate the machine with wet hands.
14. Do not operate the machine in potentially explosive environment.
15. Please ensure the controller is grounded.
16. Keep hands away from the inner part of the controller while it is connecting to the power or during
operating.
17. Do not touch the heat sink, regenerative resistance, the power supply or the computer inside the
controller while it is operating due to its high temperature.
18. Be sure power is disconnected prior to repair and maintenance, and ensure to operate under the
condition of no electrical shock risk.
19. Do not disassembly the controller without permission. If there’s any issues, please contact our
engineers.

18
C25UE901-2208

1. The personnel installing robot should be trained and licensed.


2. To ensure personal safety, robot installation must comply with this manual and related industrial
safety regulations.
3. The control cabinet should not be placed near high voltage or machines that generate electromagnetic
fields to prevent interference that could cause the robot to deviation or malfunction.
4. Using non-HIWIN spare parts to repair may cause robot damage or malfunction.
5. Beware of the heat generated by the controller and servo motor.
6. Do not overbend the cable to avoid poor circuit contact or unexpected damage.
7. Do not stand on the controller or put heavy objects on it.
8. Do not block the vent or put foreign objects into the controller.
9. Please ensure the controller is fixed on the base.
10. Do not pull the connector violently or twist the electric wires excessively.
11. Do not frequently switch ON/OFF the power switch and the control button.
12. Please ensure that the robot, the emergency stop switch and the controller are functioning properly
before performing any work.
13. Do not shutdown the power switch during the operation.
14. Do not open, modify, disassemble and maintain the machine without permission.
15. The power must be disconnected when the machine does not operate in a long time.
16. Do not turn off the power of the controller when modifying the program or parameter. Otherwise, the
data stored in the controller will be damaged.
17. When changing the program or parameters inside the robot controller, do not turn off the power of
the controller. Otherwise, the internal data of the controller will be damaged.
18. After the brake of a servo motor is released, the robot will be moved due to gravity and it may injured
the operator.
19. The industrial robots can be applied for the different industrial environments.
20. When the operating procedures are interrupted, the special attention should be paid during the
troubleshooting.

19
C25UE901-2208

Precautions during operations

1. Teaching, jogging or programming should be done outside of the safety fence. If it is inevitable to
enter the safety fence, press the emergency stop button before entrance. Operation should be
restricted at low speed and beware of surrounding safety.
2. All operations shall be executed by trained staff.

Maintenance Precautions

1. Please contact us if the procedure not specified by HIWIN is needed.


2. Please contact us if the replacement of the component not specified by HIWIN is needed.
3. Be sure to carry out regular maintenance, otherwise it will affect the service life of the robot or other
unexpected danger.
4. Prior to repair and maintenance, please switch off power supply.
5. Maintenance and repair should be performed by a qualified operator with a complete understanding
of the entire system to avoid risk of robot damage and personal injury.
6. When replacing the components, avoid foreign object going into the robot.

Precautions for using End Effector

End effectors can be basically divided into the following two categories:
A. gripper jaw: Mainly for pick and place operations, such as pneumatic, electric gripper jaw, vacuum
suction cup, etc.
B. Tools: Mainly for processing operations, such as welding, cutting, surface treatment, etc.

1. More attention must be paid to the design of the end effector to prevent power loss or any other
errors that could lead to workpiece falling or damage.
2. The tool-type end effector is usually equipped with high voltage, high temperature and active rotary
shaft. Special attention should be paid to the operating safety.
3. The end effector should be mounted firmly on the robot to avoid workpiece fall during operation
which may cause personal injury or hazard.

1. The end effector may be equipped with its own control unit. During installation, pay attention to
installed location. Ensure that the control unit does not interfere with robot operation.
2. The gripper jaw-type end effector should prevent the workpiece from dropping or damaging when the

20
C25UE901-2208

robot experiences a power error or other errors. If potential dangers or abnormal situations exist
when using end effector, the associated hazards must be handled by the system integrator in
accordance with the related standards.

Precautions for using Hydraulic and Pneumatic

1. When using the pneumatic or hydraulic system, the gripped workpiece may fall due to insufficient
pressure or gravity.
2. The pneumatic or hydraulic system must be equipped with the relief valve, so that it can be applied in
an emergency.

1. More attention should be paid to the pressure remained in the pneumatic systems after the power is
disconnected.
2. The internal pressure must be released before the pneumatic systems are maintained.
3. More attention should be paid to the pressure in the pneumatic system as it is several times more
than the atmosphere pressure.

Emergency Stop Switch Precautions

1. The robot or other control component should have at least one device for immediate halt, such as an
emergency stop switch.
2. The emergency stop button must be installed in an easily accessible location for quick stop.
3. While executing an emergency stop, power to the servo motor will be cut, and all movements will be
stopped. And the control system will be shut down. Emergency stop should be reset if the restoration
of operating procedure is wanted.
4. Avoid using emergency stop to replace a normal stop procedure. This could reduce the lifespan of the
robot.

1. When an emergency stop is performed, the power of the drive is cut off, all operations are stopped,
and the control system of the robot arm is turned off.
2. To resume execution, reset the emergency stop switch.
3. Emergency stop is immediate stop: Immediately stop the movement of the robot arm and cut off the
power of the drive.
4. The emergency stop switch is for emergency stop only.
5. HIWIN's industrial robot arm has two emergency stop switches, one of which is located on the teach
pendant and the other is automatically connected to the controller via a dedicated cable. If there is a

21
C25UE901-2208

need for other emergency stop switches, the other means of connection can be used to achieve the
purpose of emergency stop.
6. Based on the relevant industrial safety regulations, the emergency stop switch needs to be directly
connected to the control box of the robot arm through a physical connection line.

22
C25UE901-2208

1 USE COMMAND FOR MANUAL GETTING STARTED


1.1 MANUAL DESCRIPTION OF HIWIN TECHONOLOGIES CORP.
Each product manual for robot of Hiwin Technologies Corp. is mainly classified into the
Manipulator Manual, Controller Manual and Software Manual, Remote Robot Controller Software
Manual, Software Development Kit Manual and Programming Command Set Manual etc., total six
manuals. This manual is specifically used to describe the Command set manual of software. If there are
any other requirements, please refer to other manuals. The applicable products collocating with their
manuals are described as follows:

Name Remote
Robot Software Programming
Manipulator Controller Software
Controller Development Command
Manual Manual Manual
Robot model Software Kit Manual Set Manual
Manual
Articulated
Robot Series
V V V X V V
(RA605, RA610,
RA620)
SCARA Robot
Series (RS405, V V V V V V
[note1]
RS410)
Delta Robot
V V V X V V
Series (RD403)
Wafer Series
V V V X X X
(RW Series)
Electric Gripper
V X V X X X
Jaw X Series
Electric Gripper
V X X X X X
Jaw S Series
Note: “ V “ is applicable, ” X “ is non-applicable.
[note1] RC4 controller not used.

23
C25UE901-2208

※Example: RA605-710-GC articulated robot product.


No. 1 2 3 4

Picture

Remote Robot
Software
Name Manipulator Manual Controller Manual Controller Software
Manual
Manual
HRSS software Installation of remote
Specification of installation of connection software
Specification of Caterpillar, interface
robot controller, HIWIN robot system
robot manipulator, operation, example of
Content optional parts of software, interface application program.
optional parts,
controller, operation, example (Note: Applicable for
maintenance/repair.
maintenance/repair. of application SCARA-LU series, not
program. applicable for 6-axis)
No. 5 6

Picture

Software Development Programming Command


Name Kit Manual Set Manual
Hiwin robot system
Provide robot
software HRSS shares
function library. SDK is
with remote connection
furnished for users to
Content write their own
software Caterpillar,
Description of how to
software interface to
use program
manipulate the robot.
Commands.

24
C25UE901-2208

1.2 DESCRIPTION OF HOW TO USE COMMAND ARCHITECTURE


❖ Category description of Command classification:
Classify the HRSS & Caterpillar software Commands into two parts. The first part is the Commands in the
software, which can be used as long as the Commands being entered in the software. Please refer to
Table.1 the classification table of Command categories.
All internal Commands of HRSS & Caterpillar software are classified in accordance with different
functional modes. Please refer to the following table as the classified categories and give an English word
code. The code will be applied to the Command number as the distinguishing number. The user can search
for category in accordance with the classification method, and then search for the desired program
Command chapter, or search for the desired program Command from the summary table through the next
chapter.
Table. 1 Classification of Command Category & Code Chart
Item No. Class Class name
1 A Variable Declare
2 B Motion Command
3 C Register
4 D Input, Output Signal Control
5 E Flow Control Feature
6 F Motion Parameters/System Setting
7 G Mathematic Computation
8 H Communication Function
9 I Conveyor
10 J Message Prompt
11 K Simulation Environment
12 L Electric Gripper Jaw Function
13 M External Axis Function
14 N Welding Function
15 O Collision Detection Function
16 P String Operation

25
C25UE901-2208

❖ Description of Command items:


Each Command has 8 items for description, the content of each item is described as follows:
1. Command name: The usable input Command name and the Chinese description of Command
name, there is @ as the Command using as the quick Command for finding function, and use the
font face black highlight (character shading feature) as the identification function of obvious
Command.

Floating Point Variable


Command

Command Name Chinese Description of Command Font Face Black


Quick Command
Name Highlight for Easy
Find
Figure. 4 Feature Description Graphic of Command Name Identification
2. Description: Simply describe the description of this Command feature.
3. Prerequisite: When use this Command, notify the user that the supplementary Command of
conditions shall be prerequisite.
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

Applicable Applicable version The default status of each Command is pre-


version for HRSS for Caterpillar read CONT or not pre-read FINE.
HIWIN robot remote connection The not pre-read FINE will allow the program
software system software waiting until complete the execution of
current Command, and then proceed the
next line Command, but not for pre-read.
The summary table refers toAPPENDIX1、
continuous (CONT)/NON- continuous (FINE)

4. Command format: Describe the complete Command format, notify the user that the mode is taken
by the program to formulate the Command format.
5. Format/Parameter description: Using text mode to supplement the description of
format/parameter Command contents, or describe the interval range value.
6. Example: Describe this Command use by providing one or more program examples.
7. Example description: Using text mode to supplement the description of content expressed by the
example program.
8. Related Commands: Notify the user about the related Commands, the similar Command
application may be referred.

26
C25UE901-2208

1.3 SUMMARY TABLE OF COMMAND SETS


All HRSS and Caterpillar Command set tables under the first part of Command set are shown as follows,
please click the page number for quick connection.
Table. 2 Summary Table of Command Sets
No. Class Number Command Name Description Page
A-1 REAL Declare Floating Point Variable 31
A-2 INT Declare Integer Variable 34
A-3 BOOL Declare Boolean Variable Command 37
A-4 CHAR Declare Character Variable Command 38
Declare Cartesian Coordinate System Position
A-5 E6POS 40
Variable Command
Declare Joint Coordinate System Angle Variable
A-6 E6AXIS 42
Command
Variable Declaration

Declare Cartesian Coordinate System Point


A-7 E6POINT 44
Information Position Variable Command
Declare (Coordinate System) Architecture
A A-8 FRAME 46
Command
A-9 STRUC Declare Structure Definition Command 48
A-10 DEF... END Declare Subroutine Command 50
A-11 DEFFCT…ENDFCT Declare Feature Function Command 53
A-12 EXT Call External Subroutine Command 56
A-13 EXTFCT…ENDFCT Call External Feature Function Command 59
A-14 STRING Declare String Command 62
ARRAY Self-defined
A-15 Declare Array Command 63
Name
Declare No Symbol (Positive) Integer Variable
A-16 UINT 66
Command
B-1 PTP Point-to-point Move Command 69
Point-to-point Move Command with Relative
B-2 PTP_REL 72
Position Mode
B-3 LIN Linear Move Command 74
Linear Move Command with Relative Position
B-4 LIN_REL 76
Mode
Linear Move Command with Relative Position
B-5 LIN_REL_TOOL 78
Mode Reference to Tool Coordinate
Move Mode

B-6 CIRC Circular Arc Move Command 80


B
Circular Arc Move Command with Relative
B-7 CIRC_REL 83
Position Mode
B-8 SPLINE Point & Point Fit Spline Command 86
B-9 STOP_MOTION Trigger Last Motion Stop 88
B-10 BRAKE Stop & Clear Command in Brake 90
B-11 CHECK_LIN Line Path Singularity Check Command 92
B-12 P#_EXIST() Check Point Position Existence Command 94
B-13 P#() Point Position Variable Replacement Command 96
Infinite Rotation Extreme End 6th-axis Speed
B-14 CT_A6 98
Command
27
C25UE901-2208

No. Class Number Command Name Description Page


C-1 $C[] Count Register Command 100
Register C-2 $T[] Timing Register Command 102
C C-3 $T_STOP[] Stop Timing Register Command 104
C-4 $PR[] Position Register Command 106
C-5 $SRR[]、$SRW[] Site Fieldbus Register 110
D-1 $DI[] Digital Input Signal Command 113
D-2 $DO[] Digital Output Signal Command 115
Input, Output Signal

D-3 $SI[] Site Fieldbus Input Signal Command 116


D-4 $SO[] Site Fieldbus Output Signal Command 118
Control

D D-5 $VO[] Solenoid Valve Output Signal Command 119


D-6 $RO[] Robot Output Point Position Signal Command 120
D-7 $RI[] Robot Input Point Position Signal Command 121
Performing Output Signal Switch Adjustment
D-8 SYN 123
Time Command of Conveyor Track
E-1 IF If Command 130
E-2 FOR For Command 133
E-3 LOOP Loop Command 135
E-4 WHILE While Command 137
E-5 REPEAT Repeat Command 139
Process Control Function

E-6 GOTO Go To/Jump Command 141


E-7 SWITCH Switch Logic Command 143
E-8 WAIT SEC Waiting Seconds Command 146
E-9 WAIT FOR Waiting Input Signal Command 148
E
WAIT FOR ...
E-10 Input Signal Timeout Command 150
TIMEOUT
E-11 AND & Logic Gate Command 152
E-12 OR Or Logic Gate Command 155
INTERRUPT…WHEN
E-13 Declare Interruption Condition Command 158
…DO…
INTERRUPT
E-14 Enable/Stop Interruption Command 160
ON/OFF
E-15 BREAK_POINT Program Break-point Command 163
SET_OVERRIDE_SPEE
F-1 164
D Set Override Overall Speed Command
Motion Parameter/System Setting

F-2 SET_SPEED Set Speed Command 165


F-3 SET_ACC Set Acceleration Command 167
SET_ROTATION_SPEE
F-4 170
D Set Posture Rotation Speed Command
F-5 SET_TOOL Set Tool Coordinate System Command 171
F F-6 SET_BASE Set Base Coordinate System Command 173
F-7 SET_PAYLOAD Set End Payload Weight Data 175
Get Current Coordinate Position or Angle Value
F-8 GETPOINT 176
Command
GET_MOTION_STA
F-9 Read Current Motion Status Command 177
TUS
Start External TCP Point Position Track
F-10 EXT_TCP_START 179
Command

28
C25UE901-2208

No. Class Number Command Name Description Page


F-11 EXT_TCP_END End External TCP Point Position Track Command 179
F-12 TL_SET Torque Limit Monitoring Parameter Setting 181
F-13 SERVO_ON Excitation of all the axis Command 182
F-14 SERVO_OFF De-excitation of all the axis Command 183
F-15 SERVO_ON(#) Excitation of Single-axis Command 184
F-16 SERVO_OFF(#) De-excitation of Single-axis Command 185
G-1 + Addition Command 186
Mathematical Operation

G-2 - Subtraction Command 187


G-3 * Multiply Command 188
G-4 / Division Command 189
G G-5 SIN Sine Function Command 190
G-6 COS Cosine Function Command 191
G-7 TAN Tangent Function Command 192
G-8 ASIN Arcsine Function Command 193
G-9 ACOS Arccosine Function Command 194
Mathematical

G-10 ATAN Arctangent Function Command 195


Operation

G-11 ATAN2 Arctangent Function Change Command 196


G
G-12 FWD Forward Robot Kinematics Convert Command 197
G-13 % Find Remainder Command 199
H-1 COPEN Communication Opening Command 200
H-2 CCLOSE Communication Closing Command 202
Communication

H-3 CCLEAR Communication Buffer Data Clear Command 203


Function

H-4 CREAD Data Receiving Command 205


H
H-5 CWRITE Data Sending Command 208
H-6 CINQUIRE Data Quantity Getting Command 210
Declare Self-defined Communication Format
H-7 CFORMAT 212
Command
I-1 CNV_START Start Conveyor Tracking Procedure Command 215
I-2 CNV_END End Conveyor Tracking Procedure Command 216
CNV_PICK_QUANTI Quantity of Picked Object Command of
I-3 217
TY Conveyor Tracking
CNV_TRIGGER_TIM Triggering Times of Sensor Command of
I-4 218
ES Conveyor Tracking
Move Command for Pick Object of Conveyor
I-5 CNV_PICK 219
Tracking
Move Command for Place Object of Conveyor
Conveyor

I-6 CNV_PLACE 223


Tracking
I
Number Command for Pick Object of Conveyor
I-7 CNV_OBJECT 226
Tracking
Count of Object Full Command for Conveyor
I-8 CNV_FULL 228
Tracking
Count of Object Empty Command of Conveyor
I-9 CNV_EMPTY 230
Tracking
CNV_SET_DELAY_TI
I-10 Tracking Delay End Time of Conveyor Tracking 232
ME
Triggered Queue Quantity Command of
I-11 CNV_QUEUE_SIZE 234
Conveyor Tracking

29
C25UE901-2208

No. Class Number Command Name Description Page


CNV_OBJ_CNT_DIS Encoder Deviation Command for Triggered
I-12 236
T Object Position of Conveyor Tracking
I-13 CNV_PLACE_BATCH Maximum Times for Place of Conveyor Tracking 237
Clear Count Command for External Encoder of
I-14 CNV_RESET_ENC 238
Conveyor Tracking
CNV_QUEUE_REMOV
I-15 Remove Queue Command of Conveyor Tracking 239
E
Conveyor

Setting Acceleration Time for Press Down


I I-16 CNV_PICK_ACC 240
Command of Conveyor Tracking
X-axis Position Offset Command of Conveyor
I-17 CNV_OFFSET_X 241
Tracking
Y-axis Position Offset Command of Conveyor
I-18 CNV_OFFSET_Y 242
Tracking
Z-axis Position Offset Command of Conveyor
I-19 CNV_OFFSET_Z 243
Tracking
Get Conveyor Speed Command of Conveyor
I-20 CNV_SPEED 244
Tracking
Message
Prompt

J J-1 USER_ALARM User Self-defined Alarm Trigger Command 245

Add New Robot Tool Command in Simulation


K-1 ADDTOOL 246
Simulation Environment

View
Add New Peripheral Object Command in
K-2 ADDOBJ 248
Simulation View
Show/Hide Robot Tool Command in Simulation
K K-3 SHOW_TOOL 251
View
Show/Hide Peripheral Object Command in
K-4 SHOW_OBJ 253
Simulation View
Moving Floor Position Command in Simulation
K-5 MOVEFLOOR 254
View
Environmen

Display Coordinate System (Axis) Command in


Simulation

K-6 AXISON 255


Simulation View
K
t

Hide Coordinate System (Axis) Command in


K-7 AXISOFF 256
Simulation View

Each Command will be explained in details under the first part of chapter below.

30
C25UE901-2208

2 FIRST PART: FORMAT OF COMMAND SETS & APPLICATION


NOTE
This chapter describes the program Commands already defined inside the program. For most part, the
basic application can be completed through this chapter.

2.1 CODE A, VARIABLE & FUNCTION DECLARE COMMAND


This chapter describes the variable declare Commands for code A separately.
2.1.1 @REAL Floating Point Variable Command
◼ Description:
The Command name of self-defined variable and the saved type of floating point are able use the self-
defined name to declare the saved setting for the requirements of subsequent programs. After the
program is closed or power outage, the variable value will not be saved.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
Format (1):
REAL [self-defined variable name 1]
[Self-defined variable name 1] = [Self-defined initial settings or values in register]
Format (2):
REAL [self-defined variable name 1] = [Self-defined initial settings or values in register]
Format (3):
REAL [self-defined variable name 1], [self-defined variable name 2],…
[Self-defined variable name 1] = [Self-defined initial settings or values in register]
[Self-defined variable name 2] = [Self-defined initial settings or values in register]
Format/Parameter Description:
 Format (1): The user only defines one variable, and then the self-defined initial settings or count
register values will be defined in the next line.
 Format (2): The user only defines one variable, and gives the initial settings at the same time.
 Format (3): The user defines two variables or more, which are separated by using commas「,」,
and then the multiline self-defined initial settings or count register values will be defined in the
following lines.

31
C25UE901-2208

Description:
1. [Self-defined variable name 1] and [self-defined variable name 2] are the self-defined variable
names, which can be English alphabets or English alphabets + numbers, but the numbers cannot
be the start of heading character, and「-」cannot be used.
2. [Self-defined initial settings or values in the register] are the floating point numbers, the variable
can record 6 numbers after the decimal point, and the number will be invalid if it exceeds 6
decimal places. (The register may use count register or timing register)
3. After the program is closed, the value defined by the variable disappears accordingly. If the special
value is required to hold, the count register $C[] shall be used.
◼ Example-1:
REAL G1
G1 = 10.2
$C[2] = G1*10

◼ Example-1 description:
Declare REAL variable G1, and define the initial value of G1 as 10.2 in the next line.
The value of the second count register is defined as the value of G1 variable and multiplied by 10 (the
count register is an integer type), the result of count register: 102.

◼ Example-2:
REAL G1 = 10.02

◼ Example-2 Description:
Declare REAL variable G1, and define the initial value of G1 as 10.02.

◼ Example-3 :
REAL X1,Y1,Z1
REAL total
X1 = 0.6
Y1 = 12.2
Z1 = X1 * Y1
total = Z1 + X1

◼ Example-3 Description:
Declare the floating point number REAL variable X1, Y1, Z1 : Declare REAL variable total.
Define the initial value of variable X1 = 0.6; Y1 = 12.2;
Z1 variable is the result of X1 multiplied by Y1, (Z1 = 0.6 * 12.2 = 7.32)
The total variable is the result of Z1 adding X1, (total = 7.32 + 0.6 = 7.92)
The value of calculation result 7.92 is saved in the total variable, which will be used for the subsequent
program code.

32
C25UE901-2208

◼ Related Commands:
INT、BOOL、$C[]

33
C25UE901-2208

2.1.2 @INT Integer Variable Command


◼ Description:
The Command name of self-defined variable and the saved type of integer mode are able use the self-
defined name to declare the saved settings for the use of subsequent programs. After the program is closed
or power outage, the variable value will not be saved. It can also be a hexadecimal value (for example: The
hexadecimal 0X10 is converted to the decimal as 16).

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
Format (1):
INT [self-defined Variable Name 1]
[Self-defined Variable Name 1] = [Self-defined initial settings or values in register]
Format (2):
INT [self-defined Variable Name 1] = [Self-defined initial settings or values in register]
Format (3):
INT [Self-defined Variable Name 1], [self-defined Variable Name 2],…
[Self-defined Variable Name 1] = [Self-defined initial settings or values in register]
[Self-defined Variable Name 2] = [Self-defined initial settings or values in register]

Format/Parameter Description:
 [Self-defined variable name 1] and [Self-defined variable name 2] are the self-defined variable
names, which can be English alphabets or English alphabets + numbers, but the numbers cannot
be the start of heading character, and「-」cannot be used.
 [Self-defined initial settings or value in the register] are integers, and the value after the decimal
point is unconditionally rounded down. (The register may use count register, timing register).
Note: The range value (decimal) of timing and count register:
- 2147483648(-231) ~ 2147483647(231-1).
 After the program is closed, the value defined by the variable disappears accordingly. If the
special value is required to hold, the register $C[] shall be used.

34
C25UE901-2208

◼ Example-1:
INT G1
G1 = 10
$C[2] = G1

◼ Example-1 Description:
Declare INT variable G1,and define the initial value of G1 as 10 in the next line, and then define the
value of count register [2] as the value of G1 variable in the next line.

◼ Example-2:
INT G1 = 10

◼ Example-2 Description:
Declare INT variable, and define the initial value of G1as 10.

◼ Example-3 :
INT x1,y1,z1
INT total
x1 = 3
y1 = 2.2
z1 = x1 * y1
total = z1 + 3.14

◼ Example-3 Description:
Declare INT variable x1,y1,z1; declare INT variable total.
Define the initial value of variable x1 = 3; y1 = 2.2
The variable of z1 is the result of x1 mutiplied by y1, z1 = 3 * 2 = 6 (integer type, the values after the
decimal point are unconditionally rounded down)
The vairable of total is the result of z1 adding 3.14, total = 6 + 3.14 = 9 (integer type, the values after
the decimal point are unconditionally rounded down)
The result of calculation value 9 is saved in the total variable for the use of subsequent program code.

35
C25UE901-2208

◼ Example-4 : (hexadecimal)
UINT DATA = 0x10
$C[1] = DATA
$C[2] = DATA + 0x10
$C[3] = DATA - 0x10
$C[4] = DATA * 0x10
$C[5] = DATA / 0x10

◼ Example-4 Description:
Decalre INT integer variable DATA.
Display the value in the DATA variable with the first count register, and the result is 16 (decimal).
Display the value in the DATA variable with the second count register, add 0X10 value,and the result is
32 (decimal).
Display the value in the DATA variable with the third count register, subtrack 0X10 value, and the result
is 0 (decimal).
Display the value in the DATA variable with the fourth count register, multiplued by 0X10 value, and the
result is 256 (decimal).
Display the value in the DATA variable with the fifth count register, divided by 0X10 value, and the
result is 1 (decimal).

◼ Related Commands:
REAL、BOOL、$C[]

36
C25UE901-2208

2.1.3 @BOOL Declare Boolean Variable Command


◼ Description:
The Command name of variable can be self-defined, take Boolean BOOL as TRUE or FALSE logical
variable state, choose one of the two states (true or false), and declare with the self-defined name, then
save the assumed value for the use of subsequent programs. If the program is closed or power outage, the
variable value will not be saved.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
BOOL [self-defined variable name] = [Boolean variable]

Format/Parameter Description:
⚫ [Self-defined variable name] is the self-defined variable names declared by the user, which can be
English alphabets or English alphabets + numbers, but the numbers cannot be the start of
heading character, and「-」cannot be used.
⚫ [Boolean variable] is TRUE or FALSE, Boolean logic variables, choose one of the two states.
⚫ After the program is closed or power outage, the variable defined value will not be saved.

◼ Example-1:
BOOL K = TRUE

◼ Example-1 Description:
Boolean variable declaration, declare the variable name K and the variable value is TRUE.

◼ Example-2:
BOOL L = FALSE
IF L == FALSE THEN
PTP P0
ENDIF

◼ Example-2 Description:
Declare the variable name L and the variable value is FALSE. If L is equal to FALSE/0, moves to P0 point
with point-to-point mode.

◼ Related Commands:
IF、INT、REAL

37
C25UE901-2208

2.1.4 @CHAR Declare Character Variable Command


◼ Description:
The Command name of variable can be self-defined, which is able to declare the character setting with
the character variable type and the self-defined name for the requirements of subsequent programs. After
the program is closed or power outage, the variable value will not be saved.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
CHAR [self-defined variable name] = ' [Self-defined character name] '

Format/Parameter Description:
 [Self-defined variable name] is the self-defined variable names declared by the user, which can be
English alphabets or English alphabets + numbers, but the numbers cannot be the start of heading
character, and「-」cannot be used.
 The value of [Self-defined variable name] is self-defined by the user to assign a character of English
alphabet, and add apostrophe「'」before and after, for example: 'A', A is a character, the case of
English alphabet is not limited and different; if more than one character is a string, string is not
currently supported.
 The characters are saved in the computer as an octet integer (ie 1 Byte), and the corresponding
relationship between this symbol and number may refer to ASCII code (American Standard Code for
Information Interchange).
 The character is a number as well, therefore, it can also be used for 4 computation of addition,
subtraction, multiplication and division. After calculation, it shall be corresponded by comparing with
the ASCII code. For example, the ASCII code number 65 is the character A, and the ASCII code number
97 is character a. Please refer to Appendix 2, ASCII Printable Characters.
 After the program is closed or power outage, the variable defined value will not be saved.

38
C25UE901-2208

◼ Example-1:
CHAR WORD = 'A'
IF WORD == 'A' THEN
PTP P0
ENDIF
WORD = WORD +2
IF WORD == 'C' THEN
PTP P1
ENDIF

◼ Example-1 Description:
Declare the variable name of WORD character and define the initial character 'A', use the if Command,
if WORD is equal to 'A' character, then moves to P0 point with the point-to-point mode.
Then increase the character number value by 2, from 'A' alphabet which is ASCII code number 65
changes to 'C' alphabet which is ASCII code number 67, use the if Command, if WORD is equal to 'C'
character, then moves to P1 point with point-to-point mode.

◼ Example-2:
CHAR WORD = 'A'
INT G
FOR G= 'A' TO 'Z' STEP 1
$C[1] =G
WAIT SEC 2
ENDFOR

◼ Example-2 Description:
⚫ Declare the variable name of character type WORD character and define the initial character 'A', 'A'
alphabet which is ASCII code number 65.
⚫ Declare the variable name of integer type G.
⚫ The FOR loop condition starts from 'A' = 65 and ends at 'Z' = 90. The interval distance is 1 per time.
The content of execution action is to import the value of G into the value of the first register, and
wait for 2 seconds, the program ends after executing 26 times in total.

◼ Related Commands:
IF、FOR、INT

39
C25UE901-2208

2.1.5 @E6POS Declare Cartesian Coordinate System Position Variable Command


◼ Description:
In the right angle/Cartesian coordinate system, the user self-declares the name of the newly built
POINT, not only just P0~P9999, and makes good use of the motion Command (e.g.: PTP, LIN) to move to the
POINT or performs the program calculation. It is used to declare the coordinate position variable. When the
arm executes the action, it can be moved to the specified position in accordance with the set coordinates.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
E6POS [variable name]
E6POS [variable name] = {X <Value 1>,Y <Value 2>,Z <Value 3>,A <Value 4>,B <Value 5>,C <Value 6>}
LU series have no AB-axis.

Format/Parameter Description:
 E6POS executes this program code i.e. executes the declaration of position coordinate name.
 [Variable name] is the self-defined variable of position coordinate by the user, and set the
parameter, which contents coordinate X, Y, Z, A, B and C-axis,in position coordinate variables. The
value of X, Y, Z, A, B and C-axis can be directly declared with the specified format { }, and give the
variable to the specified position that self-defined by user. (The LU series have no A and B-axis
values)
 <Value 1> to <Value 6> are the self-defined values by the customer, the unit of distance is
millimeter, there shall be a space between the axis name and the value, and the commas " , "
shall be used to separate two axes or more; it may also able to omit the axis values not to declare,
only declare [variable name] for the convenience of subsequent program editing.
 Since E6POS has no definition of the axis angle point, therefore, the value of A1~A6 cannot be set
directly. If it is required to set the value of A1~A6, please use the E6AXIS declaration. (LU series
have no A5, A6 value)
 E6POS is only used for setting/recording the 6 variables of X, Y, Z, A, B and C-axis, E6POINT can
set/record the 12 variables of A1, A2, A3, A4, A5, A6, X, Y, Z, A , B and C-axis, here are more
variables available for use, but the initial value of each axis shall be defined prior to use, if one
axis has not been defined, the error will occur.

40
C25UE901-2208

◼ Example-1:
E6POS HOME = {Y 200,Z -100}
PTP HOME CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
◼ Example-1 Description:
⚫ E6POS executes this program code i.e. declares the name of position coordinate.
⚫ [{Y 200,Z -100}] = Declare the position of coordinate Y, Z, coordinate Y=200mm, Z=-100mm.
⚫ Move to the HOME point position with the point-to-point (PTP) move mode, 100% smoothness,
100% speed, 50% acceleration, tool coordinates [0] and base coordinates [0].

Note: ※If the parameter of coordinate X (or other parameters) is not set, and the parameters of
rotation A, B and C are not set, the original value will be maintained (or default value).

➢ Example-2: (P1 position increases 10mm and moves to the new position)
E6POS NEWP1
NEWP1 = P1
NEWP1.X = NEWP1.X + 10
LIN NEWP1

◼ Example-2 description:
 E6POS declares the coordinate name of new position, NEWP1.
 The position value of NEWP1 refers to X, Y, Z, A, B and C of P1.
 Increase 10mm on the direction of NEWP1’s X-axis, and then use the linear (LIN) move mode,
move to the position of new NEWP1 point.

◼ Related Commands:
E6POINT、E6AXIS

41
C25UE901-2208

2.1.6 @E6AXIS Declare Joint Coordinate System Angle Variable Command


◼ Description:
In the JOINT coordinate system, the name of newly built POINT self-declared by user, not just only
P0~P9999, and makes good use of the PTP motion Command to move to the new angle or perform the
program calculation. It is usually used to declare the angle variable of joint. When robot executes the
motion, it can be moved to the specified angle in accordance with the set coordinates.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
E6AXIS [variable name]
E6AXIS [variable name] = {A1 <Value 1>, A2 <Value 2>, A3 <Value 3>, A4 <Value 4>, A5 <Value 5>, A6
<Value 6>}

Format/Parameter Description:
 E6AXIS executes this program code i.e. declares the name of position coordinate.
 [Variable name] is the name of variable self-defined by the user, and set the parameter, which
contents the angle variable of each axis A1, A2, A3, A4, A5 and A6-axis in JOINT coordinate
system. The A1, A2, A3, A4, A5 and A6-axis values can be directly declared with the specified
format { }, and give the variable to the specified angle that self-defined by user. (The LU series
have no A5, A6 values)
 <Value 1> to <Value 6> are the self-defined values by the customer, the unit of angle is degree,
there shall be a space between the axis coordinate and the value, and the commas " , " shall be
used to separate two axes or more; it may also able to omit the axis values not to declare, only
declare [variable name] for the convenience of subsequent program editing.
 Since E6AXIS has no definition of the axis coordinate position, therefore, the values of X、Y、Z、
A、B and C cannot be set directly, if it is required to set X, Y, Z, A, B and C, please use E6POS or
E6POINT for declaration.

42
C25UE901-2208

◼ Example-1:
E6AXIS HOME = {A1 0, A2 0, A3 0, A4 0, A5 -90}
PTP HOME CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-1 Description:
⚫ E6AXIS executes this program code i.e. declares the angle name of position.
⚫ [{A1 0, A2 0, A3 0, A4 0, A5 -90}] = Declare the angles of A1, A2, A3, A4 and A5 position, 1st -axis 0º,
2nd -axis 0º, 3rd -axis 0º, 4th -axis 0º, 5th -axis-90º.
⚫ Move to the HOME point position with the point-to-point (PTP) motion Command, 100%
smoothness, 100% speed, 50% acceleration, tool coordinates [0] and base coordinates [0].

Note: ※If the angle A6 (or other parameters) is not set, the original value will be maintained (or
default value).

◼ Example-2: (P1 position increases 10º and moves to the new angle)
E6AXIS NEWP1
NEWP1 = P1
NEWP1 = NEWP1.A1 + 10
PTP NEWP1

◼ Example-2 Description:
⚫ E6AXIS declares the coordinate name of NEWP1 new angle.
⚫ NEWP1 position value refers to A1, A2, A3, A4, A5 and A6 of P1.
⚫ Increase 10º on the direction of NEWP1 A1-axis, and then use point-to-point (PTP) motion
Command, move to the new NEWP1 point position. (Assume that the original A1-axis of P1 point
is 5º, the NEWP1 point increases by 10º becoming 15º, and the angles of other A2~A6-axis remain
unchanged.)

◼ Related Commands:
E6POS 、E6POINT

43
C25UE901-2208

2.1.7 @E6POINT Cartesian Coordinate System Point Information Position


Variable Command
◼ Description:
In the right angle/Cartesian coordinate system, the user self-declares the name of the newly built
POINT, not only just P0~P9999, and makes good use of the motion Command (e.g.: PTP, LIN) to move to the
POINT or performs the program calculation. It is usually used to declare the coordinate position variable.
When robot executes the motion, it can be moved to the specified position in accordance with the set
coordinates. E6POINT is the Command used to build the point positions for the internal programs. The
parameters are more complete than those of E6POS and E6AXIS. However, it is recommended to use
E6POINT or E6POS Commands to declare the point positions in the right angle/Cartesian coordinates (XYZ
coordinate system), and declare the point positions in the joint coordinate system (JOINT coordinate
system) with the E6AXIS Command.

◼ Prerequisite:
Applicable Software version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
E6POINT [variable name]
E6POINT [variable name] = {X <Value 1>,Y <Value 2>,Z <Value 3>,A <Value 4>,B <Value 5>,C <Value 6>}
LU series have no A,B-axis.

Format/Parameter Description:
 E6POINT executes this program code i.e. executes the declaration of position coordinate name.
 [Variable name] is the position coordinate variable self-defined by the user, set the parameter
contents i.e. the position coordinate variables of right angle/Cartesian coordinates X, Y, Z, A, B
and C-axis and the joint coordinate system A1~A6. The X, Y, Z, A, B and C-axis values can be
directly declared with the specified format { }, The LU series has no A5, A6, A, and B-axis values,
and give the variable to the specified position that self-defined by user, each axis is independent,
and one axis must be declared at least.
 <Value 1> to <Value 6> are the self-defined values by the customer, the unit of distance is mm,
the unit of angle is degree, there shall be a space between the axis name and the value, and the
commas " , " shall be used to separate two axes or more; it may also able to omit the axis values
not to declare, only declare [variable name] for the convenience of subsequent program editing.
 E6POINT has the definitions of axis angle points, but the initial value of each axis shall be defined
prior to use. if one axis has not been defined, the error will occur. If it is required to set the values
of A1~A6, it is recommended to use E6AXIS to declare the point position.
 E6POS is only used for setting/recording the 6 variables of X, Y, Z, A, B and C-axis, E6POINT can
set/record the 12 variables of A1, A2, A3, A4, A5, A6, A1, X, Y, Z, A , B and C-axis, there are more
variables available for use, but the initial value of each axis shall be defined prior to use, if one

44
C25UE901-2208

axis has not been defined, the error will occur.

◼ Example: (Declare one origin and move to the original position)


E6POINT HOME
HOME = {Y 200,Z 300,C 90}
PTP HOME CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
or
E6POINT HOME = {Y 200,Z 300,C 90}
PTP HOME CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example Description:
E6POINT executes this program code i.e. declares the name of position coordinate.
{Y 200,Z 300,C 90} = Declare the position coordinates of coordinate Y, Z and C, Y=200mm, Z=300mm,
C=90º.
Move to the HOME point position with the point-to-point (PTP) motion Command, 100% smoothness,
100% speed, 50% acceleration, tool coordinates [0] and base coordinates [0].

Note: ※If the coordinate X parameter (or other parameters) is not set, the original value will be
maintained (or default value).

◼ Related Commands:
E6POS 、E6AXIS 、GETPOINT

45
C25UE901-2208

2.1.8 @FRAME Declare (Coordinate System) Architecture Command


◼ Description:
Declares the architecture name of a coordinate system. The architecture name contains the variables
of X, Y, Z, A, B and C information. It can be used to replace the variable values or tool (TOOL) or base (BASE)
coordinate system. It cannot be used on the point position.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
FRAME [self-defined variable name]
[Self-defined variable name].X = [Self-defined setting values or values in register]
[Self-defined variable name].Y = [Self-defined setting values or values in register]
[Self-defined variable name].Z = [Self-defined setting values or values in register]
[Self-defined variable name].A = [Self-defined setting values or values in register]
[Self-defined variable name].B = [Self-defined setting values or values in register]
[Self-defined variable name].C = [Self-defined setting values or values in register]

Format/Parameter Description:
 [Self-defined variable name] is the self-defined variable name, which can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and「-」
cannot be used.
 [Self-defined setting values or values in register] are the floating point numbers, the variable can
record 6 numbers after the decimal point, and the number will be invalid if it exceeds 6 decimals.
 X is the X-axis value; Y is the Y-axis value; Z is the Z-axis value; A is the rotation angle value
corresponding to the X-axis, B is the rotation angle value corresponding to the Y-axis; C is the
rotation angle value corresponding to the Z-axis.

46
C25UE901-2208

◼ Example:
FRAME BASE_2
BASE_2.X = 0
BASE_2.Y = 200
BASE_2.Z = -100
BASE_2.A = 0
BASE_2.B = 0
BASE_2.C = 45
SET_BASE 2
SET_BASE BASE_2
◼ Example Description:
Declare architecture BASE_2 variable, X-axis value of BASE_2 is 0mm; Y-axis value of BASE_2 is 200mm;
Z-axis value of BASE_2 is -100mm; A-axis value of BASE_2 is 0º; B-axis value of BASE_2 is 0º; C-axis value
of BASE_2 is 45º.
Set to change the 2nd BASE coordinate system, import the architecture parameter of BASE_2 into the
2nd BASE coordinate system.

◼ Related Commands:
TOOL、BASE

47
C25UE901-2208

2.1.9 @STRUC Declare Structure Definition Command


◼ Description:
The structure is a derived data type, which is used to express the type composed of more than one
attribute, the data type self-defined by the user, and then describe the content which is applicable by the
structure through the declaration, so that allow a more complex content can be easily separated.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
STRUC [self-defined variable] [structure type 1] [member name 1], [structure type 2] [member name
2] …
DECL [self-defined variable] [structure variable 1], [structure variable 1]
[Structure variable 1] = {[member name 1] <value 1>, [member name 2] <value 2>,>}
[Structure variable 1] = {[member name 1] <value 1>, [member name 2] <value 2>,>}

Format/Parameter Description:
 [Self-defined variable] is the variable name self-defined and declared by the user, which can be
English alphabets or English alphabets + numbers, but the numbers cannot be the start of
heading character, and「-」cannot be used.
 [Structure type] is the format type to go with [member name], such as INT positive integer, REAL
floating point number type.
 [Member name] is the variable name self-defined and declared by the user, which can be English
alphabets or English alphabets + numbers, but the numbers cannot be the start of heading
character, and「-」cannot be used.
 [Structure variable 1] is the variable name self-defined and declared by the user, which can be
English alphabets or English alphabets + numbers, but the numbers cannot be the start of
heading character, and「-」cannot be used.

48
C25UE901-2208

◼ Example:
STRUC GROUP INT Age, REAL Weight
DECL GROUP people1, people2
People 1 = {Age 50, Weight 50.3 }
People 2 = {Age 60, Weight 70.1}
$C [2] = people 1. Weight

◼ Example Description:
Declare GROUP as structure type, which consists of the Age member as the integer type and the
Weight member as the floating point number type.
Declare the content of structure variable GROUP has 2 variables i.e. people 1 and people 2.
The GROUP variable, People 1, has the member, Age, which is 50, and the member, Weight, is 50.3.
The GROUP variable, People 2, has the member, Age, which is 60, and the member, Weight, is 70.1.
Save the member parameter value, Weight, of variable People 1 into the 2nd register, and the result is
50.3.

◼ Related Commands:
INT、REAL

49
C25UE901-2208

2.1.10 @DEF... END Declare Subroutine Command


◼ Description:
If a program is the Command group (more than one line) that requires to be used repeatedly, the
multiple Commands can be grouped into a subroutine through the Command declaration mode. When it is
required for use, call the Command group from the main program; the subroutine will only perform input
and execution, but will not perform the value return. If the return is required, the functions will be required
(DEFFCT…ENDFCT).
◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
[Self-defined subroutine name]( [Input subroutine parameter value] )
DEF [Self-defined subroutine name]([Input subroutine parameter value])
[Action Instruction]
END
Note: The brackets () after the [self-defined subroutine name] are the essential symbols and shall not be
omitted. The subroutine parameter values could be omitted in the brackets ().

Format/Parameter Description:
 [Self-defined subroutine name] is the subroutine label name self-defined by the user which shall
be English alphabets or combination of English alphabets plus numbers, but the numbers cannot
be the start of heading character, and there shall no space between alphabets. It can be replaced
with "_" (underline), for example: MySub is one self-defined label, the program calls the
subroutine by enter the self-defined label directly to execute.
 [Input subroutine parameter value] is to take the value or point information that the user desires
to bring into the subroutine for calculation, no input or more than one input information can be
ignored. If multiple input values are separated by "," (comma) in the middle, up to 5 values at
most; the input parameter value requires to add: IN, describing it is the input value, for example:
MySub (num1: IN). The input parameter values may use the integer format (INT) or point
position format (E6POINT). If the parameter is the input, then use parameter: IN for indication.
Even if the input parameter is modified in the function, it will not affect the incoming variable. If
it is the output, use parameter: OUT as the output variable, if it is modified in the function, the
original incoming variable will also be changed accordingly.
 The brackets () after the [self-defined label] are the essential symbols and shall not be omitted.
The subroutine parameter values could be omitted in the brackets ().
 [Action Instruction] is the combination of logic program, move Command or signal Command in
order to execute the statement action defined by subroutine.

50
C25UE901-2208

◼ Example-1: (The subroutine example of omitting input value)


PTP P0; Main program
PICK()

DEF PICK (); Subroutine


PTP P1
LIN P2 FINE = 1
$DO[1] = TRUE
WAIT SEC 1
END

◼ Example-1 Description:
Moves to P0 point (origin) with point-to-point move mode, and executes the content of subroutine
PICK ().
The content of subroutine PICK () is shown as follows:
Moves to P1 point (above the pick-up point of material) with point-to-point move mode, moves to P2
point (pick-up point of material) with linear move mode, turn on the 1st digital output signal ($DO[1] =
TRUE), and wait for 1 second. After completing the execution of subroutine, it will then return to the
main program, and continue the subsequent content of the main program.

◼ Example-2: (The subroutine example of having input value)


; Main Program
PTP P0
PICK (30)

DEF PICK(rise_Dis:IN); Subroutine


INT rise_Dis
PTP P1
LIN P2 FINE = 1
$DO[1] = TRUE
WAIT SEC 1
P2.Z = P2.Z + rise_Dis
LIN P2
END
◼ Example-2 Description:
Moves to P0 point (origin) with point-to-point move mode, and executes the content of subroutine
PICK (), in which, substitute the input value of subroutine with 30.
The content of subroutine PICK (rise_Dis:IN) is shown as follows:
(rise_Dis:IN) is the entering variation of the change height, this example is to enter a value 30.
Move to P1 point (above the pick-up point of material) with point-to-point move mode, moves to
P2 point (pick-up point of material) with linear move mode, turn on the 1st digital output signal
51
C25UE901-2208

($DO[1] = TRUE), and wait for 1 second. Overlay 30mm distance at the Z-axis direction of P2
point, and then moves to the new P2 poit position with linear move mode.
After completing the execution of subroutine, it will then return to the main program, and continue
the subsequent content of the main program.

◼ Example-3 : (The subroutine example of having input point position value)


; Main Program
PTP P0
Changeposition 1 ( P1 , -100)
Changeposition 1 ( P2 , 50)
LIN P1
LIN P2

DEF changeposition 1 ( changepos:OUT, rise_Dis:IN ; Subroutine


E6POINT changepos
INT rise_Dis
changepos.Z = changepos.Z + rise_Dis
END

◼ Example-3 Description:
This is the example of program application that increase/decrease the distance of the entering point
position through the subroutine.
After moving to P0 point with the point-to-point move mode, execute the changeposition1 subroutine
for P1 point with the distance of -100mm, and then execute the subroutine changeposition1 for P2
point with the distance of 50mm, move to the new P1 point position with linear move mode, and
move to the new P2 point position with linear move mode.
The content of subroutine changeposition1( changepos:OUT, rise_Dis:IN) is shown as follows:
In (changepos:OUT, rise_Dis:IN), the changepos is the input & output information, rise_Dis is the input
rise distance, declare the point position information of changepos variable, declare the integer
information of rise_Dis variable, add the rise_Dis distance to the Z-axis direction of the changepos
point variable.

◼ Related Commands:
INT、$DO[]、DEFFCT…ENDFCT、E6POINT、EXT、EXTFCT.

52
C25UE901-2208

2.1.11 @DEFFCT…ENDFCT Declare Feature Function Command


◼ Description:
If a program is the Command group (more than one line) that requires to be used repeatedly, the
multiple Commands can be grouped into a function through the Command declaration mode. When it is
required for use, call the Command group from the main program; the function may execute multiple lines
Command, and shall return (RETURN) data to the main program at last; if the return is not required, the
subroutine Command (DEF…END) may be used.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
DEFFCT [return data type] [self-defined function name] ([input/output function parameter values])
[Action Instruction]
RETURN [Return data]
ENDFCT
Note: The brackets () after the [self-defined function name] are the essential symbols and shall not be
omitted. The input/output function parameter values could be omitted in the brackets ().

Format/Parameter Description:
 [Return data type] is the data type definition declaration of return function, for example: the
variable declare format INT, E6POINT etc.
 [Self-defined function name] is the function label name self-defined by the user which shall be
English alphabets or combination of English alphabets plus numbers, but the numbers cannot be
the start of heading character, and there shall no space between alphabets. It can be replaced
with "_" (underline), for example: MySub is one self-defined label, the program calls the
subroutine by enter the self-defined label directly to execute.
 [Input/output function parameter values] is to take the value or point position information that
the user desires to bring into the function for calculation, no input or more than one input
information can be ignored. If multiple input values are separated by "," (comma) in the middle,
up to 5 values at most, the function may also have no function parameter; the data type of
parameter will refer to the data type declared in the [Action Instruction]. The input parameter
value requires to add: IN, describing it is the input value, for example: MyFunction (num1: IN).
The input parameter values may use the integer format (INT) or point position format (E6POINT).
If the parameter is the input, then use parameter:IN for indication. Even if the parameter, acting
as the input, is modified in the function, it will not affect the incoming variable. If it is the output,
then use parameter:OUT as the output variable, if it is modified in the function, the original
incoming variable will also be changed accordingly.

53
C25UE901-2208

 [Action Instruction] is the combination of statement action, logic program, move Command or
signal Command in order to execute the statement action defined by function.
 [Return data] is the information returned to the main program after executing the complete
function. It can be value or point information.

◼ Example-1: (Addition function of 2 values)


INT SUM_value; Main Program
SUM_value = SUM(2,3)
DEFFCT INT SUM(value1:IN, value2:IN); Function
INT value1, value2
RETURN value 1+ value2
ENDFCT

◼ Example-1 Description:
Declare integer variable SUM_value, execute function SUM(), and write the return value intoo
SUM_value variable, input values of the function are 2, 3, the resulted variable SUM_value is 5.
The content of function SUM(value1:IN, value2:IN) is shown as follows:
(value1:IN, value2:IN) is the input variable, value 1 and value 2, for this example is input 2 and 3 value.
Declare integer variable value1, value2.
The return data is the value of value1 plus value2, and write the value into the variable, SUM_value, in
the main program.

54
C25UE901-2208

◼ Example-2: (Subtraction function of 2 point positions)


E6POINT Tolerance_point; Main Program
Tolerance_point=change2(P1 ,P2)
IF Tolerance_point.Z > 10 THEN
$DO[1] = TRUE
ENDIF

DEFFCT E6POINT change2(POINT_A:IN, POINT_B:IN); Function


E6POINT POINT_A,POINT_B,POINT_C
POINT_C.Z =POINT_A.Z -POINT_B.Z
RETURN POINT_C
ENDFCT

◼ Example-2 Description:
The declare point position variable Tolerance_point and execute function change2 to calculate the Z-
axis distance difference between the 2 point position P1 and P2. If the difference exceeds 10mm, then
turn on the 1st digital output signal ($DO[1] = TRUE)).
The content of function change2(POINT_A:IN, POINT_B:IN) is shown as follows:
(POINT_A:IN, POINT_B:IN) are the input point position A and point position B, this example is to input
P1 and P2 point position.
Declare point position variable POINT_A,POINT_B,POINT_C.
Calculate the subtraction of Z-axis information of POINT_A and POINT_B, and pass the subtracted
value to the POINT_C variable.
Finally, return POINT_C point position information to the main program, allow POINT_C point position
equals to Tolerance_pointpoint position.

◼ Related Commands:
INT、$DO[]、DEFFCT…ENDFCT、E6POINT、EXT、EXTFCT.

55
C25UE901-2208

2.1.12 @EXT Declare External Subroutine


◼ Description:
The declare external subroutine means that the user writes the content of subroutine in another
independent file. When it is required by the main program, the subroutine content of another file is called
for use, which can make it more easier to confirm the program segmented architecture, and easy to find
the content of subroutine.
The approach of declare external subroutine is shown as follows:
1) The file in the main program requires to use EXT + subroutine name to declare the format
content, which means that the main program may call the subroutine, one main program may call
more than one subroutine, and each subroutine requires EXT for declaration, after the
declaration, it can be used as calling the general subroutine.
2) The name of independent file shall be the same as the name of subroutine, and the subroutine
shall be called outside this independent file.
3) On the first line of program code, the external subroutine must start with the DEF keyword and
end with END, and write the action Instruction in the subroutine content. Other action
instructions cannot be added after the end of END. One file can only define one external
subroutine.
4) The EXT Command does not return any value (RETURN) after executing the program. If it requires
to return the value, the EXTFCT Command must be used.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
Main program content:
EXT [self-defined subroutine name]([Input subroutine parameter values])
[Self-defined subroutine name]

Subroutine content (the file name shall be the same as the self-defined subprogram name):
DEF [Self-defined subroutine name]([Input subroutine parameter values])
[Action Instruction]
END
Note: The brackets () after the [self-defined subroutine name] are the essential symbols and shall not be
omitted. The input subroutine parameter values could be omitted in the brackets ()

56
C25UE901-2208

Format/Parameter Description:
 [[Self-defined subroutine name] is the subroutine label name self-defined by the user which shall
be English alphabets or combination of English alphabets plus numbers, but the numbers cannot
be the start of heading character, and there shall no space between alphabets. It can be replaced
with "_" (underline), for example: MySub is one self-defined label, the program calls the
subroutine, and enter the self-defined label directly to execute the call.
 [Input subroutine parameter values] is to take the value or point position information that the
user desires to bring into the subroutine for calculation, no input or more than one input
information can be ignored. If multiple input values are separated by "," (comma) in the middle,
up to 5 values at most, the function may also have no function parameter; the data type of
parameter will refer to the data type declared in the [Action Instruction]. The input parameter
value requires to add: IN, describing it is the input value, for example: Mysub (num1: IN). The
input parameter values may use the integer format (INT) or point position format (E6POINT). If
the parameter is the input, then use parameter:IN for indication. Even if the parameter, acting as
the input, is modified in the function, it will not affect the incoming variable. If it is the output,
then use parameter:OUT as the output variable, if it is modified in the function, the original
incoming variable will also be changed accordingly.
 [Action Instruction] is the combination of statement action, logic program, move Command or
signal Command in order to execute the statement action defined by subroutine.

57
C25UE901-2208

◼ Example:
Main program content:
EXT PICK(rise_Dis:IN)
PTP P0
PICK(30)

Subroutine content (file name: PICK):


DEF PICK(rise_Dis:IN)
INT rise_Dis
PTP P1
LIN P2 FINE = 1
$DO[1] = TRUE
WAIT SEC 1
P2.Z = P2.Z + rise_Dis
LIN P2
END

◼ Example Description:
Main program content:
The declaration that this program will use the external subroutine PICK(rise_Dis:IN);
Moves to the P0 point (origin) with the point-to-point move mode, and executes the subroutine PICK()
content, in which, substitute the input value 30 into subroutine.

Subroutine content:
The file name of subroutine is PICK, declare subroutine PICK(rise_Dis:IN):
(rise_Dis:IN) is the entering variation of the change height, this example is to enter a value 30.
Moves to P1 point (above the pick-up point of material) with point-to-point move mode, moves to P2
point (pick-up point of material) with linear move mode, turn on the 1st digital output signal ($DO[1] =
TRUE), and wait for 1 second. Overlay 30mm distance at the Z-axis direction of P2 point, and then
moves to the new P2 point position with linear move mode.
After completing the execution of subroutine, it will then return to the main program, and
continue the subsequent content of the main program.

◼ Related Commands:
INT、$DO[]、DEF…END、DEFFCT…ENDFCT、E6POINT、EXTFCT.

58
C25UE901-2208

2.1.13 @EXTFCT Declare External Function


◼ Description:
The declare external function means that the user writes the content of function in another
independent file. When it is required by the main program, the function content of another file is called for
use, which can make it more easier to confirm the program segmented architecture, and easy to find the
content of function.
If a program is the Command group (more than one line) that requires to be used repeatedly, the
multiple Commands can be grouped into a function through the Command declaration mode. When it is
required for use, call the Command group from the main program; the function may execute multiple lines
Command, and shall return (RETURN) data to the main program at last; if the return is not required, the
subroutine Command (DEF…END) may be used.
The approach of declare external function is shown as follows:
1) The file in the main program requires to use EXTFCT + function name to declare the format
content, which means that the main program may call the function, one main program may call
more than one function, and each function requires EXTFCT for declaration, after the declaration,
it can be used as calling the general function.
2) The name of independent file shall be the same as the name of function, and the function shall
be called outside this independent file.
3) On the first line of program code, the external function must start with the DEFFCT keyword and
end with ENDFCT, and write the action instruction in the function content. Other action
instructions cannot be added after the end of ENDFCT. One file can only define one external
function.
4) The EXTFCT Command returns the value after executing the program. If it does not require to
return the value, the EXT Command must be used.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
Main program content:
EXTFCT [return data type] [self-defined function name]([input/output function values])
[Self-defined function name]

Function content (the file name shall be the same as the self-defined function name)
DEFFCT [return data type] [self-defined function name]([input/output function values])
[Action Instruction]
RETURN [return data]
ENDFCT

59
C25UE901-2208

Note: The brackets () after the [self-defined function name] are the essential symbols and shall not be
omitted. The input/output function parameter values could be omitted in the brackets ().

◼ Format/Parameter Description:
 [Return data type] is the defined declaration of return data type for function return, for example:
the variable declaration format INT, E6POINT etc.
 [Self-defined function name] is the function label name self-defined by the user which shall be
English alphabets or combination of English alphabets plus numbers, but the numbers cannot be
the start of heading character, and there shall no space between alphabets. It can be replaced
with "_" (underline), for example: MySub is one self-defined label, the program calls the function,
and enter the self-defined label directly to execute the call.
 [Input/output function parameter values] is to take the value or point position information that
the user desires to bring into the function for calculation, no input or more than one input
information can be ignored. If multiple input values are separated by "," (comma) in the middle,
up to 5 values at most, the function may also have no function parameter; the data type of
parameter will refer to the data type declared in the [Action Instruction]. The input parameter
value requires to add: IN, describing it is the input value, for example: Myfunction (num1: IN).
The input parameter values may use the integer format (INT) or point position format (E6PINT). If
the parameter is the input, then use parameter:IN for indication. Even if the parameter, acting as
the input, is modified in the function, it will not affect the incoming variable. If it is the output,
then use parameter:OUT as the output variable, if it is modified in the function, the original
incoming variable will also be changed accordingly.
 [Action Instruction] is the combination of statement action, logic program, move Command or
signal Command in order to execute the statement action defined by function.
 [Return data] is the information returned to the main program after executing the complete
function, it may be value or point information.

60
C25UE901-2208

◼ Example:
Main program content:
EXTFCT E6POINT change2(POINT_A:IN, POINT_B:IN)
E6POINT Tolerance_point
Tolerance_point=change2(P1 ,P2)
IF Tolerance_point.Z > 10 THEN
$DO[1] = TRUE
ENDIF
Subroutine name (file name: change2):
DEFFCT E6POINT change2(POINT_A:IN, POINT_B:IN)
E6POINT POINT_A,POINT_B,POINT_C
POINT_C.Z =POINT_A.Z -POINT_B.Z
RETURN POINT_C
ENDFCT

◼ Example Description:
Main program content:
The declaration that this program will use the external function change2(POINT_A:IN,
POINT_B:IN).
Declare point position variable Tolerance_point, executes function change2, calculates the Z-axis
distance difference of 2 point positions i.e. P1 and P2 points, if the difference exceeds 10mm,
then turn on the 1st digital output signal ($DO[1] = TRUE).
Function content:
The function name is change2, declare function change2(POINT_A:IN, POINT_B:IN).
(POINT_A:IN, POINT_B:IN) are the input point position A and point position B, this example is to
input P1 and P2 point positions.
Declare point position variable POINT_A,POINT_B,POINT_C。
Calculate the Z-axis information subtraction of POINT_A and POINT_B, and send the subtraction
value to POINT_C variable.
Finally, return the point position information of POINT_C to the main program, let the point
position of POINT_C equal to the point position of Tolerance_point.

◼ Related Commands:
INT、$DO[]、DEF…END、DEFFCT…ENDFCT、E6POINT、EXT.

61
C25UE901-2208

2.1.14 @STRING Declare String Command


◼ Description:
Declares the variables of string text, and can be subsequently used for string expression, classification
application, or combined conversion of multiple strings.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.5 or above Caterpillar1.0.4 or above CONT(pre-read)

◼ Command Format:
STRING [string name] = " [Content of string text] "

Format/Parameter Description:
 [String name] is the self-defined string name by the user.
 [Content of string text] is the self-defined string text by the user, for example: abc1, which is the
self-defined text content; please pay special attention that the double quote「"」symbol shall be
added before and after the content of string. (If the copy manual text is used, some part
generates the error format. It is recommended to re-modify the double quote「"」, so that the
execution error will not be caused).

◼ Example:
STRING first_word = "Wang"
STRING second_word = "ming"
STRING Name
Name = first_word + second_word

◼ Example Description:
Declare string variable first_word, the content text of string variable is "Wang".
Declare string variable second_word, the content text of string variable is "ming".
Declare string variable Name, the content text of string variable for Name is the combination of
first_word string plus the content text of second_word string. The result is "Wangming".

◼ Related Commands:
STRCMP、STRPOS、STRCPY、STRLEN、INTTOSTR、REALTOSTR、STRTOINT、STRTOREAL.

62
C25UE901-2208

2.1.15 ARRAY Declare Array Command


◼ Description:
Array is a set of continuous variables with the same type. It is required to declare the array type, array
name and array size in advance. Under the same array name, through an index value (Index), to specify
which number of variable to be used, and correspond to the relative stored variable value; this Command
only has the declaration format and application format, and there is no fixed Command string name
(therefore, the title does not add ).
It can be divided into the one-dimensional array and multi-dimensional array (more than 2 dimensions).
The one-dimensional (or single-dimensional) array is a type of linear array, for example: INT K[4], which
means that the K array has 4 integer variable values, which are K[ 1], K[2], K[3] and K[4] respectively, please
refer to Figure. 5; the multi-dimensional arrays can be used for numerical calculation or graphics
applications on the plane or space, for example: INT F[2][3] , which means that the two-dimensional F array
is 6 (2*3) integer variable values, which are F[1][1], F[1][2], F[1][3], F[2][1] , F[2][2] and F[2][3] respectively,
please refer to Figure. 6, for more flexible double-row calculation applications.

K[4] Array 11 12 13 14

K[1] K[2] K[3] K[4]

Figure. 5 Schematic Diagram of One-dimensional K Array (save variable values 11~14)

F[1,1] F[1,2] F[1,3]

21 22 23
F[2,3] Array 24 25 26

F[2,1] F[2,2] F[2,3]

Figure. 6 Schematic Diagram of two-dimensional F Array (save variable values 21~26)


◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.10 or above Caterpillar1.0.8 or above CONT(pre-read)

63
C25UE901-2208

◼ Command Format:
Format (1) one-dimensional array
[Variable type] [array name] [ [index value quantity ] ]
Array name [ [index value] ] = [self-defined variable name] or [self-defined setting value]

Format (2) multi-dimensional array


[Variable type] [array name] [ [index value quantity 1 ], [index value quantity 2 ],… ]
Array name [index value 1], [index value 2], … ] = [self-defined variable name] or
[self-defined setting value]
Note: [ ] is the essential symbol for array name.

Format/Parameter Description:
 [Variable type] TYPE is to use the type specification of array variable, supports the use array of
variable type i.e. INT、REAL、CHAR、E6POS、E6POINT、E6AXIS etc.
 [Array name] NAME is the self-defined array name by the user, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」.
 [Self-defined variable name] is the self-defined array name, it can be English alphabets or English
alphabets + numbers, but the numbers cannot be the start of heading character, and shall not use
「-」.
 [Self-defined setting value] which is Arabic numerals, the range is -2147483648 (-
231)~2147483647.
 [Index value quantity], [index value quantity 1], [index value quantity 2] Index Quantity is the
quantity of index value, which means the variable quantity declared by array, it may fill
with Arabic numerals or [self-defined variable name], the Arabic numerals shall not be 0.
 [Index value], [index value 1], [index value 2] Index is the index value corresponded by array, it
may fill with Arabic numerals or [self-defined variable name], the Arabic numerals shall not be 0.
 Array can be used similar as variable, it ought to be used as the assigned value (the array is placed
to the left of equal sign) and selected value (the array is placed to the right of equal sign).
 The entire array can be passed into the subroutine or sub-function through the argument passing
mode, but the entire array cannot be returned through the function RETURN.mode.

64
C25UE901-2208

◼ Example-1: (One-dimensional example, self-defined setting value)


REAL K [5]
K[1] = 9.8

◼ Example-1 Description:
Declare the array variable value of floating-point type, the array name K has 5 index values, and the
variable value of the first index value for K array is 9.8.

◼ Example-2: (One-dimensional example, self-defined variable name)


INT K [5],U1,W1
U1 = 1
W1 = 9
K[U1] = W1

◼ Example-2 Description:
Declare the array variable value of integer type, the array name K has 5 ndex values, and declare the
integer type variables of U1, W1. The initial value of variable U1 is 1, the initial value of variable W1 is
9, and the variable value of the U1th index value for the K array is W1. Result: The variable value of the
1st index value for the K array is 9.

◼ Example-3: (Two-dimensional example)


REAL F[3,4]
F[1,1] =10.1
$C[3] = F[1,1] *10

◼ Example-3 Description:
Declare the variable value of two-dimensional array for the floating point type, the array name F is 3
rows and 4 lines, total has 12 index values.
The index value for the 1st row 1st line of F array is 10.1.
The 3rd count register displays the value of the 1st row 1st line of F array multiplied by 10.
The result of the 3rd count register: 101 (10.1*10).

◼ Related Commands:
INT、REAL、CHAR、E6POS、E6POINT、E6AXIS
.

65
C25UE901-2208

2.1.16 @UINT Declare Unsigned (Positive) integer variable Command


◼ Description:
The Command name of self-defined variable. The saved type with unsigned integer mode. The 32-bit
unsigned integer can only indicate non-negative values, that is, 0 and positive numbers. Declare the saved
setting values with the self-defined name for the need of subsequent programs. It may also be the
hexadecimal value (for example: the hexadecimal 0X10 converts to decimal as 16). After the program is
closed or power outage, the variable value will not be saved. This Command is often used in other
equipment for communication calculation.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.12 or above Caterpillar1.0.10 or above CONT(pre-read)

◼ Command Format:
Format (1):
UINT [Self-defined variable name 1]
[Self-defined variable name 1] = [Self-defined set initial value or register value]
Format (2):
UINT [Self-defined variable name 1] = [Self-defined set initial value or register value]
Format (3):
UINT [Self-defined variable name 1], [Self-defined variable 2],…
[Self-defined variable name 1] = [Self-defined set initial value or register value]
[Self-defined variable name 2] = [Self-defined set initial value or register value]

Format/Parameter Description:
 [Self-defined variable name 1]、[Self-defined variable name 2] is the self-defined variable name
it can be English alphabets or English alphabets + numbers, but the numbers cannot be the start
of heading character, and shall not use「-」
 [Self-defined set initial value or register value] is the unsigned (positive) integer value, the value
(decimal) range:
0 ~ 4294967295 (232-1), if it is a negative value, the program will determine as the error message,
and the value in the register will be unconditionally rounded down after the decimal point. (The
register may use the count register and timing register). Note: The range value (decimal) of timing
and count registers are in the range: - 2147483648(-231) ~ 2147483647(231-1), unable to display
all values in UINT, the users require to convert by themselves.
 The self-defined Array can also be declared as the hexadecimal indication, for example: UINT
DATA[3].
 After the program is closed, the value defined by the variable disappears accordingly. If the
special value is required to hold, please use the $C[] count register.

66
C25UE901-2208

◼ Example-1:
UINT G1
G1 = 10
$C[2] = G1

◼ Example-1 Description:
Declare the UINT unsigned (positive) integer variable G1, and define the initial value of G1 as 10 in the
next line, and then define the value of the second count register ($C[2]) as the value of G1 variable in
the next line, the result is 10.

◼ Example-2:
UINT G2 = 10

◼ Example-2 Description:
Declare the UINT unsigned (positive) integer variable G2, and define the initial value of G2 as 10.

◼ Example-3 :
UINT G3,H3,F3
G3 = 10
H3 = 5
F3 = G3 + H3

◼ Example-3 Description:
Declare UINT unsigned (positive) integer variables G3, H3, F3, and define the initial value of G3 as 10,
the initial value of H3 as 5.
F3 is the value of G3 plus H3, and the result of F3 is 15.

67
C25UE901-2208

◼ Example-4 : (Hexadecimal)
UINT DATA = 0x10
$C[1] = DATA
$C[2] = DATA + 0x10
$C[3] = DATA - 0x10
$C[4] = DATA * 0x10
$C[5] = DATA / 0x10

◼ Example-4 Description:
Declare UINT unsigned (positive) integer variable DATA.
Display the value in the DATA variable with the 1st count register, the result is 16 (decimal).
Display the value in the DATA variable with the 2nd count register, plus 0x10 value, the result is 32
(decimal).
Display the value in the DATA variable with the 3rd count register, subtract 0x10 value, the result is 0
(decimal).
Display the value in the DATA variable with the 4th count register, mutiply by 0x10 value, the result is
256 (decimal).
Display the value in the DATA variable with the 5th count register, divides by 0x10 value, the result is 1
(decimal).
Note: The range value (decimal) of timing and count registers are in the range: - 2147483648(231) ~
2147483647(231-1)。

◼ Related Commands:
INT、REAL、$C[]、$T[]

68
C25UE901-2208

2.2 CODE B, MOTION COMMAND


This chapter describes the move mode Commands of code B respectively.
2.2.1 @PTP Point-to-point Move Command
◼ Description:
The current position is the initial point. After specifying the next point, it moves with the absolute
position mode of point-to-point. The motors of each axis calculate the rotation angle by themselves, start
at the same time and arrive at the same time. The path is not a straight line. This method does not
generate the singularity.

End Initial
Point Point
PTP
Figure. 7 PTP Path Schematic Diagram (green solid line path)

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
PTP [point position name] [track form ] [velocity] [acceleration] [tool coordinate] [base coordinate]
PTP [ P# ] [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]

Format/Parameter Description:
 # is the number which is filled by the user.
 [Point position name] is the point name which will move to, cooperate with the point position window
acting as the teaching point position P1~P9999, get the next point position desired to reach, or self-
define the point position in accordance with the naming mode of user cooperative Command E6POINT,
or directly give the angle and position values of each axis.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
◼ FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
69
C25UE901-2208

◼ FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
◼ FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
 CONT, CONT = #%, CONT = #mm, FINE = #, omit such as the track form parameter etc., please select
one to use.
 [Velocity] Vel is the single-line velocity parameter, fill the parameter Vel=1~100%, this parameter may
be omitted, the omitted velocity will refer to the previous Command line, or the initial defined
parameter.
 [Acceleration] Acc is the single-line velocity parameter, fill the parameter Acc=1~100%, the larger the
number, the faster the acceleration, this parameter may be omitted, the omitted acceleration will
refer to the previous Command line, or the initial defined parameter.
 [Tool coordinate] TOOL[#] is the tool coordinate parameter, the different position control of end tool
can be set, the input range is 0 to 15 for #, this parameter may be omitted, the omitted tool
coordinate will refer to the previous Command line, or the initial defined parameter.
 [Base coordinate] BASE[#] is the base coordinate parameter, it can be set to have the base number
proceeding the conveyor correction, the input range for # is of 0 to 31, this parameter may be omitted,
the omitted base coordinate will refer to the previous Command line, or the initial defined parameter.
 At least require to write PTP + [point position name], Vel, Acc, TOOL and BASE parameters may ignore
for input.

◼ Example-1:
PTP P0 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-1 Description:
Move to the next point position P0 with the point-to-point mode, move with 100% continuous track
mode, velocity 100%, acceleration 50%, the tool coordinate of set 0, the base coordinate of set 0.

◼ Example-2:
E6POS POINT = {X 0,Y 300,Z 200}
PTP POINT CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-2 Description:
Use E6POS to declare the POINT point position as X-axis 0mm, Y-axis 300mm, Z-axis 200mm, move to
the next point position POINT with the point-to-point mode, move with 100% continuous track mode,
velocity 100%, acceleration 50%, the tool coordinate of set 0, apply the base coordinate of set 0.

70
C25UE901-2208

◼ Example-3:
PTP {X 100} FINE=1 Vel=100% Acc=50% TOOL[1] BASE[1]

◼ Example-3 Description:
Move to the absolute position X-axis 100mm with point-to-point mode, no pre-reading, no in-place
check, velocity 100%, acceleration 50%, the tool coordinate of 1st set, apply the base coordinate of the
1st set.

◼ Example-4:
PTP {A1 45} FINE=2 Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-4 Description:
Move to the next point with the point-to-point mode, increase 45 º for the 1st axis (A1-axis),no pre-
reading, the in-place check will be performed, move the continuous track with 100% mode,
acceleration 50%, the tool coordinate of set 0, apply the base coordinate of set 0.

◼ Related Commands:
E6POINT、E6POS、E6AXISPTP、PTP_REL、LIN、LIN_REL、CIRC、CIRC_REL.

71
C25UE901-2208

2.2.2 @PTP_REL Point-to-point Move Command with Relative Position Mode


◼ Description:
The robotic arm moves to the position of relative increment value along the point-to-point path.
For example: Instruct the initial point P0 of the robotic arm moving toward to the target point P1
direction of A1-axis 10ºfor then point-to-point motion.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
PTP_REL{ [increment parameter of each axis] } [track form ] [velocity] [acceleration] [tool
coordinate] [base coordinate]
PTP_REL{ [A1 num, A2 num,…]} [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]
※The increment parameter content of each axis: {A1 num, A2 num, A3 num, A4 num, A5 num, A6 num},
num indicate the values, fill by the users themselves, the unit is degree, LU series have no A5 and A6-axis.

Format/Parameter Description:
 # is the number which is filled by the user.
 [Increment parameter of each axis] is the value of increment parameter, it may choose to fill with the
angle value of each axis (A1~A6), the unit is degree, LU series have no A5 and A6-axis.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
◼ FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
◼ FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
◼ FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
◼ CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1~100%, the larger the
number, the faster the velocity.
 [Acceleration] Acc is the single-line acceleration parameter, # fill the parameter Acc=1~100%, the
larger the number, the faster the acceleration.
 [Tool coordinate] TOOL[#] is the tool coordinate parameter, the different end tool can be set, the input
range is 0 to 15 for #.
 [Base coordinate] BASE[#] BASE is the base coordinate parameter, the different base number can be
set, the input range is 0 to 31 for #.
 Vel, Acc, TOOL and BASE may omit for input. The Command value or initial defined parameter of
previous line will be referred when omit.

72
C25UE901-2208

◼ Example-1:
PTP_REL {A2 30} CONT=100% Vel=30% Acc=100% TOOL[0] BASE[0]

◼ Example-1 Description:
The robotic arm uses the point-to-point motion mode to relatively increase the A2-axis for 30º
movement. The smooth track setting value 100%, velocity 30%, acceleration 100%, the tool coordinate
of set 0, the base coordinate of set 0.

◼ Example-2:
PTP_REL {A3 -15, A4 5} FINE=2 Vel=100% Acc=50% TOOL[4] BASE[8]

◼ Example-2 Description:
The robotic arm uses the point-to-point motion mode to move toward to A3-axis with relatively
reduction of 15º, and move the A4- axis with relatively increment of 5º. Use the non-continuous
smooth track, velocity 100%, acceleration 50%, the tool coordinate of 4th set, the base coordinate of
the 8th set.

◼ Related Commands:
E6POINT、E6POS、E6AXISPTP、PTP、LIN、LIN_REL、CIRC、CIRC_REL.

73
C25UE901-2208

2.2.3 @LIN Linear Move Command


◼ Description:
The robotic arm moves from the current position to the target point along the linear path, and moves
with the absolute position mode. When it is moving, the end posture remains unchanged, showing a linear
motion.
For example: Instruct the robotic arm moving straight from the initial point P0 to the target point P1,
and the path is the linear mode.

Initial Point Target


P0 Point P1
Figure. 8 LIN Move Schematic Diagram

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
LIN [point position name] [track form ] [velocity] [acceleration] [tool coordinate] [base coordinate]
LIN [ P# ] [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]

Format/Parameter Description:
 # is the number which is filled by the user.
 [Point position name] is the target point parameter, the point position (P1~P9999), the self-defined
point (E6POINT, E6POS), the angle value of each axis (A1~A6) and the coordinate position value
(XYZABC) can be selected and filled. The LU series does not have A5, A6, A and B-axes.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
1) FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
2) FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
3) FINE = 2, will not pre-read the continuous Command, will execute the in-place check.

74
C25UE901-2208

4) CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1mm/s~2000mm/s, the
larger the number, the faster the velocity. (SCARA-LU series Vel=1~4000 mm/s)
 [Acceleration] Acc is the single-line acceleration parameter, # fill the parameter Acc=1~100%, the
larger the number, the faster the acceleration.
 [Tool coordinate] TOOL[#] is the tool coordinate parameter, the different end tool can be set, the input
range is 0 to 15 for #.
 [Base coordinate] BASE[#] BASE is the base coordinate parameter, the different base number can be
set, the input range is 0 to 31 for #.
 Vel, Acc, TOOL and BASE may omit for input. The Command value or initial defined parameter of
previous line will be referred when omit.

◼ Example-1:
LIN P5 CONT=100% Vel=3000mm/s Acc=100% TOOL[0] BASE[0]

◼ Example-1 Description:
The robotic arm uses the linear motion mode moving toward to the target point P5. The smooth track
setting value 100%, velocity 3000 mm/s, acceleration 100%, the tool coordinate of set 0th, the base
coordinate of set 0th.

◼ Example 2
LIN {X -100} CONT=80% Vel=2500mm/s Acc=100% TOOL[0] BASE[0]

◼ Example-2 Description:
The robotic arm uses the linear motion mode moving to the position of X -100. The smooth track
setting value 80%, velocity 2500 mm/s, acceleration 100%, the tool coordinate of set 0th, the base
coordinate of set 0th.

◼ Example 3
E6POINT AAA = {X 100, Y 90}
LIN AAA CONT=100% Vel=2000mm/s Acc=75% TOOL[1] BASE[1]

◼ Example-3 Description:
The robotic arm uses the linear motion mode moving to the position of self-defined point position X
100mm, Y 90m. The smooth track setting value 100%, velocity 2000 mm/s, acceleration 75%, the tool
coordinate of 1st set, the base coordinate of 1st set.

◼ Related Commands:
E6POINT、E6POS、E6AXISPTP、PTP_REL、LIN_REL、CIRC、CIRC_REL.

75
C25UE901-2208

2.2.4 @LIN_REL Linear Move Command with Relative Position Mode


◼ Description:
The robotic arm moves to the position of relative increment along the linear path. When it is moving,
the end posture remains unchanged.
For example: Instruct the robotic arm moving toward to the target point P1 direction of X +100mm
with the linear move.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
LIN_REL{ [increment parameter of each axis] } [track form ] [velocity] [acceleration] [tool
coordinate] [base coordinate]
LIN_REL{ [X num, Y num,…]} [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]

※The increment parameter content of each axis: {X num, Y num, Z num, A num, B num, C num},num
indicate the values, fill by the users themselves, the unit is degree, LU series have no AB-axis.

Format/Parameter Description:
 # is the number which is filled by the user.
 [Increment parameter of each axis] is the value of increment parameter, it may choose to fill with the
coordinate position value of each axis (XYZABC), LU series have no AB-axis.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
1) FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
2) FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
3) FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
4) CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1mm/s~2000mm/s, the
larger the number, the faster the velocity. (SCARA-LU series Vel=1~4000 mm/s)
 [Acceleration] Acc is the single-line acceleration parameter, # fill the parameter Acc=1~100%, the
larger the number, the faster the acceleration.
 [Tool coordinate] TOOL[#] is the tool coordinate parameter, the different end tool can be set, the input
range is 0 to 15 for #.
 [Base coordinate] BASE[#] BASE is the base coordinate parameter, the different base number can be
set, the input range is 0 to 31 for #.

76
C25UE901-2208

 Vel, Acc, TOOL and BASE may omit for input. The Command value or initial defined parameter of
previous line will be referred when omit.

◼ Example-1:
LIN_REL {X -50} CONT=100% Vel=3000mm/s Acc=100% TOOL[0] BASE[0]

◼ Example-1 Description:
The robotic arm uses the linear motion mode moving toward to the direction of X-50. The smooth
track setting value 100%, velocity 3000 mm/s, acceleration 100%, the tool coordinate of set 0th, the
base coordinate of set 0th.

◼ Example-2:
LIN_REL {X 45, Z 15} FINE=2 Vel=1000mm/s Acc=50% TOOL[4] BASE[8]

◼ Example-2 Description:
The robotic arm uses the linear move mode moving toward to the position of X-axis +45º, Z-axis+15º.
Use the non-continuous smooth track, velocity 1000 mm/s, acceleration 50%, the tool coordinate of 4th
set, the base coordinate of 8th set.

◼ Related Commands:
E6POINT、E6POS、E6AXISPTP、PTP_REL、LIN、CIRC、CIRC_REL.

77
C25UE901-2208

2.2.5 @LIN_REL_TOOL Linear Move Command with Relative Position Mode


Reference to Tool Coordinate
◼ Description:
The linear move Command with the reference tool coordinate relative position mode is the Command
to make the reference tool coordinate system performing the relative move.
For example: Move along with the direction of X +100mm doing the linear move according to the tool
coordinate system.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)
 Only able to move against one axis at a time.

◼ Command Format:
LIN_REL_TOOL { [increment parameter of each axis] } [track form ] [velocity] [acceleration] [tool
coordinate] [base coordinate]
LIN_REL_TOOL { [X num, Y num,…]} [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]

※ The increment parameter content of each axis: {X num, Y num, Z num, A num, B num, C num}, num
indicate the values, fill by the users themselves, LU series have no AB-axis.

Format/Parameter Description:
 # is the number which is filled by the user.
 [Increment parameter of each axis] is the value of increment parameter, it may choose to fill with the
coordinate position value of each axis (XYZABC). LU series have no AB-axis.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
1) FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
2) FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
3) FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
4) CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1mm/s~2000mm/s, the
larger the number, the faster the velocity. (SCARA-LU series Vel=1~4000 mm/s)
 [Acceleration] Acc is the single-line acceleration parameter, # fill the parameter Acc=1~100%, the
larger the number, the faster the acceleration.
 [Tool coordinate] TOOL[#] is the tool coordinate parameter, the different end tool can be set, the input
range is 0 to 15 for #.

78
C25UE901-2208

 [Base coordinate] BASE[#] BASE is the base coordinate parameter, the different base number can be
set, the input range is 0 to 31 for #.
 Vel, Acc, TOOL and BASE may omit for input. The Command value or initial defined parameter of
previous line will be referred when omit. Only able to move against one axis at a time.

◼ Example-1:
LIN_REL_TOOL {X -50} CONT=100% Vel=2000mm/s Acc=100% TOOL[0] BASE[0]

◼ Example-1 Description:
The tool coordinate system of robotic arm uses the linear motion mode moving toward to the direction
of X-50. The smooth track setting value 100%, velocity 2000 mm/s, acceleration 100%, the tool
coordinate of set 0th, the base coordinate of set 0th.

◼ Example-2:
LIN_REL_TOOL {A3 45} FINE=2 Vel=1000mm/s Acc=50% TOOL[4] BASE[8]

◼ Example-2 Description:
The tool coordinate system of robotic arm uses the linear motion mode moving toward to the
position of A3-axis +45º. Use the non-continuous smooth track, velocity 1000 mm/s, acceleration
50%, the tool coordinate of 4th set, the base coordinate of 8th set.

◼ Related Commands:
E6POINT、E6POS、E6AXISPTP、PTP、PTP_REL、LIN、LIN_REL、CIRC、CIRC_REL.

79
C25UE901-2208

2.2.6 @CIRC Circular Arc Move Command


◼ Description:
Use the move Command with circular arc mode, take the circular arc path based on the current
position and the two points under the Command, and use 3 points to form a circular arc path, and then the
current arm position + transition point + end point compose of a circular arc.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

Transition Point [Point


Starting Point Position Name 1]
TCP Position

End Point [Point


Position Name 2]

Figure. 9 Point Position Schematic Diagram of Circular Arc Command

◼ Command Format:
CIRC [Point position name 1] [Point position name 2] [track form ] [velocity] [acceleration] [tool
coordinate] [base coordinate]
CIRC [P# ] [P# ] [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]

Format/Parameter Description:
 # is the number which is filled by the user.
 [Point position name 1], [point position name 2] are the point names, cooperate with the point
position window acting as the teaching point position P1~P9999, get the next point position desired to
reach, or self-define the point position in accordance with the naming mode of user cooperative
Command E6POINT, or directly give the angle and position values of each axis.
 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
1) FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
2) FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
3) FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
4) CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.

80
C25UE901-2208

 CONT, CONT = #%, CONT = #mm, FINE = #, omit such as the track form parameter etc., please select
one to use.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1~2000mm/s, this
parameter may be omitted, the omitted velocity will refer to the previous Command line, or the initial
defined parameter. (SCARA-LU series Vel=1~4000 mm/s).
 [Acceleration] Acc is the single-line velocity parameter, # fill the parameter Acc=1~100%, the larger the
number, the faster the acceleration, this parameter may be omitted, the omitted acceleration will
refer to the previous Command line, or the initial defined parameter.
 [Tool coordinate] is the tool coordinate parameter, the different position control of end tool can be set,
shows as TOOL[#], the input range is 0 to 15 for #, this parameter may be omitted, the omitted tool
coordinate will refer to the previous Command line, or the initial defined parameter.
 [Base coordinate] BASE is the base coordinate parameter, it can be set to have the base number
proceeding the conveyor correction, shows as BASE[#], the input range for n is of 0 to 31, this
parameter may be omitted, the omitted base coordinate will refer to the previous Command line, or
the initial defined parameter.
 At least require to write CIRC + [point position name 1], [point position name 2], Vel, Acc, TOOL and
BASE parameters may ignore for input.

◼ Example-1:
CIRC P0 P1 CONT=100% Vel=2000mm/s Acc=100% TOOL[0] BASE[0]

P0 Transition
Starting Point Point
TCP Position

P1 End Point
Figure 1 Point Position Schematic Diagram of Circular Arc Command

◼ Example-1 Description:
The current position TCP uses the circular arc mode to pass through P0 to P1, and apply the continuous
track 100% mode to move, apply speed 2000mm/s, apply acceleration 100%, apply the 0th tool
coordinate, apply the 0th base coordinate.

81
C25UE901-2208

◼ Example-2:
E6POS POINTA = {X 20,Y 400,Z 800}
E6POS POINTB = {X 10,Y 200,Z 400}
CIRC POINTA POINTB CONT=100% Vel=2000mm/s Acc=100% TOOL[0] BASE[0]

◼ Example-2 Description:
Use E6POS to declare that the POINTA point position is X-axis 20mm, Y-axis 400mm, Z-axis 800mm
position, POINTB point position is X-axis 10mm, Y-axis 200mm, Z-axis 400mm position, the current
position TCP uses the circular arc mode to pass through POINTA and end at POINTB, apply the
continuous track 100% mode to move, apply speed 2000mm/s, apply acceleration 100%, apply the 0th
tool coordinate, apply the 0th base coordinate.

◼ Related Commands:
E6POINT、E6POS、E6AXIS、PTP、PTP_REL、LIN、LIN_REL、CIRC_REL.

82
C25UE901-2208

2.2.7 @CIRC_REL Circular Arc Move Command with Relative Position Mode
◼ Description:
The robotic arm moves to the position of relative increment value along the arc path, when it is
moving, the end remains unchanged, which is similar to the CIRC Command, but the transition point and
the end point are provided with the relative positions.
For example: take the original coordinates as the starting point, move to the transition point and then
arrive at the destination point

Relative
Starting Transition
Relative
Point Point
End Point

Figure. 10 Relative Position CIRC_REL Schematic Diagram

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
CIRC_REL { [Transition increment parameter 1] } { [end point increment parameter 2 ] } [track form ]
[velocity] [acceleration] [tool coordinate] [base coordinate]

CIRC_REL { [X num, Y num,… ] } { [X num, Y num,… ] } [FINE=#/CONT=#] [Vel=#] [Acc =#] [TOOL[#] ] [BASE[#] ]
※The increment parameter content of each axis: {X num, Y num, Z num, A num, B num, C num}, num
indicate the values, fill by the users themselves, LU series have no AB-axis.

Format/Parameter Description:
 # is the number which is filled by the user.
 [Transition increment parameter 1], [end point increment parameter 2] are the point position
information data of the transition point and the end point, through the relative value of 3 points to
form an arc line, and [transition point increment parameter 1] is the relative position of starting point
to via point. [End point increment parameter 2] is the relative position of via point to end point, the
information of each axis for the transition point and end point can be filled with X, Y, Z, A, B and C etc.
information , if it is not filled, then it will refer to the previous point or the desired setting value. The
unit is mm or Deg.

83
C25UE901-2208

 [Track form] is the continuous CONT type or non-continuous FINE type, fill in the parameters CONT
and FINE; and the percentage (1%~100%) behind the continuous track form is the degree of
smoothness to determine the continuous parameter; the non-continuous type FINE is divided into 3
levels:
1) FINE (=0), will pre-read the continuous Command, will not execute the in-place check.
2) FINE = 1, will not pre-read the continuous Command, will not execute the in-place check.
3) FINE = 2, will not pre-read the continuous Command, will execute the in-place check.
4) CONT (=100%), the degree of smoothness can be determined by percentage (%) or corner radius
length (mm). For example: CONT=10%, CONT=3mm.
 CONT, CONT = #%, CONT = #mm, FINE = #, omit such as the track form parameter etc., please select
one to use.
 [Velocity] Vel is the single-line velocity parameter, # fill the parameter Vel=1~2000mm/s, this
parameter may be omitted, the omitted velocity will refer to the previous Command line, or the initial
defined parameter. (SCARA-LU series Vel=1~4000 mm/s).
 [Acceleration] Acc is the single-line velocity parameter, # fill the parameter Acc=1~100%, the larger the
number, the faster the acceleration, this parameter may be omitted, the omitted acceleration will
refer to the previous Command line, or the initial defined parameter.
 [Tool coordinate] is the tool coordinate parameter, the different position control of end tool can be set,
shows as TOOL[#], the input range is 0 to 15 for #, this parameter may be omitted, the omitted tool
coordinate will refer to the previous Command line, or the initial defined parameter.
 [Base coordinate] BASE is the base coordinate parameter, it can be set to have the base number
proceeding the conveyor correction, shows as BASE[#], the input range for n is of 0 to 31, this
parameter may be omitted, the omitted base coordinate will refer to the previous Command line, or
the initial defined parameter.
 At least require to write CIRC_REL + { [transition increment parameter1] }、{ [end increment parameter
2] }, Vel, Acc, TOOL and BASE parameters may ignore for input.

◼ Example-1:
CIRC_REL {X -150, Y 150} {X -150, Y -150} CONT=100% Vel=2000mm/s Acc=50% TOOL[0] BASE[0]

◼ Example-1 Description:
The current position of the robot is the starting point, move relatively to the auxiliary point {X -150, Y
150} and then arrive at the destination point {X -150, Y 150}, and draw an arc through the above stated
3 points, the setting value of smoothness track 100%, speed 2000mm/s, acceleration 100%, the 0th tool
coordinate, the 0th base coordinate.
{X -150, Y 150} is the relative position from the start point to the via point, {X -150, Y 150} is the relative
position from the via point to the end point.

84
C25UE901-2208

◼ Example-2:
CIRC_REL {A1 5.0, A2 5.0, A3 5.0, A4 5.0} {A1 10.0, A2 10.0, A3 10.0, A4 10.0} CONT=100%
Vel=2000mm/s Acc=50% TOOL[0] BASE[0]

◼ Example-2 Description:
The current position of the robot is the starting point, move relatively to the auxiliary point {A1 5.0, A2
5.0, A3 5.0, A4 5.0} and then arrive at the destination point {A1 10.0, A2 10.0, A3 10.0, A4 10.0, and
draw an arc through the above stated 3 points, the setting value of smoothness track 100%, speed
2000mm/s, acceleration 100%, the 0th tool coordinate, the 0th base coordinate.
{A1 5.0, A2 5.0, A3 5.0, A4 5.0} is the relative position from the start point to via-point, A1 10.0, A2 10.0,
A3 10.0, A4 10.0} is the relative position from the via-point to end point.

◼ Related Commands:
CIRC、PTP、PTP_REL、LIN、LIN_REL.

85
C25UE901-2208

2.2.8 @SPLINE Point & Point Fit Spline Command


◼ Description:
Fit the point information of more than one point into the same strip line, in which, use the B-Spline
curve motion mode for fitting. For example, there is a multi-point adhesive dispensing track to be fitted as
one curve track, then it can use this Command for combination.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
SPLINE
SPL [point position name 1]
SPL [point position name 2]
SPL [point position name 3]

ENDSPLINE

Format/Parameter Description:
 SPLINE is the beginning of the fitting point position; ENDSPLINE is the end of the fitting point
position. SPL + [point position name] determines the combination order of point position, and fit
up to 200 point positions at most.
 [Point position name] is the point position name of each point position, and the name has the
point information (X, Y, Z, A, B, C; LU series have no AB information).

86
C25UE901-2208

◼ Example: (Take RA605-710 arm as the example)


E6POINT P1 ={ X 0 , Y 368 , Z 293.5 }
E6POINT P2 ={ X 145 , Y 358 , Z 293.5 }
E6POINT P3 ={ X 185 , Y 420 , Z 255 }

PTP P0 CONT Vel=100% Acc=100% TOOL[0] BASE[0]


SPLINE
SPL P1
SPL P2
SPL P3
ENDSPLINE
◼ Example Description:
Use the point position variable to declare P1、P2、P3 point position information.
After moving to the P0 position with the point-to-point mode, start to execute the SPLINE fitting line
work at P1, P2, and P3 points and perform the fitting line motion.

◼ Related Commands:
E6POINT、E6POS、E6AXIS

87
C25UE901-2208

2.2.9 @STOP_MOTION Trigger to Stop Previous Motion According to Signal


◼ Description:
This Command is used to stop the action in the previous line of motion Command after triggered by
the signal. When the specified $DI, $SI or $MI are triggered for turn-on (ON), it will stop the current motion
and slowly move backwards in the opposite direction at the speed of 1mm/s, until the specified $DI, $SI or
$MI are triggered for close (OFF), then the action of the previous line will be stopped subsequently, and
proceed to the next point for executing the Command. It can go with the sensor used to measure the
height, similar to stop and clear the Command application of braking Command (BRAKE), for example:
when the stack height is unknown while stacking sheet metal workpieces, then this Command can be used
to detect the height of the first sheet to be taken.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT(pre-read)

◼ Command Format:
[Action Instruction 1]
STOP_MOTION [Input signal Command]
[Action Instruction 2]

Format/Parameter Description:
 [Action Instruction] is the combination of logic program, move Command or signal Command for
executing the statement action of program.
 [Input signal Command] is the Command format of input signal control, for example: $DI[] digital
signal input, $SI[] fieldbus input signal or $MI[] combined input signal, when the input signal is
triggered for turn-on (ON), it will stop the current motion, and slowly move backwards in the
opposite direction at the speed of 1mm/s, until the specified input signal is triggered for close
(OFF).

88
C25UE901-2208

◼ Example:
E6POINT OBJ_Position
LIN P0 CONT Vel=200mm/s Acc=100% TOOL[0] BASE[0]
STOP_MOTION $DI[1]
WAIT SEC 0.1
OBJ_Position = GETPOINT
◼ Example Description:
Description: A sensor is mounted at the end of the robot, the sensor signal receives the $DI[1] signal,
and measure the object height toward the direction of P0 point position. After the sensor signal is
triggered, it will take the backward action until the sensor signal is turned off. , record the current
position.
Declare the point position variable OBJ_Position, and move the linear motion slowly to the P0 point
position. When the end sensor is triggered to turn on during the move, it immediately stops the action
of moving forward in the direction of the P0 point position, after stopping, reverse the action of P0
point direction until the signal of end sensor is turned off, i.e. wait for 0.1 seconds, and record the
current position into the OBJ_Position point position variable.

◼ Related Commands:
E6POINT、GETPOINT
.

89
C25UE901-2208

2.2.10 @BRAKE Stop & Clear Command in Brake


◼ Description:
Stop and clear the motion Command, includes the Command in the motion raw and must go with the
previous move Command using the continuous track (CONT). Usually, it goes with IF - if judgmental as the
trigger of stop condition.
Examples of applicable case: If the arm is applied to test the Z-axis plane distance, the end position
moves slowly from top to bottom. If the trigger condition is established due to the infrared sensor installed
at the end of the arm, it means that the arm has detected the position of Z-axis plane, the arm will execute
the jump out of the current detection action. Follow-up with the development of interrupt Commands
(INTERRUPT).

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Action Instruction]
IF [conditional] THEN
BRAKE
ENDIF
Note: BRAKE does not necessarily require to go with the IF loop judgmental, the other loop judgmental
may be used, such as: WHILE, LOOP.

Format/Parameter Description:
 [Action Instruction] is the combination of logic program, move Command or signal Command
for executing the statement action of program.
 [Conditional] is to set conditions for the user, for example: setting of variable condition,
setting of signal condition, it may be the condition judgmental such as the logic operators etc.
shown as follows.
Operator Name Syntax Operator Name Syntax
Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to
Greater than A>B Logic negation !A

Greater than or
A >= B
equal to

90
C25UE901-2208

 IF … THEN is the judgmental, which determines if the condition is established.


 When [conditional] is established, while execute up to BRAKE, the motion is stopped, and
along with the jump out.
 Require to go with the previous to us the continuous track (CONT).
 The exterior normally goes with the loop Command, for example: LOOP、WHILE…etc., when
execute up to BRAKE, it will go with EXIT and jump out the external loop Command.

◼ Example:
LOOP
PTP P0 FINE=1 Vel=80% Acc=100% TOOL[0] BASE[0]
PTP P1 CONT Vel=80% Acc=100% TOOL[0] BASE[0]
IF $DI[1]==1 THEN
BRAKE
EXIT
ENDIF
WAIT SEC 0.1
ENDLOOP
PTP P2 FINE=1 Vel=80% Acc=100% TOOL[0] BASE[0]

◼ Example Description:
When the signal of DI[1] is not triggered, the robotic arm moves back and forth between P0 and P1
points, If the signal of DI[1] is triggered, the arm will stop to move after moving from P0 to P1, jump
out from the loop and move to P2 point.

◼ Related Commands:
IF、LOOP、WHILE 、INTERRUPT … WHEN … DO…、INTERRUPT ON/OFF.

91
C25UE901-2208

2.2.11 @CHECK_LIN Linear Path Singularity Check Command


◼ Description:
It is used to check in advance if the singularity state occurs between two points, so as to avoid the
situation of moving to the singularity in the middle and stop the machine, this allows that the user is able
to confirm in advance through the software, instead of waiting until the real machine test to occur the
point problem, in order to reduce the time spent on the verification. The Command is only used for pre-
check to perform the software verification. The actual test will still be required to assure no occurrence of
singularity.
In addition to the motion Command of PTP point-to-point (the forward robot kinematics calculation
mode) during the motion of robotic arm, the LIN linear motion Command may move to the singular
position, and the robotic arm will alarm and stop running at this time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 This Command is only used for RA and RT six-axis series which is not applicable for RS SCARA
series.

◼ Command Format:
[Self-defined variable name] =CHECK_LIN ([initial point position name], [end point position name])

Format/Parameter Description:
 [Self-defined variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」,it may also use $C[] count register.
 [Initial point position name], [end point position name] are used to start checking the singular
position of linear path and end checking the singular position of linear path, for example: P1, P2,
etc., or the point position variable name declared by the user.

◼ Example-1:
$C[2] =CHECK_LIN(P1, P2)

◼ Example-1 Description:
In the 2nd count register, the value after checking the singularity position of linear path of P1 point and
P2 point can be acquired. If the value is 1, it means that there is occurrence of singularity path; if the
value is 0, it means that there is no occurrence of singularity path.

92
C25UE901-2208

◼ Example-2:
IF CHECK_LIN(P1, P2) == TRUE THEN
LIN P1
LIN P2
ENDIF

◼ Example-2 Description:
Through the IF judgmental, the judgment condition is if the singular check value of linear path between
P1 point and P2 point is equal to true (TRUE), and assure there is no singular path, and then the linear
motion of P1 point and P2 point Command will be executed.

◼ Related Commands:
IF、$C[].

93
C25UE901-2208

2.2.12 @P#_EXIST() Check Point Position Existence Command


◼ Description:
The Command is used to confirm if the existence of point position. It can be used to judge the point
position information. If the point position is deleted, the remaining loop of point positions can still be
executed. It may be used to the logic judgment of executing application after judging the existence of point
position.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.8 or above Caterpillar1.0.10 or above CONT (pre-read)

◼ Command Format:
Format (1):
[Boolean variable] = P#_EXIST( [point position number] )
Format (2):
IF P#_EXIST( [point position number] ) == TRUE THEN
[Action Instruction]
ENDIF

Format/Parameter Description:
 [Boolean variable] is true TRUE or false FALSE, Boolean logic variable, select either state.
 [Point position number] is the poit position value of point position list, which is Arabic number.
For example: P0 point, the value is 0.
 [Action Instruction] is the combination of logic program, move Command or signal Command for
executing the statement action defined by the subroutine.
 Format (1) is to check one point position number in a single line, and format (2) is P#_EXIST used
with IF judgmental.
 Often collocated point position variable used to in place of P# ().

◼ Example-1:
BOOL P_Status
P_Status = P#_EXIST(1)

◼ Example-1 Description:
Declare Boolean variable P_Status.
The P_Status variable is the Boolean variable used to confirm if the 1st point position exists. If the 1st
point position exists, then it is true (TRUE), otherwise, if the 1st point position does not exist, it is false
(FALSE).

94
C25UE901-2208

◼ Example-2:
INT G = 0
FOR G = 0 TO 3
IF P#_EXIST(G) == TRUE THEN
LIN P#(G)
ENDIF
ENDFOR

◼ Example-2 Description:
Declare the integer variable G.
FOR loop variable G is executed from 0 to 3 for 4 times in total (0, 1, 2, 3), if the existence of Gth point
position is true (TRUE), then execute the linear move to the Gth point; if the point position does not
exist, this point is not executed.

◼ Related Commands:
IF、BOOL、FOR、P#().

95
C25UE901-2208

2.2.13 @P#() Point Position Variable Replacement Command


◼ Description:
The point position variable replacement Command is applicable for the repeatedly bring-in use of
multi-point position actions inside the loop. For example, the point positions of 1~20 ea Point require to
execute, for the normal mode, there are 20 ea line numbers of program from P1, P2, P3... to P20 points.
Through this Command, after completing the execution of point position correction or the assignment of
communication, it is able to sequentially bring into the point position variable replacement Command from
1 through the FOR loop, and complete the execution of 20 ea point positions, which can save the number
of program lines and repeatedly writing time, more streamline the program and efficiently achieve the
expected order of point positions.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.8 or above Caterpillar1.0.10 or above CONT (pre-read)

◼ Command Format:
PTP P#( [point position number] )
LIN P#( [point position number] )

Format/Parameter Description:
 [Point position number] is the poit position number of point position list (Pointlist), which is
Arabic number. For example: P0 point, the number is 0. It can be replaced by using the self-
defined integer variable as the number.
 The point positions, PR point positions and other variables declared by the user in the program
are not supported.
 The check point position of often collocated point for the previous equation exists in the
Command P#_EXIST().

96
C25UE901-2208

◼ Example-1:
INT G = 0
FOR G = 0 TO 10
IF P#_EXIST(G) == TRUE THEN
PTP P#(G)
ENDIF
ENDFOR

◼ Example-1 Description:
Declare the integer variable G.
The FOR loop variable G is totally executed 11 times from 0 to 10. If the Gth point position exists is true
(TRUE), then the point-to-point mode is executed moving to the Gth point (from P0, P1, P2...P10); if the
point position does not exist, the point will not be executed.

◼ Example-2:
INT G = 0
FOR G = 0 TO 10
IF P#_EXIST(G) == TRUE THEN
LIN P#(G)
ENDIF
ENDFOR

◼ Example-2 Description:
Declare the integer variable G.
The FOR loop variable G is totally executed 11 times from 0 to 10. If the Gth point position exists is true
(TRUE), then the linear mode is executed moving to the Gth point (from P0, P1, P2...P10); if the point
position does not exist, the point will not be executed.

◼ Related Commands:
IF、FOR、P#_EXIST().

97
C25UE901-2208

2.2.14 @CT_A6 Infinite Rotation Extreme End Axis Speed Command


◼ Description:
Execute the infinite rotation motion of the extreme end axis of robotic arm and determine the rotation
rate Command. The joint-type (6-axis) arm is the rotation of 6th-axis, and the SCARA arm is the rotation of
4th-axis.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.1 or above Caterpillar 1.0.6 or above CONT (pre-read)

 The joint-type (6-axis) arm is the rotation of 6th-axis, and the SCARA arm is the rotation of 4th-axis.
 It is required to go to the main menu first >> start-up setting >> system setting >> next page (Next)
>> infinite rotation, open the function setting of infinite rotation on the page of Continuous Turn.
 The SCARA arm requires to go to the main menu first >> Start-up >> infinite rotation Continuous
Turn.
 When the infinite rotation function of SCARA robotic arm is opened, it also opens the function of
point position alarm setting (Home point check).

Figure. 11 Setting Diagram of Infinite Rotation (left diagram: joint-type robotic arm, right
diagram: SCARA robotic arm)

◼ Command Format:
CT_A6 [extreme end rotation rate]

Format/Parameter Description:
 CT_A6 is the functional Command of infinite rotation motion for using the extreme end axis of
the arm, the joint-type (6-axis) arm is the rotation of 6th-axis, and the SCARA arm is the rotation
of 4th-axis.
 [Extreme end rotation rate] is the speed ratio of infinite rotation (%), the input range is -100 to
100. The plus/minus sign determines the clockwise/counterclockwise rotation direction. Enter 0
to stop the infinite rotation.

98
C25UE901-2208

◼ Example:
CT_A6 88
WAIT SEC 3
PTP P0 CONT
PTP P1 CONT
CT_A6 0

◼ Example Description:
Open the infinite rotation movement of the 6th - axis of the joint-type arm and use the clockwise 88%
speed for the infinite rotation, and wait for 3 seconds.
Move to the P0 and P1 point with the point-to-point mode, the continuous path, the infinite rotation in
progress.
After arriving at the P1 point, reset the infinite rotation speed to zero (stop the rotation of the 6th -
axis).

◼ Related Commands:
None

99
C25UE901-2208

2.3 CODE C, REGISTER INSTRUCTION

This chapter describes the register instructions of code C separately.


2.3.1 @$C[] Count Register Instruction
◼ Description:
The count register is a variable space which is able to save integers used for count or calculation.
Permanently archive, it will not be lost when the program is closed or power outage.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
$C [ [count register number] ] = <value>
$C [ [count register number] ] = $C [count register number] + <value>

Format/Parameter Description:
 [Count register number] is a space to fill in the count register number, the filled value range is
1~20.
 <Value> is a constant integer value, the negative value also can be filled, the save capacity is 32
bit, the save range is -2147483648(-231)~2147483647(231 -1).
 The count register is able to go with the operation symbols (add +, subtract -, multiply*, divide/)
for performing the numerical calculation.

◼ Example-1:
$C[1] = 10

◼ Example-1 Description:
The constant value 10 is saved in the 1st count register. The constant 10 is saved in the 1st count
register. After closing the program, the value defined by the variable is still temporarily saved.

100
C25UE901-2208

◼ Example-2:
$C[1] = 10
$C[1] = $C[1] + 1

◼ Example-2 Description:
The constant 10 value is saved in the 1st count register.
The value of the 1st count register is increased 1 and saved in the 1st register, and the value of 1st count
register is changed to 11. After closing the program, the value defined by the variable is still
temporarily saved.

◼ Related Commands:
$PR[]、$T[]、$T_STOP[]

101
C25UE901-2208

2.3.2 @$T[] Timing Register Instruction


◼ Description:
The timing register is a variable space, the English code name is Timer, which is able to save the integer
value of time changes; and used for counting time or time calculation. The minimum unit of counting time
beat is 1 millisecond (1 ms, 0.001 seconds). Permanently archive, it will not be lost under the power outage.
The user may use it to calculate the motion time executed by the robot arm, or the user uses this
timing register as the conditional, and apply to the determination of time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
$T [ [timing register number] ] = <value>
$T[ [timing register number] ] = $T [timing register number] + <value>

Format/Parameter Description:
 [Timing register number] is variable space to fill in the timing register number, the filled values
are 1~20.
 <Value> is the constant integer, the negative value also can be filled, the save capacity is 32 bit,
the save range is -2147483648(-231)~2147483647(231 -1).
 The timing register is able to go with the operation symbols (add +, subtract -, multiply*, divide/)
for performing the numerical calculation.
 The counting time of timer beats 1 millisecond (0.001 seconds)) as one unit, which is the counting
time of engineering computer’s software.

◼ Example-1:
$T[1] = 1001

◼ Example-1 description:
The constant 1001 is saved in the 1st timing register. This means 1.001 seconds. After closing the
program, the value defined by the variable is still temporarily saved.

◼ Example-2:
REAL TIME_error
$T[1] = 1000
$T[2] = 3000
TIME_error = $T[2] -$T[1]

102
C25UE901-2208

◼ Example-2 Description:
Declare the floating point form Time_error variable.
The time constant 1000 is saved in the 1st timing register, and the time constant 2000 is saved in the
2nd register.
The Time_error variable is the value of subtracting from the 2nd timing register to the 1st timing
register, and the result is the error time of 2000ms (2 seconds).

◼ Example-3:
REAL NEED_TIME
$T[1] = 0
PTP P0 FINE = 1
$T_STOP[1] = FALSE
PTP P1 FINE = 1
$T_STOP[1] = TRUE
NEED_TIME = $T[1]

◼ Example-3 Description:
Declare the floating point form NEED_TIME variable, and set the 1st timing register value as zero.
Move to the P0 point with the point-to-point mode, start the discontinuous track, and start the time
count of the 1st timing register.
Move to the P1 point with the point-to-point mode, start the discontinuous track, and close the time
count of the 1st timing register.
Convert the time of the 1st timing register to the NEED_TIME variable for the convenient use of
subsequent programs. At the same time, the information of time required for executing P1 point may
be viewed on the interface of timing register.

◼ Related Commands:
$PR[]、$C[]、$T_STOP[]

103
C25UE901-2208

2.3.3 @$T_STOP[] Timing Register Instruction


◼ Description:
The time increment value used to turn on/stop the timing register, is similar to the action commands of
switch button for seconds, when the stop timing register is true (TRUE), the time count is stopped; on the
contrary, the stop timing register is false (FALSE), then the time count is started, and the time is mainly
based on the industrial computer software’s time increasing by seconds (milliseconds). The calculated time
information is for the reference only, which is not necessarily consistent with the actual situation.

◼ Prerequisite:
Applicable Software Version Default state
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
$T_STOP [ [timing register number] ] = [Boolean variable]

Format/Parameter Description:
 [Timing register number] is increment value to fill in the timing register number, the filled values
are 1~20.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either any one
of them. When the stop timing register is true (TRUE), the time count is stopped; on the contrary,
when the stop timing register is false (FALSE), the time count is started.
 The value of timing register may be viewed on the interface as calculated value, or used with the
$T [] commands.
 $T_STOP is defaulted as the pre-reading state, therefore, the FINE=1 format shall be selected for
the previous programming point, or add to wait for 0.05 seconds, so that the calculation time is
more accurate.

104
C25UE901-2208

◼ Example-1:
REAL NEED_TIME
$T[1] = 0
PTP P0 FINE = 1
$T_STOP[1] = FALSE
PTP P1 FINE = 1
$T_STOP[1] = TRUE
NEED_TIME = $T[1]

◼ Example-1 Description:
Declare the floating point form NEED_TIME variable, and set the 1st timing register to zero.
Move to the P0 point with the point-to-point mode, open the FINE track, and start the time count of
the 1st timing register.
Move to the P1 point with the point-to-point mode, open the FINE track, and close the time count of
the 1st timing register.
Convert the time of the 1st timing register to the NEED_TIME variable for the convenient use of
subsequent programs. At the same time, the information of time required for executing P1 point may
be viewed on the interface of the timing register.

◼ Related commands:
$PR[]、$C[]、$T[].

105
C25UE901-2208

2.3.4 @$PR[] Position Register Instruction


◼ Description:
The position register PR is able to save the preset position in the register, and save the current point
position of the robot arm in the register as well. There are two types i.e. angle (DEG) format and position
(POS) format.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Only the version after HRSS3.3.16 has the E1, E2 and E3 external axes; LU series have no AB-axis.

◼ Command Format:
 Format 1:
$PR [#] = { X <value 1>,Y <value 2>,Z <value 3>,A <value 4>,B <value 5>,C <value 6>
,E1 <value 7> ,E2 <value 8> ,E3 <value 9>}
 Format 2:
$PR [#] = { A1 <value 1>, A2 <value 2>,A3 <value 3>,A4 <value 4>,A5 <value 5>,A6 <value 6>
,E1 <value 7> ,E2 <value 8> ,E3 <value 9> }
 Format 3:
$PR [#] = P#
or
$PR [#] = [point position variable name]
 Format 4:
$PR [#] = GETPOINT

※LU series have no AB-axis.

Format/Parameter Description:
 Format 1:
 # is the number, the user desires to use their PR number as a position register.
 Set the coordinates of parameter content, and the format within curly bracket { } can directly
declare the values of X, Y, Z, A, B, C, E1, E2 and E3 axes. LU series have no AB-axis. E1 ~ E3 are
external axes (only the versions after HRSS3.3.16 has the external axes), assign the user to
self-define the $PR[] inner Cartesian coordinate position.
 <Value 1> to <value 9> are the values self-defined by the customer, the unit of distance is mm,
the unit of angle is degree, there shall be one space between the axis coordinate and the
value, and more than two axes are separated by” , ” (comma).

106
C25UE901-2208

 Complete the declaration of $PR value for the convenient use of subsequent program editing,
for example: moving or acting as the position calculation or for the use of communication
transmission.

 Format 2:
 # is the number, the user desires to use the PR number as a position register.
 Set the coordinates of parameter content, and the format within curly bracket { } can directly
declare the values of A1~A6 axes and E1~E3 axes. LU series have no A5, A6 axes, and E1 ~ E3
are external axes (only the versions after HRSS3.3.16 has the external axes), assign the user
to self-define the $PR[] inner joint coordinate angle position.
 <Value 1> to <value 9> are self-defined by the customer, the unit of angle is degree, the unit
of external axis is mm, there shall be one space between the axis coordinate and the value,
and more than two axes are separated by” , ” (comma).
 Complete the declaration of $PR value for the convenient use of subsequent program
editing, for example: moving or acting as the position calculation or for the use of
communication transmission.

 Format 3:
 # is the number, the user can desires to use the PR number for position register.
 P# is the point position name of user teaching point, for example: P0, P1 and $PR registers
will have the same point position information.
 Users may also use the self-defined [point position variable name] of E6POS and E6AXIS, and
then transfer the point position information to the $PR[] register.

 Format 4:
 $PR register collocates with GETPOINT command, and inputs the current position value into
the register.

◼ Example-1:
$PR[2] = {X 0,Y 150,Z 300,A 0,B 0,C 0, E1 10,E2 5,E3 20}
LIN $PR[2]

◼ Example-1 Description:
Save the values of arm positions of X=0mm, Y=150mm, Z=300mm, A=0°, B=0°, C=0°, E1=10mm,
E2=5mm and E3=20mm in the position register 2 , and then use the linear movement instruction to
move the value of position register 2.

107
C25UE901-2208

◼ Example-2:
$PR[1] = {A1 1,A2 2,A3 3,A4 4,A5 5,A6 6, E1 7,E2 8,E3 9}
PTP $PR[1]

◼ Example-2 Description:
Save the values of robot arm angles as A1=1°, A2=2°, A3=3°, A4=4°, A5=5°, A6=6°, E1 =7mm, E2 =8mm
and E3 = 9mm in the position register 1, and then use the point-to-point instruction to move the value
of position register 1.

◼ Example-3 :
E6POS POINTA = {X 20,Y 400,Z 800}
$PR[4] = POINTA

◼ Example-3 Description:
Use E6POS to declare the POINTA point position are X-axis 20mm, Y-axis 400mm and Z-axis 800mm,
and save the value in position register 4.

◼ Example-4:
$PR[5] =GETPOINT

◼ Example-4 Description:
Save the values of robot arm position information in the register 5.

108
C25UE901-2208

Transfer Current Position to $PR[5] Position Information

◼ Related Commands:
GETPOINT、E6POINT、E6POS、E6AXIS.

109
C25UE901-2208

2.3.5 @$SRR[]、$SRW[] Site Fieldbus Register


◼ Description:
The fieldbus register, SRR is the abbreviation of Register for Read, indicating that the value of robot
arm register waits to read the external equipment input value, SRW is the abbreviation of Register for Write,
indicating that the value of robot arm register writes the external equipment’s output value.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

 The fieldbus communication hardware’s (such as CC-Link card, Profinet card and optional
items) related settings are required to install before use this register, and the fieldbus
register commands can only used after successfully completing the connection.
 Go to main menu first >> Display>> perform setting on the register page of site fieldbus, the
parameter definition indicated by the register number may be set, such as the information
of axis-1 angle, X value, error code, TCP speed , acceleration time, etc., the number of
fieldbus registers required is different for each parameter.

◼ Command Format:
[Self-defined variable name] = $SRR[#]
$SRW[#] = <value>

Format/Parameter Description:
 $SRR indicates that the value of robot arm register waits to read the external equipment (input
value), $SRW indicates that the value of robot arm register writes the external equipment (output
value).
 [Self-defined variable name] it can be English alphabets or English alphabets + numbers, but the
numbers cannot be the start of heading character, and shall not use「-」, it may also use $C[]
count register.
 # is the number, the user can desires to use the register number of site filedbus, the input values
are 1~32.
 <Value> is the constant integer, allow to fill the negative value. The saving capacity is 32 bit.
The saving range is -2147483648(-231)~2147483647.

110
C25UE901-2208

◼ Example:
$SRW[1] = 10
$C[2] =$SRR[1]

◼ Example Description:
The value 10 of the 1st register for robot arm writes to the external equipment.
After the value of the 1st register of robot arm waiting to read the value of the external equipment, and
then transfer the value into the 2nd count register.

◼ Related Commands:
$C[]

111
C25UE901-2208

2.4 CODE D, INPUT & OUTPUT SIGNAL CONTROL INSTRUCTION


This chapter explains the specific description for the signal communication instruction of code D.

The I/O (input/output) commands can read the state of input signal or change the state of the
output signal for the external equipment.

No. Type I/O Name Description

User candetermine the communication


1 DI/O Digital I/O PLC, communication equipment and
sensor
CC-Link/Profinet network
2 SI/O FieldBus I/O communication, it requires to add the
communication card to enable for use.

3 FI/O Function I/O External control, specified function

End effector robot I/O, internal lines of


4 RI/O Robot I/O robot itself.
(Not for Delta & SCARA-LU)
Module has the mulit I/O at the same
5 MI/O Module I/O
time.
Control the end built-in electromagnetic
valve which is used for controlling the
6 VO Valve I/O
end effectors air pressure control.
(Only for RA6XX series)

The following subsections describe each command.

112
C25UE901-2208

2.4.1 @$DI[ ] Digital Input Signal Command


◼ Description:
Turn on or turn off the digital input signal which is already being connected, the user may use this
command to open or close for acting as the judgmental/conditional. After this signal is judged for
confirmation, then the subsequent program is executed, which is often collocated with the WAIT FOR
command, or used the IF conditional for determination.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

It is usually used for the judgmental or waiting for signal. Use the keyboard to write commands. "$"
shall be in front of the command for determination.

◼ Command Format:
$DI[#] == [Boolean variable]

Format/Parameter Description:
 "$" shall be in front of the command for determination.
 DI [#] digital signal gateway, # can be filled with the signal numbers 1~24 (it will be different
depending on the arm model.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either anyone
command or fill the substituted number: 1 or 0; turn on or trun off signal.

◼ Example-1:
WAIT FOR $DI[1] == TRUE
WAIT FOR $DI[3] == 0

◼ Example-1 Description:
When the following program codes are executed, wait for the digital signal input gateway ($ DI []) 1 to
execute the turn-on signal, wait for the digital signal input gateway ($ DI []) 3 to execute the turning-off
signal.

113
C25UE901-2208

◼ Example-2:
IF $DI[1] == TRUE THEN
PTP P0
ENDIF
or
IF $DI[1] == 1 THEN
PTP P0
ENDI
F

◼ Example-2 Description:
Use the $ DI [] signal as the determining program, if the digital signal gateway 1 is turned on, execute
the program of point-to-point to the P0 point position, and the program is ended when the digital
signal gateway 1 is not turned on.

◼ Related commands:
$DO[]、IF、WAIT FOR、BOOL.

114
C25UE901-2208

2.4.2 @$DO[ ] Digital Output Signal Command


◼ Description:
Digital output signal, the user can use this command to turn on or turn off the digital output signal,
and the user can use this command to turn on or turn off the peripheral communication equipment (such
as: PLC, machine tool, conveyor, automatic door, etc.) as the handshaking signal.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
$DO[#] == [Boolean variable]

Format/Parameter Description:
 ”$” shall be in front of the command for determination.
 DI [#] digital signal gateway, # can be replaced with the signal numbers 1~24 (it will be different
depending on the robot arm model).
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either
command or fill the substituted number: 1 or 0; turn on or turn off signal.

◼ Example:
$DO[1] = TRUE
or
$DO[1] = 1

◼ Example Description:
Turn on the digital signal output gateway ($DO[])1 externally.

◼ Related commands:
$DI[]、BOOL

115
C25UE901-2208

2.4.3 @$SI[ ] Site Fieldbus Input Signal Command


◼ Description:
Turn on or turn off the digital input signal which is already being connected, the user may use this
command to turn on or turn off for acting as the judgmental/conditional. After this signal is judged for
confirmation, then the subsequent program is executed, which is often collocated with the WAIT FOR
command, or used the IF conditional for determination.
The fieldbus input signals 1~8 are the I/O command of default function for the system, which cannot
be changed by the user.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ command Format:
$SI[#] == [Boolean variable]

Format/Parameter description:
 ” $ ” shall be in front of the command for determination.
 SI [#] site fieldbus signal gateway, # can be replaced with the signal numbers 1~128 (it will be
different depending on the optional card of robot arm model).
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either anyone
command or fill the substituted number as: 1 or 0; turn on or turn off signal.
 The fieldbus input signals 1~8 are the default function I/O command, which cannot be changed by
the user. The user application shall be started to self-define for use from the 9th channel of fieldbus
gateway.

◼ Example-1:
WAIT FOR $SI[10] == TRUE
WAIT FOR $SI[13] == 0

◼ Example-1 Description:
When performing the following code, wait for the 10th channel of site fieldbus input gateway ($ Si []) to
execute the turn-on signal, and then wait for the 13th channel of fieldbus input gateway ($ Si []) to
execute the turn-off signal.

116
C25UE901-2208

◼ Example-2:
IF $RI[10] == TRUE THEN
PTP P0
ENDIF
or
IF $RI[10] == 1 THEN
PTP P0
ENDIF

◼ Example-2 Description:
Use the $RI[] signal as the determining program, if the 10th channel of site fieldbus signal gateway is
turned on, execute the program of point-to-point to the P0 point position, and when the 10th channel
of site fieldbus signal gateway is not turned on, the program is ended.

◼ Related command:
$SO[]、IF、WAIR FOR、BOOL.

117
C25UE901-2208

2.4.4 @$SO[ ] Site Fieldbus Output Signal Command


◼ Description:
Turn on or turn off the site fieldbus output signal which is already being connected, the user may use
this command to turn on or turn off for acting as the judgmental/conditional. The user can use this
command to turn on or turn off the site fieldbus output signal, and the user can use this command to turn
on or turn off the peripheral communication equipment (such as: PLC, machine tool, conveyor, automatic
door, etc.) as the handshaking signal. The peripheral equipment shall be the same fieldbus communication
mode as well.

The site fieldbus output signals 1~8 are the I/O command of default function for the system, which
cannot be changed by the user.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ command Format:
$DO[#] == [Boolean variable]

Format/Parameter Description:
 ”$” shall be in front of the command for determination.
 SO [#] site fieldbus signal gateway, # can be replaced with the signal numbers 1~128 (it will be
different depending on the optional card of robot arm model).
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either one
command or fill the substituted number: 1 or 0; turn on or turn off signal.
 The fieldbus input signals 1~8 are the default function I/O command, which cannot be changed
by the user. The user application shall be started to self-define for use from the 9th channel of
fieldbus gateway.
◼ Example:
$SO[11] = TRUE
Or
$SO[11] = 1

◼ Example description:
Turn on the 11th channel external output site fieldbus signal gateway ($ SO []).

◼ Related commands:
$SO[]、IF、WAIR FOR、BOOL.

118
C25UE901-2208

2.4.5 @$VO[ ] Solenoid Valve Output Signal Command


◼ Description:
The solenoid valve output signal, the user can use this command to turn on or turn off the solenoid
valve signal, and the user can use this command to turn on or turn off the internal equipment output signal
of solenoid valve.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
$VO[#] == [Boolean variable]

Format/Parameter Description:
 ”$” shall be in front of the command for determination.
 The end signal gateway of Vo [#] robot, # can be replaced with the signal number 1 ~ 3.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, either select one
command or fill the substituted number: 1 or 0; turn on or shut off signal.

◼ Example:
$VO[1] = TRUE
or
$VO[1] = 1

◼ Example Description:
Turn on the external output solenoid valve signal gateway ($ RO[])1.

◼ Related commands:
BOOL.

119
C25UE901-2208

2.4.6 @$RO[ ] Robot Output Signal Command


◼ Description:
The robot’s end effectors output signal; the user can use this command to turn on or turn off the end
effector signal, and the user can use this command to turn on or turn off the external equipment output
signal (for example: pneumatic gripper jaw or air tube).

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
$RO[#] == [Boolean variable]

Format/Parameter Description:
 ”$” shall be in front of the command for determination.
 The end signal gateway of RO [#] robot, # can be replaced with the signal number 1 ~ 4.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select one command
from either one or fill the substituted number: 1 or 0; turn on or turn off signal.

◼ Example:
$RO[1] = TRUE
or
$RO[1] = 1

◼ Example Description:
Turn on the external output of robot end signal gateway ($RO[])1.

◼ Related Commands:
$RI[]、BOOL

120
C25UE901-2208

2.4.7 @$RI[ ] Robot Input Signal Command


◼ Description:
Turn on or turn off the end effectors’ input signal of robot which is already being connected, the user
may use this command to turn on or turn off for acting as the judgmental/conditional. After this signal is
judged for confirmation, then the subsequent program is executed, which is often collocated with the WAIT
FOR command, or used the IF conditional for determination.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
$RI[#] == [Boolean variable]

Format/Parameter Description:
 ”$” shall be in front of the command for determination.
 The end signal gateway of RI [#] robot, # can be replaced with signal number 1 ~ 6.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select one command
from either one or fill the substituted number: 1 or 0; turn on or turn off signal.

◼ Example-1:
WAIT FOR $RI[1] == TRUE
WAIT FOR $RI[3] == 0

◼ Example-1 Description:
When performing the following code, wait for the end input gateway of robot ($ RI []) 1 to execute the
turn-on signal, and then wait for the end input gateway ($ RI []) 3 of robot to execute the turn-off
signal.

121
C25UE901-2208

◼ Example-2:
IF $RI[1] == TRUE THEN
PTP P0
ENDIF
or
IF $RI[1] == 1 THEN
PTP P0
ENDIF

◼ Example-2 Description:
Use the $RI[] signal as the determining program, if the end signal gateway of robot is turned on,
execute the program of point-to-point to the P0 point position, and when the end signal gateway of
robot is not turned on, the program will be ended.

◼ Related Commands:
$RO[]、IF、WAIR FOR、BOOL.

122
C25UE901-2208

2.4.8 @SYN Proceeding Output Signal Switch Adjustment Time Command of


Conveyor Track
◼ Description:
The conveyor tracking output ($DO/$SO) signal switching adjustments works with the time command;
the switching adjustment of time command of settings applies to the output signal during the Robot
motion process. The SYN command may set multiple states at once, up to 8 times can be stated in the
program records at most. Apply to the signal delay time command for the external accessory/equipment of
robot adjustment, such as the applications of adjusting the turn-on/turn-off time for the suction action of
end effector, adjusting the action time for turning on/turning off the supply glue of glue gun etc.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)
⚫ Use the program over 1 point, and place SYN between motion 1 and motion 2

◼ Command Format:
SYN [Output signal ] =
[Boolean variable] [calculate start/end/path settings] DELAY = [adjustment time] ms
SYN [$DO[#]/$SO[#]] =
[Boolean variable] [ START/ END /PATH ] DELAY = [adjustment time] ms

Format/Parameter Description:
 SYN is not the individual command, it requires to collocate with the point move motion
command. In the single move command, there are more than one SYN setting presents, up to 8
time of SYN settings can be done at most.
 [Output signal] is the signal command used by the conveyor flying-pick robot to the external
equipment. For example, turn on/turn off the end suction action, the output signal can be used
as the digital output ($DO[#]) and the fieldbus output signal used as ($SO[#]), # means the
number, indicates the selection of the #th output signal.
 [Boolean variable] is true TRUE or false FALSE, Boolean logical instructions, select either one.
 [Calculate beginning/end/path settings] is the output signal to begin the calculation of setting for
the delay time with start or end, select the start and type「START」text, or select the end to
Typethe「END」text, or select the middle path to place the「PATH」text, select one of the
above 3 commands. If it is「PATH」, then require to add the distance unit in millimeters (mm),
and the distance is calculated from the previous point.
 [Adjustment time] is the adjustment time value of moving up or delaying the output signal. The
move-up time is indicated by the negative value, the delay time is indicated by the positive value,
the input range is -1000~1000, the unit is milliseconds (ms).

123
C25UE901-2208

◼ Example-1:
LIN P1 FINE Vel=100% Acc=50% TOOL[0] BASE[0]
SYN $DO[1] = TRUE START DELAY = 50 ms
SYN $DO[2] = TRUE END DELAY = -50 ms
LIN P2 FINE Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-1 Description: (Both P1and P2 use the FINE track mode)


As shown in the figure below, move from P1 to P2 with SYN command. Under the condition without
smoothness for P1 and P2, the range of START is from the accurate point position P1 to the accurate
point position P2, and the range of End is the distance from P2 point to P1 point. But, the START
command Delay for 50ms under SYN from P1, then execute the command of DO[1]=True, the END
command Delay -50ms under SYN from P2 advancing for 50ms, then execute the DO[2]=True
instruction, and adjust the output signal time through this command.

Figure. 12 Schematic Diagram of Example 1

➢ Example-2: (P1 uses the FINE track mode, P2 uses the CONT track mode, START & END example)
LIN P1 FINE Vel=100% Acc=50% TOOL[0] BASE[0]
SYN $DO[1] = TRUE START DELAY = 50 ms
SYN $DO[2] = TRUE END DELAY = -50 ms
LIN P2 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-2 description:
As shown in the figure below, move from P1 to P2 with SYN command. Under the condition of using
the smoothness for P1, the range of START is from the accurate point position P1 to the smoothness
start position of P2 point, and the range of End is from the the smoothness start position of P2 point to
the smoothness end position of P2 point. But the START command Delay for 50ms under SYN from P1,
then execute the command of DO[1]=True, the END command Delay -50ms under SYN advancing for
50ms from the center point of P2 smoothness range, then execute the DO[2]=True command.

124
C25UE901-2208

Figure. 13 Schematic Diagram of Example 2

◼ Example-3 : (Both P1and P2 use the FINE track mode, START & END example)
LIN P1 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
SYN $DO[1] = TRUE START DELAY = 50 ms
SYN $DO[2] = TRUE END DELAY = -50 ms
LIN P2 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-3 Description:
As shown in the figure below, move from P1 to P2 with the SYN command. Under the condition of
using the smoothness for both P1 and P2, the range of START is from the smoothness end position of
P1 point to the smoothness start position of P2 point, and the range of End is from the the smoothness
start position of P2 point to the smoothness end position of P2 point; the START command Delay 50ms
under SYN from the smoothness end position of P1, then execute the command of DO[1]=True, the
END command Delay -50ms under SYN from the center point of P2 smoothness range, then execute
the DO[2]=True command.

Figure. 14 Schematic Diagram of Example 3

125
C25UE901-2208

◼ Example-4 : (Both P1and P4 use the FINE track mode, PATH example)
LIN P1 FINE Vel=100% Acc=50% TOOL[0] BASE[0]
SYN $DO[1] = FALSE PATH = 50 mm DELAY = -50 ms
LIN P2 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
LIN P3 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
LIN P4 FINE Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-4 Description:
As shown in the figure below, move from P1 to P2 with SYN command. Under the condition of using
the smoothness for both P2 and P3, the range of START is from the accurate point position P1 to the
accurate point position P4. But, under SYN; PATH= 50mm, DELAY = -50ms from the P1 point, move up
50ms again, Then execute DO[1]=FALSE; if the P3 point is the accurate point position without using
smoothness, then the range of START is from the accurate point position of P1 position to the accurate
point position of P3 position.

Schematic Diagram of Example 4

Figure. 15 Schematic Diagram of Example 4

126
C25UE901-2208

◼ Example 5: (P1 uses the CONT track mode, P4 uses the FINE track mode, PATH example)
LIN P1 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
SYN $DO[1] = FALSE PATH = 50 mm DELAY = -50 ms
LIN P2 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
LIN P3 CONT=100% Vel=100% Acc=50% TOOL[0] BASE[0]
LIN P4 FINE Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example 5 Description:
As shown in the figure below, move from P1 to P2 with SYN command. Under the condition of using
PATH and the smoothness for P1, P2 and P3, the range of START is from the smoothness start position
of P1 point to the accurate point position of P4 position; under SYN, PATH= 50mm DELAY = -50ms, that
is, start the calculation from the 50mm of smoothness start position of P1 point, move up 50ms again,
then execute DO[1]=FALSE.
Note: If the P2 point is the accurate point position without using smoothness, then the range of START
is from the smoothness start position of P1 point to the accurate point position of P2 position.
Schematics Diagram of Example 5

Figure. 16 Schematic Diagram of Example 5

◼ Related commands:
PTP、LIN、PICK、PLACE
.

127
C25UE901-2208

2.4.9 @PULSE Output Signal Pulse Time Control Command


◼ Description:
The output signal pulse time control command is able to control the delay time to turn off the signal. It
is able to apply to master the time control and switch time control of external handshaking. For example,
control the indicator light, is it able to control the turn-on time of light for 5 seconds and then turn off the
light.
Time

$DO[] Signal
Figure. 17 Schematic Diagram of PULSE Digital Output

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.8 or above Caterpillar1.0.10 or above FINE (non pre-read)

◼ Command Format:
[Digital output signal] = PULSE ([pulse output time])

Format/Parameter Description:
 [Digital output signal] is the command of digital output signal, for example, $DO[1] is the 1st
digital output signal. Only supports the $DO output pulse signal and $SO[] site fieldbus output
signal, but not applicable for $MO[] combined output signal.
 [Pulse output time]: The pulse output time, default is 0.1 seconds.
1) The minimum unit value is 0.1 seconds, the maximum value is 30 seconds.
2) Able to simultaneously support up to 3 sets of PULSE command at most.
3) The program cancel (QUIT command) will cancel the PULSE output.
4) The interrupting trigger command will not cancel the PULSE output.
5) Emergency stop, user stop and Alarm will not cancel the PULSE output.
 This command will block the pre-read, similar to the FINE=1 setting function, so that the program
will not read the following program early.

128
C25UE901-2208

◼ Example:
PTP P1
$DO[1] = PULSE(3.2)
WAIT SEC 5
LIN P2

◼ Example Description:
After the point-to-point moving to P1 point, turn on the 1st digital output signal, and after continuously
outputting the pulses for 3.2 seconds, turn off the 1st digital output signal. While outputting the signal,
it is also executing the command program of waiting for 5 seconds, and finally linear movement to P2
point.
3.2sec

$DO[1] Signal
Figure 2 Schematic Diagram of Digital Output $DO[1] of Pulse PULSE 3.2 Seconds

◼ Related Commands:
$DO[]、WAIT SEC.

129
C25UE901-2208

2.5 CODE E, FLOW CONTROL FUNCTIONAL COMMANDS


This chapter describes the logical instructions of code E individually.
2.5.1 @IF Command
◼ Description:
This command is a judgmental type, which is used to judge the single or complex number of conditions.
When the condition is achieved, the follow-up action instructions will be executed. If the conditions are
untenable, then the respetive program commands will be executed.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
 Format 1:
IF [Condition] THEN
[Action instruction]
ENDIF
 Format 2:
IF [Condition] THEN
[Action instruction 1]
ELSE
[Action instruction 2]
ENDIF
 Format 3:
IF [Condition A] AND [Condition B] THEN
[Action instruction]
ENDIF

Format/Parameter Description:
 [condition A] and [condition B] are the conditions set by the user, such as variable condition
setting, signal condition setting, it may be the following logical instructions, and equivalence
condition judgmental.

130
C25UE901-2208

logical logical
Syntax Syntax
instructions instructions
Less than A<B Not equal to A != B
Less than or
A <= B Equal to A == B
equal to
Greater than A>B Logic negation !A

Greater than or
A >= B
equal to

 [Action instruction] is the combination of logical instructions, move command or signal


instructions.
 Format 1 is the single judgmental condition and executes the single action instruction.
 Format 2 is the single judgmental condition, executes the action instruction 1 or executes the
action instruction 2 through the judgmental conditions, only one of the two can be executed.
 Format 3 is with 2 or more conditions and executes the single action instruction.

◼ Example-1:
IF $DI[1] == TRUE THEN
PTP P0 CONT Vel=100% Acc=100% TOOL[0] BASE[1]
ENDIF

◼ Example-1 Description:
If the digital input $D[1] is true, then execute point P0 motion with the point-to-point mode. If the
digital input $D[1] is false, then ignore this action instruction and continue to execute the action
instruction code after ENDIF.

◼ Example-2:
IF $DI[1] == TRUE THEN
PTP P0
ELSE
LIN P1
ENDIF

◼ Example-2 Description:
If the digital input $D[1] is true, then execute point P0 motion command with the point-to-point mode.
If the digital input $D[1] is false, then execute point P1 motion with the linear mode.

131
C25UE901-2208

◼ Example-3 :
IF $DI[1] == TRUE AND $DI[2] == TRUE THEN
PTP P1 CONT Vel=100% Acc=100% TOOL[0] BASE[1]
ENDIF

◼ Example-3 Description:
If both digital input $D[1] and digital input $D[2] are true at the same time, then execute point P1
motion command with point-to-point mode, if the digital input $D[1] is false or the digital input $D is
false, and the conditional are untenable at the same time, then ignore this whole mostion commands
and continue to execute the instruction commands after ENDIF.

◼ Related Commands:
$DI[]、WHILE、LOOP、FOR、REPEAT.

132
C25UE901-2208

2.5.2 @FOR Command


◼ Description:
FOR is a common control flow. It is the program commands which may be continuously executed for
multiple times in a row or executed the specific number of times, and the loop will be ended when the
equivalence conditions are tenable, or execute all the items in the program once. Simply speaking, it is the
loop able to allow the program commands to execute repeatedly and has the counter feature.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
FOR [variable name] =[initial value] TO [final value] STEP [increment value]
[Action instruction]
ENDFOR

Format/Parameter Description:
 [Variable name] is the name defined by the user, which requires to declare prior to the FOR loop.
Note: It can only be in English letter (It is not a case sensitive, so lowercase or uppercase are
acceptable) or English letter with number is okay. For example: INT H, INT h, INT H1 and INT h1.
 [Initial value] is the initial value of loop desired to execute.
 [Final value] is the final value of loop desired to execute.
 [Increment value] is the increment value required for executing FOR loop command every time,
which is the integer value; STEP [increment value] can also be omitted, and the default increment
value will be 1.
 ([Final value]- [(initial value])/[increment value] is the loop number required for the action.
 [Action instruction] is the combination of logical instrutions, move commands or signal instruction
can be used for FOR command.

133
C25UE901-2208

◼ Example-1:
INT H
FOR H = 0 TO 2 STEP 1
PTP P0 CONT = 100% Vel=100% Acc=50% TOOL[0]BASE[0]
PTP P1 CONT = 100% Vel=100% Acc=50% TOOL[0]BASE[0]
ENDFOR

◼ Example-1 Description:
Declare an integer variable is H, the initial value is 0, the final value is 2, the increment value is 1, and
start the FOR loop from counts 0 to 3, totally execute 2 times of motion commands. The motion
command executes the point-to-point mode of P0, and then execute the point-to-point mode of P1,
and end the FOR loop.
※Program description: 3 times of back and forth from the P0 point to P1 point (0, 1 and 2).

◼ Example-2:
INT H
FOR H = 0 TO 4 STEP 2
PTP P0 CONT = 100% Vel=100% Acc=50% TOOL[0]BASE[0]
PTP P1 CONT = 100% Vel=100% Acc=50% TOOL[0]BASE[0]
ENDFOR

◼ Example-2 Description:
Declare an integer variable is H.
FOR H = [initial value 2] TO [final value 4] STEP [increment value 2]
The motion commands will be executed as follows, the point-to-point P0 motion at first, and then the
point-to-point P1 move command.
End the FOR loop.
※Program description: 3 times of back and forth from the P0 point to P1 point (0, 2 and 4).

◼ Related Commands:
INT、$DI[]、WHILE、LOOP、REPEAT.

134
C25UE901-2208

2.5.3 @LOOP Command


◼ Description:
The Action instructions in the loop will be repeated as set by the user. If the conditions set by the
user in the loop are met, the action instruction will be executed which is inside the LOOP command.
when the "EXIT" instruction is used, the program will jump out of the loop and continue to next
program command or action instructions.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
 Format 1:
LOOP
[Action instruction]
ENDLOOP

 Format 2:
LOOP
[Action instruction 1]
IF [Condition] THEN
EXIT
ENDIF
[Action instruction 2]
ENDLOOP

Format/Parameter Description:
 “LOOP” is the heading text of loop command, ”ENDLOOP “ is the ending text of loop command.
 EXIT is able to jump out from the LOOP.
 [Condition] is set by the user, such as variable condition setting, signal instructions, it may be the
following logical instructions, and equivalence condition judgmental.
logical logical
Syntax Syntax
instructions instructions
Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to
Greater than A>B Logic negation !A
Greater than or
A >= B
equal to
135
C25UE901-2208

 [Action instruction] is the combination of logical instructions, move command or signal instruction.
 Format 1: It is the infinite loop logical instruction and executes the action instruction within the
loop.
 Format 2: It is the infinite loop logical instruction with the conditions. When the “IF” condition set
by the user is met, also when the “EXIT” instruction is used, the program will jump out/end the
LOOP and will not execute the content of action instruction 2.

◼ Example:
LOOP
PTP P1 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
PTP P2 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
ENDLOOP

◼ Example-1 Description:
The robot continuously repeats the infinite loop of P1 ➔ P2 ➔ P1 ➔ P2… point position move.

◼ Example-2:
LOOP
PTP P1 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
PTP P2 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
IF $DI[1] == TRUE THEN
EXIT
ENDIF
ENDLOOP

◼ Example-2 Description:
The robot continuously repeats the infinite loop of P1 ➔ P2 ➔ P1 ➔ P2 point position movement. If
the DI[1] signal is true & If (DI[1]) THEN command also true, then jump out the LOOP and end the
program; (if DI[1] has false, then the robot continuously repeats the infinite loop of P1 ➔ P2 ➔ P1 ➔
P2 point position movement.)

◼ Related Commands:
IF、$DI[]、WHILE

136
C25UE901-2208

2.5.4 @WHILE Command


◼ Description:
While is the control flow loop. Use the additional conditions to decide if the loop is to be ended or not.
When the additional condition is TRUE/1, the program commands in the loop will repeatedly executed; if
the addtional judgmental condition is FALSE/0, then the program commands inside the loop will not be
executed, and then it the continue to execute the program commands outside the ENDWHILE.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
WHILE [Condition]
[Action instruction]
ENDWHILE

Format/Parameter Description:
 [Condition] is the addtional judgmental, which may be the following logical instructions and
equivalence judgmental.

logical logical
Syntax Syntax
instructions instructions
Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to

Logical
Greater than A>B !A
negation

Greater than or
A >= B
equal to

 [Action instruction] is the combination of logical instructions, move command or signal instruction
for executing the action instructions in the WHILE loop.

137
C25UE901-2208

◼ Example:
INT N=0
WHILE N <= 10
LIN P0 FINE=1
LIN P1 FINE=1
N=N+1
WAIT SEC 0.5
ENDWHILE

◼ Example Description:
Declare integer variable N as 0, and execute the loop WHILE; if N is less than or equal to 10 and the
conditional is true, then execute the motion commands of internal program, and the content of motion
commands is the linear movement of P0, and then execute the linear movement of P1, after
completion of this comamnds cycle for one time, the N value will be accumulated as 1, and after
waiting for 0.5 seconds, proceed the execution of WHILE loop command again; if N is accumulated to
more than 10, and the conditional will be false, then the action instruction of inside program of WHILE
will not be executed, the program continues to execute the after the ENDWHILE code.

◼ Related Commands:
INT、FOR、LOOP、REPEAT、GOTO.

138
C25UE901-2208

2.5.5 @REPEAT Command


◼ Description:
The REPEAT loop is the control flow. It will execute the action instruction for one time, then it will
decide that the loop is to be repeated or not in accordance with the conditions. Until the counts of
conditions becomes TRUE/1, the program commands in the loop will repeatedly executed; if the counts of
condition is FALSE/0, then the program commands inside the loop will not be executed, therafter the
program commands outside the loop will be executed.
The repeating loop is similar to the WHILE loop. It will completely execute the action instructions for
one time at the beginning before executing the conditions. The while loop will execute the conditions at the
beginning, and then execute the action instructions accodingly.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
REPEAT
[Action instructions]
UNTIL [Conditions]

Format/Parameter Description:
 [Condition] is a judgmental type, which may be the following logical instructions and equivalence
judgmental.
logical logical
Syntax Syntax
instructions instructions
Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to

Greater than A>B Logic negation !A


Greater than or
A >= B
equal to

 [Action instruction] is the combination of logical instructions, motion commands or signal


instruction for executing the action instruction in the REPEAT loop.

139
C25UE901-2208

◼ Example:
INT N=1
REPEAT
LIN P0 FINE=1
LIN P1 FINE=1
N=N+1
WAIT SEC 0.5
UNTIL N > 3

◼ Example Description:
Declare that integer variable as N (value=1), and execute the REPEAT loop; execute the motion
command of internal program, and the content of motion command is the linear movement of P0, and
then the linear movement of P1 , after completion of this cycle for one time, the N value is accumulated
as 1, and after waiting for 0.5 seconds, proceed the determination of REPEAT loop as per the conditions;
if N is less than 3, and meet the conditions as false, then the program will stop to executed the REPEAT
loop. With the above condition, action instruction will be executed for 3 times from the P0 point to P1
point position (The condition is judged only after the execution of commands P0, P1 & P2).

◼ Related Commands:
INT、FOR、LOOP、WHILE、GOTO.

140
C25UE901-2208

2.5.6 @GOTO Command


◼ Description:
GOTO command to be used when the user desires to make the program and it can jumping from the
specified position to the another labeled position with the conditions.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
GOTO [Label name]

[Label name]:
[Action Instruction]

Format/Parameter Description:
 [Label name] is the self-defined name, it can be English alphabets or combination of English alphabets
+ numbers, but the numbers cannot be the starting of heading character, and GOTO + [label name] is
the program code which starts the position of jump instruction.
 [Label name]: In order to jump to the target label position, and then execute motion instruction. The " :
" (colon) shall be added after the [label name] to identify.
 [Action instruction] is the combination of logical instructions, move command or signal instruction for
executing the GOTO command.

141
C25UE901-2208

◼ Example:
INT n = 0
WHILE n < 2
IF n == 0 THEN
GOTO STEP0
ENDIF
IF n == 1 THEN
GOTO STEP1
ENDIF
NEXT:
n=n+1
ENDWHILE
STEP0:
PTP P0 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
GOTO NEXT
STEP1:
PTP P1 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
GOTO NEXT

◼ Example description:
When the self-defined integer variable n is less than 2, enter the WHILE loop, and then use the IF
command to judge if the integer n is 0 or 1. When the integer n is 0, use GOTO command to jump into
the STEP0 label’s underneath program, the underneath program of STEP0 label is to used to the PTP
motion command to move the robot to the point position of P0, and then use GOTO NEXT label to
execute the underneath program. The underneath program of NEXT label is to add 1 to the integer
variable n; when the integer variable n is 1, use GOTO jumping to the STEP1 label and execute the
underneath program. The underneath program of STEP0 label is to use the PTP motion command to
move the robot to the point position of P1, and then use GOTO NEXT label to execute the underneath
program. The underneath program of NEXT label is to add 1 to the integer variable n. When the integer
n is accumulated to not less than 2, it will jump out of the WHILE loop and end the program.

◼ Related Commands:
INT、WHILE、FOR、REPEAT、LOOP、IF.

142
C25UE901-2208

2.5.7 @SWITCH Command


◼ Description:
The switch command is a statement of selection range, it may compare in accordance with the
「comparison expression」mode, and selects the single「parameter section」to be executed from the
candidate list.
The statement of switch logical instruction contains one or more parameter sections. Each parameter
section contains one or more「case label」(case or default label), and follows by one or more statements.
The user may select the required case content in accordance with the requirements. The SWITCH logical
instruction can place one default label in any parameter section.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Instruction Format:
SWITCH [Condition variable name]
CASE [variable 1]
[Action instruction 1]
CASE [variable 2]
[Action instruction 2]
CASE [variable 3]
[Action instruction 3]
DEFAULT
[Action instruction 4]
ENDSWITCH

Format/Parameter Description:
 [Condition variable name] is the switch command variable, the user self-defined name, integer,
long integer or character variables.
 [Variable 1~3] is the numbers/letter corresponding to the known case.
 [Action instruction 1~4] is the combination of logical instructions, move command or signal
instructions.
 ”SWITCH” is the initial letter, and acts as the judgmental condition, ”ENDSWITCH” is the ending
letter for the command, and ”CASE” is the variable condition setting. If the [condition variable
name] is equal to [variable n], then proceed the [Action instruction n]. ”DEFAULT” is the exclusive
term. If the [condition variable name] is not equal to [variable n] at all, then proceed the default
content of [Action instruction 4], and the above stated n is the arbitrary numbers.
 When the [variable] of SWITCH has no corresponding CASE, and has not set the default exclusive
term ”DEFAULT” as well, the the program will redirect to ENDSWITCH.

143
C25UE901-2208

◼ Example-1: SWITCH has no default value


INT n =0
LOOP
SWITCH n
CASE 0
PTP P0 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
CASE 1
PTP P1 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
CASE 2
EXIT
ENDSWITCH
n=n+1
ENDLOOP

◼ Example-1 Description:
Declare the integer variable n, execute the LOOP, and use the SWITCH to judge the n variable. When n
= 0, the switch to case 0, the end TCP point-to-point moves to the P0 position, and n accumulates the
value of 1; When n = 1, the switch to case 1, the end TCP point-to-point moves to the P1 position, and
n accumulates the value 1; when n = 2, the switch to case 2, then execute the EXIT command to end
the loop.

◼ Example-2: SWITCH has the DEFAULT value


INT n =0
LOOP
SWITCH n
CASE 0
PTP P0 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
CASE 1
PTP P1 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
DEFAULT
EXIT
ENDSWITCH
n=n+1
ENDLOOP

144
C25UE901-2208

◼ Example-2 Description:
Declare the integer variable is n, execute the loop, and use the SWITCH command to judge the n
condition variable. When n = 0, the switch to case 0, the end TCP point-to-point moves to the P0
position, and n accumulates the value of 1; When n = 1, the switch to case 1, the end TCP point-to-
point moves to the P1 position, and n accumulates the value 1; when n value is not equal to 0 or 1,
then execute the default, and it has only EXIT command and it will be end the loop.

※ The [condition variable name] of SWITCH corresponds to the CASE [variable], if no correspondence, then
execute the statement of DEFAULT.

Example-3: SWITCH extended use – multiple variable conditions


INT n =0
LOOP
SWITCH n
CASE 0,2,4
PTP P0 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
CASE 1,3
PTP P1 FINE=1 Vel=100% Acc=50% TOOL[0] BASE[0]
CASE 5
EXIT
ENDSWITCH
n=n+1
ENDLOOP

◼ Example-3 Description:
Declare the integer variable n, execute the LOOP, and use the SWITCH loop to judge the n condition
variable. When n = 0,2, 4, the switch to case 0, 2, 4; the end TCP point-to-point moves to the P0
position, and n accumulates the value of 1, 3; When n = 1, the switch to case 1, 3, the end TCP point-
to-point moves to the P1 position, and n accumulates the value 1; when n = 5, the switch to case 5,
then execute the jump program EXIT instruction to end the LOOP.

◼ Related Commands:
INT、WHILE、FOR、REPEAT、LOOP.

145
C25UE901-2208

2.5.8 @WAIT SEC Command


◼ Description:
The WAIT SEC command, which allows the user to set a period of desired time for waiting the robot
while running the program. For example: There will be a time when the pneumatic gripper fingers is
actually opened. This command can be used to allow the program temporarily stopped and start to execute
after the waiting period.
If this command is added, the pre-read function will also be ceased, and it will often proceed the
waiting signal before the important signal or point position.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
WAIT SEC [time in seconds]

Format/Parameter Description:
 “WAIT SEC” is the command, the desired waiting time in seconds shall be added after the
command. The waiting seconds are the referred from the software system, which can be used to
link with the pre-read program command at the bottom of WAIT SEC.
 [Time in seconds] is the waiting time, the constant positive floating point value, the input range is
0~2147483648, the unit is seconds, the minimum increment unit is 0.01 second. (Not
recommend to write WAIT SEC 0, unable to explain the physical phenomenon).
 Since the version of RSS3.3.24, WAIT SEC value may use the variable for switching.

◼ Example-1:
PTP P1
WAIT SEC 1.15
LIN P2

◼ Example-1 Description:
Move to the point P1 with the point-to-point mode, wait for 1.15 seconds, and then execute moving to
the point P2 with the linear mode.

146
C25UE901-2208

◼ Example-2:
$DO[1] = TRUE
WAIT SEC 2
$DO[1] = FALSE
◼ Example-2 Description:
Turn on the digital output signal DO[1], wait for 2 seconds, and then turn off the digital output signal
DO[1].
(This $DO[1] may be used to control the pneumatic gripper jaw, therefore, the actual opening/closing
action time required for the gripper jaw shall be given).

◼ Related Commands:
WAIT FOR、$DO

147
C25UE901-2208

2.5.9 @WAIT FOR Input Signal Command


◼ Description:
Wait for the external input signal, allows the user to set the desired input signal condition for waiting
during the program execution. For example: wait for the input signal from the material feed tray. The
program will continue the subsequent actions only after assuring the completion of material feed tray
signal. If the waiting input signal is not given at all times (for example: the sensor is damaged), the program
will wait at all times and will not take any action, therefore, it is required to manually check the source
problem of input signal.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
WAIT FOR [input signal] = = [Boolean variable]

Format/Parameter Description:
 “WAIT FOR” is the waiting signal command, the desired wait input signal format shall be filled
after the command.
 [Input Signal] is the input source, there are 4 signal sources for selection, digital input signal
($DI[]), Robot input signal ($RI[]), Fieldbus input signal ($SI[) or combined input signal ($MI[]).
 [Boolean variable] TRUE indicates the start or FALSE indicates the stops, Boolean logical
iinstructions, select anyone.

◼ Example-1:
PTP P1
WAIT FOR $DI[1] == TRUE
LIN P2

◼ Example-1 Description:
Move to the point P1 with the point-to-point mode, wait until the digital input signal is true, and then
execute moving to the point P2 with the linear mode.

148
C25UE901-2208

◼ Example-2:
$SO[1] = TRUE
WAIT FOR $SI[1] == FALSE
PTP P1
◼ Example-2 Description:
Turn on the No. 1 site fieldbus output signal ($SO[1]), wait for the No. 1 site fieldbus input signal
($SI[1]), and then start moving to the point P1 with the point-to-point mode.
(This $SO[1] may be the notification signal for notifying the upper controller PLC etc., and the robot
requires the input signal given by the upper controller to act).

◼ Related Commands:
WAIT SEC、$DI[]、$RI[]、$SI[]、$MI[].

149
C25UE901-2208

2.5.10 @WAIT FOR … TIMEOUT Input Signal Timeout Command


◼ Description:
While waiting for the IO signal, the waiting time can be specified, and the program will jump to the
specified label for specific command after this timeout.
As shown in the flow chart below, the program determines if the conditional of signal is established,
and then determines whether it is timedout or not. If it is timesout, it will go toward the label set by the
user to perform the action operation of subsequent program B.

No Yes
Input User set Program-B
Start signal TimeOut
label

Yes No

Program-A
Figure. 18 WAIT FOR … TIMEOUT Flow Chart

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.8 or above Caterpillar1.0.10 or above FINE (non pre-read)

◼ Command Format:
WAIT FOR [digital input signal] == [Boolean variable] TIMEOUT( [wait time],[user set label] )

Format/Parameter Description:
 [Digital input signal]: Wait for the digital input ( $DI[] ) signal.
 [Boolean variable] is TRUE or FALSE, Boolean logical instructions, select one from them.
 [Wait time]: the time to execute the timeout. The default is 0.1 second, the minimum value is 0.1
second, and the maximum value is 86400 seconds (one day).
 [User set label]: After the waiting time is timeout, switch to execute the label action. The user
requires to self-define the label name and determine the label placement position. When it is
timeout, it will executes the user self-defined program.

150
C25UE901-2208

◼ Example:
LOOP
PTP P0 FINE = 1
WAIT FOR $DI[1] == TRUE TIMEOUT(10,Safetypoint)
LIN P1
ENDLOOP

Safetypoint; label
LIN P2 Vel= 500 mm/s
USER_ALARM[1]
◼ Example Description:
Declare the LOOP …ENDLOOP, repeatedly execute the following 3-line program:
Move to the P0 position with point-to-point mode, wait until the 1st digital input signal as true, and
then move to the point P1 position in linear mode.
If the waiting time for the 1st digital input signal exceeds more than 10 seconds, then execute the
program labeled Safetypoint:, and it will be move to the P2 point position in linear mode, and adjust
the speed as 500 mm/s, and send the self-defined error (USER_ALARM[1]) to the first user.

◼ Related Commands:
LOOP、LIN、WAITFOR、USER_ALARM.

151
C25UE901-2208

2.5.11 @AND And Logic Gate Command


◼ Description:
One of the logical instructions, the logic gate of and, if there are A condition and B condition, the
action will be executed when both conditions are able to meet at the same time. As shown in the following
table and figure, the determination results of AND logic gate occur under the different conditions.

Table. 3 And Logic Determination Results


A Condition B Condition R Result
0 0 0
0 1 0
1 0 0
1 1 1

Figure. 19 Sequence Diagram of And Logic Determination Results

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Condition A] AND [condition B]

Format/Parameter Description:
 AND is the logic gate instruction, it requires to collocate with the other logical instructions for use,
such as IF, WHILE.
 [Condition A] and [condition B] are the conditions set by the user, such as the variable condition
setting and signal condition setting, which can be the following logical instructions.

152
C25UE901-2208

Operator Name Syntax Operator Name Syntax


Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to

Greater than A>B Logic negation !A


Greater than or
A >= B
equal to

 It requires to distinguish the different use states, which may collocate with parentheses () for
classification. It is recommended that the quantity of judgmental in () does not exceed 30
conditions.

◼ Example-1:
PTP P0 FINE = 1
IF $DI[2] == TRUE AND $DI[3] == TRUE THEN
PTP P1
ENDIF
LIN P3

◼ Example-1 Description:
Move to the point P0 position with the point-to-point mode.
IF judgmental, when the 2nd channel digital input ($DI[2]) and the 3rd channel digital input ($DI[3])
signals are true, the point-to-point will move to point P1 position when the condition is met, and then
linear movement will occure for P3 point position.
IF the condition is untenable, then it will not be moved to the P1 point position.
Result: Both $DI[2] and $DI[3] conditions are tenable, the move path P0→P1→P3 point positions.
None of the $DI[2] and $DI[3] conditions are tenable, the move path P0→P3 point positions.

153
C25UE901-2208

◼ Example-2:
INT X1 = 0
PTP P0 FINE=1
WHILE (X1<3) AND ($C[3] == 1)
PTP P1
PTP P0
X1 = X1 +1
ENDWHILE
LIN P3
◼ Example-2 Description:
Declare the integer variable X1, the initial value is 0, and move to the point P0 position with the point-
to-point mode.
The while judgmental; while (X1<3) and ($C[3] == 1) both are tenable, move to the point P1 position
with the point-to-point mode, move to the point P0 position with the point-to-point mode, and adding
1 to the X1 value for one time, until the while conditional is untenable. And then move to the P3 point
position in linear mode.

Results: (X1<3) and ($C[3] == 1) conditions, both are tenable, the move path P0→(P1→P0)*3
times→P3 point position.
(X1<3) and ($C[3] == 1) conditions, none of them are tenable, the move path P0→P3 point
position.

◼ Related Commands:
IF、WHILE、OR、$C[]、INT.

154
C25UE901-2208

2.5.12 @OR Logic Gate Command


◼ Description:
One of the logical instructions, the logic gate of OR, if there are A condition and B condition, two
conditions will be executed when one of the two conditions is able to meet. As shown in the following table
and figure, the determination results of OR logic gate occur under the different conditions.
Table. 4 OR Logic Determination Results
A Condition B Condition R Result
0 0 0
0 1 1
1 0 1
1 1 1

Figure. 20 Sequence Diagram of OR Logic Determination Results

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Condition A] OR [condition B]

Format/Parameter Description:
 OR is the logic gate instruction of OR, it requires to collocate with the other logical instructions to
use, such as IF、WHILE.
 [Condition A] and [condition B] are the conditions set by the user, such as the variable condition
setting and signal condition setting, which can be the following logical instructions, equivalent
condition judgmental.

155
C25UE901-2208

Operator Name Syntax Operator Name Syntax


Less than A<B Not equal to A != B

Less than or
A <= B Equal to A == B
equal to

Greater than A>B Logic negation !A


Greater than or
A >= B
equal to
 It requires to distinguish the different use states, which may collocate with parentheses () for
classification. It is recommended that the quantity of judgmental in () does not exceed more than
30 conditions.

◼ Example-1:
PTP P0 FINE = 1
IF $DI[2] == TRUE OR $DI[3] == TRUE THEN
PTP P1
ENDIF
LIN P3

◼ Example-1 description:
Move to the point P0 position with the point-to-point mode.
IF judgmental, when the 2nd channel digital input ($DI[2]) and the 3rd channel digital input ($DI[3])
signals are both true (TRUE), the point-to-point will move to P1 point position when the condition is
met, and then linear move to the P3 point position.
IF the condition is untenable, then it will not be moved to the P1 point position.
Result: One of the $DI[2] or $DI[3] condition is tenable, the move path P0→P1→P3 point positions.
Only none of $DI[2] and $DI[3] conditions are untenable at the same time, the move path
P0→P3 point positions.

156
C25UE901-2208

◼ Example-2:
INT X1 = 0
PTP P0 FINE=1
WHILE (X1<3) OR ($C[3] == 1)
PTP P1
PTP P0
X1 = X1 +1
ENDWHILE
LIN P3
◼ Example-2 Description:
Declare the integer variable X1, the initial value is 0, and move to the P0 point position with the point-
to-point mode.
The WHILE judgmental, while (X1<3) and ($C[3] == 1) and one of two is tenable, move to the point P0
position with the point-to-point mode, move to the point P1 position with the point-to-point mode,
and complete adding 1 to the X1 value for one time, until the WHILE conditional is untenable, and then
linear move to the P3 point position.
Results: (X1<3) or ($C[3] == 1) condition, one of the two is tenable, the move path P0→(P1→P0)*3
times→P3 point position;
Only none of (X1<3) or ($C[3] == 1) condition is untenable at the same time, the move path
P0→P3 point position.

◼ Related Commands:
IF、WHILE、AND、$C[]、INT.

157
C25UE901-2208

2.5.13 @INTERRUPT…WHEN…DO… Declare Interruption Condition Command


◼ Description:
The priority, trigger condition and subroutine setting instruction declaration, these instruction are
only used for the declaration of interruption instruction. If the open is required, then it requires to refer the
interruption open/close commands. The interruption commands requires to declare the trigger signal
condition, the signal priority and specify the subroutine name to be executed after the interruption. After
completing the execution of interruption subroutine, it will continue the action which has not been
executed completely.
Examples of applicable cases: If the robot is used to move the workpiece A in the cyclic action, if
the trigger condition of sensor signal is tenable, the robot will execute another subroutine to move the
workpiece B, after completing the execution of moving workpiece B, it will be returned to the original cyclic
action of moving workpiece A.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.5 or above Caterpillar1.0.4 or above CONT (pre-read)
 After completing the declaration of interrupt instruction, the interruption task function will only
be enabled by using the interruption signal instruction again.

◼ Command Format:
INTERRUPT [priority value] WHEN [signal condition determination] DO [subroutine name]

Format/Parameter Description:
 [Priority value] is the interruption signal action, the positive integer value, it may be entered the
value of 1~8, and 1 is the top priority.
 [Signal condition determination] is the digitalinput $DI signal, for example: $DI[1] == TRUE. When
the signal is turned on/turned off at one time, only one interruption will be executed; if the signal
is always turned on, the subroutine specified by the interruption will not be executed for all the
time.
 [Subroutine name] is defined by the user, for example: PRO_1(). When the interruption signal
condition is determined to be tenable, the subroutine content will be executed; after completing
the execution of subroutine, it will continue the originally unfinished program action.

158
C25UE901-2208

◼ Example:
INTERRUPT 1 WHEN $DI[1] == TRUE DO Subprogram1()
INTERRUPT ON 1
PTP P0 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
PTP P1 FINE=1 Vel=10% Acc=100% TOOL[0] BASE[0]

DEF Subprogram1()
PTP P2 CONT Vel=100% Acc=100% TOOL[0] BASE[0]
WAIT FOR $DI[1] == FALSE
END

◼ Example Description:
Declare the interruption instruction, the priority is 1, the trigger signal condition of judgment is the
turn-on digital input signal ($DI[1] == TRUE), and the subroutine Subprogram1 will be executed after
the condition is tenable, and enable the interruption instruction action with priority 1.
Move from P0 point to P1 point with the point-to-point move mode, when the 1st digital input signal
is turned on ($DI[1] == TRUE) during the movement, the current action from P0 to P1 will be
interrupted, and changed to execute the subroutine action of Subprogram1.
The action content of subroutine is to move to point P2 (safety point) with the point-to-point mode,
and wait for the 1st digital input signal to shut off ($DI[1] == FALSE).

◼ Related Commands:
BRAKE、$DI[]、DEF…END、INTERRUPT ON/OFF.

159
C25UE901-2208

2.5.14 @INTERRUPT ON/OFF Enable/Stop Interruption Command


◼ Description:
The enable/stop interruption command; it is required to declare through the interruption condition
instruction (INTERRUPT … WHEN … DO…) to complete the declaration in advance before the enable/stop
interruption instruction can be effectively applied. This instruction is mainly used for controlling the switch
interruption instruction action between paragraphs.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.5 or above Caterpillar1.0.4 or above CONT (pre-read)

◼ Command Format:
INTERRUPT Open [priority value]
INTERRUPT ON [priority value]
or
INTERRUPT Close [priority value]
INTERRUPT OFF [priority value]

Format/Parameter Description:
 ON/OFF is the control interruption instruction, ON is to open the interruption instruction, OFF is
to close the interruption instruction, the instruction can only select ON or OFF, i.e. select either
one of them.
 [Priority value] is to define the priority value of interruption signal action, it is the positive integer
value, which is able to enter the value of 1~8, 1 is the top priority; or it may enter ALL the
instruction to open or close the all interruption instructions at one time.

160
C25UE901-2208

◼ Example-1:
INTERRUPT 1 WHEN $DI[1] == TRUE DO Subprogram1()
INTERRUPT ON 1
PTP P0 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
PTP P1 FINE=1 Vel=10% Acc=100% TOOL[0] BASE[0]
INTERRUPT OFF 1

DEF Subprogram1()
PTP P2 CONT Vel=100% Acc=100% TOOL[0] BASE[0]
WAIT FOR $DI[1] == FALSE
END
◼ Example-1 Description:
Declare the interruption instruction, the priority is 1, the trigger signal condition of judgment $DI[1] ==
TRUE, and the subroutine Subprogram1 will be executed after the condition is tenable, and enable the
interruption instruction action with priority 1.
Move from point P0 to point P1 with the point-to-point move mode, when $DI[1] == TRUE occurs
during the movement, the current action from P0 to P1 will be interrupted, and changed to execute
the subroutine action of Subprogram1.
The action content of subroutine is to move the P2 point (safety point), and wait for $DI[1] == FALSE.
After completing the subroutine action, and until complete at the P1 point position, the interrupt
instruction action with priority 1 will be closed.

161
C25UE901-2208

◼ Example-2:
INTERRUPT 1 WHEN $DI[1] == TRUE DO Subprogram1()
INTERRUPT 2 WHEN $DI[2] == TRUE DO Subprogram2()
INTERRUPT ON ALL
PTP P0 FINE=1 Vel=100% Acc=100% TOOL[0] BASE[0]
PTP P1 FINE=1 Vel=10% Acc=100% TOOL[0] BASE[0]
INTERRUPT OFF ALL

DEF Subprogram1()
PTP P2 CONT Vel=100% Acc=100% TOOL[0] BASE[0]
WAIT FOR $DI[1] == FALSE
END
DEF Subprogram2()
PTP P3 CONT Vel=100% Acc=100% TOOL[0] BASE[0]
WAIT FOR $DI[2] == FALSE
END

◼ Example-2 Description:
Declare the interruption instruction, the priority is 1, the trigger signal condition of judgment $DI[1] ==
TRUE, and the subroutine Subprogram1 will be executed after the condition is tenable.
Declare the interruption instruction, the priority is 2, the trigger signal condition of judgment $DI[2] ==
TRUE, and the subroutine Subprogram2 will be executed after the condition is tenable.
All interruption instructions of the priority (1&2) will be opened.
Move the P0 point to point P1 with the point-to-point move mode, when $DI[1] == TRUE occurs during
the movement, the current action from P0 to P1 will be interrupted, and changed to execute the
subroutine action of Subprogram1; when $DI[2] == TRUE occurs during the movement, the current
action from P0 to P1 will be interrupted, and changed to execute the subroutine action of
Subprogram2. In which, the priority of $DI[1] is greater than $DI[2].
The action content of subroutine is to move the point P2 (safety point) with the point-to-point mode,
and wait for $DI[1] == FALSE.
The action content of subroutine is to move the point P3 (safety point) with the point-to-point mode,
and wait for $DI[2] == FALSE.
After completing the subroutine action, and until complete at the P1 point position, all interruption
instruction actions of the priority (1&2) will be closed.

◼ Related Commands:
INTERRUPT … WHEN … DO… , BRAKE, $DI[], DEF…END.

162
C25UE901-2208

2.5.15 @BREAK_POINT Command


◼ Description:
The instruction of program break point, when the operation is run to the command, the program
will be paused, and allow the program stopped for the user to confirm and check. The program after the
break point can be continued to execute through the program operation button.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.20 or above Caterpillar1.0.4 or above FINE (non pre-read)

◼ Command Format:
BREAK_POINT

Format/Parameter Description:
 “BREAK_POINT” is a command, which allows the program to stop and then user need to check &
confirm. After completing the confirmation, the operator must click the program operation
button again to continue the subsequent program operation. The multiple program break points
can be set in the same program.

◼ Example:
PTP P1
$C[1] = 5
BREAK_POINT
LIN P2

◼ Example Description:
Move to the point P1 with the point-to-point mode. After the value of the 1st count register is equal to
5, one new breakpoint will be added to the program. The operator must click the program operation
button again to continue the program execution. Move to the point P2 with the linear mode.

◼ Related Commands:
WAIT SEC、BRAKE、INTERRUPT … WHEN … DO…、INTERRUPT ON/OFF.

163
C25UE901-2208

2.6 CODE F, MOTION PARAMETERS & SYSTEM COMMAND SETTING


This chapter describes the motion parameter setting of commands F separately.
2.6.1 @SET_OVERRIDE_SPEED Command
◼ Description:
Using this command in the program is to change the overall speed percentage of the program, and
adjust the speed to adjust the line. After completing the setting, it can be placed in the initial running
speed of the program or in any stroke i.e. set the percentage of speed value.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)
⚫ Use the command for editing, which is not limited to place at the position in the main program,
and the speed switching will be started when the execution reaches at the program of the line
program code.

◼ Command Format:
SET_OVERRIDE_SPEED [parameter 1]

Format/Parameter Description:
 The parameter variable type is the positive integer. The input range of [parameter 1] is 1 to 100,
which indicates that the executed speed of the arm movement is 1%~100%. [Parameter 1]
cannot be 0. The input parameter indicates the overall speed percentage of the operation. If
the program is executed manually/automatically, the default overall speed of executing
override is 10%.
◼ Example:
SET_OVERRIDE_SPEED 100
PTP P0
WAIT SEC 1
SET_OVERRIDE_SPEED 55
LIN P1

◼ Example Description:
When the program is executed, the overall speed of the robot will be reached to 100% first, and the
point-to-point moves to the P0 point. After waiting for 1 second, the overall speed of the arm will be
changed to 55% and move to the P1 point with linear movement.

◼ Related Commands:
SET_SPEED、SET_ACC.

164
C25UE901-2208

2.6.2 @SET_SPEED Command


◼ Description:
Using this command in the program that is able to set the moving speed of linear track or circular
track in the action; it is usually used when the speed needs to adjust in multiple stages, and the speed (Vel=)
in the single line point position of the program is usually ignored without given defintion.
1. Using the SET_SPEED command is able to allow the robotic arm acquiring
higher operation speed, but too high speed of value may exceed the load of
robotic arm that may result the occurrence of error alarms.
2. Please adjust the parameters properly according to the actual using
conditions to avoid the equipment damage due to excessive operation speed.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
SET_SPEED [speed parameter]

Format/Parameter Description:
 [Speed parameter] is the positive integer parameter value, which cannot be 0. There are different
default values depending on the different robot models.
 The input parameter indicates the setting speed, the unit is mm/s, the range of 6-axis (RA6) is
between 1 and 2000, the range of Delta (RD4) is between 1 and 6000, and the range of SCARA (RS4)
is between 1 and 4000 (except for the RS406 range i.e. between 1 and 3200).

◼ Example-1:
SET_SPEED 2000
LIN P0
CIRC P1 P2

◼ Example-1 Description:
Set the speed of general motion as 2000 mm/s.
The robotic arm uses the linear motion mode moving to the target point P0.
Take the P0 point as the starting point, P1 point is the transition point of circular arc, the ending point
of P2 point performs the circular arc motion.
※ Inputs of Vel, Acc, TOOL and BASE can be omitted. When omitted, it will refer to the previous line
of command value, or the initial definition parameter.

165
C25UE901-2208

◼ Example-2: (HRSS3.3 later speed may fill with the variable)


INT High_SPEED = 2000
INT Low_SPEED = 500
SET_SPEED Low_SPEED
LIN P0
SET_SPEED High_SPEED
LIN P1

◼ Example-2 Description:
Declare the integer type variable High_SPEED, the initial value is 2000 mm/s. Declare the integer type
variable Low_SPEED, the initial value is 500 mm/s. Change the speed to low speed (500 mm/s), and
linear move to the P0 point. Change the speed to high speed (2000 mm/s), and linear move to the P1
point.

◼ Related Command:
SET_ROTATION_SPEED

166
C25UE901-2208

2.6.3 @SET_ACC Set Acceleration Command


◼ Description:
Set the acceleration and deceleration Commands executed by the program. It may set the 100%
acceleration/deceleration time of the action. It is usually used when the acceleration requires to adjust in
multiple stages, and the acceleration (Acc=) in the single line point position of the program is usually
ignored without given defintion. This is the time required to accelerate to the desired motion speed, the
unit is ms, in the range is between 20 to 1000.
If this setting is not used, there are different default values depending on the model.
1. Using the SET_ACC Command is able to allow the robotic arm acquiring higher
perform ability, but too low setting value may exceed the load of robotic arm that may
result the occurrence of error alarms.
2. Please adjust the parameters properly according to the actual using conditions to
avoid the equipment damage due to excessive operation speed.

For example: RA605-710-GB/GC Payload is the default of acceleration time for 0 kg: 176 ms (the
default is given by the HIWIN manufacturer in accordance with different models).
According to the V-T curve diagram, the setting value of this commands is the △t value, as the
acceleration settings of (1)th and (3)th intervals shown in the following figure, which determine the initial
acceleration and ending acceleration settings of each action for the robot action (intervals of (2) uniform
accelerations etc.).
T: Time.
V: Speed.
△t: Acceleration time.

Speed
(1) (2) (3)

Time T
△t △t
Figure. 21 Speed - Time (V-T) Curve Diagram
◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

167
C25UE901-2208

◼ Command Format:
SET_ ACC [acceleration parameter value]

Format/Parameter Description:
 [Acceleration parameter value] The variable type is the positive integer value, shall not be 0, the
range is between 20 and 1000, the smaller the value indicating the faster the deceleration. If the
single line sets the Acc value, the acceleration value will be replaced, usually the user omits the
acceleration setting value (Acc) of single line program code, using the SET_ ACC to do the interval
acceleration/deceleration adjustment. It is recommended to modify the parameter value with
gradual adjustment, please do not adjust more than 50ms at one time. It may generate the
phenomena of sudden acceleration or sudden pause, special attention is required.
Table. 5 Default Value of Acceleration Parameters
Robot Spec.
RS405 RS410 RA605 RA610 RA620 RD403
Parameter Name
Acceleration Setting
(ms) SET_ACC (ms) 120 110~170 55~176 265~468 280~315 222

◼ Example-1:
SET_ACC 500
PTP P0 CONT Vel=100% Acc=50% TOOL[0] BASE[0]

◼ Example-1 Description:
The acceleration time is 500 ms, then use the point-to-point (PTP) move mode, with the smooth track,
speed of 100%, acceleration of 50%, tool coordinate [0], base coordinate [0], execute up to the
position of P0 point, the 2nd line has changed the acceleration to 50% at this time. The acceleration
time is no longer 500 ms, but 500/(50%) = 1000 ms.

168
C25UE901-2208

◼ Example-2:
SET_ACC 500
PTP P0
WAIT SEC 1
SET_ACC 200
PTP P1
◼ Example-2 Description:
The acceleration time of setting action is 500 ms, and then uses the point-to-point (PTP) move mode to
the position of P0 point, waiting for 1 second, the acceleration time of setting action is 200 ms, and
then use the point-to-point move mode to the position of P1 point.
Since PTP omits the acceleration parameter, it will refer to the commands of previous line, or the initial
definition parameter. The user can adjust the desired acceleration value in the interval of the program.

Note: The line program code omits the setting values of CONT/FINE, VEL, ACC, TOOL [] and base [], so
that it can be used for the adjustment of subsequent overall speed.

◼ Related commands:
SET_SPEED 、SET_ROTATION_SPEED.

169
C25UE901-2208

2.6.4 @SET_ROTATION_SPEED Set Posture Rotation Speed Command


◼ Description:
Using this Command in the program is able to set the speed of the rotation in the action.

1. Using the SET_ROTATION_SPEED Command is able to allow the robotic arm


acquiring higher operation speed, but too much higher speed may exceed
the load of robotic arm that may result the occurrence of error alarms.
2. Please adjust the parameters properly according to the actual using
conditions to avoid the equipment damage due to excessive operation
speed.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
SET_ROTATION_SPEED [rotation speed parameter]

Format/Parameter Description:
 [Rotation speed parameter] is the positive integer parameter value for setting the robot rotation
speed, the unit is deg/sec, which can limit or increase the motor speed.
 The 6-axis (RA6) range is between 1 to 500, the DELTA (RD4) range is between 1 to 2400, and the
SCARA (RS4) range is between 1 to 2400.

◼ Example:
SET_ROTATION_SPEED 100
PTP P0

◼ Example Description:
Set the posture rotation speed, the unit is 100 deg/sec, and move to the P0 point with the point-to-
point mode.

◼ Related Commands:
SET_SPEED.

170
C25UE901-2208

2.6.5 @SET_TOOL Coordinate System Command


◼ Description:
Using this command is able to select the specified TOOL setting, or change the TOOL setting
parameters. It is usually used to act as the adjustment command for the switching between multiple end
tools, and the tool coordinates (TOOL[#]) in the point position of the program single line shall be ignored
without making definition.
The schematic diagram of tool coordinate system change (the picture on the left is before the change;
the picture on the right is after the change).

Figure. 22 Schematic Diagram of Tool Coordinate System Change


(Picture on the left is before the change; picture on the right is after the change)

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
SET_TOOL [tool parameter value]

Format/Parameter Description:
 [Tool parameter value] is to set the number value, which is able to input 2 types i.e. positive integer
value and frame.
 The input range of positive integer value is between 0 to 15, allow the robot to select the tool setting
of the number, and the interface tool number on the upper right corner will also be changed, and the
default is TOOL[0].
 If the frame is an input, then the Base setting parameter currently selected will be changed to the
value of FRAME, and the FRAME variable shall be declared at the front end of the program in
advance.
 When this command is used, the preset format TOOL[#] of each line point position in the program
shall be deleted.

171
C25UE901-2208

◼ Example-1:
SET_TOOL 1
LIN P1 FINE=1 Vel=3000mm/s Acc=100%

◼ Example-1 description:
The TOOL coordinate of switching tool is the 1st set of parameters, and move to P1 point with the linear
motion (TOOL[#] shall be omitted from the command behind the 2nd line).

◼ Example-2:
FRAME T_ONE
T_ONE.X = 100
SET_TOOL T_ONE
LIN P1 FINE=1 Vel=3000mm/s Acc=100%

◼ Example-2 description:
Declare the frame variable T_ONE, the X-axis of T_ONE parameter is 100mm, change the coordinate
system TOOL currently used to the T_ONE variable, and move to P1 point with the linear motion.
(TOOL[#] shall be omitted from the command behind the 2nd line).

◼ Related Commands:
FRAME、SET_BASE.

172
C25UE901-2208

2.6.6 @SET_BASE Coordinate System Commands


◼ Description:
Using this command is able to select the specified Base setting, or change the Base setting parameters.
At the same time, the small Base page on the upper right corner of interface will also be changed to the
base number specified by the user. It is usually used to act as the adjustment command for the switching
between multiple base coordinates, and the base coordinates (BASE[#]) in the single line point position of
the program shall be ignored without making definition.

Figure. 23 Schematic Diagram of Base Coordinate System Change


(picture on the left is before the change; picture on the right is after the change)

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
SET_BASE [base parameter value]

Format/Parameter Description:
 [Base parameter value] is to set the number value of base coordinate system, which is able to input 2
types i.e. positive integer value and frame.
 The input range of positive integer value is between 0 to 31, allow the robot to select the base
setting of the number, and the interface base number on the upper right corner will also be changed,
and the default is BASE[0].
 If the frame is a input, then the Base setting parameter currently selected will be changed to the
value of FRAME, and the FRAME variable shall be declared at the front end of the program in
advance.
 When this command is used, the preset format BASE[#] of each line point position in the program
shall be deleted.

173
C25UE901-2208

◼ Example-1:
SET_BASE 1
LIN P1 FINE=1 Vel=3000mm/s Acc=100%

◼ Example-1 Description:
The BASE coordinate of switching base is the 1st set of parameters, and move to P1 point with the
linear motion (BASE[#] shall be omitted from the command behind the 2nd line).

◼ Example-2:
FRAME B_ONE
B_ONE.Y = 100
SET_BASE B_ONE
LIN P1 FINE=1 Vel=3000mm/s Acc=100%

◼ Example-2 Description:
Declare the frame variable as B_ONE, the Y-axis of B_ONE parameter is 100mm, change the coordinate
system BASE currently used to the B_ONE variable, and move to P1 point with the linear motion.

◼ Related Commands:
FRAME、SET_TOOL.

174
C25UE901-2208

2.6.7 @SET_PAYLOAD: Set End Payload Weight Data Command


◼ Description:
Use the Set_payload command, which is used to change the different payload values in the program.
The input parameter indicates the set number of payload data, and the command will be active only
when the setting is completed on the HRSS parameter page of payload setting.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
SET_PAYLOAD[payload setting number]

Format/Parameter Description:
 [Payload setting number] is the setting number of end payload mass, the value type is the
positive integer, and the input range number is 1 to 20 sets.
 The end payload weight value includes the total weight of the 6th -axis flange surface of the robot,
including the workpiece to be gripped, gripper jaw and sheet metal fixture etc.; different ranges
can be input depending on the different robot’s specifications. For example: For 5kg, the
recommended range for 6 axis is 0 to 5, and its weight setting will affect the
acceleration/deceleration value.

◼ Example:
SET_PAYLOAD[1]
LIN P1
$DO[1] = TRUE
SET_PAYLOAD[2]
LIN P2

◼ Example Description:
⚫ Set as the number of 1st set of payload mass; (assumed to be 2 kg, only the payload of gripper jaw
but not include the object weight).
⚫ Move to the P1 point with linear mode, turn on the 1st digital output signal $DO[1], and pick the
object (after adding weight);
⚫ Switch the setting as the number of 2nd set of payload mass, and then move to the P2 point with
the linear mode; (assumed to be 3 kg, the payload of gripper jaw plus the object weight).

◼ Related Commands:
$DO[]

175
C25UE901-2208

2.6.8 @GETPOINT: Get Current Coordinate Value Commands


◼ Description:
Get the coordinates (X, Y, Z, A, B, C) and angle values (A1, A2, A3, A4, A5, A6) of current robot position,
and place the position variable value (E6POINT can be used to declare the position variable) as desired by
the user at the robot position information, the unit of distance is mm, and the unit of angle is degree.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Position variable name] = GETPOINT

Format/Parameter Description:
 [Position variable name] is the position coordinate variable as self-defined and declared by the
E6POINT user; or the point position information of point position window may also be used, for
example: P0, P1...Pn, n is any integer, which shall be the position variable.
 GETPOINT, execute this program code, then able to get the coordinate value and angle value of
current position, which can be used for subsequent operations.

◼ Example:
E6POINT
Newpoint1
Newpoint1 = GETPOINT
Newpoint1.Z = Newpoint1.Z - 10
PTP Newpoint1

◼ Example Description:
Use E6POINT to declare the position variable Newpoint1, transfer the current robot position value to
Newpoint1, accumulate -10mm to the Z-axis position of Newpoint1, and use the point-to-point mode
moving to the new Newpoint1 position; execute the above procedures every time, take the current
position as the reference to allow the Z-axis able to move 10mm.

◼ Related Commands:
E6POINT、E6POS、E6AXIS

176
C25UE901-2208

2.6.9 @GET_MOTION_STATUS Read Current Motion Status Commands


◼ Description:
Read the current motion status and get the current status of the robot. When the read value is 0, it is
the idle status (Idle), -1 is the running status (Running) and 2 is the hold status (Hold).

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Variable Name] = GET_MOTION_STATUS

Format/Parameter Description:
 [Variable name] is REAL or INT variable as self-defined and declared by the user, and record the
variable value of robot status.
 The variable name is used for recording values. The codes of each status for the robot are shown
as follows:
Status
Robot Status
Code
0 Idle
-1 Running
2 Hold
Note: Currently, HRSS is a single execution sequence mode, which is unable to display the running and
hold status (Hold) in the register, however, only when it is the remote connection (SDK), then
the functionality is equipped.

◼ Example-1:
PTP P0 CONT
$C[2] = GET_MOTION_STATUS
PTP P1
WAIT SEC 1
$C[2] = GET_MOTION_STATUS

◼ Example-1 Description:
Move to the point P0 with the point-to-point mode, continuous track (CONT), therefore, the program
will be pre-read first. While still moving to the P0 point, read the current motion status and transfer
the value into the 2nd timing register. The status value is -1 at this time (in motion).
Move to the point P1 with the point-to-point mode, wait for 1 second, then read the current motion
status and transfer the value into the 2nd timing register, the status value is 0 at this time (idle).

177
C25UE901-2208

◼ Example-2:
PTP P0 CONT
LOOP
IF GET_MOTION_STATUS == 0 THEN
PTP P1
EXIT
ENDIF
ENDLOOP

◼ Example-2 Description:
Move to the P0 point with the point-to-point mode, continuous track (CONT), enter the LOOP. If, the
current motion status value is read as 0, then proceed the point-to-point move mode to P1 point, and
exit the loop.

◼ Related Commands:
$C[].

178
C25UE901-2208

2.6.10 @EXT_TCP_START External TCP Point Position Track Commands


2.6.11 @EXT_TCP_END External TCP Point Position Track Commands
◼ Description:
When the robot picks the workpiece and executes the LIN or CIRC motion to the external tool points,
for example: polishing operation. If the posture is required to change, then this command is required to use.
If EXT_TCP is not used, then the workpiece and tool will only contact at the start and end points. As
shown in the picture below

Used EXT_TCP Command

Not Used EXT_TCP Command


Figure. 24 EXT_TCP Schematic Diagram
(upper picture is already used it, lower picture is not used it)

◼ Prerequisite:
Applicable Software Version Default state
HRSS3.2.1 or above Caterpillar1.0.1 or above FINE (non pre-read)
 At the external tool point (the position of red sharp point in the figure below), teach a BASE
coordinate system, and the origin of BASE coordinate system is located on the tool machining
point.

Teach Base
Figure. 25 Origin Diagram of Teach BASE Coordinate System

 Teach the start point P1 and end point P2 (at the red spot).

179
C25UE901-2208

Figure. 26 Picture of Teach Start Point P1 (left) Picture of Teach End Point P2 (right)

◼ Command Format:
EXT_TCP_START
[motion command]
EXT_TCP_END

Format/Parameter Description:
 The action instruction between EXT_TCP_START and EXT_TCP_END, it will proceed the motion with
the external tool point refers to base coordinate point mode.
 [Action instruction] is the combination of logical instructions, move command or signal instruction
for executing the statement action.

◼ Example:
EXT_TCP_START
LIN P1 FINE=1 Vel=1000mm/s Acc=100% TOOL[0] BASE[1]
LIN P2 FINE=1 Vel=1000mm/s Acc=100% TOOL[0] BASE[1]
EXT_TCP_END

◼ Example Description:
After the robot goes to P1, it performs (polishing) the machining along the straight line of the
workpiece. During the process of moving to P2, the workpiece maintains contact with the external tool
point.

Figure. 27 Schematic Diagram of Using EXT_TCP

◼ Related Commands:
LIN、CIRC

180
C25UE901-2208

2.6.12 @TL_SET: Set Torque Limit Monitoring Parameter Commands


◼ Description:
The torque limit value of each axis can be set separately. Under the open of torque monitoring
function, when the torque of the axis reaches the limit value, then the robot motion is stopped. Setting「-1」
indicates that the torque limit monitoring is not enabled for this axis. The default of each axis is not to open
this function, which shall be set by the user.
◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.19 or above Caterpillar1.1.2 or above CONT (pre-read)

◼ Command Format:
TL_SET( [1st -axis value], [2nd -axis value], [3rd -axis value], [4th -axis value], [5th -axis value], [6th-–axis
value], [E1th -axis value], [E2th -axis value], [E3th -axis value] )

Format/Parameter Description:
 [1st -axis value] ~ [6th-axis value] is the torque limit value from the 1st to the 6th robot arm axes, an
integer (int) form as follows, the unit is %, the input range is 1 ~ 300. If the input value for 1st axes
is「-1」, this indicates that the torque limit monitoring of the axis is not enable; the default
monitoring function for axes has not been opened (-1).
 [E1st-axis value] ~ [E3rd-axis value] is the torque limit value from the 1st -axis to the 3rd -axis, the
integer (INT) form, an integer (int) form, the unit is %, the input range is 1 ~ 300. If the input value
for 1st axes is「-1」, this indicates that the torque limit monitoring of the axis is not enable; the
default monitoring function for axes has not been opened denoted as (-1).

◼ Example:
TL_SET(50, -1, 20, 30, -1, -1, 100, -1, -1)
TL_START
PTP P0
PTP P1
TL_END
◼ Example Description:
Set the torque limit monitoring function, the 1st -axis is set as 50%, the 3rd -axis is set as 20%, the 4th -
axis is set as 30%, the E1th-axis is set as 100%, the 2nd, 5th , 6th , E2th, E3th-axes are set as -1 which
indicates that the monitoring is not enabled.
Start the torque limit monitoring function.
Move to P0 with the point-to-point mode, and move to P1 with the point-to-point mode.
End the torque limit monitoring function.

◼ Related Commands:
TL_START、TL_END.

181
C25UE901-2208

2.6.13 @SERVO_ON Full-axis Excitation Commands


◼ Description:
The full-axis excitation command will make the robot motor acting as the full-axis (the 1st & 2nd -axes)
changing to the excitation state, and allow the robot arm proceeding the operation state. Currently, it is only
applicable to the SCARA. Due to the safety issue, this is not available for the 6-axis robotic arm temporarily.
Note: If the operation closes to the robotic arm, please be sure to hold the emergency stop switch in
one hand, in order to hold the robot arm state at any time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.23 or above Caterpillar1.1.6 or above CONT (pre-read)
 Only applicable for the 1 -axis and 2 -axis motors of SCARA robotic arm (SCARA).
st nd

◼ Command Format:
SERVO_ON

Format/Parameter Description:
 Use the program mode to turn on the excitation state of motor.

◼ Example:
SERVO_ON

◼ Example Description:
Turn on the 1st -axis and 2nd -axis motor excitation of SCARA series.

◼ Related Commands:
、SERVO_OFF、SERVO_ON(#)、SERVO_OFF(#).

182
C25UE901-2208

2.6.14 @SERVO_OFF Full-axis De-excitation Commands


◼ Description:
The full-axis de-excitation command will make the robot acting as the full-axis (the 1st & 2nd -axes)
changing to the de-excitation state, and allow the robot proceeding the operation state. Currently, it is only
applicable to the SCARA robotic arm. Due to the safety issue, this is not available for the 6-axis robotic arm
temporarily. It allows the user entering the manual mode to push the robot to the correction point position or
move to the desired position, and then exciting the motor, which is the alternative adjustment mode.
Note: If the operation closes to the robotic arm, please be ready to hold the emergency stop switch in
one hand, in order to pressed the emergency stop of the robot state at any time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.23 or above Caterpillar1.1.6 or above CONT (pre-read)
 st nd
Only applicable for the 1 -axis and 2 -axis motors of SCARA robotic arm.

◼ Command Format:
SERVO_OFF

Format/Parameter description:
 Use the program mode to turn on the de-excitation state of motor.

◼ Example:
SERVO_OFF

◼ Example Description:
De-excite the 1st -axis and 2nd -axis motor of SCARA series.

◼ Related Commands:
SERVO_ON、SERVO_ON(#)、SERVO_OFF(#).

183
C25UE901-2208

2.6.15 @SERVO_ON(#) Single-axis Excitation Command


◼ Description:
The full-axis excitation command will make the robot motor acting as the single-axis (the 1st or 2nd -
axes) changing to the excitation state, and allow the arm proceeding the operation state. Currently, it is only
applicable to the SCARA robotic arm. Due to the safety issue, this is not available for the 6-axis robotic arm
temporarily.
Note: If the operation closes to the robotic arm, please be ready to hold the emergency stop switch in
one hand, in order to press the emergency stop switch of robot at any time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.23 or above Caterpillar1.1.6 or above CONT (pre-read)
 st nd
Only applicable for the 1 -axis or 2 -axis motors of SCARA robotic arm (SCARA).

◼ Command Format:
SERVO_ON

Format/Parameter description:
 Use the program mode to turn on the excitation state of motor.

◼ Example:
SERVO_ON(2)

◼ Example Description:
Turn on the excitation function of 2nd -axis motor (SCARA series).

◼ Related Commands:
SERVO_ON、SERVO_OFF、SERVO_OFF(#).

184
C25UE901-2208

2.6.16 @SERVO_OFF(#) Single-axis De-excitation Commands


◼ Description:
The full-axis de-excitation command will make the robot motor acting as the single-axis (the 1st or 2nd -
axes) changing to the de-excitation state, and allow the robot proceeding the operation state. Currently, it is
only applicable to the SCARA robotic arm. Due to the safety issue, this is not available for the 6-axis robotic
arm temporarily. It allows the user entering the manual mode to push the arm to the correction point position
or move to the desired position, and then exciting the motor, which is the alternative adjustment mode.
Note: If the operator near to the robotic arm during the operation, please be ready to hold the
emergency stop switch in one hand, in order to stop the robot motion at any time.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.3.23 or above Caterpillar1.1.6 or above CONT (pre-read)
 st nd
Only applicable for the 1 -axis or 2 -axis motors of SCARA robotic arm.

◼ Command Format:
SERVO_OFF(#)

Format/Parameter Description:
 Use the program mode to turn on the de-excitation state of motor.
 # indicates the type of motor axis to be de-excited, the input range is 1 ~ 2.

◼ Example:
SERVO_OFF(1)

◼ Example Description:
De-excite the motor of 1st -axis motor (SCARA series).

◼ Related Commands:
SERVO_ON、SERVO_OFF、SERVO_ON(#).

185
C25UE901-2208

2.7 CODE G, MATHEMATIC OPERATION COMMANDS


This chapter describes individual description for the conveyor commands of code G.
2.7.1 @+ Add command of Mathematic Operation
◼ Description:
“(+)” It is used for the addition function of basic mathematic operation, and is used for the mathematic
operation with the same property of values, variables, count registers, timing registers or PR position
registers.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = [self-defined variable name] + [value]
[Register] = [register] + [value]

Format/Parameter Description:
 [Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of the heading character, and shall not use
hyphen「-」, for example: X1.
 [Register] is various registers which are used for the mathematic operation, such as: Timing
register $T[], count register $C[] or PR position register $PR[].

◼ Example-1:
INT X1 = 10
X1 = X1 + 1

◼ Example-1 Description:
Declare the integer variable X1, the initial value is 10.
Add the value 1 to the X1 variable, and then return to the X1 variable. Result: 10+1 = 11.
◼ Example-2:
$C[1] = 0
$C[1] = $C[1] + 1
◼ Example-2 Description:
The initial value of 1st count register is 0.
Add the value 1 to the 1st count register ($C[1]) and then return to the 1st count register. Result:
$C[1]=0+1 = 1.
◼ Related Commands:
INT、REAL、$C[]、$T[]、$PR[].

186
C25UE901-2208

2.7.2 @- Subtract Commands of Mathematic Operation


◼ Description:
It is used for the subtraction (-) function of basic mathematic operation, and is also used for the
mathematic operation with the same property of values, variables, count registers, timing registers or PR
position registers.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = [self-defined variable name] - [value]
[Register] = [register] - [value]

Format/Parameter Description:
 [Self-defined variable name] it can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use hyphen
「-」, for example: X1.
 [Register] is various registers which are used for the mathematic operation, such as: Timing
register $T[], count register $C[] or PR position register $PR[].

◼ Example-1:
INT X1 = 10
X1 = X1 - 1

◼ Example-1 Description:
Declare the integer variable X1, the initial value is 10.
Subtract the value 1 from the X1 variable, and then return to the X1 variable. Result: 10-1 = 9.

◼ Example-2:
$C[1] = 0
$C[1] = $C[1] - 1

◼ Example-2 Description:
The initial value of 1st count register is 0.
Subtract the value 1 from the 1st count register ($C[1]) and then return to the 1st count register. Result:
$C[1]=0-1 = -1.

◼ Related Commands:
INT、REAL、$C[]、$T[]、$PR[].

187
C25UE901-2208

2.7.3 @* Multiply Instruction of Mathematic Operation


◼ Description:
It is used for the multiplication (*) function of basic mathematic operation, and is used for the
mathematic operation with the same property of values, variables, count registers, timing registers or PR
position registers.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = [self-defined variable name] * [value]
[Register] = [register] * [value]

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use hyphen
「-」, for example: X1.
 [Register] is various registers which are used for the mathematic operation, such as: Timing
register $T[], count register $C[] or PR position register $PR[].

◼ Example-1:
INT X1 = 10
X1 = X1 * 2

◼ Example-1 Description:
Declare the integer variable X1, the initial value is 10.
Multiply the X1 variable by the value 2, and then return to the X1 variable. Result: 10*2 = 20.

◼ Example-2:
$C[1] = 4
$C[1] = $C[1] * 2

◼ Example-2 Description:
The initial value of 1st count register is 4.
Multiply the 1st count register ($C[1]) by the value 2, and then return to the 1st count register. Result:
$C[1]=4*2 = 8.

◼ Related Commands:
INT、REAL、$C[]、$T[]、$PR[].

188
C25UE901-2208

2.7.4 @/ Divide Instruction of Mathematic Operation


◼ Description:
It is used for the division (/) function of basic mathematic operation, and is used for the mathematic
operation with the same property of values, variables, count registers, timing registers or PR position
registers.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = [self-defined variable name] * [value]
[Register] = [register] / [value]

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use hyphen
「-」, for example: X1.
 [Register] is various registers which are used for the mathematic operation, such as: Timing
register $T[], count register $C[] or PR position register $PR[].

◼ Example-1:
INT X1 = 10
X1 = X1/2

◼ Example-1 Description:
Declare the integer variable as X1, the initial value is 10.
Divide the X1 variable by the value 2, and then return to the X1 variable. Result: 10/2 = 5.

◼ Example-2:
$C[1] = 4
$C[1] = $C[1]/2

◼ Example-2 Description:
The initial value of 1st count register is 4.
Divide the 1st count register ($C[1]) by the value 2, and then return to the 1st count register. Result:
$C[1]=4/2 = 2.

◼ Related Commands:
INT、REAL、$C[]、$T[]、$PR[].

189
C25UE901-2208

2.7.5 @SIN Sine Function Instruction of Mathematic Operation


◼ Description:
The sine function instruction of mathematic operation is used for mathematic form operation in the
program. If the angle value of triangle is known and desire to get the ratio value of side length, this
instruction can be used.

a
sin 𝜃 =
c

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = SIN(#)

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 # is the angle value of triangle, which can be the floating point value. The value is input by the
user. The input range is between 0 and 180 degrees.

◼ Example:
REAL dis_ratioA
dis_ratioA =SIN(30)

◼ Example Description:
Declare the floating point value name dis_ratioA, the value in dis_ratioA is the value of the sine
function of 30 degrees, and the calculated value result is 0.5.

◼ Related Commands:
ACOS、ASIN、ATAN、ATAN2、ACOS、COS、TAN.

190
C25UE901-2208

2.7.6 @COS Cosine Function Instruction of Mathematic Operation


◼ Description:
The cosine function (cosine) instruction of mathematic operation is used for mathematic form
operation in the program. If the angle value of triangle is known and desire to get the ratio value of side
length, this instruction can be used.

b
cos 𝜃 =
c

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = COS(#)

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 # is the angle value of triangle, which can be the floating point value. The value is input by the
user. The input range is between 0 and 180 degrees.

◼ Example:
REAL dis_ratioA
dis_ratioA =COS(60)

◼ Example Description:
Declare the floating-point value name dis_ratioA, the value in dis_ratioA is the value of the cosine function
of 60 degrees, and the calculated value result is 0.5.

◼ Related Commands:
ACOS、ASIN、ATAN、ATAN2、ACOS、SIN、TAN.

191
C25UE901-2208

2.7.7 @TAN Tangent Function Instruction of Mathematic Operation


◼ Description:
The tangent function instruction of mathematic operation is used for mathematic form operation in
the program. If the angle value of triangle is known and desire to get the ratio value of side length, this
instruction can be used.

a
tan 𝜃 =
𝑏

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = TAN(#)

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 # is the angle value of triangle, which can be the floating point value. The value is input by the
user. The input range is between 0 and 180 degrees.

◼ Example:
REAL dis_ratioA
dis_ratioA =TAN(45)

◼ Example Description:
Declare the floating-point value name dis_ratioA, the value in dis_ratioA is the value of the tangent
function of 45 degrees, and the calculated value result is 1.

◼ Related Commands:
ACOS、ASIN、ATAN、ATAN2、ACOS、COS、SIN.

192
C25UE901-2208

2.7.8 @ASIN Arcsine Function Instruction of Mathematic Operation


◼ Description:
The arcsine function (arcsine, sin-1) instruction of mathematic operation is used for mathematic form
operation in the program. If the ratio value of triangle side length is known and desire to get the angle
value, this instruction can be used.

a
sin 𝜃 = =𝑥
c

𝜃 = sin−1 𝑥

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = ASIN(#)

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 # is the ratio value of triangle side length, which can be the floating point value. The value is
input by the user. The input interval range is between -1 and 1. The calculated angle value is
π π
between -90 to 90 degrees (− 2 ~ 2 ).

◼ Example:
REAL Degree_A
Degree_A =ASIN(0.5)

◼ Example Description:
Declare the floating point value name Degree_A, the value in Degree_A is 0.5 i.e. the value of arcsine
function of the ratio value of triangle side length, and the result of calculated value is 30 degrees.

◼ Related Commands:
ACOS、SIN、ATAN、ATAN2、ACOS、COS、TAN.

193
C25UE901-2208

2.7.9 @ACOS Arccosine Function Instruction of Mathematic Operation


◼ Description:
The arcsine function (arccosine, cos-1) instruction of mathematic operation is used for mathematic
form operation in the program. If the ratio value of triangle side length is known and desire to get the angle
value, this instruction can be used.

b
cos 𝜃 = =𝑥
c

𝜃 = cos−1 𝑥

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = ACOS(#)

Format/Parameter Description:
 [Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 Hash “#” is the ratio value of triangle side length, which can be the floating point value. The
value is input by the user. The input interval range is between -1 and 1. The calculated angle
value is between 0 to 180 degrees (0~π ).
◼ Example:
REAL Degree_A
Degree_A =ACOS(0.5)

◼ Example Description:
Declare the floating-point value name as Degree_A, the value in Degree_A is 0.5 i.e. the value of
arccosine is the ratio of triangle side lengths, and the result of calculated value is 60 degrees.

◼ Related Commands:
ASIN、SIN、ATAN、ATAN2、ACOS、COS、TAN.

194
C25UE901-2208

2.7.10 @ATAN Arctangent Instruction of Mathematic Operation


◼ Description:
The arctangent function (arctangent, tan-1) instruction of mathematic operation is used for
mathematic form operation in the program. If the ratio value of triangle side lengths are known and desire
to get the angle value, this instruction can be used.

a
tan 𝜃 = =𝑥
b

𝜃 = tan−1 𝑥

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = ATAN(#)

Format/Parameter Description:
 [Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 Hash # is the ratio of triangle side lengths, which can be the floating point value. The value is
input by the user. The input interval range is between 0 and 1. The calculated angle value is
π π
between -90 to 90 degrees (− 2 ~ 2 ).

◼ Example:
REAL Degree_A
Degree_A =ATAN(1)

◼ Example Description:
Declare the floating point value name as Degree_A, the value in Degree_A is 1 i.e. the value of
arctangent function of the ratio value of triangle side length, and the result of calculated value is 45
degrees.

◼ Related Commands:
ASIN、SIN、ACOS、ATAN2、ACOS、COS、TAN.

195
C25UE901-2208

2.7.11 @ATAN2 Arctangent Variant Instruction of Mathematic Operation


◼ Description:
The variant mode of arctangent function (arctangent, tan-1) instruction for the mathematic operations,
which is used for mathematic form operation in the program. If the triangle values of a & b value (x, y
coordinates) are known, and desire to get the angle value, this instruction can be used.

a
tan 𝜃 = =𝑥
b
a
𝜃 = tan−1 𝑥 = tan−1
b

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = ATAN2(y coordinate value, x coordinate value)

Format/Parameter Description:
 Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use
hyphen「-」.
 The y coordinate value & x coordinate value are the distance values, which can be the floating
point value. The value is input by the user. The input interval range is between 0 and 1. The
π π
calculated angle value is between -90 to 90 degrees (− 2 ~ 2 ).

◼ Example:
REAL dis_X, dis_Y, Degree_A
dis_X = 5
dis_Y = 5
Degree_A =ATAN2(dis_Y, dis_X)

◼ Example Description:
Declares the floating-point value names as dis_X and dis_Y, Degree_A, the side length distance
between dis_X and dis_X is 5, and the value in Degree_A is the value of arcsine function of the side
length ratio for dis_Y and dis_X, and the result of calculated value 45 degrees.

◼ Related Commands :
ASIN、SIN、ACOS、ATAN、ACOS、COS、TAN.

196
C25UE901-2208

2.7.12 @FWD Forward Robot Kinematics Convert Command


◼ Description:
Convert the angle of joint coordinate system into the XYZ rectangular coordinate system (Cartesian
coordinate system) through the forward robot kinematics, for performing the position switching operation.
When the user only knows the angle for each axis of the point, and requires to get the position and posture
coordinate value of tool center point (TCP) of the end effectors under the current coordinate, this
command can be used to convert and get the information, and use for the determination of coordinate
system.

1 X
2 Y Position &
Joint Angle

3 Z Posture of
4 Forward Kinematics A End Effector
5 B
6 C
Figure. 28 Schematic Diagram of Forward Kinematics

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable name] = FWD ( [joint coordinate system angle point position/variable] )

Format/Parameter Description:
 [Self-defined point position variable] is self-defined by the user, set the parameter content
rectangular/Cartesian coordinate X, Y, Z, A, B and C-axis position coordinate variables. The SCARA-
LU series has no A,B-axis. The declaration of point variable shall be made through the commands
of E6POINT, E6POS, E6AXIS etc.
 [Joint coordinate system angle point position/variable] is the point position or variable with the
JOINT angle of joint coordinate system, which have the angle information of A1, A2, A3, A4, A5
and A6. The SCARA-LU series has no A5 and A6-axis information.

197
C25UE901-2208

◼ Example:
E6AXIS P1_AXIS = {A1 0, A3 0, A4 0, A5 -90, A6 0}
E6POS P1_POS
P1_POS = FWD(P1_AXIS)

◼ Example Description:
Declare the angle variable of P1_AXIS joint coordinate system, define the 1st -axis as 0º, the 2nd -axis as
0º, the 3rd -axis as 0º, the 4th -axis as 0º, the 5th-axis as -90º and the 6th -axis as 0º.
Declare the angle variable of P1_POS Cartesian coordinate system.
Convert the P1_AXIS variable into the XYZ Cartesian coordinate system through the forward robot
kinematics, and save to the P1_POS variable. P1_POS is the Cartesian coordinate system value of
P1_AXIS. (If it is the RA605-710-GC model, P1_POS is (0,368,293.5,-180,0,90); if it is the RS405-500-
200-LU model, P1_POS is (0,500,0,0). The calculated results of each robot model are different).

◼ Related Commands:
E6POINT、E6POS、E6AXIS.

198
C25UE901-2208

2.7.13 @% Find Remainder Command


◼ Description:
The mathematic operation of command to find the remainder, which is used for the mathematical
form operations in the program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
[Self-defined variable] = [dividend value] % [divisor value]
[Count register] = [dividend value] % [divisor value]

Format/Parameter Description:
 [Self-defined variable name] can be English alphabets or combination of English alphabets +
numbers, but the numbers cannot be the starting of heading character, and shall not use hyphen
「-」.
 [Dividend value] and [divisor value] is the self-defined value or variable, the divisor cannot be 0.
 [Counter register] is the register used for counting/displaying, which is displayed in the register
(Counter) page, the integer type. For example: $C[1] is the 1st count register.
 For example: 13 is divided by 10, [dividend value] is 13, [divisor value] is 10, the quotient is 1, and
the remainder is 3 (13=1×10+3).

◼ Example:
INT remainder_1
remainder_1 = 13%10
$C[1] = remainder_1

◼ Example Description:
Declare the integer variable remainder_1.
Calculate the remainder of dividing 13 by 10, and save the remainder in the remaining_1 variable.
Use the 1st count register to display the value in the remaining_1 variable.

◼ Related Commands:
INT、$C[].

199
C25UE901-2208

2.8 CODE H, COMMUNICATION FUNCTIONAL COMMAND


This chapter describes the communication Command between the arm and the outside. The
communication Command can be used for the serial communication RS232 and network Ethernet
(TCP/IP) communication architecture, which can be applied to perform the communication handshake
with the external equipment, such as the logical instructions to control PLC or industrial computer. The
terminal application can be collocated with vision or human-machine interface HMI for
communication use. (Modbus communication is not described in this Command)
2.8.1 @COPEN Communication Opening Command
◼ Description:
Open the serial communication RS232 or network EtherNet (TCP/IP) communication. The network
communication is usually opened when the program is started to initialize in order to perform the
subsequent data handshake. Support the single-connection and multi-connection communication modes.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance. RS232 requires to set the serial baud rate setting;
Ethernet requires to select the connection architecture of server end Server or client end Client
and perform the IP setting.

◼ Command Format:
 Format: (single-connection)
COPEN( [communication mode] , [self-defined variable name])

 Format 2: (multiple-connection)
[Self-defined variable name] = COPEN( [communication mode] ,[connect IP],[communication port] )

Format/Parameter Description:
 [Communication mode] is to select the communication mode of the arm with outside, the serial
communication RS232 or network Ethernet (TCP/IP) communication. If it is RS232, please fill the
code「SER」; if it is Ethernet, please fill the code「ETH」.
 [Self-defined variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. Before the COPEN Command, the [self-defined variable name] shall be declared in
advance, usually with the type of integer INT, so that the variable can be used in the opening
Command; if the open is failed, the value of [self-defined variable name] will be -1.

200
C25UE901-2208

 If the IP is 192.168.0.5 and the port is 5000, then use the multiple connection channels, the write
will be done as follows:
 [Connection IP] is the IP of communication connection, it will be required to enter 4 values, which
is separated by commas「,」, Example: 192, 168, 0, 5.
 [Communication port] is the communication port (PORT) of requiring connection setting, in order
to identify the specified channel, for example: PORT: 5000.

◼ Example-1: (Single-connection)
INT HANDLE
COPEN(SER,HANDLE)

◼ Example-1 Description:
Declare the integer variable HANDLE.
Turn on the communication of serial communication RS232.
(Note: If SER is changed to ETH, then turn on the netwrok Ethernet (TCP/IP) communication.)

◼ Example-2: (Multiple-connection)
INT HANDLE1,HANDLE2
HANDLE1 = COPEN(ETH, 192, 168, 0, 5, 5000)
HANDLE2 = COPEN(ETH, 192, 168, 0, 25, 5000)

◼ Example-2 Description:
Declare the integer variable HANDLE1 and HANDLE2.
Turn on the network Ethernet (TCP/IP) communication 1, IP192.168.0.5 and Port: 5000; turn on the
network Ethernet (TCP/IP) communication 2, IP192.168.0.25 and Port: 5000.

◼ Related Commands:
INT、CCLOSE、CCLEAR、CREAD、CWRITE、CINQUIRE.

201
C25UE901-2208

2.8.2 @CCLOSE Communication Closing Command


◼ Description:
Close the communication Command of serial communication RS232 or network Ethernet (TCP/IP).

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance.
 The COPEN Command shall be executed prior to the CCLOSE Command.

◼ Command Format:
CCLOSE( [communication variable name] )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. The communication will only be shut off when the COPEN Command should be
executed prior to the CCLOSE Command, and be corresponded to the relative [communication
variable name].

◼ Example:
INT HANDLE
COPEN( ETH ,HANDLE)
WAIT SEC 3
IF $DI[5] == TRUE THEN
CCLOSE (HANDLE)
ENDIF

◼ Example Description:
Declare the integer variable HANDLE.
Open, then open the network Ethernet (TCP/IP) communication.
After waiting for 3 seconds, if it is determined that the 5th digital input signal ($DI[5]) is true (TRUE),
then shut off the network Ethernet (TCP/IP) communication.

◼ Related Commands:
INT、COPEN、CCLEAR、CREAD、CWRITE、CINQUIRE、IF.

202
C25UE901-2208

2.8.3 @CCLEAR Communication Buffer Data Clear Command


◼ Description:
The Command is for clearing the data of communication temporary buffer area in the arm. During the
communication, the continuously inputting data form the arm to the temporary buffer area will be
occurred, and the arm will perform the clear action for the data of temporary buffer area received but not
executed through the CCLEAR in accordance with the receiving sequential operation, in order to ensure
that the next data record is the latest information.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance.
 The COPEN Command shall be executed prior to the CCLEAR Command.

◼ Command Format:
CCLEAR( [communication variable name] )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. The clear action for the data of temporary buffer area will only be performed when
the COPEN Command should be executed prior to the CCLEAR Command, and be corresponded
to the relative [communication variable name].

203
C25UE901-2208

◼ Example:
INT HANDLE
REAL receive_data
COPEN( ETH ,HANDLE)
CREAD (HANDLE,receive_data)
IF $DI[5] == TRUE THEN
CCLEAR (HANDLE)
ENDIF

◼ Example description:
Declare the integer variable HANDLE, declare the floating point variable receive_data (data received by
communication).
Open, then open the network Ethernet (TCP/IP) communication.
Wait to read the communication value from the external equipment into the receive_data variable.
If it is determined that the 5th digital input signal ($DI[5]) is true (TRUE), then clear the data of
communication temporary buffer area in the arm (a lot of data may be transmitted, but the data not
being transmitted into the receive_data variable register will all be cleared).

◼ Related Commands:
INT、REAL、COPEN、CCLOSE、CREAD、CWRITE、CINQUIRE.

204
C25UE901-2208

2.8.4 @CREAD Data Receiving Command


◼ Description:
The Command is for receiving the input data of external equipment with the arm communication
mode; the user requires to decide the value to be subsequently applied to the program, and the user of
upper equipment and the arm will coordinate the indicated meaning of transmitted/received data.
When execute the CREAD Command to the program, the data is required to transmit by the upper
equipment. If no data is successfully transmitted, the arm will be stopped at the CREAD Command all the
time. If the quantity of upper transmitted values does not comply, it will take 0 as the value or ignore, and
the error message will not be generated. For example, 2 ea values are transmitted to the arm for receipt,
and the arm is required to receive the information of 3 ea values, then the 3rd value of the arm is 0.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance.
 The COPEN Command shall be executed prior to the CCLOSE Command.

◼ Command Format:
CREAD( [Communication variable name] , [Input data receive variable 1], [Input data receive variable
2], … )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. The receive action for the data will only be performed that the COPEN Command
shall be executed prior to the CREAD Command, and corresponded to the relative
[communication variable name].
 [Input data receive variable] is to receive the variable from the external equipment
communication to the input data of the arm, and the variable name shall be defined by the user
in advance.
 The variable of declaration requires to use the floating point (REAL) type.
 It is able to receive multiple [input data receive variable], the comma「,」is used as the
separation between each of them (up to 400 data records at most).
 [Input data receive variable] will decide the value to be applied on the program subsequently,
and the transmitted value of upper equipment will coordinate with the user that the value
meaning in the variable is indicated by [input data receive variable].
 There will be a series of packets when reading the data. When the [input data receiving variable]
does not comply with the upper transmission value, it will take 0 as the value or ignore.

205
C25UE901-2208

 The beginning and ending for the communication receiving data of the arm are required to add
the symbol of braces「{ }」, such as { 100,200 }.
 For the version of HRSS3.3.8 or Caterpillar1.0.6 or above, the character information can be
transmitted through the communication.

◼ Example-1:
INT HANDLE
REAL receive_data
COPEN( ETH ,HANDLE)
CREAD (HANDLE,receive_data)

◼ Example-1 Description:
Declare the integer variable HANDLE, declare the floating point variable receive_data (data received by
communication).
Open, then open the network Ethernet (TCP/IP) communication.
Wait to read the communication value from the external equipment into the receive_data variable.

206
C25UE901-2208

◼ Example-2: (Example of transmitting the visual coordinates X,Y through the external equipment)
For example: Camera transmits the coordinate visually {100,200}
The Command of arm is shown as follows:
INT HANDLE
REAL X_data,Y_data
E6POINT OBJ_P
COPEN( ETH ,HANDLE)
PTP P1 FINE=1 Vel=40% Acc=75% TOOL[0] BASE[0]
OBJ_P = P1
LOOP
IF HANDLE > -1 THEN
CREAD (HANDLE, X_data,Y_data)
OBJ_P.X = X_data
OBJ_P.Y = Y_data
LIN OBJ_P FINE = 1
ENDIF
WAIT SEC 0.3
ENDLOOP

◼ Example-2 Description:
Declare the integer variable HANDLE, declare the floating point variable X_data, Y_data (the visual
coordinate X, Y data are transmitted by the external equipment and received by the communication).
Declare the position variable OBJ_P. Open, then open the network Ethernet (TCP/IP) communication.
Move to the P1 point with the point-to-point mode, and make the OBJ_P position equal to P1 (in order
to avoid the out of synchronization of other information A, B, C etc.)
Use LOOP…ENDLOOP loop to allow the infinite loops for receiving information and moving action.
IF - If the network communication is opened (HANDLE > -1), then the data receiving operation is able
to execute.
Wait to read the value from the external equipment communication into the X_data, Y_data variable
(received the value X_data=100, Y_data=200).
Replace the received X_data, Y_data variable values with the OBJ_P.X, OBJ_P.Y position values, and use
the linear mode moving to the new OBJ_P point position to be picked for the material (i.e. move to
the position where X is 100mm and Y is 200mm).
After waiting for 0.3 seconds, continue to the next round of receiving data action.

◼ Related Commands:
INT、REAL、COPEN、CCLOSE、CCLEAR、CWRITE、CINQUIRE.

207
C25UE901-2208

2.8.5 @CWRITE Data Sending Command


◼ Description:
The output data Command given by the arm communication mode to the external equipment; the
meaning of transmission data will be coordinated by the upper equipment with the arm user to assure the
value application of transmission data.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance.
 The COPEN Command shall be executed prior to the CCLOSE Command.。

◼ Command Format:
CWRITE( [communication variable name] , [output data receive variable 1], [output data receive
variable 2], … )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. The receive action for the data will only be performed that the COPEN Command
shall be executed prior to the CWRITE Command, and corresponded to the relative
[communication variable name].
 [Output data receive variable] is the transmission variable of output data from the arm
communication to the external equipment, and the variable name shall be defined by the user in
advance.
 The variable of declaration requires to use the floating point (REAL) type.
 It is able to transmit multiple [output data transmission variable], the comma「,」is used as the
separation between each of them (up to 400 data records at most).
 [Output data receive variable] will decide the value to be applied on the program subsequently,
and the transmission value of upper equipment will coordinate with the user that the value
meaning in the variable indicates by [output data receive variable].
 The beginning and ending for the communication transmission data of the arm are required to
add the symbol of braces「{ }」, such as { 100,200 }.
 For the version of HRSS3.3.1 or Caterpillar1.0.4 or above, the character information can be
transmitted through the communication.

208
C25UE901-2208

◼ Example-1:
INT HANDLE
REAL send_data = 10
COPEN( ETH ,HANDLE)
CWRITE (HANDLE,send_data)

◼ Example-1 Description:
Declare the integer variable HANDLE, declare the floating point variable send_data (data transmitted
by communication), the value is 10.
Open, then open the network Ethernet (TCP/IP) communication.
The communication transmits the value 10 in the send_data variable to the external equipment. (The
value {10} will be received by outside. The beginning and ending for the sending data of arm
communication require to add the symbol of braces「{ }」)

◼ Example-2:
The Command of arm is shown as follows:
INT HANDLE
REAL long_size = 30
REAL width_size = 20
REAL tall_size = 10
COPEN( ETH ,HANDLE)
CWRITE (HANDLE,long_size,width_size,tall_size)
For example: The receive coordinate {30, 20, 10} for the industrial computer of external equipment.

◼ Example-2 Description:
Declare the integer variable HANDLE, declare the floating point variable long_size value is 30, the
width_size value is 20, and the tall_size value is 10.
Open, then open the network Ethernet (TCP/IP) communication.
The values of 30, 20, 10 in the communication transmission variable to the external equipment. (The
outside will receive the values {30, 20, 10}. The beginning and ending for the sending data of arm
communication require to add the symbol of braces「{ }」).

◼ Related Commands:
INT、REAL、COPEN、CCLOSE、CCLEAR、CREAD、CINQUIRE.

209
C25UE901-2208

2.8.6 @CINQUIRE Data Quantity Getting Command


◼ Description:
The Command used to read the data quantity received by the buffer area of communication
transmission, which is used to confirm the correctness of transmission quantity by the external equipment.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 It is required to go to the parameter page of serial communication RS232 or network Ethernet
(TCP/IP) communication for setting in advance.
 The COPEN Command shall be executed prior to the CCLOSE Command.

◼ Command Format:
CINQUIRE( [communication variable name] , [self-defined variable name] )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. The receive action for the data will only be performed that the COPEN Command
shall be executed prior to the CINQUIRE Command, and corresponded to the relative
[communication variable name], then the action of transmission data is able to perform.
 [Self-defined variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」, which is used to read the data quantity received by the communication
transmission.

210
C25UE901-2208

◼ Example:
INT HANDLE,data_num
REAL receive_data,send_data
send_data=0
COPEN ( ETH , HANDLE)
LOOP
IF HANDLE > -1 THEN
CINQUIRE(HANDLE,NUM)
If data_num > 0 THEN
CREAD (HANDLE,receive_data)
ENDIF
CCLEAR (HANDLE)
send_data = send_data + 1
CWRITE (HANDLE,send_data)
ENDIF
WAIT SEC 0.3
ENDLOOP

◼ Example Description:
Declare the integer variable HANDLE, data_num, declare the floating point variables i.e. receive_data,
send_data, and send_data, the initial value of variables is 0. Open, then open the network Ethernet
(TCP/IP) communication.
Use LOOP…ENDLOOP loop to allow the infinite loops for the receiving information and moving action.
IF If the network communication is opened (HANDLE > -1), then the data receiving operation is able to
execute.
Read the data quantity received in the buffer area of communication transmission. IF If the received
data_num data quantity is greater than 1, then execute CREAD receive data.
Wait to read the value of communicated from the external equipment vice into the receive_data
variable.
CCLEAR clears the temporary buffer area data of communication in the arm.
The send_data quantity is added by 1 per each execution, and send the send_data value to the
external equipment for communication.
After waiting for 0.3 seconds, continue to the next round of receiving data action.

◼ Related Commands:
INT、REAL、COPEN、CCLOSE、CCLEAR、CREAD、CWRITE.

211
C25UE901-2208

2.8.7 @CFORMAT Declare Self-defined Communication Format Command


◼ Description:
Add the self-defined communication format Command, which can be used to self-define the symbols
of beginning, ending and splitting characters through Hex ASCII code (please refer to Appendix 2, ASCII),
and apply to switch symbols between different communication formats. For example: The visual system
collocates with the beginning code but not the default "{" format, that can perform the self-declared
definition, this is able to compensate the problem of insufficient option for the communication interface.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 The COPEN Command shall be executed prior to the CFORMAT Command.
 The format (non format) function cannot be checked for cancel on the network connection
setting (Network Config) page.

◼ Command Format:
CFORMAT ( [Communication variable name] , [self-defined beginning symbol] , [self-defined splitting
symbol] , [self-defined ending symbol] )

Format/Parameter Description:
 [Communication variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」. Prior to the CCLOSE Command, the COPEN Command shall be executed, and
correspond to the relative [communication variable name], and then perform the communication
close.
 [Self-defined beginning symbol] is the identification symbol of beginning packet used for the
communication, the category is string (STRING) type, the original default symbol is "{" (0x7B), and
at least either the beginning symbol or the ending symbol shall be set, it is not allow for not using
none of them.
 [Self-defined splitting symbol] is used to identify the symbol between each string of
communication, the category is string (STRING) type, the original default symbol is "," (0x2C), and
the splitting symbol ought to set.
 [Self-defined ending symbol] is the identification symbol of ending packet used for the
communication, the category is string (STRING) type, the original default symbol is "}" (0x7D), and
at least either the beginning symbol or the ending symbol shall be set, it is not allow for not using
none of them.
 If either the beginning symbol or the ending symbol is not used, then use「””」.
 The string beginning of defined symbol shall be started with "0x". For example: the common
ending character <CR><LF> is "0x0D0A", and the self-defined symbol uses 2 characters at most.

212
C25UE901-2208

 CFORMAT will apply the communication format to CREAD and CWRITE simultaneously.
 CFORMAT, the self-defined communication format is only valid during the execution of the
program, and it will undo the communication format on the interface (UI) after the program is
ended.

◼ Example-1:
INT HANDLE
REAL receive_data
COPEN(ETH, HANDLE)
CFORMAT(HANDLE,"0x02","0x2C","0x0D0A")
CREAD (HANDLE,receive_data)

◼ Example-1 Description:
Declare the integer variable HANDLE.
Declare the floating point variable receive_data(data received by communication).
Open the network Ethernet (TCP/IP) communication.
The beginning symbol of self-declared communication format is "0x02", which means <STX>; the
splitting symbol is "0x2C", which means " , " (comma); the ending symbol is "0x0D0A", which means
<CR><LF >.
When the program is executed, the arm only receives the format of <STX> beginning symbol,
<CR><LF> ending symbol and ” , ” splitting symbols transmitted from other communication equipment.
Wait to read the communication value from the external equipment into the receive_data variable.

<STX> Beginning Symbol

Body & Splitting


1,2
Symbol

<CR><LF> Ending Symbol

Communication Equipment (such as:


Arm Equipment Industrial computer)

Figure. 29 Schematic Diagram of Communication Transmission for Self-defined Communication


Format

213
C25UE901-2208

◼ Example-2:
INT HANDLE
STRING receive_data1,send_data1,send_data2
COPEN(ETH, HANDLE)
CFORMAT(HANDLE,"0x00","0x01","0x0D0A")
send_data1 = "Robot1"
send_data2 = "Robot2"
CWRITE (HANDLE,send_data1,send_data2)
CREAD(HANDLE, receive_data1)

◼ Example-2 Description:
Declare the integer variable HANDLE.
Declare the string variable receive_data1 and send_data1 (data received by communication).
Open the network Ethernet (TCP/IP) communication.
The beginning symbol of self-declared communication format is "0x00", which means NULL (use 「""」
to replace as well); the splitting symbol is "0x01", which means <SOH>; the ending symbol is "0x0D0A",
which means <CR><LF >.
When the program is executed, the arm only receives the format of NULL beginning symbol, <CR><LF>
ending symbol and ”<SOH>” splitting symbols transmitted from other communication equipment.
The data of send_data1 is the information of string "Robot1", the data of send_data2 is the
information of string "Robot2", and the communication transmits the information to the external
equipment i.e. send_data1, send_data2 data.
Wait to read the communication value from the external equipment into the receive_data 1 variable.

NULL Beginning Symbol

Body & Splitting


Send_data1<SOH> Send_data2
Symbol

<CR><LF> Ending Symbol

Communication Equipment (such as:


Arm Equipment
Industrial computer)
◼ Related Commands:
COPEN、CCLOSE、CCLEAR、CREAD、CWRITE.

214
C25UE901-2208

2.9 CODE I, CONVEYOR COMMAND


This chapter describes the conveyor Commands of code I separately.
2.9.1 @CNV_START Start Conveyor Tracking Procedure Command
◼ Description:
Start the conveyor tracking function, so that the relevant Commands of corresponding conveyor
number CNV_ can be used. After this Command, the track Commands of other conveyors will be able to act,
which will be used as the beginning of conveyor tracking program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 The settings of parameters for various dynamic picks (flying picks) and conveyors in the conveyor
track Track shall all be set completely, and the Commands will be written by using the keyboard.

◼ Command Format:
CNV_START CNV = [conveyor number value]

Format/Parameter Description:
 CNV_START is the beginning of conveyor track Command; CNV is the English abbreviation of
conveyor, which requires the user to give the conveyor value; usually the ending of the program
goes with CNV_END (end the conveyor track Command) for use.
 [Conveyor number value] is the conveyor number specified as the start, the input range is 1~4.

◼ Example:
CNV_START CNV = 1
CNV_START CNV = 4

◼ Example Description:
Start the tracking function of No.1 conveyor.
Start the tracking function of No.4 conveyor.

◼ Related Commands:
CNV_END.

215
C25UE901-2208

2.9.2 @CNV_END End Conveyor Tracking Procedure Command


◼ Description:
End the conveyor tracking function, so that the relevant Commands of corresponding conveyor
number CNV_ cannot be used. Use to end the conveyor track program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 The settings of parameters for various dynamic picks (flying picks) and conveyors in the conveyor
track Track shall all be set completely, and the Commands will be written by using the keyboard.

◼ Command Format:
CNV_END CNV = [conveyor number value]

Format/Parameter Description:
 CNV_END is the ending of conveyor track Command; CNV is the English abbreviation of conveyor,
which requires the user to give the conveyor value; usually the ending of the program goes with
CNV_START (start the conveyor track Command) for use.
 [Conveyor number value] is the conveyor number specified as the end, the input range is 1~4.

◼ Example:
CNV_START CNV = 1
CNV_END CNV = 1

◼ Example Description:
Start the tracking function of No.1 conveyor.
End the tracking function of No.1 conveyor.

◼ Related Commands:
CNV_START.

216
C25UE901-2208

2.9.3 @CNV_PICK_QUANTITY Quantity of Picked Object Command of Conveyor


Tracking
◼ Description:
Set the maximum quantity of the variable for the objects of dynamic pick (flying pick) performed by
the arm each time. When the picked quantity reaches this setting value, the Command of picking action
will not be executed anymore. If it is not set, the default value is 1 ea object.
It is often used with the CNV_FUL (conveyor picking with full quantity) Command. This variable setting
will also affect the states of CNV_FULL and CNV_EMPTY.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

 Use CNV_START to start the specified conveyor before using, and write the Command by using
the keyboard.

◼ Command Format:
CNV_PICK_QUANTITY = [parameter value of workpiece quantity value]

Format/Parameter Description:
 CNV_PICK_QUANTITY is the setting Command for the conveyor to track the picking object quantity.
 [Parameter value of workpiece quantity value] is the quantity value of picking workpiece. The
input range is 1 ea to 8 ea objects, the integer type.

◼ Example:
CNV_PICK_QUANTITY = 2

◼ Example Description:
Set the maximum quantity for the objects flying-picked by the arm each time is 2. (Applicable to the
double suction nozzles, flying pick 2 ea objects each time.)

◼ Related Commands:
CNV_START、CNV_END、CNV_FULL.

217
C25UE901-2208

2.9.4 @CNV_TRIGGER_TIMES Triggering Times of Sensor Command of Conveyor


Tracking
◼ Description:
The robotic arm will only be able to get the job task QUEUE to proceed the pick when the times
Command is triggered by the sensor of conveyor track. This Command is only applicable to the use of
sensor triggered type. It can be applied to only one job task available after judging by multiple sensors, and
then the job task is able to execute the subsequent flying-pick or flying-place action.
※ This function shall be set in the interface, and the Command can also be used in the program. If
the Command is used in the program, the setting of program Command will be the priority.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor before using, and write the Command by using
the keyboard.
 It is only limited to trigger by the sensor, which cannot be used on the visual recognition system.

◼ Command Format:
CNV_TRIGGER_TIMES[conveyor number] = [trigger parameter value]

Format/Parameter Description:
 [Conveyor number] is the number value of the conveyor, the input range is 1 to 4, which indicates CNV1
to CNV4.
 [Trigger parameter value] is the integer value of triggering times, and the input range is 1 to 100 times.

◼ Example:
CNV_TRIGGER_TIMES[1] = 1

◼ Example Description:
When 1 time is triggered by the sensor of No. 1 conveyor, the arm will get the job task of proceeding
the flying-pick or flying-place.

◼ Related Commands:
CNV_START、CNV_END、CNV_QUEUE_SIZE.

218
C25UE901-2208

2.9.5 @CNV_PICK Move Command for Pick Object of Conveyor Tracking


◼ Description:
The Action Instruction of conveyor tracking and picking the object, for short as the flying-pick. The arm
will perform the dynamic pick (flying-pick) action one time after dispatching by the system. In this
Command, there may be 11 ea parameters required for setting prior to perform the tracking and picking
object action by the conveyor.
If the pick is successful, the arm returns to the height position prepared for the downward picking, and
then wait for the next move/place Command; if the pick is failed, the arm returns to the position started
the action. It is able to decide in accordance with the setting mode of conveyor to proceed the Retry or
Remove mode.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_PICK [conveyor number] [object number] [output signal ] [point position name] [press-down
height distance ] [track form ] [speed ] [acceleration] [input signal] [tool coordinate] [base
coordinate]
CNV_PICK [ CNV=# ] [OBJ =# ] [$DO[#] / $SO[#] ] [ P# ] [Down=#
mm ] [FINE=#/CONT=#] [Vel=# mm/s] [Acc =# % ] [$DI[#] ] [TOOL[#] ]
[BASE[#] ]

Format/Parameter Description:
Parameter
Parameter Name Descrption of Parameters
Format
The CNV number parameter of conveyor specified for start, the input
[Conveyor
CNV=# range of # is the integer value from 1 to 4. If the conveyor number is
Number]
omitted, then enter no track.
The OBJ number parameter of picked object, the input range of # is the
integer value from 1 to 8. If the object number is omitted, then the object
[Object Number] OBJ=#
number will not be specified, and all ALL objects will be treated as the
objects which are able to be picked.
When picking, give the opening signal to suction nozzle or the output
$DO[#]
signal of upper control system, the input range of # $DO digital output is
[Input Signal] or $SO[#]
from 1 to 24. Or use the $SO site fieldbus output range of 9 to 128 value.
or $MO[#]
Or use the $MO combined output signal.
The position point parameter. The value of position is the coordinate of
the initial position when the object triggers the sensor signal; if this point
P#
[Point Position is required to ignore when using the image/vision to trigger, then the
or
Name] point name will not be written. # can record the position number when
Point
corresponds to teaching, such as P1, P3, etc., or self-declare the Point
name by the user.
219
C25UE901-2208

Parameter
Parameter Name Descrption of Parameters
Format
When the arm picks, press down the height distance of object to pick the
[Press-down Down=# object; when performs the flying pick, the arm will first stop at the specific
Height Distance] mm distance above the object and then press down the height distance to
pick, # can enter the positive integer value, the unit is millimeter mm.
Continuous CONT or non-continuous FINE type; and the percentage of
FINE=#
1%~100% behind the continuous track form is the degree of smoothness,
[Track Form] or
decide the continuous parameter; the continuous type FINE is divided into
CONT=#
three levels: 0, 1, and 2.
Speed parameter, DELTA specification, the input range of # is the integer
value from 1 to 3000. (The 6-axis specification range is the value from 1 to
Vel=
[Speed] 2000, SCARA-LU series Vel=1 to 4000 values). This parameter can be
#mm/s
omitted, and the omitted speed will refer to the Command of previous
line, or the initial defined parameter.
Acceleration parameter, the input range of # is the integer value from 1 to
100. The larger the number, the faster the acceleration. This parameter
[Acceleration] Acc=#%
can be omitted. If the acceleration is omitted, the Command of previous
line or the initial defined parameter will be referred to.
When picking, the input signal acquired from the suction nozzle signal or
$DI[#] the upper control system will be used to judge if the object signal is
[Input Signal] or $SI[#] successfully picked. The input range of # is the value from 1 to 24. Or use
or $MI[#] the $SI site fieldbus, the output range is the value from 9 to 128. Or use
the $MI combined output signal.
Tool coordinate parameter, the input range of # is the integer from 0 to
15. This parameter can be omitted. If the tool coordinate is omitted, the
[Tool Coordinate] TOOL[#]
Command of previous line or the initial defined parameter will be referred
to.
Base coordinate parameter, the input range of # is the integer from 0 to
[Base 31. This parameter can be omitted. If the base coordinate is omitted, the
BASE[#]
Coordinate] Command of previous line or the initial defined parameter will be referred
to.

220
C25UE901-2208

Write sequence of CNV_PICKCommand parameters:

Figure. 30 Write Sequence Diagram of CNV_PICK Command Parameters


Description of Sequence Diagram:
1) # is the number
2) CNV、OBJ、P、Vel、Acc parameters may ignore the parameter items depending on the use
condition.
3) (Track form) CONT、CONT = #%、CONT = #mm、FINE parameters, please select one of them to
use.

◼ Example-1:
CNV_START CNV = 1
CNV_PICK CNV=1 OBJ=1 $DO[1] P1 Down=5.000mm FINE=1 Vel=2500mm/s Acc=50% $DI[1] TOOL[0]
BASE[0]

◼ Example-1 Description:
 Start the track function of No. 1 conveyor.
 The Action Instruction of conveyor tracking the picked object, which is applicable for the sensor
triggering mode. Set the initial position of flying-pick as the P1 point on the arm to No. 1 conveyor,
after pressing down 5mm, output the $DO[1] signal to pick the No. 1 object, read the input signal of
DI[1] to confirm if the pick is successful. During the arm moving process, the discontinuous track
parameter is FINE=1, the speed parameter is 2500mm/s, the acceleration parameter is 50%, the
tool coordinate parameter is 0th, and the base coordinate parameter is 0th.

221
C25UE901-2208

◼ Example-2:
CNV_START CNV = 1
CNV_PICK CNV=1 OBJ=1 $DO[1] Down=5.000mm FINE=1 Vel=2500mm/s Acc=50% $DI[1] TOOL[0]
BASE[0]

◼ Example-2 Description:
 Start the track function of No. 1 conveyor.
 The Action Instruction of conveyor tracking the picked object, which is applicable for the
image/vision triggering mode. After pressing down 5mm on the arm to No. 1 conveyor, output the
$DO[1] signal to pick the No. 1 object, read the input signal of DI[1] to confirm if the pick is
successful. During the arm moving process, the discontinuous track parameter is FINE=1, the speed
parameter is 2500mm/s, the acceleration parameter is 50%, the tool coordinate parameter is 0th,
and the base coordinate parameter is0th.

◼ Related Commands:
CNV_START、CNV_END、CNV_PLACE.

222
C25UE901-2208

2.9.6 @CNV_PLACE Move Command for Place Object of Conveyor Tracking


◼ Description:
The Action Instruction of conveyor will tracking and placing the object, for short as the flying-pick. The
arm will perform the dynamic pick (flying-pick) action one time after dispatching by the system. In this
Command, there may be 11 ea parameters required for setting prior to perform the tracking and placing
object action by the conveyor.
If the place is successful, the arm returns to the height position prepared for the downward picking,
and then wait for the next move/place Command; if the place is failed, the arm returns to the position
where the action was started. It is able to decide in accordance with the setting mode of conveyor to
proceed the Retry or Remove mode.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_PLACE [conveyor number] [object number] [output signal ] [point position name] [press-down
height distance ] [track form ] [speed ] [acceleration] [input signal] [tool coordinate]
[base coordinate]
CNV_PLACE [ CNV=# ] [OBJ =# ] [$DO[#] / $SO[#] ] [ P# ] [Down=# mm ] [FINE=#/CONT=#]
[Vel=# mm/s] [Acc =# %] [TOOL[#] ] [BASE[#] ]
Format/Parameter Description:
Parameter
Parameter Name Description of Parameters
Format
The CNV number parameter of conveyor specified for start, the
[Conveyor
CNV=# input range of # is the integer value from 1 to 4. If the conveyor
Number]
number is omitted, then enter no track.
The OBJ number parameter of picked object, the input range of # is
the integer value from 1 to 8. Or the object number is omitted, then
[Object Number] OBJ=#
the object number will not be specified, and all ALL objects will be
treated as the objects which are able to be picked.
When picking, give the opening signal to suction nozzle or the
$DO[#]
output signal of upper control system, the input range of # $DO
[Input Signal] or $SO[#]
digital output is from 1 to 24. Or use the $SO site fieldbus output
or $MO[#]
range of 9 to 128 value. Or use the $MO combined output signal.
The position point parameter. The value of position is the
coordinate of the initial position when the object triggers the sensor
P#
[Point Position signal; if this point is required to ignore when using the image/vision
or
Name] to trigger, then the point name will not be written. # can record the
Point
position number when corresponds to teaching, such as P1, P3, etc.,
or self-declare the Point name by the user.
[Press-down Down=# When the arm picks, press down the height distance of object to
Height Distance] mm pick the object; when performs the flying pick, the arm will first stop

223
C25UE901-2208

Parameter
Parameter Name Description of Parameters
Format
at the specific distance above the object and then press down the
height distance to pick, # can enter the positive integer value, the
unit is millimeter mm.
Continuous CONT or non-continuous FINE type; and the percentage
FINE=#
of 1%~100% behind the continuous track form is the degree of
[Track Form] or
smoothness, decide the continuous parameter; the continuous type
CONT=#
FINE is divided into three levels: 0, 1, and 2.
Speed parameter, DELTA specification, the input range of # is the
integer value from 1 to 3000. (The 6-axis specification range is the
Vel=
[Speed] value from 1 to 2000, SCARA-LU series Vel=1 to 4000 values). This
#mm/s
parameter can be omitted, and the omitted speed will refer to the
Command of previous line, or the initial defined parameter.
Acceleration parameter, the input range of # is the integer value
from 1 to 100. The larger the number, the faster the acceleration.
[Acceleration] Acc=#% This parameter can be omitted. If the acceleration is omitted, the
Command of previous line or the initial defined parameter will be
referred to.
Tool coordinate parameter, the input range of # is the integer from 0
to 15. This parameter can be omitted. If the tool coordinate is
[Tool Coordinate] TOOL[#]
omitted, the Command of previous line or the initial defined
parameter will be referred to.
Base coordinate parameter, the input range of # is the integer from
[Base 0 to 31. This parameter can be omitted. If the base coordinate is
BASE[#]
Coordinate] omitted, the Command of previous line or the initial defined
parameter will be referred to.

224
C25UE901-2208

Write Sequence of CNV_PLACE Command Parameters:

Figure. 31 Write Sequence Diagram of CNV_PLACE Command Parameters


Description of Sequence Diagram:
1) # is the number
2) CNV、OBJ、P、Vel、Acc parameters may ignore the parameter items depending on the use
condition.
3) (Track form) CONT、CONT = #%、CONT = #mm、FINE parameters, please select one of them to
use.

◼ Example:
CNV_PLACE CNV=1 OBJ=1 $DO[1] P1 Down=5.000mm CONT=100% Vel=2000mm/s Acc=50% TOOL[0]
BASE[0]

◼ Example Description:
The Action Instruction of conveyor tracking the placed object, which is applicable for the sensor
triggering mode. Set the initial position of flying-pick as the P1 point on the arm to No. 1 conveyor,
after pressing down for 5mm, output the $DO[1] signal to place the No. 1 object, read the input signal
of DI[1] to confirm if the pick is successful. During the arm moving process, the discontinuous track
parameter is CONT 100%, the speed parameter is 2000mm/s, the acceleration parameter is 50%, the
0th tool coordinate parameter, and the 0th base coordinate parameter.

◼ Related Commands:
CNV_START、CNV_END、CNV_PICK.

225
C25UE901-2208

2.9.7 @CNV_OBJECT Number Command for Pick Object of Conveyor Tracking


◼ Description:
Read the object number currently picked by the arm, which can be used to judge the current object
number condition and execute the specific actions accordingly. Take up to 8 ea objects at most. Therefore,
there are 8 object numbers to classify 8 types of action states, which require to collocate with CNV_PICK
(flying-pick) and CNV_PLACE (flying-place) Commands to use, CNV_PICK will update the state after picking
the object, and the state returns to zero after CNV_PLACE placing the object.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.
 After using CNV_PICK (flying-pick), CNV_PLACE (flying-place), the object number of CNV_OBJECT
is able to change.

◼ Command Format:
IF CNV_OBJECT == <value> THEN
[Action Instruction]
ENDIF

Format/Parameter Description:
 [Variable name] is to define one variable for the user, for example: X1, Y1 etc.
 Use IF conditional for judgment, take the object number value as the condition judgmental, and
<value> is the integer from 1 to 8. When the condition is tenable, the following Action Instruction
content will be executed.
 [Action Instruction] is the combination of statement action, logical instructions, move Command
or signal Command after the IF judgmental is tenable.

226
C25UE901-2208

◼ Example: (Dynamic pick with the sensor mode)


CNV_START CNV = 1
CNV_START CNV = 2
CNV_START CNV = 3
CNV_PICK_QUANTITY = 2
WHILE CNV_FULL == FALSE
CNV_PICK CNV=1 $DO[1] P1 Down=5.000mm FINE=1 Vel=2500mm/s Acc=50% $DI[1]
ENDWHILE
IF CNV_OBJECT==1 THEN
CNV_PLACE CNV=2 OBJ=1 $DO[1] P2 Down=5.000mm FINE=1 Vel=2500mm/s Acc=50%
ENDIF
IF CNV_OBJECT==2 THEN
CNV_PLACE CNV=3 OBJ=2 $DO[1] P3 Down=5.000mm FINE=1 Vel=2500mm/s Acc=50%
ENDIF
CNV_END CNV = 1
CNV_END CNV = 2
CNV_END CNV = 3

◼ Example Description:
⚫ Start the track function of No.1, No. 2 & No.3 conveyors.
⚫ After flying-pick the object on the arm to No.1 conveyor, use the $DO[1] output signal;, press
down for 5mm to pick, and judge if the $DI[1] intput signal if the arm successfully picks the
material.
⚫ Then according to the IF judgmental condition, place the object on the corresponding conveyor. If
it is confirmed that the number of conveyor object (CNV_OBJECT) is 2, then it will flying-place on
the conveyor with No. 2 (use the $DO[1] output signal, press down for 5mm to place); if it is
confirmed that the number of conveyor object (CNV_OBJECT) is 3, then it will flying-place on the
conveyor with No. 3 (use the $DO[1] output signal, press down for 5mm to place).
⚫ End the track function of No. 1, No. 2 & No.3 conveyors.

◼ Related Commands:
CNV_START、CNV_END、CNV_PICK、CNV_PLACE.

227
C25UE901-2208

2.9.8 @CNV_FULL Count of Object Full Command for Conveyor Tracking


◼ Description:
The variable Command used to determine the full state for the object quantity of conveyor track is to
confirm if the current dynamic pick quantity equals to the maximum quantity variable
(CNV_PICK_QUANTITY) of setting. The flying-pick state is the Boolean variable; proceed the determination
of true TRUE or false FALSE in accordance with the state of already flying-pick/flying-place reaching the full
amount.
It is the state Command for the condition judgmental, which shall collocate with WHILE…ENDWHILE to
proceed the conditional setting. The relative state Command is CNV_EMPTY.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.
 After the condition judgmental is tenable, collocate with the Commands of CNV_PICK (flying-pick),
CNV_PLACE (flying-place) etc. to use.

◼ Command Format:
[Loop judgmental beginning] CNV_FULL [comparison operator] [Boolean variable]
[Action Instruction]
[Loop judgmental ending]
Format example:
WHILE CNV_FULL == FLASE
[Action Instruction]
ENDWHILE

Format/Parameter Description:
 [Loop judgmental beginning] is to use the beginning letter of loop judgment Command, which can
be used for the judgmental of WHILE Command or the IF…THEN Command as the beginning.
 [Loop judgmental ending] is to use the ending letter of loop judgment Command, and echo with
the judgmental of ENDWHILE Command or the ENDIF Command as the ending.
 [Comparison operator] is the symbol if the CNV_FULL and Boolean variable are able to establish
the condition judgmental. For example, " == " or " != ", two comparison operators are more
commonly used.
 [Boolean variable] is true TRUE indicating start or false FALSE indicating close, Boolean logical
instructions, select one state from two of them.
 [Action Instruction] is the combination of statement action, logical instructions, move Command
or signal Command after the IF judgmental is tenable.

228
C25UE901-2208

◼ Example:
CNV_START CNV = 1
CNV_PICK_QUANTITY = 2
WHILE CNV_FULL == FALSE
CNV_PICK CNV=1 OBJ=1 $DO[1] Down=5.000mm FINE=1 Vel=2500mm/s Acc=50% $DI[1] TOOL[0]
BASE[0]
ENDWHILE

◼ Example Description:
⚫ Start the track function of No.1 conveyor.
⚫ Set the maximum quantity of objects that the arm can fly-pick up to 2 per time.
⚫ When the flying-pick quantity of the arm does not reach the full of 2 (FALSE), proceed the flying-
pick of object.
(Flying-pick conditions: After pressing down for 5mm, output the $DO[1] signal to pick the No. 1 object,
read the DI[1] input signal to confirm if the pick is successful. During the arm moving process, the
discontinuous track parameter is FINE=1, the speed parameter is 2500mm/s, the acceleration
parameter is 50%, the 0th tool coordinate parameter, and the 0th base coordinate parameter).

◼ Related Commands:
CNV_START、CNV_END、CNV_PICK_QUANTITY、CNV_EMPTY.

229
C25UE901-2208

2.9.9 @CNV_EMPTY Count of Object Empty Command of Conveyor Tracking


◼ Description:
The variable Command used to determine the empty state for the object quantity of conveyor track is
to confirm if the current object quantity is empty/zero (0). The flying-pick state is the Boolean variable;
proceed the determination of true TRUE or false FALSE in accordance with the state of already flying-
pick/flying-place reaching the state of empty/zero.
It is the state Command for the condition judgmental, which shall collocate with WHILE…ENDWHILE to
proceed the conditional setting. The relative state Command is CNV_FULL.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.
 After the condition judgmental is tenable, collocate with the Commands of CNV_PICK (flying-pick),
CNV_PLACE (flying-place) etc. to use.

◼ Command Format:
[Loop judgmental beginning] CNV_EMPTY [comparison operator] [Boolean variable]]
[Action Instruction]
[Loop judgmental ending]
Format example:
WHILE CNV_EMPTY == FLASE
[Action Instruction]
ENDWHILE

Format/Parameter Description:
 [Loop judgmental beginning] is to use the beginning letter of loop judgment Command, which can
be used for the judgmental of WHILE Command or the IF…THEN Command as the beginning.
 [Loop judgmental ending] is to use the ending letter of loop judgment Command, and echo with
the judgmental of ENDWHILE Command or the ENDIF Command as the ending.
 [Comparison operator] is the symbol if the CNV_EMPTY and Boolean variable are able to establish
the condition judgmental. For example, " == " or " != ", two comparison operators are more
commonly used.
 [Boolean variable] is true TRUE indicating start or false FALSE indicating close, Boolean logic
variable, select one state from two of them.
 [Action Instruction] is the combination of statement action, logical instructions, move Command
or signal Command after the IF judgmental is tenable.

230
C25UE901-2208

◼ Example:
CNV_START CNV = 1
CNV_PICK_QUANTITY = 2
WHILE CNV_EMPTY == FALSE
CNV_PLACE CNV=1 OBJ=1 $DO[1] Down=5.000mm FINE=1 Vel=2500mm/s Acc=50% TOOL[0]
BASE[0]
ENDWHILE

◼ Example Description:
⚫ Start the track function of No.1 conveyor.
⚫ Set the maximum quantity of objects that the arm can fly-pick up to 2 per time.
⚫ When the flying-pick quantity of the arm does not reach empty/zero (0) (FALSE), proceed the
placement of object.
(Placement conditions: After pressing down for 5mm, output the $DO[1] signal to pick the No. 1 object.
During the arm moving process, the discontinuous track parameter is FINE=1, the speed parameter is
2500mm/s, the acceleration parameter is 50%, the 0th tool coordinate parameter, and the 0th base
coordinate parameter).

◼ Related Commands:
CNV_START、CNV_END、CNV_FULL.

231
C25UE901-2208

2.9.10 @CNV_SET_DELAY_TIME Tracking Delay End Time of Conveyor Tracking


◼ Description:
The delay end time Command for the flying-pick/flying place of conveyor track. Through setting this
variable, it is able to allow the arm continuously to move with the object for the specific time after arriving
in place, and then proceed the leaving action; in order to allow the entire flying-pick/flying place to adjust
the leaving time, so that the user is able to complete the flying-pick/flying place action completely.
As shown in the figures below, after the flying-pick or flying place arriving in place, it will move with the
object for 50ms and then leave.

Figure. 32 Schematic Diagram of Delta Arriving in Place (arrive in place and then leave
immediately)

50ms
Figure. 33 Schematic Diagram of Delta Delaying for 50 ms (follow for 50ms and then leave)

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

232
C25UE901-2208

◼ Command Format:
CNV_SET_DELAY_TIME[conveyor number] = [delay time]

Format/Parameter Description:
 [Conveyor number] is the conveyor number to be delayed, and the input range is the integer value
from 1 to 4.
 [Delay time] is to set the delay time of following the conveyor move, the input range is the integer
value from 0 to 1500, and the unit is ms (0.001 second).

◼ Example:
CNV_SET_DELAY_TIME[1] = 100

◼ Example Description:
Set the arm on the No. 1 conveyor, after arriving the positioning point, follow the delay time for 100ms,
then leave the positioning position, and continue the follow-on program Commands.

◼ Related Commands:
CNV_START、CNV_END.

233
C25UE901-2208

2.9.11 @CNV_QUEUE_SIZE Triggered Queue Quantity Command of Conveyor


Tracking
◼ Description:
The quantity variable for the queue has already triggered but not pick yet of conveyor track. This
variable represents the object quantity on the conveyor which have already been triggered by the sensor
but have not been picked yet. After getting the quantity, it can be used to determine the subsequent
program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_QUEUE_SIZE [conveyor number]

Format/Parameter Description:
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to CNV4.
The variable type is the positive integer, which can be used for the logical judgmental such as the WHILE
Command or the IF Command.

234
C25UE901-2208

◼ Example:

Figure 3 Schematic Diagram of CNV_QUEUE_SIZE Conveyor


IF CNV_QUEUE_SIZE[4] > 2 THEN
$C[3] = 0
$DO[3] = TRUE
ENDIF

◼ Example Description:
As shown in the figure, the sensor of conveyor 4 has triggered 3 objects, the program achieves the
condition of greater than 2, the content in the IF judgmental will be executed, the 3rd counter is reset
to zero and the 3rd digital output signal is true (TRUE).

◼ Related Commands:
CNV_START、CNV_END、CNV_PICK、CNV_PLACE、CNV_PICK_QUANTITY.

235
C25UE901-2208

2.9.12 @CNV_OBJ_CNT_DIST Encoder Deviation Command for Triggered Object


Position of Conveyor Tracking
◼ Description:
The encoder deviation variable for the already triggered object position of conveyor track, when the
variable value of CNV_QUEUE_SIZE[NUM] is greater than or equal to 2 (there are more than 2 already
triggered objects on the conveyor), then it can be used.
This variable is able to display the encoder deviation between the 1st object position and the 2nd object
position triggered by the sensor. Usually it is used to judge if the triggered object is continuous.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_OBJ_CNT_DIST[conveyor number]
Format/Parameter Description:
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to
CNV4. The variable type is the positive integer, which can be used for the logical instructions
such as the WHILE Command or the IF Command.

◼ Example:
IF CNV_QUEUE_SIZE[2] > 1 THEN
IF CNV_OBJ_CNT_DIST[2] < 2600 THEN
$C[3] = 0
$DO[3] = TRUE
ELSE
$C[3] = 1
$DO[3] = FLASE
ENDIF
ENDIF

◼ Example Description:
If it is detected that the object quantity on the conveyor 2 is greater than 1, then judge if the encoder
value of the 1st detection and the 2nd detection is less than 2600 (2600 is the self-measured value), if
yes, then it is continuous , otherwise it is not the contiuous object. The content in the IF judgmental
will be executed, the 3rd counter is reset to zero and the 3rd digital output signal is true (TRUE).
Otherwise, the 3rd counter is reset to 1 and the 3rd digital output signal is false (FALSE).

◼ Related Commands:
CNV_START、CNV_END、CNV_QUEUE_SIZE、CNV_PICK、CNV_PLACE、CNV_PICK_QUANTITY.
236
C25UE901-2208

2.9.13 @CNV_PLACE_BATCH Maximum Times for Place of Conveyor Tracking


◼ Description:
The flying-place state variable is used for the condition where the plural objects are required for flying-
place at the same job task location.
When the conveyor sensor used for releasing the object is triggered, the arm will get a job task
position which is able to execute the flying-place, and the maximum flying-place number at the job task
position can be declared and set by this variable. It can be used to set the stacking quantity of multiple
objects on the production line.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_PLACE_BATCH[conveyor number] = [maximum flying-place times]

Format/Parameter Description:
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to
CNV4.
 [Maximumflying-place time] is the positive integer value, the input range is 1 to 100 times; if no
number is specified, the default value is 1.

◼ Example:
CNV_PLACE_BATCH[1] = 3

◼ Example Description:
Setting the arm is able to get a job task position which is able to execute the flying-place, and the
maximum flying-place times declared by the arm at the job task position are 3 times.

◼ Related Commands:
CNV_START、CNV_END、CNV_TRIGGER_TIMES.

237
C25UE901-2208

2.9.14 @CNV_RESET_ENC Clear Count Command for External Encoder of Conveyor


Tracking
◼ Description:
The count Command for clearing the external encoder of conveyor track. The user is able to use this
Command to clear the count values of all external encoders during the process of writing program, and
make the encoder value as zero, and re-start the count. Using this Command, the effect is the same as
when press the clear "CLEAR" on the conveyor correction page.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
CNV_RESET_ENC

Format/Parameter Description:
 CNV_RESET_ENC is the program Command to reset the values of all external encoders to zero.

◼ Example:
CNV_RESET_ENC

◼ Example description:
The values of all external encoders will be cleared to zero when the program reads this Command.

◼ Related Commands:
CNV_START、CNV_END.

238
C25UE901-2208

2.9.15 @CNV_QUEUE_REMOVE Removed Queue Command of Conveyor Tracking


◼ Description:
The Command is used to remove the queue in front of the temporary storage zone of flying-pick/flying-
place of conveyor track. The pick/place state variables, the user is able to use this Command to remove the
temporary storage value placed at the head of the waiting queue during the process of writing program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)

◼ Command Format:
CNV_QUEUE_REMOVE[conveyor number]

Format/Parameter Description:
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to
CNV4.

◼ Example:
CNV_QUEUE_REMOVE[1]

◼ Example Description:
Remove the queue temporary storage value of 1st conveyor.

◼ Related Commands:
CNV_START、CNV_END、CNV_QUEUE_SIZE、CNV_RESET_ENC
.

239
C25UE901-2208

2.9.16 @CNV_PICK_ACC Setting Acceleration Time for Press Down Command of


Conveyor Tracking
◼ Description:
It is required to collocate with the functional Command of conveyor track (CNV_START) to set the
press-down acceleration time of conveyor track.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_PICK_ACC[conveyor number] = [acceleration parameter value]

Format/Parameter Description:
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to
CNV4.
 [Acceleration parameter value]. The variable type is the positive integer value, the input range is
between 10 and 100, the unit is millisecond (ms); if there is no specified number, the default
value is 30 ms.

◼ Example:
CNV_START CNV = 1
CNV_PICK_ACC[1] = 50

◼ Example Description:
Start the tracking function of No.1 conveyor.
Set the press-down acceleration time of conveyor track is 50ms.

◼ Related Commands:
CNV_START、CNV_END、SET_ACC.

240
C25UE901-2208

2.9.17 @CNV_OFFSET_X X-axis Position Offset Command of Conveyor Tracking


◼ Description:
It is required to collocate with the functional Command of conveyor track (CNV_START)), the user is
able to set the offset distance value of X-axis on the conveyor at the dynamic pick during the process of
writing the program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_OFFSET_X[conveyor number] = [offset distance value]

Format/Parameter Description:
 [Conveyor number] is the conveyor number, the input range is 1 to 4 representing CNV1 to CNV4.
If no input, then it will be specified as all.
 [Offset distance value] is the offset distance value of axis, the unit is millimeter (mm).

◼ Example-1:
CNV_START CNV = 1
CNV_OFFSET_X[1] = 10

◼ Example-1 Description:
Start the tracking function of No.1 conveyor.
In the conveyor CNV1, the direction of X-axis is offset to 10mm distance.

◼ Example-2:
CNV_START CNV = 1
CNV_OFFSET_X = -20

◼ Example-2 Description:
Start the tracking function of No.1 conveyor.
In all conveyors (CNV1~CNV4), the direction of X-axis is offset to -20mm distance.

◼ Related Commands:
CNV_START、CNV_END、CNV_OFFSET_Y、CNV_OFFSET_Z、CNV_START.

241
C25UE901-2208

2.9.18 @CNV_OFFSET_Y Y-axis Position Offset Command of Conveyor Tracking


◼ Description:
It is required to collocate with the functional Command of conveyor track (CNV_START)), the user is
able to set the offset distance value of Y-axis on the conveyor at the dynamic pick during the process of
writing the program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_OFFSET_Y[conveyor number] = [offset distance value]

Format/Parameter Description:
 [Conveyor number] is the conveyor number, the input range is 1 to 4 representing CNV1 to CNV4.
If no input, then it will be specified as all.
 [Offset distance value] is the offset distance value of axis, the unit is millimeter (mm).

◼ Example-1:
CNV_START CNV = 1
CNV_OFFSET_Y[1] = 10

◼ Example-1 Description:
Start the tracking function of No.1 conveyor.
In the conveyor CNV1, the direction of Y-axis is offset to 10mm distance.

◼ Example-2:
CNV_START CNV = 1
CNV_OFFSET_Y = -20

◼ Example-2 Description:
Start the tracking function of No.1 conveyor.
In all conveyors (CNV1~CNV4), the direction of Y-axis is offset to -20mm distance.

◼ Related Commands:
CNV_START、CNV_END、CNV_OFFSET_X、CNV_OFFSET_Z、CNV_START.

242
C25UE901-2208

2.9.19 @CNV_OFFSET_Z Z-axis Position Offset Command of Conveyor Tracking


◼ Description:
It is required to collocate with the functional Command of conveyor track (CNV_START)), the user is
able to set the offset distance value of Z-axis on the conveyor at the dynamic pick during the process of
writing the program.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
CNV_OFFSET_Z[conveyor number] = [offset distance value]

Format/Parameter Description:
 [Conveyor number] is the conveyor number, the input range is 1 to 4 representing CNV1 to CNV4.
If no input, then it will be specified as all.
 [Offset distance value] is the offset distance value of axis, the unit is millimeter (mm).

◼ Example-1:
CNV_START CNV = 1
CNV_OFFSET_Z[1] = 10

◼ Example-1 Description:
Start the tracking function of No.1 conveyor.
In the conveyor CNV1, the direction of Z-axis is offset to 10mm distance.

◼ Example-2:
CNV_START CNV = 1
CNV_OFFSET_Z = -20

◼ Example-2 Description:
Start the tracking function of No.1 conveyor.
In all conveyors (CNV1~CNV4), the direction of Z-axis is offset to -20mm distance.

◼ Related Commands:
CNV_START、CNV_END、CNV_OFFSET_X、CNV_OFFSET_Y、CNV_START.

243
C25UE901-2208

2.9.20 @CNV_SPEED Get Conveyor Speed Command of Conveyor Tracking


◼ Description:
The conveyor state variable, the user is able to read the current speed of conveyor.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above CONT (pre-read)
 Use CNV_START to start the specified conveyor prior to use.

◼ Command Format:
[Self-defined variable name] = CNV_SPEED[conveyor number]

Format/Parameter Description:
 [Self-defined variable name] is the self-defined variable name, it can be English alphabets or
English alphabets + numbers, but the numbers cannot be the start of heading character, and shall
not use「-」.
 [Conveyor number] is the conveyor number value, the input range is 1 to 4 representing CNV1 to
CNV4.
 Or use the register as the input temporary storage value.
 After getting the conveyor speed through the CNV_SPEE Command, it can be applied to the
subsequent program as the condition determination.

◼ Example-1:
INT G1
G1 =CNV_SPEED[1]

◼ Example-1 Description:
Declare theINT variable G1, and the current speed of conveyor 1 specifies the G1 variable value, which
is used as the judgment of subsequent program.

◼ Example-2:
$C[1]=CNV_SPEED[1]

◼ Example-2 Description:
The current speed of conveyor 1 specifies the register 1 as the display.

◼ Related Commands:
CNV_START、CNV_END、$C[1]、INT.

244
C25UE901-2208

2.10 CODE J, MESSAGE PROMPT FUNCTIONAL COMMAND


2.10.1 @USER_ALARM User Self-defined Alarm Trigger Command
◼ Description:
If the user requires to self-judge the condition and issue the alarm during the program execution, it
may use this Command function to issue the alarm while the program is running. The text content of alarm
record is the set text content used on the interface. After issuing the alarm, the program execution will be
stopped, and the error code (Err01-09-XX) and the set text content will be displayed in the show window,
and it will also be recorded in the history record simultaneously.

◼ Prerequisite:
Applicable Software Version Default State
HRSS2.0.1 or above Caterpillar1.0.1 or above FINE (non pre-read)

◼ Command Format:
USER_ALARM[#]

Format/Parameter Description:
 # is the number, the positive integer type, which indicates that the #th self-defined alarm is
triggered. The input range is 1 to 10, but it shall not be 0.

◼ Example:
IF $DI[2] == TRUE AND $DI[3] == TRUE THEN
USER_ALARM[3]
ENDIF

◼ Example Description:
IF, if the digital input signals 2 & 3 are both true (TRUE) at the same time, the 3rd self-defined alarm
will be triggered, the error code Err01-09-12 +, the user-defined alarm text is displayed, and the arm
will stop running.

◼ Related Commands:
IF.

245
C25UE901-2208

2.11 CODE K, SIMULATION ENVIRONMENT COMMAND


This chapter describes the simulation environment Command of code K separately.
2.11.1 @ADDTOOL Add New Robot Tool Command in Simulation View
◼ Description:
Add the display picture of simulation tool in the offline version software, and newly add the tool model
for the user to draw the 3D, which is displayed in the simulation display page. When the arm (flange face)
moves, the simulation tool page will also move with various postures by following the arm, allowing the
user able to further comply and further experience the simulation action/posture information after the arm
is equipped with the tool.

Figure. 34 Diagram of Adding Simulation Page for Deburring End Tool


(Left: Not Add; Right: Already Added)

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

 Use the graphics software to convert the 3D graphic file to .stl format (the file size shall not be
too large, otherwise, it will be unable to operate).
 Place the stl file into the offline software folder stl.
Name

246
C25UE901-2208

◼ Command Format:
ADDTOOL [file name]

Format/Parameter Description:
 [File name] is the file name of converting the 3D graphic file to the file name of .stl. The
acceptable file name is the file name beginning with English uppercase/lowercase or adding
underline.
 No need to enter the extension name (.stl), take ee.stl as the example, just type the file name
"ee".
 The 3D graphic file shall be the binary format for converting to stl file, and the direction of file
coordinate system shall be the same as the flange face end coordinate system.

◼ Example: (tool file name: XEG_FINGER.stl)


ADDTOOL XEG_FINGER

◼ Example Description:
As shown in the figure below, in the offline simulation page, add the simulation tool page for one set
of XEG electric gripper jaw including the fingers (XEG_FINGER).

Figure. 35 Simulation Diagram Included Gripper Jaw & Fingers

◼ Related Commands:
SHOW_TOOL、ADDOBJ、SHOW_OBJ、MOVEFLOOR、AXISON、AXISOFF.

247
C25UE901-2208

2.11.2 @ADDOBJ Add New Peripheral Object Command in Simulation View


◼ Description:
In the offline version software, the simulation peripheral objects and equipment display page are
added, and the 3D-object and equipment models drawn by the user are newly added to display in the
simulation display page, allowing the user able to further comply and further experience the simulation
action/posture information of arm objects and equipment peripheral configuration, in order to confirm if
the arm is able to reach the desired range, and collocate with the timer function to calculate the cycle time
of backward and forward action of the arm.

Figure. 36 Simulation Page Diagram of Add Machine Tool Object

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)
 Use the graphics software to convert the 3D graphic file to .stl format (the file size shall not be
too large, otherwise, it will be unable to operate).
 Place the stl file into the offline software folder stl.
Name

248
C25UE901-2208

◼ Command Format:
ADDOBJ [file name] [offset flange face distance information] [color information]
ADDOBJ [file name] [P:X, Y, Z, A, B, C ] [C: R, G, B ]

Format/Parameter Description:
 [File name] is the file name of converting the 3D graphic file to the file name of .stl. The acceptable file
name is the file name beginning with English uppercase/lowercase or adding underline.
 No need to enter the extension name (.stl), take QW.stl as the example, just type the file name "QW".
 The 3D graphic file shall be the binary format for converting to stl file, and the direction of file
coordinate system shall be the same as the original base coordinate system. (The original coordinate
system is placed at the 2nd -axis rotation center point)
 [Offset flange face distance information] is the user offset distance information from the center point
of original base coordinate system, the format is P:X, Y, Z, A, B and C, X indicates the X-axis distance, Y
indicates the Y-axis distance, Z indicates the Z-axis distance, and the unit is millimeter (mm); A
indicates the X-axis rotation angle, B indicates the Y-axis rotation angle, and C indicates the Z-axis
rotation angle, the unit is degrees.
 [Color information] is the color match of input 3D object, the format is C:R,G and B, using red, green,
blue for the color match, the input range is 0~255. For example: C:0,0,0 is black; C:255,255,255 is
white.

◼ Example: (File name of conveyor object: conveyor.stl)


ADDOBJ conveyor P: 0,470,-130,0,0,30 C: 0,130,0

◼ Example Description:
In the offline simulation page, add the simulation object page of one conveyor object (conveyor). The
object distance from the original base coordinate system i.e. X-axis 0mm, Y-axis 470mm and Z-axis
130mm, and the rotation angle to Z-axis is 30º. The color information configuration (R,G,B) is (0,130,0),
please refer to the figure below.

249
C25UE901-2208

Figure. 37 Simulation Diagram of Add One Conveyor

◼ Related Commands:
ADDTOOL、SHOW_TOOL、SHOW_OBJ、MOVEFLOOR、AXISON、AXISOFF.

250
C25UE901-2208

2.11.3 @SHOW_TOOL Show/Hide Robot Tool Command in Simulation View


◼ Description:
In the offline simulation page, after adding the end tool Command ADDTOOL, it is able to further show
or hide the end tool through this Command, and the simulation page is closer to the process scenario that
the user desires to simulate.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

◼ Command Format:
SHOW_TOOL [file name] [Boolean variable]

Format/Parameter Description:
 [File name] is the file name of converting the 3D graphic file to the file name of .stl. The
acceptable file name is the file name beginning with English uppercase/lowercase or adding
underline.
 No need to enter the extension name (.stl), take ee.stl as the example, just type the file name
"ee".
 The 3D graphic file shall be the binary format for converting to stl file, and the direction of file
coordinate system shall be the same as the flange face end coordinate system.
 [Boolean variable] is true TRUE indicating the start or false FALSE indicating the close, Boolean
logical instructions, select one from either states.

◼ Example: (tool file name: XEG_FINGER.stl)


ADDTOOL XEG_FINGER
WAIT SEC 2
SHOW_TOOL XEG_FINGER FALSE

◼ Example Description:
As shown in the figure below, in the offline simulation page, add the simulation tool page of one set of
XEG electric gripper jaw including the fingers (XEG_FINGER).
After waiting for 2 seconds, hide the electric gripper jaw tool on the simulation page.

251
C25UE901-2208

Figure. 38 Add Simulation Diagram of One set XEG Electric Gripper Jaw Including
Fingers

◼ Related Commands:
ADDOBJ、SHOW_OBJ、MOVEFLOOR、AXISON、AXISOFF.

252
C25UE901-2208

2.11.4 @SHOW_OBJ Simulation Page for Display Show/Hide Peripheral Object


Command
◼ Description:
In the offline simulation page, after adding the peripheral environment object Command ADDTOOL, it
is able to further show or hide the peripheral environment object through this Command, and the
simulation page is closer to the process scenario that the user desires to simulate.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

◼ Command Format:
SHOW_OBJ [file name] [Boolean variable]

Format/Parameter Description:
 [File name] is the file name of converting the 3D graphic file to the file name of .stl. The
acceptable file name is the file name beginning with English uppercase/lowercase or adding
underline.
 No need to enter the extension name (.stl), take ee.stl as the example, just type the file name
"ee".
 The 3D graphic file shall be the binary format for converting to stl file, and the direction of file
coordinate system shall be the same as the flange face end coordinate system.
 [Boolean variable] is true TRUE indicating the start or false FALSE indicating the close, Boolean
logical instructions, select one from either states.

◼ Example: (object file name: conveyor.stl)


ADDOBJ conveyor P: 0,470,-130,0,0,30 C: 0,130,0
WAIT SEC 1
SHOW_OBJ conveyor FALSE

◼ Example Description:
In the offline simulation page, add the simulation object page of one conveyor object (conveyor). The
object distance from the original base coordinate system i.e. X-axis 0mm, Y-axis 470mm and Z-axis
130mm, and the rotation angle to Z-axis is 30º. The color information configuration (R,G,B) is (0,130,0).
After waiting for 1 second, hide the conveyor object (conveyor) of simulation page.

◼ Related Commands:
ADDOBJ、SHOW_TOOL、MOVEFLOOR、AXISON、AXISOFF.

253
C25UE901-2208

2.11.5 @MOVEFLOOR Moving Floor Position Command in Simulation View


◼ Description:
In the offline simulation page, the moving floor position Command can be used to collocate with the
installation position of robotic arm. If the arm is installed on one arm base, the move distance can be
adjusted through the moving floor Command, in order to allow the offline page of arm more matches the
current real environment.

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

◼ Command Format:
MOVEFLOOR [move distance]

Format/Parameter Description:
 [Move distance] is the floor moving distance of simulation page. Take the arm base as the original
reference distance of zero. The distance as compared to the reference can be adjusted by the user.
The unit is millimeters (mm). The positive value of the number is the Z-axis of original world
coordinate upward; the negative value of the number is the Z-axis of original world coordinate
downward.

◼ Example:
MOVEFLOOR -1000

◼ Example Description:
In the offline simulation page, take the arm base as the basis, move the floor plane position downward
for a distance of 1000mm.

◼ Related Commands:
ADDOBJ、SHOW_TOOL、SHOW_OBJ、AXISON、AXISOFF.

254
C25UE901-2208

2.11.6 @AXISON Display Coordinate System (Axis) Command in Simulation View


◼ Description:
In the offline simulation page, it is able to open the XYZ coordinate axis of Cartesian coordinate system
and the TOOL coordinate system. The open to display the state of coordinate axes is shown in the figure
below.

Figure. 39 Simulation Diagram of Openning Coordinate Axis

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

◼ Command Format:
AXISON

Format/Parameter Description:
 Open to display the XYZ coordinate axis of Cartesian coordinate system and the TOOL coordinate
system.

◼ Example:
AXISON

◼ Example Description:
Show the XYZ coordinate axis of Cartesian coordinate system and the TOOL coordinate system .

◼ Related Commands:
ADDOBJ、SHOW_TOOL、SHOW_OBJ、MOVEFLOOR、AXISOFF.

255
C25UE901-2208

2.11.7 @AXISOFF Hide Coordinate System (Axis) Command in Simulation View


◼ Description:
In the offline simulation page, it is able to close the XYZ coordinate axis of Cartesian coordinate system
and the TOOL coordinate system. The result of hiding coordinate is shown in the figure below.

Figure. 40 Simulation Diagram of Closing Coordinate Axis

◼ Prerequisite:
Applicable Software Version Default State
HRSS3.2.1 or above Caterpillar not use CONT (pre-read)

◼ Command Format:
AXISOFF

Format/Parameter Description:
 Hide the XYZ coordinate axis of Cartesian coordinate system and the TOOL coordinate system.

◼ Example:
AXISOFF

◼ Example Description:
Hide the XYZ coordinate axis of Cartesian coordinate system and the TOOL coordinate system .

◼ Related Commands:
ADDOBJ、SHOW_TOOL、SHOW_OBJ、MOVEFLOOR、AXISON.

256
C25UE901-2208

APPENDIX1、CONTINUOUS (CONT)/NON- CONTINUOUS


(FINE) LIST
This appendix is the organized table of Commands preset as the continuous track (pre-reading)
CONT/non-continuous track (non pre-reading) FINE, which is convenient for the user to understand the
characteristics of the Command in advance, and understand if it can be modified through the program
Command.
If the original is the continuous track CONT state, the user shall pay special attention to the program
pre-reading state, so that there will be no phenomenon of early action or inconsistent action; the
improvement mode is able to stop (get stuck) the pre-read state through the program by using the
discontinuous track (FINE) Command or adding the waiting time (WAIT SEC) Command in the previous line
of pre-read.
In the table on the next page, 「O」indicates the default setting state; 「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE function.

Table. 6 Pre-read & Pre-set State Table of Command Set


Continuous FINE
No. Class Number Command Name (CONT) (non pre-
(pre-read) read)
A-1 REAL O -
A-2 INT O -
A-3 BOOL O -
A-4 CHAR O -
Variable/Function Declaration

A-5 E6POS O -
A-6 E6AXIS O -
A-7 E6POINT O -
A A-8 FRAME O -
A-9 STRUC O -
A-10 DEF... END O -
A-11 DEFFCT…ENDFCT O -
A-12 EXT O -
A-13 EXTFCT O -
A-14 STRING O -
A-15 ARRAY O -
A-16 UINT O -
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.

257
C25UE901-2208

Table. 6 Pre-read & Pre-set State Table of Command Set(cont. 1)


Continuous FINE
No. Class Number Command Name (CONT) (non pre-
(pre-read) read)
B-1 PTP O △
B-2 PTP_REL O △
B-3 LIN O △
B-4 LIN_REL O △

B-5 LIN_REL_TOOL O △
Motion Command

B-6 CIRC O △
B B-7 CIRC_REL O △
B-8 SPLINE O △
B-9 STOP_MOTION O -
B-10 BRAKE O -
B-11 CHECK_LIN O -
B-12 P#_EXIST() O -
B-13 P#() O -
B-14 CT_A6 O -
C-1 $C[] O -
O
Register

C-2 $T[] -
C C-3 $T_STOP[] O -
C-4 $PR[] O -
C-5 $SRR[]、$SRW[] O -
D-1 $DI[] - O
Input, Output Signal Control

D-2 $DO[] △ O
D-3 $SI[] - O
D-4 $SO[] △ O
D D-5 $VO[] △ O
D-6 $RO[] △ O
D-7 $RI[] - O

D-8 SYN O -

D-9 PULSE - O
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.

258
C25UE901-2208

Table. 6 Pre-read & Pre-set State Table of Command Set(cont. 2)


Continuous FINE
No. Class Number Command Name (CONT) (non pre-
(pre-read) read)
E-1 IF O -
E-2 FOR O -
E-3 LOOP O -
E-4 WHILE O -
E-5 REPEAT O -
Flow Control Function

E-6 GOTO O -
E-7 SWITCH O -
E
E-8 WAIT SEC - O
E-9 WAIT FOR - O
E-10 WAIT FOR ... TIMEOUT - O
E-11 AND - O
E-12 OR - O
E-13 INTERRUPT…WHEN…DO… O -
E-14 INTERRUPT ON/OFF O -
E-15 BREAK_POINT O -
F-1 SET_OVERRIDE_SPEED O -
F-2 SET_SPEED O -
F-3 SET_ACC O -
F-4 SET_ROTATION_SPEED O -
Motion Parameter/System Setting

F-5 SET_TOOL - O
F-6 SET_BASE - O
F-7 SET_PAYLOAD O -
F-8 GETPOINT O -
F
F-9 GET_MOTION_STATUS O -
F-10 EXT_TCP_START - O
F-11 EXT_TCP_END - O
F-12 TL_SET O -
F-13 SERVO_ON O -
F-14 SERVO_OFF O -
F-15 SERVO_ON(#) O -
F-16 SERVO_OFF(#) O -
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.

259
C25UE901-2208

Table. 6 Pre-read & Pre-set State Table of Command Set(cont. 3)


Continuous FINE
No. Class Number Command Name
(CONT) (non pre-
(pre-read) read)
G-1 + O -
G-2 - O -
G-3 * O -
O
Mathematic Calculation

G-4 / -
G-5 SIN O -
G-6 COS O -
G G-7 TAN O -
G-8 ASIN O -
G-9 ACOS O -
G-10 ATAN O -
G-11 ATAN2 O -
G-12 FWD O -
G-13 % O -
H-1 COPEN O -
Communication

H-2 CCLOSE O -
Function

H-3 CCLEAR O -
H
H-4 CREAD O -
H-5 CWRITE △ O
H-6 CINQUIRE O -
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.

260
C25UE901-2208

Table. 6 Pre-read & Pre-set State Table of Command Set(cont. 4)


Continuous FINE
No. Class Number Command Name (CONT) (non pre-
(pre-read) read)
I-1 CNV_START O -
I-2 CNV_END O -
I-3 CNV_PICK_QUANTITY O -
I-4 CNV_TRIGGER_TIMES O -
I-5 CNV_PICK O △
I-6 CNV_PLACE O △
I-7 CNV_OBJECT O -
I-8 CNV_FULL O -
I-9 CNV_EMPTY O -
Conveyor

I-10 CNV_SET_DELAY_TIME O -
I
I-11 CNV_QUEUE_SIZE O -
I-12 CNV_OBJ_CNT_DIST O -
I-13 CNV_PLACE_BATCH O -
I-14 CNV_RESET_ENC O -
I-15 CNV_QUEUE_REMOVE O -
I-16 CNV_PICK_ACC O -
I-17 CNV_OFFSET_X O -
I-18 CNV_OFFSET_Y O -
I-19 CNV_OFFSET_Z O -
I-20 CNV_SPEED O -
Message
Prompt

J J-1 USER_ALARM - O

K-1 ADDTOOL O -
K-2 ADDOBJ O -
Environment
Simulation

K-3 SHOW_TOOL O -
K K-4 SHOW_OBJ O -
K-5 MOVEFLOOR O -
K-6 AXISON O -
K-7 AXISOFF O -
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.

261
C25UE901-2208

Table. 6 Pre-read & Pre-set State Table of Command Set(cont. 5)


Continuous FINE
No. Class Number Command Name (CONT) (non pre-
(pre-read) read)
Electric Gripper Jaw Function L-1 EG_OPEN - O
L-2 EG_CLOSE - O
L-3 EG_RESET △ O
L-4 EG_GET_STATUS △ O
L L-5 EG_RUN_MOVE △ O
L-6 EG_RUN_GRIP △ O

L-7 EG_RUN_EXPERT △ O

L-8 EG_GOT_POS △ O
M-1 EX_AX - O
M-2 EX_AX_ASYNC O -
External Axis

O
Function

M-3 EX_AX_SYNC_COUPLE -
M M-4 EX_AX_SET_ACC O -
M-5 EX_AX_SET_SPEED O -
M-6 EX_AX_CT O -
M-7 ASYPTP O △
N-1 WELD_START - O
Welding Function

N-2 WELD_END - O
N-3 WEAVE O -
N
N-4 WEAVE_END O -
N-5 RESUME_PROG O -
N-6 CLEAR_RESUME_PROG O -
Collision O-1 CD_START - O
O Detection
Function O-2 CD_END - O
P-1 STRCMP O -
P-2 STRPOS O -
String Operation

P-3 STPCPY O -
P-4 STRLEN O -
P
P-5 INTTOSTR O -
P-6 REALTOSTR O -
P-7 STRTOINT O -
P-8 STRTOREAL O -
Dedicated Q-1 TL_START O -
Q
Function Q-2 TL_END O -
Note: 「O」indicates the default setting state;「-」indicates none, blank;
「△」indicates that it can be modified by the program, and required to use the CONT/FINE
function.
§Continuous Trajectory (CONT, Pre-read) Description:
262
C25UE901-2208

If the “CONT” Command is called, the robot controller will consider the next motion point, and will
move in a smoother path. The path smooth level will depend on the motion velocity and acceleration.
There are three kinds of CONT Command: CONT, CONT = #%, CONT = #mm. Last two kinds represent
the fixed path, like CONT = 50% or CONT = 30mm.

◼ Command Format:
Format(1):CONT
Format (2):CONT = #%
Format (3):CONT = # mm

 Format(1):CONT
If User not define smooth path percentage ratio or smooth path distance, preset parameter is 100%.
LIN P1 CONT
LIN P2 CONT
LIN P3 CONT
When execute the Commands open, there will be the smooth path in “LIN P2 CONT”, but there won’t move
to P1 and P3(because they are the origin and destination).
CONT motion figure

Starting point P2 Terminal point


Corner radius

P3 P1
Destination Origin

 Format(2):CONT = #%
User defines smooth path percentage ratio.
LIN P1 CONT
LIN P2 CONT = 50%
LIN P3 CONT
The distance between P2, P3 is shorter than the one between P1, P2, which is called the short length.
When execute the opening program, the trajectory will start fairing when 50% short length away
before P2.

Because the “CONT= # %” Command will create a fixed path,


so the velocity of the robot may change.

263
C25UE901-2208

P2
short length 50% Fairing Trajectory

P3
destination P1

origin

CONT = 50% figure

 Format(3):CONT = # mm
User defines smooth path distance.
LIN P1 CONT
LIN P2 CONT = 5mm
LIN P3 CONT
The path will start fairing when 5mm away before P2.

P2 P

5mm 2 Fairing Path

P3
P1
destination
origin

CONT = 5mm figure

Because the “CONT= # mm” Command will create a fixed


path, so the velocity of the robot may change.

When using “CONT= # mm” Command, it does not mean


that the value specified by the user will be exactly the same.
However, the system will attempt at the distance specified
by the user.

If there is “DO” Command before the “CONT”, then the path won’t be smoothed.
Example:
LIN P1 CONT
$DO[1] = TRUE
LIN P2 CONT
LIN P3 CONT
Originally, the path moving to P1 should be faired, but in this case, the path won’t be smoothed.
Line 2 have one DO signal, to reach P1 position and stop, to output DO[1] signal, then move to P2

264
C25UE901-2208

position smoothed. CONT not work in Line 2 (not pre-read).

§Discontinuous Trajectory -FINE (Not Pre-read) Description:

Starting point Terminal point

Terminal point Starting point

FINE motion

“FINE” Command make TCP arrive the point without fairing the path.
User choose kind by task state, preset define FINE=1.

◼ Command Format:
Format(1):FINE (=0)
Format(2):FINE = 1
Format(3):FINE = 2

FINE has three kinds:


 FINE (= 0), pre-read the next Command, not check the actual position. Equal CONT command, can
save motion time.
 FINE = 1 , not pre-read the next Command, not check the actual position.
 FINE = 2 , not pre-read the next Command, check the actual position.

※Preload function description

In computer program computations, program codes are preloaded at the bottom layer of the program
to be compiled and combined with multiple follow-up actions and then integrated and outputted. We call
this the preload function. The benefit of the preload function is to allow the program to know the next step
of action in advance, and make adjustments and simplifications to reduce time. But the drawback is that
when there might be several types of processes (such as counting, statements and calculation types), that
the robot timing may be inaccurate. CONT Commands all have preload functions.
For example: In the figure below, the robot moves to 5th point from P1 to P5; when the robot is moving
towards P2, the program already read the P5 point, and the subsequent actions are more certain.

265
C25UE901-2208

Computer non pre-read Computer pre-read

P1 P2 P3 P4 P5

Robot move
Figure. 41 Preload function illustration

※In-place function description

The in-place function refers to the accuracy level in which the program determines that the target
position was reached. If the error value is extremely low, which means that in-place exits precisely. If the
error value is high, which means that in-place exits roughly or not in-place, as shown in the figure below.
When the in-place position is enlarged, the area inside the dotted circle is the error range of the point
(error of the motor being in-place). When the P1 point position is reached, there are three precision levels:
FINE(=0) is the same as the continuous CONT function, it is not in-place and not precise. A better one is
FINE=1, which means that it is in-place but not precise. The best one is FINE=2; which means that it is in-
place and precise because it takes a longer time to achieve precisely.

P1 P1 P1

(1)FINE (= 0) (2)FINE = 1 (3)FINE = 2


In-place function example illustration (1) Not in-place (2) In-place but not precise
(3) In-place and precise
:Denotes
表 P1 point: denotes the in-place point of the robot. The area inside the dotted circle is
the error
示 range of the point position.
P
1
◼ Application
點 program example 1: (explaining using CONT, which is the same as FINE=0)
PTP P1 CONT
LIN P2 CONT
$C[1] = $C[1] + 1

266
C25UE901-2208

◼ Application program example 1 description:


Execute point-to-point movement to the P1 point, with continuous trajectory (CONT).
Execute point-to-point movement to the P2 point, with continuous trajectory (CONT).
The first counter executes the calculation of plus 1.
Result description: Successfully moved from P1 point to P2 point in order and completed the counting
action; the connection between the action of P1 and P2 is a continuous trajectory, which can save time. But
when the P1 movement just begin, the program already preloaded and completed the counter’s count+1;
the counting action ran without waiting for P2 to complete execution before performing the counting
action.

◼ Application program example 2: (explaining using FINE = 1)


PTP P1 FINE = 1
LIN P2 FINE = 1
$C[1] = $C[1] + 1

◼ Application program example 2 description:


Execute point-to-point movement to the P1 point, with non-continuous trajectory (FINE=1). .
Execute point-to-point movement to the P2 point, with non-continuous trajectory (FINE=1).
The first counter executes the calculation of plus 1
Result description: Successfully moved from P1 point to P2 point in order and complete the counting
action; the connection between the action of P1 and P2 is non-continuous trajectory, and the in-place
method of P1&P2 is not fully precise positions. The program did not preload, and the counting action was
executed after P2 had finished executing.

◼ Application program example 3: (explaining using FINE = 2)


PTP P1 FINE = 1
LIN P2 FINE = 2
$C[1] = $C[1] + 1

◼ Application program example 3 description:


Execute point-to-point movement to the P1 point, with non-continuous trajectory (FINE=1). .
Execute point-to-point movement to the P2 point, with non-continuous trajectory (FINE=2).
The first counter executes the calculation of plus 1.
Result description: Successfully moved from P1 point to P2 point in order and completed the counting
action; the connection between the action of P1 and P2 is non-continuous trajectory, and the in-place
method of P2 is fully precise position. The program did not preload, and the counting action was executed
after P2 had finished executing.

267
C25UE901-2208

APPENDIX 2、ASCII PRINTABLE CHARACTERS


Table. 7 ASCII printable characters-1
DEC HEX Symbol DEC HEX Symbol DEC HEX Symbol
0 00 NULL 32 20 64 40 @
1 01 SOH 33 21 ! 65 41 A
2 02 STX 34 22 " 66 42 B
3 03 ETX 35 23 # 67 43 C
4 04 EOT 36 24 $ 68 44 D
5 05 ENQ 37 25 % 69 45 E
6 06 ACK 38 26 & 70 46 F
7 07 BEL 39 27 ' 71 47 G
8 08 BS 40 28 ( 72 48 H
9 09 HT 41 29 ) 73 49 I
10 0A LF 42 2A * 74 4A J
11 0B VT 43 2B + 75 4B K
12 0C FF 44 2C , 76 4C L
13 0D CR 45 2D - 77 4D M
14 0E SO 46 2E . 78 4E N
15 0F SI 47 2F / 79 4F O
16 10 DLE 48 30 0 80 50 P
17 11 DC1 49 31 1 81 51 Q
18 12 DC2 50 32 2 82 52 R
19 13 DC3 51 33 3 83 53 S
20 14 DC4 52 34 4 84 54 T
21 15 NAK 53 35 5 85 55 U
22 16 SYN 54 36 6 86 56 V
23 17 ETB 55 37 7 87 57 W
24 18 CAN 56 38 8 88 58 X
25 19 EM 57 39 9 89 59 Y
26 1A SUB 58 3A : 90 5A Z
27 1B ESC 59 3B ; 91 5B [
28 1C FS 60 3C < 92 5C \
29 1D GS 61 3D = 93 5D ]
30 1E RS 62 3E > 94 5E ^
31 1F US 63 3F ? 95 5F _
Refer: https://www.ascii-code.com/

268
C25UE901-2208

Table. 7 ASCII printable characters-1 ASCII printable characters -2


DEC HEX Symbol DEC HEX Symbol DEC HEX Symbol
96 60 ` 107 6B k 117 75 u
97 61 a 108 6C l 118 76 v
98 62 b 109 6D m 119 77 w
99 63 c 110 6E n 120 78 x
100 64 d 111 6F o 121 79 y
101 65 e 112 70 p 122 7A z
102 66 f 113 71 q 123 7B {
103 67 g 114 72 r 124 7C |
104 68 h 115 73 s 125 7D }
105 69 i 116 74 t 126 7E ~
106 6A j
Refer: https://www.ascii-code.com/

269
ROBOT Software Programming Instruction Set Manual
(Original Instruction) User Manual
Publication Date:August 2022

1. HIWIN is a registered trademark of HIWIN Technologies Corp.. For your protection, avoid buying
counterfeit products from unknown sources.
2. Actual products may differ from specifications and photos provided in this catalog. These differences
may be the result of various factors including product improvements.
3. HIWIN website for patented product directory: http://www.hiwin.tw/Products/Products_patents.aspx
4. HIWIN will not sell or export products or processes restricted under the "Foreign Trade Act" or
related regulations. Export of restricted products should be approved by proper authorities in
accordance with relevant laws and shall not be used to manufacture or develop nuclear, biochemical,
missiles or other weapons.

Copyright © HIWIN Technologies Corp.


Global Sales And Customer Service Site

HIWIN GmbH HIWIN Schweiz GmbH HIWIN KOREA HIWIN TECHNOLOGIES CORP.
OFFENBURG, GERMANY JONA, SWITZERLAND SUWON‧CHANGWON, KOREA No. 7, Jingke Road,
www.hiwin.de www.hiwin.ch www.hiwin.kr
www.hiwin.eu info@hiwin.ch info@hiwin.kr Taichung Precision Machinery Park,
info@hiwin.de Taichung 40852, Taiwan
Tel: +886-4-23594510
Fax: +886-4-23594420
www.hiwin.tw
HIWIN JAPAN HIWIN s.r.o. HIWIN CHINA business@hiwin.tw (Sales)
KOBE‧TOKYO‧NAGOYA‧NAGANO‧ BRNO, CZECH REPUBLIC SUZHOU, CHINA robotservice@hiwin.tw (Customer Service)
TOHOKU‧SHIZUOKA.HOKURIKU‧ www.hiwin.cz www.hiwin.cn
HIROSHIMA‧FUKUOKA‧KUMAMOTO, info@hiwin.cz info@hiwin.cn
JAPAN
www.hiwin.co.jp
info@hiwin.co.jp

HIWIN USA HIWIN FRANCE Mega-Fabs Motion Systems, Ltd.


CHICAGO, U.S.A. STRASBOURG, FRANCE HAIFA, ISRAEL
www.hiwin.us www.hiwin.fr www.mega-fabs.com
info@hiwin.com info@hiwin.de info@mega-fabs.com

HIWIN Srl HIWIN SINGAPORE


BRUGHERIO, ITALY SINGAPORE
www.hiwin.it www.hiwin.sg
info@hiwin.it info@hiwin.sg

Copyright © HIWIN Technologies Corp.


The specifications in this catalog are subject to change without notification. ©2022 FORM C25UE901-2208 (PRINTED IN TAIWAN)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy