general robot control

110
NEXCOBOT Co., Ltd. www.nexcobot.com General Robot Control Basic Training Handbook Version: 1.2 August 1, 2019

Upload: others

Post on 19-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: General Robot Control

NEXCOBOT Co., Ltd. www.nexcobot.com

General Robot Control

Basic Training

Handbook

Version: 1.2

August 1, 2019

Page 2: General Robot Control

ii

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

This page is intentionally left blank.

Page 3: General Robot Control

iii

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Copyright Statement and Disclaimer

The contents contained in this document are the proprietary property of NexCOBOT

International Co., Ltd. (NexCOBOT hereafter) and is subject to the protection of intellectual

property law (including, but not limited to the Copyright Act). The use of any material in relation

to this document without the prior authorization of NexCOBOT is considered infringement.

Without the written approval of NexCOBOT in advance, this document or any part of it shall not

be photocopied, sold, distributed, modified, published, stored or otherwise used.

To keep this document and its contents correct and complete, NexCOBOT reserves the right

to change or revise the document at any time without further notification.

Operating machine or equipment has a certain level of danger. It is the user’s responsibility to

pay special attention and have safety protection in place before operating any machine or

equipment. NexCOBOT shall not be held for any and all direct or indirect damage or loss to the

equipment mentioned in this document due to the use for a purpose other than the intended.

Page 4: General Robot Control

iv

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Revision History

Version Description

1.0 First released.

1.1 Added 11.5. Application Scenarios and adjusted the page margin formats

1.2 Editorial changes throughout the document

Page 5: General Robot Control

v

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Table of Contents

Copyright Statement and Disclaimer ............................................................... iii

Revision History .............................................................................................. iv

Table of Contents ............................................................................................. v

Table of Figures .............................................................................................. ix

1. Introduction to Robots ............................................................................... 1

1.1. Brief History of Robots ................................................................... 1

Antiquity ....................................................................... 1

Beginning of Modern Robots ........................................ 2

Terminology .................................................................. 2

Contemporary Robots .................................................. 2

1.2. Types of Robots ............................................................................. 3

Industrial Robots .......................................................... 3

Collaborative Robots .................................................... 6

1.3. Robot Specifications ...................................................................... 7

Common Robot Specifications Terminologies .............. 7

1.4. MiniBOT Introduction ..................................................................... 8

NexCOBOT 6-axis MiniBOT Specifications .................. 9

Robot Arm Outer Dimension and Motion Range ........ 10

Robot Arm Rated Payload .......................................... 11

2. Safety ...................................................................................................... 13

2.1. Warning Labels ............................................................................ 13

2.2. Installation Precautions ................................................................ 14

Environment to Avoid ................................................. 14

Operation Precautions ............................................... 14

Stop Switch ................................................................ 14

Operating Status Indicators ........................................ 15

3. General Robot Control Software Architecture .......................................... 16

3.1. GRC Application ........................................................................... 17

4. General Robot Controller ......................................................................... 18

4.1. NexMotion Studio ......................................................................... 18

NexMotion Studio Main Screen .................................. 19

4.2. Motion Group Control ................................................................... 19

Setting Up A Motion Group ......................................... 20

Importing A Motion Group Setting .............................. 21

Setting Up A Group Setting Manually ......................... 21

4.3. Coordinate Systems ..................................................................... 22

Page 6: General Robot Control

vi

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Axis Coordinate System ............................................. 22

Machine Coordinate System ...................................... 23

Product Coordinate System ....................................... 25

4.4. Coordinate Conversion Relationship ............................................ 25

4.5. Motion Control Programming ....................................................... 26

Coordinate Programming Cases Study ...................... 27

Reading the ACS Function Description ...................... 29

API Input .................................................................... 29

4.6. Tool Set Up .................................................................................. 30

Tool Set Up Case Study ............................................. 31

4.7. Tool Calibration ............................................................................ 32

Teach-position Method ............................................... 33

TCP Panning Calibration ............................................ 33

TCP Panning and Z-axis Calibration .......................... 34

TCP Panning and Attitude Setting Calibration ............ 35

TCP Attitude Setting Calibration ................................. 37

Comparison of Tool Calibrations ................................ 38

5. Base Set Up ............................................................................................ 40

5.1. Reference Base Index.................................................................. 42

5.2. Base Calibration ........................................................................... 42

5.3. One-point Calibration ................................................................... 43

5.4. Two-point Calibration ................................................................... 44

5.5. Three-point Calibration ................................................................. 44

6. Kinematics Parameters ........................................................................... 46

6.1. Linear Robot ................................................................................ 46

6.2. Articulated Robot ......................................................................... 47

6.3. Delta Robot .................................................................................. 48

6.4. SCARA Robot .............................................................................. 50

7. Group Enable and State .......................................................................... 51

7.1. Group State .................................................................................. 51

7.2. Group Enable ............................................................................... 52

7.3. Group Functions in Program ........................................................ 52

Program Samples ...................................................... 53

7.4. Group Error Status Reset ............................................................. 55

Program Sample ........................................................ 56

7.5. Group Status Flowchart ............................................................... 57

Group Disable ............................................................ 57

Group Error/Group Disable ........................................ 57

Page 7: General Robot Control

vii

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Group Moving/Group Stand Still ................................. 57

Group Stopping/Group Stopped ................................. 58

Other Group Functions ............................................... 58

7.6. Group Motion Information ............................................................ 59

7.7. Group Speed Percentage Setting ................................................ 61

Program Sample: Group Speed Percentage .............. 62

8. Group PTP Motion ................................................................................... 64

8.1. Group PTP Functions ................................................................... 64

Group Axis PTP Speed Parameters ........................... 64

PTP Motion Displacement and Velocity Planning ....... 65

Group PTP Function APIs .......................................... 65

8.2. Group PTP Command Modes ...................................................... 66

Aborting ...................................................................... 67

Buffered ...................................................................... 67

Blending ..................................................................... 68

8.3. Circle + Line + Circle .................................................................... 68

8.4. Command Queue ......................................................................... 69

8.5. Blanding Sample Program ........................................................... 70

8.6. Jog Motion ................................................................................... 71

Jog Program Sample ................................................. 72

Group Speed Planning Setting ................................... 73

8.7. Group Stop Motion Control .......................................................... 75

Group Stop Program Sample ..................................... 75

Speed Planning Mode ................................................ 76

9. Group Linear Interpolation ....................................................................... 77

9.1. Linear Interpolation Functions ...................................................... 77

9.2. Linear Interpolation Motion Parameters ....................................... 78

9.3. Linear Interpolation Sample Script ............................................... 78

9.4. Attitude Angle Parameters ........................................................... 79

9.5. Linear Interpolation and Attitude Control ...................................... 80

10. Group Circular Interpolation .................................................................... 81

10.1. Two-dimensional Circular Interpolation ........................................ 81

2D Radius Circular Interpolation ................................ 81

2D Circle Center Circular Interpolation ....................... 82

2D Pass-through Circular Interpolation ...................... 82

10.2. Three-dimensional Circular Interpolation ..................................... 83

3D Radius Circular Interpolation ................................ 83

3D Circle Center Circular Interpolation ....................... 83

Page 8: General Robot Control

viii

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

3D Pass-through Circular Interpolation ...................... 84

10.3. Group Circular Interpolation Function Program Sample............... 85

11. Hands-on Exercises ................................................................................ 86

11.1. Preparing Your System for Programming ..................................... 86

11.2. Practice Exercise 1: Blending ...................................................... 87

11.3. Practice Exercise 2: Tool Calibrations .......................................... 89

11.4. Practice Exercise 3: Base Calibration .......................................... 91

11.5. Application Scenarios................................................................... 93

Scenario 1: Serving Coffee ........................................ 93

Scenario 2: Dealing Cards ......................................... 95

Scenario 3: Writing An Alphabet ................................. 97

Acronyms and Abbreviations ......................................................................... 99

Page 9: General Robot Control

ix

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Table of Figures

Figure 1: Images of Karakuri tea-serving robots .............................................. 1

Figure 2: Images of military, medical, industrial, and educational robots ......... 2

Figure 3: Image of different types of robots ..................................................... 3

Figure 4: Images of articulated robots .............................................................. 3

Figure 5: Image of a Cartesian robot ............................................................... 4

Figure 6: Image of a cylindrical robot and its work envelope ........................... 4

Figure 7: Image of a polar robot ....................................................................... 5

Figure 8: Image of a SACRA robot ................................................................... 5

Figure 9: Image of a Delta robot ...................................................................... 6

Figure 10. Image of NexCOBOT MiniBOT 6R ................................................. 8

Figure 11. Image of NexCOBOT MiniBOT 6R .................................................. 9

Figure 12. Drawing of robot arm attitudes and dimensions ............................ 10

Figure 13. Drawing of robot arm dimensions ................................................. 10

Figure 14. Drawing of robot arm operation range .......................................... 11

Figure 15. Drawing of robot arm wrist movement .......................................... 11

Figure 16. Diagram of robot arm payload ...................................................... 12

Figure 17. Warning label table ....................................................................... 13

Figure 18. Sample images of emergency stop buttons .................................. 15

Figure 19. Diagram of GRC software architecture ......................................... 16

Figure 20. NexMotion Studio main screen ..................................................... 19

Figure 21. Diagram of Linear, SCARA, Delta, and Articulated robots ............ 20

Figure 22. Diagram of the relationship of a motion group .............................. 20

Figure 23. Diagram of ACS, MCS, and PCS coordinate systems .................. 22

Figure 24. Diagram of Linear and SCARA robots ACS movements ............... 22

Figure 25. 6-axis robot ACS coordinate parameter notation formats ............. 23

Figure 26. Diagram of SCARA robot MCS movements .................................. 23

Figure 27. 6-axis robot MCS coordinate parameter notation formats ............ 24

Figure 28. 6-axis robot PCS coordinate parameter notation formats ............. 25

Figure 29. Sample of C/C++ language definition ........................................... 26

Figure 30. Diagram of a robotic arm before and after tool installation............ 31

Figure 31. Diagram of step 4 in TCP panning and Z-axis calibration ............. 35

Figure 32. Diagram of steps 5 and 6 in TCP panning and Attitude Setting

calibration ............................................................................................... 36

Figure 33. Diagram of steps 2 and 3 in TCP Attitude Setting calibration ........ 37

Figure 34. Diagram of robot and processing platform .................................... 40

Figure 35. Diagram of robot and base MCS relationship ............................... 41

Page 10: General Robot Control

x

Copyright © 2019 NEXCOBOT Co., Ltd. All Rights Reserved.

Figure 36. Diagram of one-point calibration ................................................... 43

Figure 37. Diagram of two-point calibration steps .......................................... 44

Figure 38. Diagram of three-point calibration ................................................. 45

Figure 39. Diagram of three-point calibration steps ....................................... 45

Figure 40. Six degrees of freedom diagram ................................................... 47

Figure 41. Delta robot diagram ...................................................................... 48

Figure 42. Diagram of a SCARA robot ........................................................... 50

Figure 43. Group status switch flowchart ....................................................... 57

Figure 44. Position and speed chart .............................................................. 62

Figure 45. PTP motion displacement and velocity planning curve diagram ... 65

Figure 46. Aborting motion command diagram .............................................. 67

Figure 47. Buffered motion command diagram .............................................. 67

Figure 48. Buffered motion command diagram .............................................. 68

Figure 49. Blending and Buffered S-shaped trajectory diagram ..................... 68

Figure 50. T-curve diagram ............................................................................ 76

Figure 51. S-curve diagram ........................................................................... 77

Figure 52. Linear interpolation diagram ......................................................... 80

Figure 53. Linear interpolation and attitude control diagram .......................... 80

Figure 54. Diagram of radius circular interpolation......................................... 82

Figure 55. Diagram of circle center circular interpolation ............................... 82

Figure 56. Diagram of circle center circular interpolation ............................... 82

Figure 57. Diagram of a 3D radius circular interpolation ................................ 83

Figure 58. Diagram of a 3D center circular interpolation ................................ 84

Figure 59. Diagram of a 3D pass-through circular interpolation ..................... 84

Figure 60. Blending Motion Control Map ........................................................ 87

Figure 61. Tool pieces: A gripper and a suction cup ....................................... 89

Figure 62. Diagram of a robotic arm next to a production platform ................ 91

Page 11: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 1 All Rights Reserved.

1. Introduction to Robots

How do you define a ‘robot’? It can be a human-like android from a Hollywood

movie, a floor cleaning vacuum, or a robotic arm from a factory’s assembly line.

Everyone’s experience with a robot is quite different; therefore, there is not a

standard definition for a robot. Robots can be categorized based on their

functionalities, designated purposes, physical forms, etc. For training purposes,

this course focuses on the industrial robot, MiniBOT 6-axis Robot (6R); thus,

we can describe a robot as a system that contains sensors, control systems,

manipulators, power supplies and software all working together to perform a

task. Before we get into the detail of the 6R, let us learn a little about the history

of robots.

1.1. Brief History of Robots

From the time of ancient civilization, there have been many accounts of user-

configurable automated devices and even automata (a self-operating machine)

resembling animals and humans, designed for practical or entertainment use.

As mechanical techniques developed through the Industrial Age, there

appeared more practical applications such as automated machines, remote

controls, and wireless remote controls.

Antiquity

Mechanical robots first appeared in ancient times. For example, the Egyptian

developed animated talking statues of divinities (1600-1100 BC), the Chinese

created chime-striking mechanical figurines of an astronomical clock tower (Su

Song, 1020-1101 BC), and the Japanese created Karakuri tea-serving dolls

(1700-1900 AD). The enthusiasm of creating a ‘’human-like mechanism’’ by

humankind has been demonstrated throughout the history and well into modern

times.

Figure 1: Images of Karakuri tea-serving robots

Page 12: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 2 All Rights Reserved.

Beginning of Modern Robots

The common perception of robotics began with the arrival of the Industrial

Revolution. The complex mechanics, electricity, and compact motors

established the foundation of the first humanoid machine in the early 20th

century.

Terminology

So, how did we begin using the term “robots”? The word “robots” was first used

to refer to fictional humanoids in a 1920 Czech stage play. Later, the name was

widely used to call a programmable computer that is capable of automatically

perform complex series of movements.

Contemporary Robots

The first generation of modern robots were industrial robots that performed

manufacturing tasks with reduced human input. Digital control and artificial

intelligence were introduced into the making of robotics since the 2000s.

Robots have replaced humans in doing tasks that require repetitive motions in

highly dangerous environments, or physically cannot be accomplished by

humans. Reliable robots are highly accurate and offer cheaper labor than

humans. Today, we have integrated the use of robots into many sectors,

including military, factories, hospitals, schools, offices, households, etc.

Figure 2: Images of military, medical, industrial, and educational robots

Page 13: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 3 All Rights Reserved.

1.2. Types of Robots

There are various ways to categorize robots. We can go by international robot

associations’ classifications: application, degrees of freedom, kinematic

structure or by movement. For training purposes, this course focuses on

addressing collaborative and industrial robots.

Figure 3: Image of different types of robots

Industrial Robots

Industrial robots are mainly classified by the types of their locomotion and

kinematics. There are six main types of industrial robots: Cartesian, SCARA,

cylindrical, delta, polar and vertically articulated.

1.2.1.1 Articulated

Articulated robots are the most commonly used industrial robots worldwide.

They feature three to 10 rotary joints and have high degrees of freedom to

perform varied tasks in factories. Famous articulated robots makers include

FANUC, Motoman, KUKA, Universal Robots, and ABB robotics.

Figure 4: Images of articulated robots

1.2.1.2 Cartesian

Cartesian robots are also called gantry or rectilinear robots. They have three

linear joints that operate on the Cartesian coordinate system (X, Y, and Z).

Page 14: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 4 All Rights Reserved.

These robots use motors and linear actuators on scaffolding to position and

support a tool. Cartesian robots move within their frameworks. You can mount

the frame structure horizontally or vertically, or overhead in specific gantry

configurations (include two Y and/or two Z axes).

Usage: Cartesian robot’s pick-and-place motion is commonly used in

application of sealant, assembly operations, handling machine, and arc

welding.

Figure 5: Image of a Cartesian robot

1.2.1.3 Cylindrical

Cylindrical robots operate within a cylindrical-shaped work envelope.

Figure 6: Image of a cylindrical robot and its work envelope

The robot has at least one rotary joint at the base and at least one prismatic

joint (slider) to connect the links. The rotary joint uses a rotational motion along

the joint axis, while the prismatic joint moves in a linear motion. In other words,

the cylindrical robot moves along Z and Y axes (in X directions) and rotates

along the Z axis.

Usage: This type of robots is used for assembly operations, such as handling

machine tools, spot welding, and die casting machines.

1.2.1.4 Polar / Spherical

The polar or spherical robot’s arm is connected to the base with a twisting joint

and a combination of two rotary joints and one linear joint. The axes form a

polar coordinate system and create a spherical-shaped work envelope.

Cylindrical

work

envelope

X

Page 15: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 5 All Rights Reserved.

Figure 7: Image of a polar robot

Usage: Polar robots are usually used for handling machine tools, spot welding,

die casting, fettling machines, gas welding, and arc welding.

1.2.1.5 SCARA

Selective Compliance Articulated Robot Arms (SCARA) are commonly used in

assembly applications; this selectively compliant arm for robotic assembly is

primarily cylindrical in design. It features two parallel joints that provide

compliance in one selected plane.

Figure 8: Image of a SACRA robot

Usage: The common use of SCARAs includes pick-and-place work, application

of sealant, assembly, and handling machine tools.

Page 16: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 6 All Rights Reserved.

1.2.1.6 Delta

The critical design of the delta robot is the use of parallelograms in the arms,

which limit the end platform to pure X, Y or Z direction movement without

rotation. The umbrella-shaped robot’s parallelograms are connected to a joint

base and able to manipulate light-weight and small objects with high-precision

in a high-speed fashion.

Figure 9: Image of a Delta robot

Usage: Besides broadly used in the packaging, pharmaceutical, medical, and

electronic industries, delta robots are also utilized in virtual platform simulators,

such as truck or flight simulators.

Collaborative Robots

Collaborative robots, also known as cobots, were introduced in the 1990s. They

are designed to safely work with humans in direct or indirect contact under the

same working environment. Cobots usually don’t have pinch points and

internalized wires and motors. They typically have a safety design to stop or

reverse when they sense abnormal force or direct human contact. With the

increasingly advanced technology in sensors, automation, and artificial

intelligence, cobots have replaced many skilled human workers and started an

evolution in the workforce globally.

International standards ISO 10218 part 1 and part 2 provide guidelines to

ensure safety when human and cobots interact and govern the types of

collaborative robots, there are four distinctive types:

Safety Monitored Stop: The work-alone robot pauses when a human

enters its workspace.

Hand Guiding: This robot is used for hand guiding and path teaching

for the programmed task(s) and associated safety measure.

Speed and Separation Monitoring: This robot slows down or stops

when a human enters the predetermined zone(s).

Power and Force Limiting: This type of robot works alongside humans

Page 17: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 7 All Rights Reserved.

with the ability to detect abnormal forces in its path and dissipate forces

on impact. Normally power and force limiting robots are certified by third

parties and do not need additional safety devices.

1.3. Robot Specifications

Before purchasing an industrial robot, you need to consider the robot

specifications and make sure that they meet your needs. The typical robot

specifications include size, payload, capacity, repeatability, reach, etc.

Common Robot Specifications Terminologies

Robot Size (kg) The physical dimensions and weight of a robot arm

Maximum Payload

Capacity (kg)

The maximum weight of the end-of-arm-tooling

Repeatability

(mm)

The ability of the robot arm to return to a previous point

Vertical &

Horizontal Reach

(mm)

The robot arm needs to reach all parts of its intended working area,

the reach capabilities has a significant impact on the selection of the

appropriate arm for the application.

Degree of freedom The motion capabilities of robots. A robot arm is like a human arm, it

has up and down (pitch) or left and right (yaw) motions to mimic

shoulder, elbow, and wrist motions. A robot arm generally has 5-7

degrees of freedom.

Motion range Robot axes are like the joints between bones; each axis has a specific

range of motion. Motion range specifications are marked as a positive

or negative degree of movement from the center base position of each

axis.

Position feedback A signal from the encoder that is sent to a servo drive or controller to

indicate a robot arm precise position at any point during shaft rotation.

There are two types of position feedback measuring systems: absolute

and incremental.

Drive system The drive system provides power to actuators of a robot and

subsequently moves the robot’s arm, wrist, and body. There are three

types of drive systems: electric, hydraulic, pneumatic.

Page 18: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 8 All Rights Reserved.

1.4. MiniBOT Introduction

A MiniBOT robot is like a standard industrial robot; its EtherCAT-based

architecture enables scalability of the system to add or change servo drives

and Input/Outputs (I/Os). For training purposes, this course uses the

NexCOBOT MiniBOT 6R to demonstrate and explain the general robot control.

Figure 10. Image of NexCOBOT MiniBOT 6R

NexCOBOT MiniBOT 6R has a nude robot body for easier understanding of

the mechanical design of 6-axis articulated robot and is specifically designed

for educational purposes. Also, it has an open software architecture for the

second development or third-party software integration.

NexCOBOT MiniBOT 6R is an articulated robotic arm with a small payload. This

type of robot works with a Robot Control System (RCS) and uses the RCS’s

Ethernet for Control Automation Technology (EtherCAT) port and Power over

Ethernet (PoE) port to interact with EtherCAT slaves and machine vision

devices. MiniBOT 6R allows the flexibility to change components, extend axis

control, and integrates with machine vision application.

Page 19: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 9 All Rights Reserved.

NexCOBOT 6-axis MiniBOT Specifications

Pay attention to the specifications when working with the NexCOBOT 6R arm

and make sure all parts are in perfect working conditions.

Figure 11. Image of NexCOBOT MiniBOT 6R

Degree of freedom 6

Payload 1 kg

Control Network EtherCAT

Drive system EtherCAT step motor x 6

Position feedback Incremental encoder

Motion range

(degree)

J1 334 ゚(+167 ゚~ -167 ゚)

J2 212 ゚(+110 ゚~ -92 ゚)

J3 216 ゚(+63 ゚~ -153 ゚)

J4 330 ゚(+165 ゚~ -165 ゚)

J5 180 ゚(+90 ゚~ -90 ゚)

J6 360 ゚(180 ゚~ -180 ゚)

Power Consumption 110 VAC

Weight 47 kg

Page 20: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 10 All Rights Reserved.

Robot Arm Outer Dimension and Motion Range

Identify the NexCOBOT 6R’s outer dimension and operation motion range and

restrict the motion range to a safe perimeter that will not interfere with the

surrounding objects or environment.

Figure 12. Drawing of robot arm attitudes and dimensions

Figure 13. Drawing of robot arm dimensions

Page 21: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 11 All Rights Reserved.

Figure 14. Drawing of robot arm operation range

Figure 15. Drawing of robot arm wrist movement

Robot Arm Rated Payload

The NexCOBOT 6R Arm is designed with a sufficient payload of 1 kg. The

figure below illustrates the location of the center of gravity with the 1kg payload,

distance limits and range of motion for the tip of the robotic arm. The horizontal

axis shows the distance in X-direction (or Y-direction) parallel to the flange

surface at the tip of the arm, whereas the vertical axis indicates the distance in

Z-direction perpendicular to the flange surface at the tip of the arm, both in mm.

Page 22: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 12 All Rights Reserved.

Figure 16. Diagram of robot arm payload

When the robotic arm is in motion, pay attention to the range of payload that is

related to the current attitude as well as its velocity and acceleration. If an

overloading occurs during a motion (the driver overload and the alarm goes off

in this case), adjust the arm’s attitude and/or reduce acceleration or

deceleration.

Page 23: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 13 All Rights Reserved.

2. Safety

This section provides safety precautions to be observed for the NexCOBOT

MiniBOT 6-axis Robot (6R) and its peripheral equipment. All safety instructions

are intended to prevent hazardous situations and/or equipment damage. The

installation shall be completed by a qualified professional and should conform

to all national and local safety codes. Teaching, inspection, adjustment, and

repair of the robot shall be carried out by personnel who are qualified to perform

these tasks safely.

2.1. Warning Labels

The robot unit and controller have warning labels. These labels are adhered to

mark the danger of the areas. It is essential to observe the instructions printed

on these labels.

Warning Label Instructions on the Label

Risk of injury.

DANGER! ELECTRICAL SHOCK

Read and understand technical

manual and safety instruction

before an operation.

Please turn off the power before

opening the door.

WARNING

High Voltage.

A potential hazardous electrical

situation that may cause injury or

major damage to the equipment.

Figure 17. Warning label table

Page 24: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 14 All Rights Reserved.

2.2. Installation Precautions

Before the installation of the NexCOBOT 6R and its peripheral equipment, you

need to secure an area that is open, clean, and free of debris.

Follow the list of actions below to protect NexCOBOT 6R and set up a safe

working area:

DO NOT modify the robot unit, robot controller, or other peripheral devices

from the original design

Make sure there is enough illumination for the safe robot operation

Consider the size, weight, temperature, and chemical nature of the object

that is held by the end-gripper and make appropriate safeguards to avoid

any risk of the operator being injured due to the object is dropped or thrown

Environment to Avoid

The robot and controller installation should avoid any environment that is:

Near flammable or explosive materials.

Near any acidic, alkaline or other corrosive material.

Near any large-sized inverters, high output/high-frequency transmitters,

large contractors, welders, or other sources of electrical noise.

Near sulfuric cutting or grinding oil mist.

Possible to cause the robot to be submerged in fluid.

Possible to have any contact with shavings from metal processing or other

conductive material.

Possible to have contact with mists.

Operation Precautions

The robot and peripheral equipment should be installed in a service space that

can be easily maintained for safe handling, maintenance, and inspection.

Stop Switch

Emergency stop switches should be provided in a position where they can be

reached easily should it be necessary to stop the robot immediately. The

emergency stop switch of the robot and any combinations of the robot and

peripheral equipment should be easily distinguished to prevent you from

executing the wrong stop switch in case of an emergency.

Page 25: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 15 All Rights Reserved.

Figure 18. Sample images of emergency stop buttons

Operating Status Indicators

Operating status indicators should be positioned in such a way where users

can easily see whether the robot is on a temporary halt or an emergency or

abnormal stop.

Page 26: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 16 All Rights Reserved.

3. General Robot Control Software Architecture

The General Robot Control (GRC) software architecture is consisted of three

levels, they are: Windows Layer, Real Time Operating System (RTOS), and

Hardware.

Figure 19. Diagram of GRC software architecture

The Windows Layer level is also called the upper level, it is divided into three

parts:

User’s App provides users with the option of secondary software

development.

TPUI (Teach Pendant User Interface) is a handheld control device

designed for factory equipment. Besides providing basic positional

calibrations, speed and limit protection settings, the TPUI’s most important

feature is to provide scripting functions that make it easy for users to write

their own scripts.

NexMotion Studio is mainly used for EtherCAT Slave communication

testing and parameter correction and testing. This software provides the

Simulation function in the Motion part of the 32-bit installation package.

The simulated 3D View feature allows users to enter parameters and

simulate the robotic motions without a physical mechanism.

Page 27: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 17 All Rights Reserved.

The second level is the RTOS level, and it is also known as the bottom layer.

The bottom layer can complete the command transmission in a short time to let

the organization run synchronously.

The third level is the Hardware level. Commands are sent from the upper level

and transmitted to each EtherCAT communication device instantaneously via

the bottom level’s real-time RTOS.

3.1. GRC Application

GRC can be used to solve the robot control needs in various applications. You

can use NexMotion Studio to work on mechanism and communication

calibration and testing. If you want to create easy scripting, you can choose the

NexCOBOT TPUI. When you want to develop your own hardware and

hardware system with vision, you can use NexCOBOT Robotic Control

Windows APIs for secondary software development.

Page 28: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 18 All Rights Reserved.

4. General Robot Controller

General Robot Controller (GRC) is a software that is mainly used for the design

of group configuration and can also control Digital Input/Output (DIO) signals.

GRC’s open-source platform enables you to use the GRC functions library to

design the robots’ movements based on your needs. GRC has been used for

the applications of image recognition object grasping and the remote monitoring

system with robotic arms and the Computer Numerical Control (CNC) machine

production line.

In addition to applying to C/C++, C#, and Python, GRC can also be used in the

Robot Operating System (ROS). GRC is user-friendly and it allows you to

develop your systems in your familiar development environment.

GRC functions generally are categorized as:

Tool/base calibration

Jog, PTP, Line, Circle, Home motion controls

DIO reading and transmitting of external device control

4.1. NexMotion Studio

After you finished checking the specifications and installed all components for

your MiniBOT, you need to have a robot control software (RCS) to program and

control the robot. You must install the NexMotion Studio software on your

computer to complete this task.

NexMotion Studio is a powerful utility designed to shorten the development time

of motion and robot applications. This software is a Microsoft Windows-based

application that can run in both 32bit and 64bit environments. After the MiniBOT

installation, you could use NexMotion Studio to test:

1. The possibility to communicate with the motor drive through EtherCAT

2. Homing of axes

3. Motion for each axis

4. The operation for the motions of MiniBOT

GRC

Tool Base Jog PTP Line Circle Home DIO

Page 29: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 19 All Rights Reserved.

NexMotion Studio Main Screen

The NexMotion Studio main screen is divided into six areas:

Figure 20. NexMotion Studio main screen

Area Name Function

A. Title Display the opened project name and “NexMotion Studio”

B. Main Menu Provides main menu items: Project, View, EtherCAT, Motion, and

Help. Select a menu item in the B-1 area, the corresponding

shortcut key will be displayed in the B-2 area.

C. Project Explorer Displays the directory tree of the selected project content

D. Operation Window Displays the operation interface window

E. Message Output Displays the Message Output or Error Message

F. Status Displays current system core status

4.2. Motion Group Control

You can define different axes as a group. Each group represents a special

structural relationship of a mechanism or robot. There is an interpolation

between the axes; we define it as a group. You can import a mechanical setting

or manually create a group setting.

Motion group control supports common industrial robots, including:

Linear robot

SCARA robot

Delta robot

Articulated robot

Page 30: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 20 All Rights Reserved.

Figure 21. Diagram of Linear, SCARA, Delta, and Articulated robots

Setting Up A Motion Group

The controller is the host and is connected to the driver through EtherCAT

communication, and the controller is connected to the motor of each axis of the

robot. You use the Normal Mode Data (NMD) file in the NexMotion Studio

software to let the controller know about the robot's parameters for motion

control.

Figure 22. Diagram of the relationship of a motion group

Linear Robot SCARA Robot

Delta Robot Articulated Robot

Page 31: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 21 All Rights Reserved.

You need to let the robot controller know the robot configuration and parameter

settings before you take control of a robot. There are two files you could use to

set up a motion group:

Normal Mode Data (NMD) file: This file records the axis’s length, left and

right limit, and the over speed protection setting information. Usually, it is

provided by the robot manufacturer.

No Cache File (NCF): This file is the configuration file of the controller; it

mainly records all connections of the controller, such as group, single-axis

mechanism, acceleration, speed, etc. If the NMD file provides the matching

model number of your robot, you can directly use the NMD file to produce

the NCF; if the NMD file does not have the exact matching model number

of your robot, you can import an NMD file that has similar mechanism

parameters, modify the parameter settings, and then regenerate an NCF.

Importing A Motion Group Setting

You can quickly establish a mechanical setting within NexMotion Studio by

importing a mechanical description NMD file. This action allows you to map the

servo motors to all axes in the group easily. You get an NCF while you are

testing the group.

The general steps of importing a motion group setting includes:

1. Importing a mechanical description NMD file into NexMotion Studio.

2. Mapping servo motor to each axis.

3. Testing the group and generate a controlled system configuration NCF file.

Setting Up A Group Setting Manually

You can set up a group setting manually by importing one that is close to the

robot you are using as a template to NexMotion Studio. Then, fine-tune the

imported settings based on your actual needs.

The general steps of manually setting up a group setting includes:

1. Importing a mechanical description NMD file into NexMotion Studio.

2. Adjusting the individual axis’s parameter.

3. Adjusting the kinematic parameters.

4. Mapping servo motor to each axis.

5. Testing the group and generate a controlled system configuration NCF file.

Page 32: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 22 All Rights Reserved.

4.3. Coordinate Systems

Before you take control of a robot, you need to understand the robotic

coordinate systems and each system’s way of describing the position of the

robotic arm.

NexMotion provides three different coordinate systems to indicate the robot

joint positions, control of the axes, and Tool Center Point (TCP), they are:

Axis Coordinate System (ACS)

Machine Coordinate System (MCS)

Product Coordinate System (PCS)

Figure 23. Diagram of ACS, MCS, and PCS coordinate systems

Axis Coordinate System

Axis Coordinate System (ACS) describes each robotic joint position in a

mechanical group. The angle-position and length of each axis of an articulated

robot describe the orientation of the TCP exactly. With the ACS, each robot axis

can be moved particularly in positive or negative sense rotation.

Generally, the ACS joints are categorized as the Linear Joints and Rotary

Joints. ACS joints’ linear joint physical unit is in millimeter (mm) and the

rotating joint unit is in Degree.

Figure 24. Diagram of Linear and SCARA robots ACS movements

Page 33: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 23 All Rights Reserved.

Each robot mechanical group can have up to 8 axes, the robotic arm’s structural

design determines the actual number of axes.

Figure 25. 6-axis robot ACS coordinate parameter notation formats

Machine Coordinate System

Machine Coordinate System (MCS) is also known as Geodetic Coordinate

System (GCS). It marks the TCP (opposite to the mechanical origin point) of

the mechanism and describes the location or attitude. MCS endpoint has

maximum six degrees of freedom (6DoF), and it is notated as X, Y, Z, A, B, and

C.

MCS uses the Cartesian coordinate system position notation method and

follows the right-hand rule.

MCS A, B, and C attitudes are notated using Euler angles intrinsic Z-Y-X

method and rotate Z, Y, and X sequentially.

Figure 26. Diagram of SCARA robot MCS movements

Page 34: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 24 All Rights Reserved.

Figure 27. 6-axis robot MCS coordinate parameter notation formats

Page 35: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 25 All Rights Reserved.

Product Coordinate System

The working object typically defines product Coordinate System (PCS). Just

like the MCS, PCS’s endpoint has maximum 6DoF, and it is notated as X, Y, Z,

A, B, and C. The difference between PCS and MCS is on the coordinate

conversion relationship when the conversion relationship is the initial value,

PCS and MCS are overlapped. In other words, when the robot’s coordinate

system is not set, the PCS is equal to the MCS.

Figure 28. 6-axis robot PCS coordinate parameter notation formats

4.4. Coordinate Conversion Relationship

NexMotion has a built-in unit conversion function between coordinate systems.

You can define conversion relationships through parameter settings.

* (mm) = millimeter

MCS and PCS coordinate conversion can be divided into linear displacement

and coordinate rotation.

User-defined coordinate conversion

User-defined kinematics conversion

User-defined unit conversion

PCS

User defined unit (mm)

MCS

User defined unit (mm)

ACS

User defined unit (mm)

Pulse Count

Page 36: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 26 All Rights Reserved.

4.5. Motion Control Programming

When programming a robot, whether you use ACS, PCS, or MCS, you use the

Pos_T definition to indicate the data type in the programming language.

Let us examine the following example:

Figure 29. Sample of C/C++ language definition

F64_T pos[MAX_POS_SIZE] in the example means the position maximum

size is 8, and the data type is defined as Pos_T which has different meanings

depending on the current coordinate system in use.

Definition of pos[0~7]:

If the motion control function uses the ACS, the value entered after pos is

the value of each axis angle.

If the motion control function uses the MCS or PCS, the value entered

after pos is the coordinate positions of the X, Y, Z, A, B, C, U, V axes.

NexMotion uses the Pos_T and Xyz_T structure reference in the programming

language to define the coordinate system data. Pos_T structure describes ACS,

MCS, or PCS coordinate data; Xyz_T structure describes only the x, y, and z

axes positions in MCS and PCS.

Page 37: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 27 All Rights Reserved.

Coordinate Programming Cases Study

Case 1: You want to declare a variable (using degree) today as a function of

ACS motion control. The desired rotations of the robot joints are:

Joint 0 = 250〫 Joint 1 = 0〫 Joint 2 = 65〫

Joint 3 = 0〫 Joint 4 = 0〫 Joint 5 =180〫

Notes: 1. You indicate the variable data type is Pos_T and use the point as

the ACS position.

2. Enter the desired rotation degree after “point.pos[0] =” for each

axis and follow with a semi-colon.

3. Enter the number 1 for axis one after “// Degree of joint”.

4. Repeat steps 2 and 3 until the rotation degrees are entered for all

axes.

5. Make sure the number in the square bracket after pos are

corresponding to the correct axis number at the end of each line.

Enter numbers 0-5 to represent axes 1-6.

#include “NexMotion.h” #include “NexMotionError.h” Int main()

{

Pos_T point; // “point” represents as ACS position. point.pos[0] = 250; // Degree of joint 1 point.pos[1] = 0; // Degree of joint 2 point.pos[2] = 65; // Degree of joint 3 point.pos[3] = 0; // Degree of joint 4 point.pos[4] = 0; // Degree of joint 5 point.pos[5] = 180; // Degree of joint 6

}

1

3 2

Page 38: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 28 All Rights Reserved.

Case 2: You want to declare a variable (using point) today as a function of PCS

or MCS motion control. The desired motions of the robot joints are:

X axis = 250 mm Y axis = 0 mm Z axis = 65 mm

A axis = 0 mm B axis = 0 mm C axis =180 mm

Notes: 1. You indicate the variable data type is Pos_T and use point as the

ACS position.

2. Enter the desired motion distance after “point.pos[0] =” for each

axis and follow with a semi-colon.

3. Enter the first axis as X (“// X axis”).

4. Repeat steps 2 and 3 until the desired value of motion distance are

entered for all axes.

5. Make sure the number in the square bracket after pos are

corresponding to the correct axis letter at the end of each line. Enter

numbers 0-5 to represent axes X, Y, Z, A, B, and C.

#include “NexMotion.h” #include “NexMotionError.h” Int main()

{

Pos_T point; // “point” represents as PCS/MCS position. point.pos[0] = 250; // X axis point.pos[1] = 0; // Y axis point.pos[2] = 65; // Z axis point.pos[3] = 0; // A axis point.pos[4] = 0; // B axis point.pos[5] = 180; // C axis

}

1

2

3

Page 39: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 29 All Rights Reserved.

Reading the ACS Function Description

After the motion control command of the ACS coordinates are finished, if you

want to read the ACS coordinate point during the motion of the robot, you can

use:

NMC_GroupGetCommandPosAcs to get the reading of the command

position of each axis of the group

NMC_GroupGetActualPosAcs to get the reading of the ACS actual

location of each axis of the group. This actual value is obtained by

converting the count value of the encoder through the gear ratio or the lead

screw pitch.

The difference between the command position and the actual position is that

the command position is obtained by the controller according to the

mathematical expression, and the actual position is obtained after the reading

encoder pulse count is converted by the gear ratio or the lead screw pitch.

Before running the motion command, sometimes the target point of the next

coordinate is taken by reading the current ACS angle value plus the desired

movement value. For the Application Programming Interface (API) that requires

more stringent kinematics calculation, when the ACS reading is too precise,

such as directly reading the actual position, it may cause the system to decide

that the target point you requested cannot be reached. Do not be alarmed since

the motion command is based on mathematical expressions, so it is relatively

easy to calculate the position point.

API Input

When running most APIs, you need to specify the Device ID (DevID). You need

to tell the system which controller you want to use for the next command. Group

index is to define which group in the controller we send the command. If we

have more than one robot arm under the controller, the group index is identified

as 0, 1, 2, 3, 4, etc. respectively.

Page 40: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 30 All Rights Reserved.

An API call is to use API as the medium between two communicating entities

or applications. When the API call is successful, the current ACS coordinates

of the group are transmitted back to the variables of the PRetCmdPosAcs or

PRetActPosAcs, depending on which API you called.

API Parameters

NMC_GroupGetCommandPosAcs

DevID GroupIndex

PRetCmdPosAcs

NMC_GroupGetActualPosAcs PRetActPosAcs

Besides reading the ACS coordinates, the current MCS value can also be read

by NMC_GroupGetCommandPosPcs or NMC_GroupGetActualPosPcs. These

functions are roughly the same as the function for obtaining the ACS

coordinates. The only difference is that the PRetCmdPosPcs and the

PRetActPosPcs return codes becomes the MCS.

API Parameters

NMC_GroupGetCommandPosPcs

DevID GroupIndex

PRetCmdPosPcs

NMC_GroupGetActualPosPcs PRetActPosPcs

4.6. Tool Set Up

Modern robots are designed to do a lot of high-precision and complex work.

Robots with six or more axes can perform extremely complicated tasks due to

their freedom of movement flexibility and capability of using different tools.

For example, when a tool is designed to grip an object but is not yet set up, the

controller does not know how to move the arm to the best position and angle to

perform the task. Once the tool is set up with the robotic arm, it is treated and

used as part of the arm in various situations.

It is often that the endpoint of a robot is equipped with various tools to perform

different tasks. Therefore, the robot controller provides up to 16 sets of tool

storage space for different application needs.

Before the tool is set up, the target position in the motion command represents

the position and attitude of the flange of the robot, as shown in the diagram

below. After the tool parameter is set, the TCP coordinate system is based on

the conversion relationship of the endpoint of the tool.

Page 41: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 31 All Rights Reserved.

Figure 30. Diagram of a robotic arm before and after tool installation

Tool Set Up Case Study

Let us examine the following case and study the relationship between the

robotic arm’s end point and the endpoint of the tool.

The table below on the left shows the robot’s PCS readings before installing

the tool; the table on the right shows the new value of the tool:

Index = 0

Axis Value

X 350 mm

Y 0 mm

Z 660 mm

A 0〫

B -90〫

C -180〫

Remember that you can install up to 16 sets of tools with the robot controller,

the parameter space in the table below is 0x80-0x8F. The data of the group of

tools in the table above on the right indicates the TCP coordinate origin is -50

units (relative to the Flange coordinate system X-axis), the Y-axis is 0 units, the

Z-axis is 100 units, and the coordinate system that is relative to the flange’s Y-

axis is -45 degrees.

Page 42: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 32 All Rights Reserved.

After you input the value of the relative tool coordinates to the flange into the

Tool Index, you need to use the following parameters to choose the Tool Index

for motion target.

Num. Sub. Description

0x40 0 Tool index selection for motion target

0x40 1 Tool index selection for read position

After completing the tool set up, if you want to switch the tool, you can select

the current tool’s 0x40 sub0 parameters and change the value for the new tool.

Or, you can use 1x40 sub1 to read the next tool’s coordinate position.

4.7. Tool Calibration

Tool calibration method speeds up the implementation of 6-axis robots. 6DoF

robots are capable of performing complex movements and are commonly

assigned tasks using different tools. Each time a new tool is introduced, you

need to implement a tool calibration to ensure the robot is ready to execute the

complex tasks with high precision.

The tool calibration process generally is time-consuming and inaccurate. There

are methods to effectively calibrate a new tool without relying on manufacturer

measurements or external sensors.

Kinematic calibration methods are used to determine the tool center point (TCP),

the point with which all robot positioning is defined. The TCP is defined relative

to the world coordinate system, the Cartesian coordinate system for any point

in the world, which always remains stationary to the robot.

The tool coordinate system defines the position and orientation of the tool and

is at a zero-position at the TCP. The TCP of the robot moves to programmed

positions as it executes a Cartesian motion. Changing the tool changes the tool

coordinate system, requiring re-calibration to enable the new TCP and

accurately reach the target.

In many robot applications, the motion trajectories of the TCP represent

complex paths in the robot’s working space, typically a straight-line path with

some orientation change of the tool by the robot. The tool itself might need to

be replaced occasionally or more frequently. Each time the tool is replaced, a

new set of geometric parameters must be determined and assigned before

operations can continue.

Page 43: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 33 All Rights Reserved.

Teach-position Method

For most industrial applications, a teach-position method is the most practical

way of writing robot tasks. With this method, tool parameters have to be

available (usually from the manufacturer) with high accuracy. The angular

offsets of the tool and its Cartesian offset is necessary for generating straight-

line paths with controlled orientation of the tool.

The teach-position method is for quick, exact estimation of tool geometry

without external sensors, vision, or other aids was developed without requiring

the dismounting the tool. This method allows the operator to bring the 6DoF

robot’s TCP to several different positions/orientations, which are then

automatically input to the tool-dimension estimation algorithms. The algorithms

quickly determine the precise calibrations of the new tool and prepare it for use.

When calibrating a tool, you can directly input the parameters or use any of the

following tool-related APIs to convert the gesture points into parameters.

TCP Panning Calibration

TCP Panning and Z-axis Calibration

TCP Panning and Attitude Setting Calibration

TCP Attitude Setting Calibration

Calibration Function

TCP Panning Calibration NMC_ToolCalib_4p

TCP Panning and Z-axis Calibration NMC_ToolCalib_4pWithZ

TCP Panning and Attitude Setting Calibration NMC_ToolCalib_4pWithOri

TCP Attitude Setting Calibration NMC_ToolCalib_Ori

Note: Do not change the Base settings during the tool calibration to avoid any errors.

TCP Panning Calibration

TCP panning calibration uses a fixed TCP to define four different gestures

between the TCP and the flange. The TCP from this calibration method only

defines the panning movement, the A, B, C angles are not changed (value = 0).

In the following table, the TCP panning calibration uses the API to bring in four

attitudes, and the tool is positioned at specific angles to get four step positions,

consequently calculating the offset value between the robot arm’s end point and

the tool’s endpoint, return the converted endpoint coordinates of the tool back

to the PRetToolCoordTrans. Errors may occur during the operation of the

robotic arm, and the erroneous data is transferred back to the PRetTolerance

variable. When the robot is performing the 4-point positioning, the more

Page 44: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 34 All Rights Reserved.

significant changes made in the attitudes, the fewer errors occur in offset

calculation.

API Parameters

NMC_ToolCalib_4p

PMcsKinP1 1st step position

PMcsKinP2 2nd step position

PMcsKinP3 3rd step position

PMcsKinP4 4th step position

PRetToolCoordTrans Return tool coordinate

conversion settings

PRetTolerance Return repeat error

PMcsKinP1 PMcsKinP2

PMcsKinP3 PMcsKinP4

TCP Panning and Z-axis Calibration

TCP panning and Z-axis calibration use a fixed TCP to describe the relationship

between the TCP and the flange via four different attitudes. However, the fourth

step of the Z direction of the TCP must point to the negative Z direction of the

MCS. This calibration method finds the TCP relationship and Flange-Y axis

rotation value.

Page 45: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 35 All Rights Reserved.

API Parameters

NMC_ToolCalib_4pWithZ

PMcsKinP1 1st step position

PMcsKinP2 2nd step position

PMcsKinP3 3rd step position

PMcsKinP4Dir TCP’s +Z direction must

point to the -Z direction

PRetToolCoordTrans Return tool coordinate

conversion settings

PRetTolerance Return repeat error

Figure 31. Diagram of step 4 in TCP panning and Z-axis calibration

TCP panning and Z-axis calibration is similar to the TCP panning calibration,

the first three points are the sampling points of the attitude angle, and the fourth

point is changed to determine the Z-axis negative direction position. The

converted relationship between the tool’s end point and the arm’s is also

transmitted back to the PRetToolCoordTrans, and the calculation error is

transmitted back to the PRetTolerance.

TCP Panning and Attitude Setting Calibration

TCP panning and Attitude Setting calibration method’s first four steps are the

same as the TCP Panning calibration method; the main goal is to find the

panning relationship between the TCP and flange. The following steps 5 and 6

are for locating the TCP coordinate gesture.

Page 46: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 36 All Rights Reserved.

API Parameters

NMC_ToolCalib_4pWithOri

PMcsKinP1 Step 1 position

PMcsKinP2 Step 2 position

PMcsKinP3 Step 3 position

PMcsKinP4 Step 4 position

PMcsKinMinusZAxisPt Step 5 position’s reference

point must be on TCP -Z axis

PMcsKinYZPlanPt Step 6 position’s reference

point must be on TCP +Y axis

PRetToolCoordTrans Return tool coordinate

conversion settings

PRetTolerance Return repeat error

Figure 32. Diagram of steps 5 and 6 in TCP panning and Attitude Setting calibration

When using the TCP panning and attitude setting calibration, the first four input

variables are reference positions, PMcsKinMinusZAxisPt determines the

negative Z-axis direction, PMcsKinYZPlanPt determines the positive direction

of the Y-axis, and finally the converted relative displacement relationship is

transmitted back to the PRetToolCoordTrans, and after the calculation, if there

is an error, it is transferred back to PRetTolerance.

Page 47: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 37 All Rights Reserved.

TCP Attitude Setting Calibration

TCP Attitude Setting calibration method teaches TCP attitudes. You can use the

TCP Panning calibration method to define the panning relationship, and then

use the TCP Attitude Setting calibration method to find out the settings of the

attitudes. TCP Attitude Setting calibration can be used to recalibrate attitude

but is not used by itself for calibrations.

API Parameters

NMC_ToolCalib_4p

PMcsKinOrg 1st step position

PMcsKinMinusZAxisPt 2nd step position’s reference point

must be on TCP -Z axis

PMcsKinYZPt 3rd step position’s reference point

must be on TCP +Y axis

PRetToolCoordTrans

Return Tool coordinate conversion

settings (only modify the attitude

conversion parameters)

Figure 33. Diagram of steps 2 and 3 in TCP Attitude Setting calibration

TCP Attitude Setting calibration is opposite to the TCP panning calibration; it

only sets up the relationship of the changed angles, not coordinates panning

relationship. Therefore, the TCP Attitude Setting calibration only takes the

converted angle value of the negative Z direction of the TCP and the positive

direction of the Y-axis.

Page 48: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 38 All Rights Reserved.

Comparison of Tool Calibrations

TCP Panning Calibration vs. TCP Panning and Z-axis Calibration

The TCP panning calibration is limited to the coordinates of the tool’s

endpoints. When a tool (illustrated in the drawing below) is only calibrated using

the TCP panning method, the Z-axis movement is not the same direction as the

tool’s endpoint tangential direction. Using the TCP panning and Z-axis

calibration allows you to set up the tool’s Z-axis movement direction the same

as the tool’s endpoint tangential direction.

TCP Panning and Z-axis Calibration vs. TCP Panning and Attitude Setting

Calibration

The TCP panning and Z-axis calibration method allows you to set the

negative Z-axis tangential direction of the tool, but the coordinate displacement

is limited to the rotation of the X-Z plane. In other words, the tool has only one

degree of freedom to operate. If you use the TCP translation and attitude setting

calibration, you can set the direction of the tool’s Y-axis and change the

operation to two or more degrees of freedom.

TCP Panning and Attitude Setting Calibration vs. TCP Panning Calibration

TCP panning and attitude setting calibration

performs four-point coordinates panning

positioning plus TCP Z-axis negative direction

setting and Y-axis positive direction positioning.

TCP panning calibration determines the

position of tool’s end point by panning the

coordinates of four points.

TCP panning and Z-axis calibration uses the

coordinate three-point panning positioning plus

TCP's Z-axis negative direction setting.

Page 49: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 39 All Rights Reserved.

The TCP panning and attitude setting calibration can only determine the

directions of the negative Z-axis and the positive Y-axis and cannot obtain the

offset value between the flange surface and the jig. Therefore, it is usually used

in conjunction with the TCP panning calibration method.

Page 50: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 40 All Rights Reserved.

5. Base Set Up

The base is set up to define the PCS coordinate system. The purpose of this

action is to ensure that all target points are relative to the base coordinates.

When the base coordinates change, only the base coordinates need to be reset,

and the target points do not need to be re-calibrated.

The NexMotion’s PCS coordinate conversion features:

Ability to support up to 32 groups

Option to allow individual level to set up to 3 levels

Base is referred as the processing platform. After the PCS coordinates are

converted, the controller knows the relative relationship between MCS and

PCS and set the PCS coordinates to the new origin.

Figure 34. Diagram of robot and processing platform

As shown in the diagram above, PCS (0,0,0) represents X, Y, Z axes = 0. The

coordinate point on the processing platform is indicated as: X-axis = 20, Y-axis

= 15, and Z-axis = 10, and it is also the reference PCS origin. Therefore, after

using the PCS coordinates, the next motion command is based on the PCS

coordinate origin. If the processing platform was bumped due to unforeseen

circumstances, the remedy for the displacement is to input the MCS and PCS

offset value into the controller to reset the PCS origin; there is no need to adjust

the point of motion control on the base.

The base set up is similar to the tool set up: the tool set up is to obtain the

relative offset position between the end point of the arm and the end point of

the tool; the base set up is to get the relative offset position of the MCS origin

and the processing platform.

Page 51: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 41 All Rights Reserved.

Figure 35. Diagram of robot and base MCS relationship

Take the above diagram as an example, the offset value between the base

origin and the MCS origin: The X-axis is 10mm and the Y-axis is 15mm. Since

the base platform is higher than the MCS, the Z-axis is offset by 5mm in the

forward direction. The Y-axis direction of the arm is precisely 90 degrees from

the Y-direction of the base. Therefore, based on the right-hand rule, the Z-axis

is rotated by 90 degrees to match the coordinate direction of the base.

The data of the table below indicates the coordinate origin of a base (Index =

0), the X- axis is 10 mm (relative to the X-axis of the MCS coordinate system),

Y-axis is 15 mm, and the Z-axis is 5 mm. Also, the Base 0 coordinate system is

rotated 90 degrees with respect to the Z-axis of the MCS.

When the base index is not specified, the system refers to the setting of the

group parameter 0x48:0 as the base that is used by the current system.

Parameter

Num.

Sub.

Index

Data

Type

Description

0x48 0 132_T Base index selection for motion target

The base space can record up to 32 groups; the parameters are from 0xC0-

0xDF, and the maximum can be set to 3 orders. To select a pre-set base, you

need to change 0x48 subIndex 0 in the group parameters and select the base

sequence number.

Page 52: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 42 All Rights Reserved.

5.1. Reference Base Index

The diagram below shows a hierarchical relationship between bases.

If we want to define the relationship between the robot arm and Base0, Base1,

and Base2, perform the following steps:

1. Find out the current MCS coordinates of the origin point of Base0 and input

these coordinates to the base calibration function to get the converted

relative relationship between MCS and Base0.

Note: The relative relationship is named Base index 0 and stored in the 32 groups of base

space.

2. Switch the parameter of Base index selection for motion target to the

base index that is stored in Base0.

Note: Base index0 is the origin position of Base0 in the diagram above, the PCS

coordinates of the X, Y, Z axes are all 0s.

3. Use the Base Calibration function to set the origin point of Base1 to the

Calibration function.

Note: The Calibration function returns the relative relationship data between Base0 and

Base1 to the controller, name this relative relationship as Base Index 1, and store it

in the 32 groups of base space.

4. Use the coordinate system switching function to switch the parameter of

Base index selection for motion target to the base index that is stored in

Base1.

5. Transfer the coordinates of Base2 to the base calibration function to get the

relative relationship between Base1 and Base2.

Note: After you complete the above five steps, Base0's reference base index becomes

-1. Base1's reference base index becomes 0 because Base0's Base index is 0, and

Base2's Reference base index becomes 1, because Base1's base index is 1.

5.2. Base Calibration

In addition to the direct input, there are other methods to set the base with

automatic correction, they are:

One-point (1P) Calibration

Two-point (2P) Calibration (includes the rotation of the z-axis)

Page 53: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 43 All Rights Reserved.

Three-point (3P) Calibration (able to arbitrarily define the X, Y, and Z axes)

Function Description

NMC_BaseCalib_1p Base Calibration—1p

NMC_BaseCalib_2p Base Calibration—2p

NMC_BaseCalib_3p Base Calibration—3p

The number of input points affects the degree of freedom of base convertibility,

and it also increase the complexity of the calibration. You can select the

applicable calibration method(s) based on your specific needs.

5.3. One-point Calibration

The One-point calibration defines the base coordinate origin point and is used

to translate the reference coordinate system to a new coordinate point.

Figure 36. Diagram of one-point calibration

API Parameters

NMC_BaseCalib_1p

PMcsBaseP1 First step position

PRetBaseCoordTrans

Return the converted coordinate

relationship with respect to the

reference coordinate system

One-point calibration only takes a point from the base coordinates and uses it

as the base origin point. This calibration method returns the converted

coordinate relationship to the PRetBaseCoordTrans. One-point calibration can

only work on the offset of X, Y, Z axes; not the rotation of A, B, C axes.

Page 54: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 44 All Rights Reserved.

5.4. Two-point Calibration

The two-point calibration rotates the Z-axis after converting the reference

coordinate system to the new coordinate point.

The two-point calibration process has two simple steps:

1. Define the base coordinate origin.

2. Define a point on the X-Z plane, and the X-axis has a positive direction.

Figure 37. Diagram of two-point calibration steps

API Parameters

NMC_BaseCalib_2p

PMcsBaseP1 First step position

PMcsBaseP2 Second step position

PRetBaseCoordTrans

Return the converted coordinate

relationship with respect to the

reference coordinate system

In addition to obtaining the MCS coordinate origin and the base origin

conversion relationship, the two-point calibration method also use the X-axis

direction on the base to determine the Z-axis coordinate rotation angle, this

process changes the direction of the X-axis and Y-axis of the base.

5.5. Three-point Calibration

The three-point calibration uses the internal encoder data of robot and

coordinates transform calculation to get the coordinates transform matrix

between the tool coordinate system and the basic coordinate system of robot.

It is convenient to operate, and its calibration result is precise.

Page 55: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 45 All Rights Reserved.

Figure 38. Diagram of three-point calibration

The three-point calibration rotates the Z-axis after translating the reference

coordinate system to the new coordinate point. The calibration process has

three steps:

1. Define the base coordinate origin.

2. Define a point on the X-axis, and the X-axis has to have a positive direction.

3. Define a point on the X-Z plane, the Y-axis has to have a positive direction.

Figure 39. Diagram of three-point calibration steps

Page 56: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 46 All Rights Reserved.

6. Kinematics Parameters

Kinematics studies the geometry of motion and is used to describe the motion

of systems composed of joined parts—such as a robotic arm. According to

Wikipedia, robot kinematics “studies the relationship between the dimensions

and connectivity of kinematic chains and the position, velocity, and acceleration

of each of the links in the robotic system, in order to plan and control movement

and to compute actuator forces and torques”.

When a robot performs a task, each joint/axis moves based on its parameters

of the specific movement. In this topic, we focus on examining the kinematic

parameters of the following NexMotion supported four types of industrial robots:

Linear robot (2-8 axes)

Articulated robot

Delta robot

SCARA robot

Different industrial robots have their unique group parameters and

configurations. Different types of robots have different configurations, and the

0x00, subindex0 mechanism parameters tells the controller what the type of

industrial robot is.

The setup of the kinematics parameters is done in group parameter 0x00,

subindex: 0-24, which is defined as follows:

Parameter 0x00:0 is the choice of configuration

Parameter 0x00: 1-24 is the mechanism size parameter

Robot

Subindex

Linear Articulated Delta SCARA

0 0 1 2 3

The table above shows the four subindex value for different industrial robot

types. When the subindex is 0, it represents the currently selected mechanism

configuration as a linear industrial robot. When the subindex is 1—it represents

the articulated robot, the subindex is 2—it represents the Delta robot, the

subindex is 3—it represents the SCARA robot.

6.1. Linear Robot

The linear robot is configured as a linear axis for the motor mechanism, and the

number of axes can be defined as 2 to 8 axes. The linear robot has the

Page 57: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 47 All Rights Reserved.

characteristics of overlapping ACS, MCS and PCS coordinate systems. The

most common is the XY Table (2-axis) or X-Y-Z Cartesian robot (3-axis).

As shown in the diagram below, each direction of the Cartesian coordinates can

be configured to a motor and the motor motion directly corresponds to the

directional movements in the Cartesian coordinates.

Num. Sub. Description

0x00 0 Kinematics type:0

1 Axis Number (2~8)

The SubIndex0 of 0x00 uses the selection mechanism configuration, the

selection 0 represents the linear configuration of the mechanism, the SubIndex

1 represents options for multiple axes linear robot. The interpolation is available

for two axes or above, therefore the possible input value is 2-8 axes.

6.2. Articulated Robot

The kinematic parameters of the articulated robot provide six degrees of

freedom in three dimensions.

Figure 40. Six degrees of freedom diagram

Page 58: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 48 All Rights Reserved.

Num. Sub Description Sub Description

0x00

0 Kinematics type:1

1 0 13 PEL-J1(Deg)

2 a2(mm) 14 PEL-J2(Deg)

3 a3(mm) 15 PEL-J3(Deg)

4 a4(mm) 16 PEL-J4(Deg)

5 0 17 PEL-J5(Deg)

6 0 18 PEL-J6(Deg)

7 d1(mm) 19 NEL-J1(Deg)

8 0 20 NEL-J2(Deg)

9 0 21 NEL-J3(Deg)

10 d4(mm) 22 NEL-J4(Deg)

11 0 23 NEL-J5(Deg)

12 d6(mm) 24 NEL-J6(Deg)

Mechanism parameter 0x00 SubIndex 0 is an articulated robot when 1 is

selected. Sub 1-12 is mainly recorded as arm length. SubIndex13-24 is the limit

of positive and negative hardware for each axis.

The articulated robots have a higher degree of freedom than other

configurations. This type of robots are often used in processing plants for cargo

grabbing, machined parts rotating, etc.

6.3. Delta Robot

The Delta Robot is a parallel robot with kinematic parameters that provide X-Y-

Z panning and one Z-axis rotation in 3D space.

Figure 41. Delta robot diagram

Page 59: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 49 All Rights Reserved.

Num. Sub Description

0x00

0 Kinematics type:2

1 f(mm)

2 e(mm)

3 rf(mm)

4 re(mm)

5 hf(mm)

6 he(mm)

7 PEL-J1(Deg)

8 PEL-J2(Deg)

9 PEL-J3(Deg)

10 PEL-J4(Deg)

11 NEL-J1(Deg)

12 NEL-J2(Deg)

13 NEL-J3(Deg)

14 NEL-J4(Deg)

15 Delta 4:0, Delta 3:1

The Delta robot is selected when the mechanism parameter 0x00 subIndex 0

is 2. Respectively, the descriptions in the table above mean:

f and e are the lengths of the upper and lower triangles

rf and re are the lengths of the upper and lower rods

hf and he are the upper triangle and the lower triangle side widths

SubIndex7-14 is the maximum angle value of each hardware’s axis

SubIndex15 is to select the Delta configuration as four axes or three axes,

and the fourth axis is the next three small center points plus one more

rotation axis

Page 60: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 50 All Rights Reserved.

6.4. SCARA Robot

SCARA Robot is a horizontal multi-joint mechanism. Its kinematic parameters

generally have four degrees of freedom, including panning of X, Y, Z axes and

rotation around the Z-axis.

Figure 42. Diagram of a SCARA robot

The SCARA robot is selected when the mechanism parameter 0x00 subIndex

0 is 3. SubIndex1-8 records the arm length and SubIndex9-16 records the

positive and negative hardware limits of the axes 1-4 respectively.

Page 61: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 51 All Rights Reserved.

7. Group Enable and State

Before we can control the motion, we need to start the driver first. Now let us

understand the various types of group status. NMC_GroupGetState is a

function to obtain the current group state. The input variable of this function is

DevID.GroupIndex.PRetState, indicating that you must tell this function which

controller to query and which group under the controller to return the current

state to the PRetState function. The value of PRetState is the constant value

of the state table below.

Group APIs Parameters

NMC_GroupGetState DevID GroupIndex *PRetState

7.1. Group State

The group state can be divided into the following definitions:

Definition Constant

Value Description

NMC_GROUP_DISABLE 0 Group is disabled, group servo

is not activated

NMC_GROUP_STATE_STAND_STILL 1 Group start is enabled, group

servo = Standing Still

NMC_GROUP_STATE_STOPPED 2 Received Stop command, group

= Stopped

NMC_GROUP_STATE_STOPPING 3 Received Stop command, group

= Stopping (decelerating)

NMC_GROUP_STATE_MOVING 4 Executing a motion command

NMC_GROUP_STATE_HOMING 5 Executing Homing motion

command

NMC_GROUP_STATE_ERROR 6 An error occurred, group =

Stopped

Below are the descriptions of the functions listed in the table above:

NMC = NexMotion Controller

GROUP = the parameter definition is for a group

Page 62: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 52 All Rights Reserved.

DISABLE = the group is currently not activated

STAND_STILL = The group is in the startup state. When the group is in

the STAND_STILL state, use the motion control command to let the robot

to move.

STOPPED = the current group is in a stopped state. It usually occurs when

a stop command is sent or an external emergency stop button is pressed.

When the STOPPED state occurs, the motion control command cannot be

performed, and the group cannot be restarted directly. To restart motion

control, you need to reset the group status with Reset, and the status does

not return to STAND_STILL after the re-production.

STOPPING = the controller has received the stop command and is

decelerating the mechanism.

MOVING = the current group is executing the motion command. When the

group continues to send commands while moving, there are different

effects depending on the currently selected command form.

HOMING = the group is executing the origin point homing motion. The

homing action must be done before the motion command is made or must

be confirmed first, because the mechanism needs to know the current

correct coordinates after returning to the origin.

ERROR = indicating the drive has an alarm, such as a communication

error during the motion, etc.

7.2. Group Enable

Use NMC_GroupEnable() to enable for all axes in a group (servo enable).

Since the startup time various depends on the brand of the drive, the waiting

time can be written as to wait for the drive state to switch to the

NMC_GROUP_STATE_STAND_STILL state.

7.3. Group Functions in Program

This section discusses how to use the functions related to the control group

state in actual program coding. The functions related to the control group can

be divided into five types. Each type of the function call must tell the system

which controller command you want to execute now, so the first one of the input

quotes is the Device ID. Then, because there may be multiple groups under

one controller, you must also tell the controller which group you want to operate.

Group axis index is a particular input quote, and you need to tell it to execute

the command is which axis in the group.

Page 63: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 53 All Rights Reserved.

Group APIs Parameters

NMC_GroupEnable

DevID GroupIndex

NMC_GroupDisable

NMC_GroupResetState

NMC_GroupResetDriveAlmAll

NMC_GroupResetDriveAlm GroupAxisIndex

The first function from the above function table is NMC_GroupEnable. This

function is a non-blocking function—after the program finishes issuing the

command, it continues to execute on the next line of the program; it does not

wait to confirm the function is enabled. Therefore, a waiting area is usually set

after calling this function, and the program waits until the group enters the

STAND_STILL state and then continue to execute the next command.

NMC_GroupDisable is the function that shutdowns groups. After calling this

function, the group status returns to the DISABLE state, and it is non-blocking

like NMC_GroupEnable.

NMC_GroupResetState function resets the group and drive status and clears

the STOPPED and ERROR states. This function is also non-blocking. If the

reset is not completed and you continue with the subsequent program, you

would experience a failed operation. Use this function with caution.

NMC_GroupResetDriveAlmAll function is divided into two types, and they

function the same way, except one is for all axes in the group, and the other is

to specify a specific group axis. The difference between this function and

NMC_GroupResetState is that this function is only responsible for clearing

Drive parameters, meaning that if the drive sends an alarm, both the drive and

group status jump to the ERROR status, just the drive alarm is cleared after

calling this function, the group status stays in the ERROR state.

Program Samples

Now we examine the following program and learn how to apply the functions

we have learned.

Page 64: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 54 All Rights Reserved.

The above program is mainly to determine the NMC_GroupEnable call. The

driver has to have a normal start before continuing to execute the program. The

include input quote in the upper lines 1-4 is a call to use the functions in the

library.

The void main is the main entry point of the program, lines 8-13 declare the

variable that are used next, and line 15 initiates the controller call. The call

function returns a value to the variable of ret based on the function’s enable

status.

Lines 16-20 determine whether the ret return value is equal to 0. In the definition

of Error code, 0 means the function runs without problems, so line 16 means

when you call the NMC_DeviceOpenUp function, if it is unsuccessful, the next

judgment statement is executed; if it succeeds, NMC_GroupEnable is executed.

NMC_GroupEnable also has a ret variable to judge whether the function

execution is successful.

Page 65: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 55 All Rights Reserved.

Here is a simple template to show you how to program the coding to wait for

the drive starts successfully.

Lines 29 to 37 from the above program coding is about the ‘do...while’ loop. The

characteristic of this loop is that the function in the loop is executed once, then

decides whether to jump out of the loop according to the ‘while’ judgment. This

‘do...while’ loop mainly checks the Group State, and when the group's state is

STAND_STILL then the group jumps out of the loop. Remember there are

different ways to program the coding to get the same result, be creative and

happy coding!

7.4. Group Error Status Reset

When the group status stops and enters the STOPPED state, no motion control

commands can be executed. You can use the NMC_GroupResetState

function to reset the group status. After the function call is successful, the group

state returns to STAND_STILL.

Use NMC_GroupResetState() to clear the group error status timing:

When you call the NMC_GroupStop() to stop the group in any situation (or

emergency), the group status (STATE) changes to STOPPED. When the

group is in the STOPPED state, the controller refuses to execute any new

motion commands. You must confirm that the condition is removed then

use the NMC_GroupResetState() function to switch the group status to

STAND STILL and allow the controller to accept the new motion command.

If the group has an alarm for any of the axis drives, the alarm can be

cleared by the controller, the API can also be used to clear the alarm. The

group status (STATE) changes from ERROR STOP to DISABLE. You need

to restart the SERVO ON to continue to send the position control command.

Page 66: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 56 All Rights Reserved.

Program Sample

The following program is written to clear the stop state. You can see the

NMC_GroupStop function is called to put the group into the STOPPED state.

The time taken to clear the group error state varies according to the drive

manufacture, so you need to set up a do...while loop to call the reset state

function—NMC_GroupResetState to check the group status and wait until the

group status is equal to STAND_STILL to leave the loop. In the program below,

the Group state is 1. According to NexMotion, the defined state 1 is equal to the

STAND_STILL state, and then the controller is turned off.

Page 67: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 57 All Rights Reserved.

7.5. Group Status Flowchart

A group can switch the current group status through different functions. In order

to have a better understanding of how functions affect the group and controlled

group, let us examine the following flowchart.

Figure 43. Group status switch flowchart

Group Disable

First, we start from the lowest layer—Group Disable. There are three

conditions result in the Disable status:

1. When the controller first started the group, each axis has not been through

the excitation source, the controller enters the Disable status.

2. The system jumps to the Error status when the driver has an alarm and

returns to the Disable state when using the GroupResetState function.

3. When the group status is standing still, sending the NMC_GroupDisable

function returns the group to the Disable state.

Group Error/Group Disable

Next, we take a look at the Group Error status at the bottom-right of the

flowchart. The Group Error status appears when the external emergency stop

button is pressed or the drive has an alarm. In this case, use the

NMC_GroupResetState or NMC_GroupDisable function to return the group

to the Disable state.

Group Moving/Group Stand Still

Group moving, at the top-left of the flowchart, when this status occurs, it

indicates that the group is receiving the motion command and is moving. When

the movement is completed or when using the NMC_GroupHalt function during

Page 68: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 58 All Rights Reserved.

the move, the group returns to the Stand Still status.

Group Stopping/Group Stopped

The last thing we want to talk about in the flowchart is the Stopping status.

When using the NMC_GroupStop function or reaching the positive or negative

limits of the software or hardware, the group goes into the Stopping status.

When the stop is completed, the group is in the Stopped status, indicating that

the group is at a complete standstill and no motion control commands are

accepted at this time. Use the NMC_GroupResetState function to make the

group return to the Stand Still status so it can receive commands again.

Other Group Functions

When using the NMC_GroupEnableAll and NMC_GroupDisabelAll functions,

you only need to specify which controller to enable and disable. You probably

guessed from the function names that these two functions are to send

commands to all groups under the controller. You can choose the function

based on your needs. It is convenient to enable or disable all the groups under

the controller at one time; however, when one of the groups under the controller

fails to start, you won’t be able to know which group has an error, and the

function returns the ‘failed to start’ error code directly back to the controller.

Group APIs Parameters

NMC_GroupEnableAll

DevID

NMC_GroupDisableAll

NMC_DeviceGetGroupCount *PRetGroupCount

NMC_DeviceGetGroupAxisCount GroupIndex *PRetGroupAxisCount

When the controller uses multiple axes or groups, use the

NMC_DeviceEnableAll() function to enable all servo drive’s axes or groups

simultaneously (Servo enable).

Use NMC_DeviceGetGroupCount() to find out how many groups the

controller uses and return the number of groups to the variable of

PRetGroupCount. Note that the index of the group is calculated from 0, 1, 2, 3.

Do not directly use the return variable as the GroupIndex of the next function to

specify the error.

NMC_DeviceGetGroupAxisCount is a group axis that is transmitted back and

forth according to the GroupIndex specified by the user, and the number of axes

is returned to the PRetGroupAxisCount variable.

Page 69: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 59 All Rights Reserved.

To DISABLE all group axes at the same time, you can use

NMC_DeviceDisableAll function to turn off all axes in the system.

NMC_DeviceEnableAll(): this function sets all single axes and groups in the

system to the startup state (Servo On). During the startup process, the single-

axis is started first and then the groups. If the startup fails during the process,

the program stops and sends back the error.

7.6. Group Motion Information

It is often that various situational judgments are added in programming, and the

corresponding actions are performed based on the current drive state. Knowing

the status of the drive enables you to recognize the current state of the drive.

We call the group status as State and the drive return status as Status. The

table below shows the return status of the drive.

Group APIs Parameters

NMC_GroupGetStatus DevID GroupIndex *PRetState

The group motion information is read through NMC_GroupGetStatus(), and

the meta-numbers of the variables represent the following meanings:

Definition Constant

Value Description

NMC_GROUP_STATUS_EMG 0 External EMG signal latch indication

NMC_GROUP_STATUS_ALM 1 Trigger indication for any group axis servo alarm

(Alarm)

NMC_GROUP_STATUS_PEL 2 Trigger indication of any group axis positive limit

signal

NMC_GROUP_STATUS_NEL 3 Trigger indication of any group axis negative limit

signal

NMC_GROUP_STATUS_PSEL 4 Trigger indication of any group axis software

positive limit signal

NMC_GROUP_STATUS_NSEL 5 Trigger indication of any group axis software

negative limit signal

NMC_GROUP_STATUS_ENA 6 Group enabled (Enable, 1) or disabled (Disable, 0)

indication

Page 70: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 60 All Rights Reserved.

Definition Constant

Value Description

NMC_GROUP_STATUS_ERR 7 Group (any group axis) error indication

NMC_GROUP_STATUS_CSTP 9 All group axes have no position output (position

change is 0.)

NMC_GROUP_STATUS_ACC 10

Cartesian coordinate motion (straight line and arc),

accelerating (or slowing down) to the maximum

speed. The bit is 0 during the PTP or JOG motion.

NMC_GROUP_STATUS_DEC 11

Cartesian coordinate motion (straight line and arc),

decelerating to the target position or stopping. The

bit is 0 during the PTP or JOG motion.

NMC_GROUP_STATUS_MV 12

Cartesian coordinate motion (straight line and arc),

at the highest speed stage. The bit is 0 during the

PTP or JOG motion.

NMC_GROUP_STATUS_OP 13 Group motion state: GROUP_MOVING,

GROUP_HOMING or GROUP_STOPPING

NMC_GROUP_STATUS_STOP 14 Group state = GROUP_STOPPED

Reading the group status is in the unit of bits. The meaning of each bit is listed

in the table above. If the read bit is 1, it indicates that the event is triggered.

EMG is the external emergency stop signal of the mechanism. When it is

pressed, the bit is changed to 1; otherwise it is 0.

ALM indicates that the group servo sends a tight report and converts this signal

to 1.

PEL triggers the signal to 1 when the group axis triggers the hardware positive

limit.

NEL triggers the signal to 1 when it triggers the hardware negative limit.

PSEL and NSEL trigger the two limits to 1 when the positive and negative

software limits are triggered. The software limit can be set from the group axis

parameters.

ENA displays 1 when the group is in the startup state, so this signal is on when

calling the NMC_GroupEnable function.

Page 71: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 61 All Rights Reserved.

ERR becomes 1 to indicate that any group axis has an error, which is equal to

the State is changed to Error stop.

CSTP indicates whether the current group has a position command output.

When there is no position command output, the signal changes to 1; when there

is a position command output, the signal changes to 0.

ACC indicates that the Cartesian coordinate motion is in the acceleration phase.

Remember if it is PTP or JOG motion, then the signal is 0. Although both PTP

and JOG have Cartesian coordinate movements, due to the kinematic design,

the route planning of PTP and JOG are based on the shortest path of each axis,

so ACC does not apply to PTP or JOG.

DEC indicates the card coordinate motion is in the deceleration phase, and the

same applies to PTP and JOG as ACC.

MV indicates that the card coordinate motion is at the same speed, that is, the

highest speed stage. The MV is the same as ACC and DEC—it does not apply

to the PTP and JOG modes.

OP is 1 when the group is performing motion control. When this state is 1, it

indicates that the current State is in MOVING.HOMING or STOPPING.

STOP indicates that the group is in the stop state, it appears when STOP is

pressed, and the State shows up as STOPPED.

7.7. Group Speed Percentage Setting

The group percentage is also the feed rate. The speed planning is repeated

according to the percentage of the acceleration and deceleration and the

maximum speed set by the group and group axis parameters. NexMotion’s

library has two functions for the speed percentage setting: one is

NMC_GroupSetVelRatio for setting the speed percentage and the other one

is NMC_GroupGetVelRatio for querying the current speed percentage.

The input argument also needs to specify the Device ID and GroupIndex. After

all of the settings are complete, the value is sent to Percentage or

PRetPercentage based on your decision on setting the speed percentage

parameter or the speed percentage parameter.

Each group has a speed percentage setting, which can be set by

NMC_GroupSetVelRatio(). For example, if the maximum speed is 100, the

speed percentage is 70%, the maximum speed of motion planning is planned

as the upper limit of 100x70% = 70.

Page 72: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 62 All Rights Reserved.

As shown in the following table, a group has X and Y axes to perform PTP

motion. When the time is 1000, the set speed percentage is 0. After the setting,

the deceleration starts to be zero. When the time is 2500, the set speed

percentage is 50. After setting, it starts to accelerate until it reaches the target

position.

Group APIs Parameters

NMC_GroupSetVelRatio

DevID GroupIndex

Percentage

NMC_GroupGetVelRatio PRetPercentage

Figure 44. Position and speed chart

Now let us take a look at the position and speed chart which shows a situational

control for speed percentage setting. The speed is planned to be set at 70% of

the maximum speed. When the time reaches 1000, the speed percentage is

set to 0. So, when it reaches 1000, the speed drops rapidly, and it gradually

stops the movement of the point until the time percentage is adjusted to 50%

at 2300, so the point moves again and moves at 50% of the maximum speed

until the arrival point.

Program Sample: Group Speed Percentage

In this program sample, you only see the part about the speed percentage

control.

The primary function of the ‘do-while’ loop is to judge when there is a command

to enter into the loop, the switch in the while loop makes the time judgment.

Page 73: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 63 All Rights Reserved.

Before changing the speed percentage, the default percentage of the controller

is 100%.

Pay attention to the numbers in the script on the right below. Before the speed

returns to 0, the displacement of each dot position reading is about 4.7. After

the speed percentage is set to 0, you can see that the position is gradually

stopped and is at the position of 10.2. After the time counts to 2500, the speed

percentage is changed to 50% of the original value, so just by reading the

subsequent points, you can see that the displacement is about 1/2 of 100%

until the controller is turned off after reaching the target point.

.

.

.

Page 74: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 64 All Rights Reserved.

8. Group PTP Motion

The point-to-point (PTP) motion control functions can be divided into two types:

Machine Coordinate System (MCS) commands and Axis Coordinate System

(ACS) commands. Since the PTP motion control plan is to use the shortest path

of each axis, when in either of the MCS space or the ACS space, the same rule

applies.

8.1. Group PTP Functions

The MCS is based on the inverse kinematics to push back the angles that each

axis needs to rotate. However, when one axis takes a longer time to reach a

position than the other axes, both MCS and ACS’s other axes base on the

slowest axis to make the motion control plan to reach the target position at the

same time. The following are PTP related APIs for group axis coordinates:

Machine Coordinate System Axis Coordinate System

NMC_GroupPtpCart() NMC_GroupPtpAcs()

NMC_GroupPtpCartAll() NMC_GroupPtpAcsAll()

Group Axis PTP Speed Parameters

When the PTP motion is executed in the ACS, the controller plans the motion

with the shortest path of each axis and automatically reduce the speed of other

axes based on the axis with the longest required motion time to make all the

motion axes reach the target location at the same time. The speed of each axis

is calculated with the axis parameters of each group axis. The speed

parameters related to PTP are as follows:

Num. Sub Description

0x31 0 Profile type(0:T-Curve, 1:S-Curve)

0x32 0 Maximum velocity

0x33 0 Acceleration

0x34 0 Deceleration

0x35 0 Jerk

0x31 is the speed planning mode, which is divided into two types: T-Curve

and S-Curve.

0x32 is the maximum speed setting of the group axis.

0x33 is the group axis acceleration setting.

0x34 is the group deceleration setting.

0x35 is the Jerk is used for S-Curve to determine the smoothness of

the speed planning curve.

Page 75: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 65 All Rights Reserved.

PTP Motion Displacement and Velocity Planning

When the PTP is moving, whether it is based on the ACS or MCS, the speed

planning of each axis motor is implemented. The following diagram illustrates

the speed and position of the PTP motion displacement, the

NMC_GroupPtpAcsAll function example has four motion positions:

Axis 1: 90 degree

Axis 2: 50 degree

Axis 3: 70 degree

Axis 4: 30 degree

Figure 45. PTP motion displacement and velocity planning curve diagram

Axis 1 has to move the longest distance, so to let each axis to reach the target

point at the same time, Axes 2, 3, and 4 decelerate with Axis1 in speed planning

and the final speed curve looks like the shape of a pyramid.

Group PTP Function APIs

PTP is used in ACS or MCS (Cartesian), you can see the names of the following

four API include either Acs or Cart.

Group APIs Parameters

NMC_GroupPtpAcs

DevID GroupIndex

GroupAxisIndex AcsPos PAcsMaxVel

NMC_GroupPtpCart CartAxis CartPos

NMC_GroupPtpAcsAll GroupAxesIdMask PAcsPos

NMC_GroupPtpCartAll CartAxesMask PTargetPos

The above motion control functions need to specify the Device ID and Group

Time

Po

sit

ion

S

pe

ed

Time

Time

Page 76: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 66 All Rights Reserved.

index. Now let us take a closer look at each function in the table above. The

input of the NMC_GroupPtpAcs function refers to GroupAxisIndex to select

which group axis in the group to run. The axis index input starts from 0,1, and

2 to represent the axes 1, 2, and 3. AcsPos is the point position value that tells

the controller to run, and PAcsMaxVel is the maximum operating speed.

The NMC_GroupPtpCart function is for the motion control of the MCS, in which

the input quotes CartAxis is the selection of the motion direction. Since it is the

mechanical coordinate, so the input value 0, 1, 2, 3, 4, 5 represent the X, Y, Z,

A, B, C axes and their attitude angles. CartPos is the distance to enter the

movement.

So far, the functions we talked about can only specify one axis at a time, the

NMC_GroupPtpAcsAll function can perform a multi-axis movement at the

same time. The axis number is determined according to the input of

GroupAxesIdMask. When you want to start the X axis and the Y axis at the

same time, GroupAxesIdMask is required to input 3, because X axis = 20 = 1,

and Y axis = 21 = 2, and GroupAxesIdMask is the result of the sum value of

axes to be started; therefore, the value is 3.

The NMC_GroupPtpCartAll function is used for the multi-axis movement of

the MCS, where CartAxesMask is the selection start axis number, and the

calculation method to select multi-axis movement is the same as

NMC_GroupPtpAcsAll.

8.2. Group PTP Command Modes

Different command modes affect the trajectory of movement between points.

Generally, command modes can be divided into three types:

Aborting

Buffered

Blending

The selection of the command mode can be modified in the group parameter

table.

Page 77: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 67 All Rights Reserved.

Aborting

The Aborting command mode is a system preset parameter. When the motion

command is issued, the current motion is interrupted and executed immediately.

If there are other motion commands in the queue, they are cleared.

Figure 46. Aborting motion command diagram

From the above Aborting motion command diagram, we assume that you need

to move from P1 to P2. However, you suddenly receive another command to

move to P3 during the move, the controller gives up the original command

(moving to P2) and moves directly to the P3 position and also clears the

commands in the command queue.

Buffered

The Buffered command mode is a system preset parameter. This mode is

usually applied to the desired trajectory planning to pass the target point bit.

When it is used, the motion command is temporarily stored in the queue until

the previous command is executed, then the previous motion command

decelerates to zero.

Figure 47. Buffered motion command diagram

The above diagram shows a buffered move from P1 to P2. If a new point

command is received, the controller saves the command in the command

queue and wait until it moves to P2 and then move to P3.

Page 78: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 68 All Rights Reserved.

Blending

If the path connection mode is set to Blending mode, the position and speed of

the two paths are mixed. This function can improve the smoothness of the

machining path, improve the movement rate, and shorten the processing time.

However, the path does not pass the set point bit.

Figure 48. Buffered motion command diagram

The Blending command mode is the mode of motion planning between points.

If you want to make a smoother turn, you can use Blending. Blending can be

divided into two modes for the corner calculation.

The first mode is determined by the corner distance. If the distance from P1

to P2 is 10mm, the value of 0x36 subindex 1 can be set to 0 first, then set the

Blending corner distance in the parameter table to 2, when the point between

P1 and P2 reaches 8, the controller plans the trajectory to move to the P3 point

in advance.

The other mode is determined by the error of the maximum corner. The value

of 0x36 subindex 1 is set to 1 and the maximum corner error is planned as the

input for 0x36 subindex 3.

8.3. Circle + Line + Circle

The diagram below shows the S-shaped trajectory using the Blending and

Buttered command modes.

Figure 49. Blending and Buffered S-shaped trajectory diagram

Buffered Blending

Page 79: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 69 All Rights Reserved.

The above diagram is an example of the use of Blending. The two S points are

the same and are completed by two circles and one line. The difference can be

seen according to the different command modes. On the left of the diagram is

the Blending mode, the drawn S has five points. On the right of the diagram is

the S drawn by Buffered mode. You can be select the command modes base

on your own needs to plan the movement trajectory between points.

8.4. Command Queue

If a command queue is listed as a position command storage, it can store up to

32 position commands. In the above diagram, Blending occupies three

command queue spaces. Remember, If the command queue is full, the position

commands cannot be added. If you want to query the remaining command

queue space in the current controller, you can use the

NMC_GroupGetMotionBuffSpace function to query.

‧‧‧ M M M M

In the following program example, the control mechanism uses PTP to move to

a specific point and use LINE to draw a square. After each LINE move, the wait

point is not reached, and then the command space is 27, which includes one

PTP command and four times LINE. Use the

NMC_GroupGetMotionBuffSpace function to read the value of 27 and verify

that the command queue space is 32. The command is stored in the command

queue.

Motion command buffer:32 Motion Processor

Page 80: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 70 All Rights Reserved.

8.5. Blanding Sample Program

The program below is a blending sample program that runs two points, point 1

is to move 50mm to the Y-axis, and point 2 is to move 50mm to the X-axis.

Point 1 = X:0, Y:50 Point 2 = X:50, Y: 0

The program shows the first three behaviors for the Buffer mode setting, the

Page 81: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 71 All Rights Reserved.

bottom is the NMC_GroupLineXY operation point movement, and then the

‘do...while’ loop is used to wait for the point to arrive.

The left and right images below use Buffered mode and Blending mode

separately. You can see that when moving with the same point, Blending mode

can draw a more rounded corner.

8.6. Jog Motion

JOG's motion control has a motion plan similar to PTP. Both the ACS and the

MCS are used for the speed and position planning of each axis, so if you want

to change Jog’s running speed, you need to modify each group axis just like

PTP.

JOG's motion control can be divided into three kinds of functions. Each motion

control needs to specify the controller and group.

The first function, NMC_GroupJogAcs, is for single-axis movement, so

GroupAxisIndex is used to choose the axis that you want to move. You can

reference the table below to find the corresponding value for each axis, i.e.,

input 0 to move the X-axis, input 1 to move the Y-axis, and so on. Dir selects

the direction of rotation, input 0 is clockwise, and input 1 is counterclockwise.

PAcsMaxVel is the maximum speed of rotation.

Value 5 4 3 2 1 0

GroupAxisIndex 5 4 3 2 1 0

Group APIs Parameters

NMC_GroupJogAcs

DevID GroupIndex

GroupAxisIndex

Dir

PAcsMaxVel

NMC_GroupJogTcpFrame CartAxis PMaxVel

NMC_GroupJogPcsFrame

Buffered mode Blending mode

Page 82: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 72 All Rights Reserved.

CartAxis C B A Z Y X

The second function is NMC_GroupJogTcpFrame. This function is for motion

control of TCP coordinates, only one direction can be specified. If you are going

to move in the X direction, you need to enter 0. If you want to move in the Y

direction, you need to enter 1 and so on. Dir is the same as NMC_GroupJogAcs,

0 is clockwise rotation, 1 is counterclockwise rotation, and PMaxVel is also the

same as NMC_GroupJogAcs, which is the input for maximum speed.

The power is the

index of bit 25 24 23 22 21 20

GroupAxesIdMask 5 4 3 2 1 0

CartAxesMask C B A Z Y X

The third function is NMC_GroupJogPcsFrame, which is the same as the

NMC_GroupJogFrame for the motion control of the MCS. You can use the

NMC_GroupJogAcs() function to move an axis in the group at maximum

speed (operating in ACS space). When the command is successfully issued,

the group axis runs at the set maximum speed. Use the NMC_GroupHalt() or

NMC_GroupHaltAll() function to pause the entire group. Jog's speed planning

is defined by the following axis parameters:

0x31 0 Profile type(0:T-Curve, 1:S-Curve)

0x32 0 Maximum velocity

0x33 0 Acceleration

0x34 0 Deceleration

0x35 0 Jerk

Jog Program Sample

The Jog motion control function does not need to specify the target point in use

and is usually used in conjunction with the mechanical point or speed decision.

In the below program sample, NMC_GroupJogAcs is used as the group axis

movement command. In addition to specifying the device ID and group index,

you also need to specify the group axis index. For example, in the program

sample, the group axis index is 2, which represents the third in the moving

group axis. The shaft rotates clockwise with a maximum speed of 20.

Page 83: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 73 All Rights Reserved.

The lower part of the above program is the command position for obtaining the

third axis in the group axis. When the command position is greater than or equal

to 100, the controller jumps out of the do-while loop and give the Halt command

to stop the motion control of the third axis.

Group Speed Planning Setting

The group speed planning type of function is mainly used to call the parameters

of the parameter list, and the parameters can be read or modified. The functions

in the table below are to modify and read the parameters of the group axis. This

type of functions needs to specify the Device ID, group and group axes, and

parameter number.

Group APIs Parameters

NMC_GroupAxSetParamI32

DevID GroupIndex GroupAxisIndex ParamNum SubIndex

ParaValueI32

NMC_GroupAxSetParamF64

NMC_GroupAxGetParamI32

PRetParaValueI32

NMC_GroupAxGetParamF64

Speed can be set by using the following two functions:

NMC_GroupAxSetParamI32

NMC_GroupAxSetParamF64

Page 84: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 74 All Rights Reserved.

You can see the first function NMC_GroupAxSetParamI32 and the second

function NMC_GroupAxSetParamF64 in the program above. These two

functions are used to set the value of the parameter. Different functions are

applied according to the data type of the parameter. The data type is referred

as I32_T or F64_T, I32_T is a well-known int, and F64_T is a double.

The third function NMC_GroupAxGetParamI32 and the fourth function

NMC_GroupAxGetParamF64 are used to read the parameters.

Page 85: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 75 All Rights Reserved.

8.7. Group Stop Motion Control

The group stop motion control functions can stop the group and there are four

of them listed in the table below.

Group APIs Parameters

NMC_GroupHalt

DevID

GroupIndex NMC_GroupStop

NMC_GroupHaltAll

NMC_GroupStopAll

The Halt function commands one group or all groups under the controller to halt

or stop. Therefore, there only specified and non-specified groups in the input

quote of the Halt function.

The stop motion function is divided into stop and halt. When the stop command

is issued that is any function with STOP, the controller clears the position

commands in the command queue and switch the group status to STOPPED,

until the user calls NMC_GroupResetState to execute new motion instruction.

Halt is temporarily stopped. According to the Buffer mode of 0x36, it is decided

whether to execute immediately. If 0x36 is 0, Halt is put into the command

queue along with other motion control functions. If 0x36 is 1, it is executed

immediately.

Halt is added to the command queue according to the selected mode, and 0x31

is the mode that chooses to connect with other commands. It is divided into

Aborting and Buffered, and the deceleration and the impulse can be set

through 0x34 and 0x35.

Stopping the Stop command can only be set as the speed planning mode, there

are T-Curve and S-Curve, and can also the deceleration and the impulse.

Group Stop Program Sample

The group stop function is NMC_GroupStop. When the stop command is

successful, the group status stays in the STOP state. When the group status

remains in the STOP state, the motion control command cannot be continued.

At this time, ‘do...while’ is used to loop back to reset and continue to check the

group status. When the group status reset is successful, the group status

returns to STAND_STILL, then continue to issue motion control commands.

Page 86: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 76 All Rights Reserved.

Speed Planning Mode

From the starting point to the end point, the object needs to go through the

process of acceleration, average speed (maximum speed) and deceleration.

The relationship between speed and time is illustrated in the mode of speed

planning. The controller provides two forms of speed planning, T-curve and S-

curve.

T-curve

T-curve is a trapezoidal plan. The speed plan is divided into three stages:

acceleration, average speed, deceleration, and the speed change relationship

is illustrated as a trapezoid.

Figure 50. T-curve diagram

Page 87: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 77 All Rights Reserved.

Advantages: The speed is faster than S-Curve, the calculation is simpler, and

requires less of the controller.

Disadvantages: In the actual difference compensation movement, because

the speed is not smooth enough, the machine vibration is significant.

S-curve

The "S" in S-curve refers to the speed planning contour in the acceleration

phase. The overall speed planning is divided into seven phases: Acceleration,

average acceleration, deceleration, average speed, acceleration and

deceleration, average deceleration, deceleration. Phases 1, 3, 5, and 7 are

what we call—Jerk. Its mathematical significance is the differential of

acceleration versus time. When the Jerk value is larger, the speed curve

becomes closer to the T-curve, and the jitter is more considerable.

Figure 51. S-curve diagram

Advantages: Acceleration and deceleration is more stable, reducing the

vibration amplitude of the mechanism.

Disadvantages: S-curve with the same distance for motion control takes longer

than T-curve.

9. Group Linear Interpolation

Linear interpolation generates new values based on geometrically rendering a

straight line between two adjacent points on a plane. All points on the line,

besides the original two points, are deemed as interpolated values.

9.1. Linear Interpolation Functions

To perform linear motion in the Cartesian space, use the following APIs:

NMC_GroupLineXY is for motion on a two-dimensional plane.

NMC_GroupLine is for linear motion in three-dimensional space.

You need to specify Device ID and Group Index when using both of the above

Page 88: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 78 All Rights Reserved.

functions. The linear motion control is limited to the X, Y, Z, A, B, and C

coordinates; thus, you must specify the X and Y coordinates that you want to

change in the NMC_GroupLineXY argument. When inputting the codes of the

movement under NMC_GroupLine, use the same Input method as PTP. When

inputting codes under PCartPos use the Pos_T format. You can specify the

maximum movement speed in both functions.

Group APIs Parameters

NMC_GroupLineXY DevID GroupIndex

PX PY PMaxVel

NMC_GroupLine CartAxisMask PCartPos

9.2. Linear Interpolation Motion Parameters

Linear Interpolation motion parameters are divided as:

Linear interpolation of linear axes

Linear interpolation of linear axes and attitude axes (A, B, C axes) attitude

control

0x30 0 Cart. relative positioning(0:Absolute, 1:Relative)

0x31 0 Cart. profile type(0:T-Curve, 1:S-Curve)

0x32 0 Cart. max. velocity

0x33 0 Cart. acceleration

0x34 0 Cart. deceleration

0x35 0 Cart. jerk

0x30 parameter specifies the command type, which is divided into absolute

command and relative command. The difference between the two is that when

the X-axis is currently 5 mm:

If an absolute 10 mm command is received, the X-axis moves to the

position of 10 mm.

If a relative 10 mm command is received, the X-axis uses the current

position as the reference position and then move to the position of 10 mm,

so the X-axis moves to 15 mm.

9.3. Linear Interpolation Sample Script

The linear motion only runs on the MCS coordinates, besides using the

NMC_GroupLineXY function to specify Device ID and Group Index, you can

use the input argument to determine the target X and Y mechanism points. This

function is a non-blocking function.

Page 89: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 79 All Rights Reserved.

When using the NMC_GroupLineXY function, you need to wait for the robot to

reach the target point then use the ‘do…while’ loop. The above script uses the

CSTP in the Status to judge, when CSTP is 0, it indicates that there is a

command input; when CSTP is 1, it means there is no command input and

leaves the ‘do…while’ loop.

9.4. Attitude Angle Parameters

The linear Interpolation parameters are focused on the X, Y, and Z axes;

whereas the attitude angle parameters are concentrated on the A, B, and C

axes.

Now let us take a look at the attitude angle parameters in the table below.

Num. Sub Description

0x3A 0 Orientation motion independent

0x3B 0 Max. orientation velocity

0x3C 0 Orientation acceleration

0x3D 0 Orientation deceleration

0x3E 0 Orientation jerk

The 0x3A parameter determines whether the attitude angle motion should use

an independent interpolation operation. When the 0x3A parameter is 0, it

means that A, B, C rotation speed planning is based on 0x3B to 0x3E, and the

attitude control adopts an independent interpolator for speed planning. When

the 0x3A parameter is 1 (non-independent difference compensation), it means

A, B, C rotation speed planning is based on the 0x32 to 0x35 settings and the

change of the attitude control angle is proportional to the linear motion.

Page 90: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 80 All Rights Reserved.

9.5. Linear Interpolation and Attitude Control

If the set group mechanism is a robot, its ABC value is defined as the attitude

angle. The following diagram depicts a 6-axis robot arm performing linear

interpolation with attitude control.

Figure 52. Linear interpolation diagram

The attitude angle is based on the right-hand rule, while the attitude angle A is

rotated against the Z-axis, the attitude angle B is rotated against the Y-axis, and

the attitude angle C is rotated against the X-axis.

Figure 53. Linear interpolation and attitude control diagram

Let us review the diagram from the previous page. The left part of the diagram

has an angular control of the Y-axis rotation in addition to the X-Y plane

movement. In the right part of the diagram, the position of the endpoint is taken

out to explain in more detail the difference between the non-attitude angle and

the attitude angle movement. When the line is not moved by the attitude control,

the Z-axis directions of the TCP are all in the same direction. You can change

the Z-axis to point to a different angle.

(No attitude control) (With attitude control)

Page 91: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 81 All Rights Reserved.

10. Group Circular Interpolation

Circular interpolation is a translation of linear axis positions into curved tool

motions. Circular interpolation commands are used to move a tool along a

circular arc to the commanded end position.

Circular interpolation requires five pieces of information: a target point, a feed

rate, a center, a radius, and a direction of movement. Circular interpolation can

be accomplished in one of two directions: clockwise, or counterclockwise. The

direction of rotation from the starting point determines the actual shape of the

arc relative to the spindle axis.

10.1. Two-dimensional Circular Interpolation

The circular interpolation can be divided into three types: Radius, Circle Center,

and Pass-through methods. All three methods can control the maximum speed

of the motion, and their motion controls are mostly done on two-dimensional

(2D) planes and the input argument needs to include the:

Device ID

A Group with specified circular interpolation parameters

Target X and Y coordinates

Circular input arguments for different circular motions

When performing circular motions using the Cartesian coordinate system (X, Y,

and Z), the controller provides the following ways to define the circular

movements:

Group APIs Parameters

NMC_GroupCirc2R

DevID GroupIndex PEX PEY

Radius

CW_CCW PMaxVel NMC_GroupCirc2C PCXOffset PCYOffset

NMC_GroupCirc2B PBX PBY

2D Radius Circular Interpolation

When using the radius circular method, you need to specify the radius length

between the starting position and the target point, and then the controller draws

a circle based on the given radius length.

The NMC_GroupCirc2R radius method requires you to specify the radius. The

CW_CCW parameter specifies rotation direction, input 0 to select CW to rotate

clockwise; input 1 is to select CCW for counterclockwise rotation.

Page 92: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 82 All Rights Reserved.

Figure 54. Diagram of radius circular interpolation

2D Circle Center Circular Interpolation

When applying the Circle Center method, you need to specify the position of

the target point and the position of the center of the circle. The controller draws

circles based on the center of the circle from the input. It is just like the radius

method; you also need to input CW_CCW to specify the rotation direction.

Figure 55. Diagram of circle center circular interpolation

2D Pass-through Circular Interpolation

When utilizing the Pass-through method, you only need to specify the positions

of the starting point, passing-through point, and target point. These three

positions determines the direction of the rotation and arc of the circle, so this

method does not need to specify the direction of rotation.

Figure 56. Diagram of circle center circular interpolation

Page 93: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 83 All Rights Reserved.

10.2. Three-dimensional Circular Interpolation

Circular interpolation in three-dimensional (3D) space is defined as the motion

control in the intersection of a plane and the surface of a sphere. The three-

dimensional circular interpolation has the same three types of methods like

the two-dimensional circular interpolation: Radius, Circle Center, and Pass-

through.

Group APIs Parameters

NMC_GroupCircR

DevID GroupIndex CartAxisMask PCartPos

PNormalVector Radius

CW_CCW

PMaxVel NMC_GroupCircC CenOfsMask PCenOfs

NMC_GroupCircB BorPosMask PBorPoint

3D Radius Circular Interpolation

When using the NMC_GroupCircR group API for the radius circular

interpolation, remember you are controlling motions in a three-dimensional

space, you need to specify the Normal Vector when drawing the circle. The

normal vector determines the dimension of the circle. And you need to input the

combination code for CartAxisMask to enable, the combination code input

method is the same as PTP.

Figure 57. Diagram of a 3D radius circular interpolation

3D Circle Center Circular Interpolation

When using the NMC_GroupCircC group API for the circle center method in

3D space, it is essential to specify the following items:

Starting combination code

Target position

Center of circle position

Center of circle combination code

CW_CCW-specified circular direction

Maximum speed

Page 94: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 84 All Rights Reserved.

Figure 58. Diagram of a 3D center circular interpolation

3D Pass-through Circular Interpolation

When using the NMC_GroupCircB group API for the 3D pass-through method,

you must indicate the following entries:

Starting combination code

Target position

Pass-through position

Pass-through combination code

Maximum speed

Figure 59. Diagram of a 3D pass-through circular interpolation

Page 95: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 85 All Rights Reserved.

10.3. Group Circular Interpolation Function Program Sample

Let us examine the program sample below:

The NMC_GroupCitc2B group API is introduced by the point method. In

addition to the Device ID and Group Index, you need to specify the positions of

the target point and the passing points.

The endCartPos.pos[0] input argument is the return argument after obtaining

the MCS function. The 0, 1, 2, 3, 4, and 5 represent X, Y, Z, A, B, and C axes,

so the endCartPos.pos[1] is the target point of the Y-axis, the

passCartPos.pos[0] and passCartPos.pos[1] are the passing points for the

X and Y axes, maxVel is the specified maximum speed.

Page 96: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 86 All Rights Reserved.

11. Hands-on Exercises

Now we practice what we have learned in this class and apply the library

functions based on the given scenarios.

11.1. Preparing Your System for Programming

Before creating a programming script of your own, you need to perform the

steps below to prepare your computer system for programming.

1. Go to Project in Visual Studio and then select Properties.

2. Under the Configuration Properties, go to C/C++, select General, and

then choose Additional Include Directories.

3. Under Linker, select General then select Additional Library Directories.

4. Under Linker, select General then select Additional Dependencies.

Note: The Additional Dependencies should point to a file “Lib” under NexMotion. The Lib

file holds static library files with a “.lib” extension in the file names.

Page 97: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 87 All Rights Reserved.

11.2. Practice Exercise 1: Blending

Scenario: You have invited a new client, Sphere Sync, to visit your company

and wanted to prepare a MiniBOT demo. The first part of the presentation is to

use the robot to write the initials of Sphere Sync—SS, use the Blending

command mode to complete this task.

Practice Exercise 1: Blending

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training Handbook, and the 6-axis MiniBOT.

Action: You will demonstrate proficiency with the Blending motion

command by:

Synchronizing motion tracks with 3D View

Using PTP’s maximum speed, acceleration, and

deceleration settings

Drawing two S-shaped tracks

Moving the robot arm to the specified position, pause

for 3 seconds and continues the follow-up action

Criteria: You will complete this task with 100% accuracy. Ability to

meet the requirements will be determined through instructor

observation and feedback.

Figure 60. Blending Motion Control Map

Page 98: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 88 All Rights Reserved.

Motion Control Steps Description

Step 1: PTP Use PTP to move to the first position

Step 2: Circle Draw the lower arc of the first S (3D view)

Step 3: Line Draw a straight line of the first S (3D view)

Step 4: Circle Draw the upper arc of the first S (3D view)

Step 5: PTP Use PTP to move to step 5 position

Step 6: STOP Use STOP to stop for 3 seconds

Step 7: PTP Use PTP to move to step 7 position

Step 8: Circle Draw the lower arc of the second S (3D view)

Step 9: Line Draw a straight line of the second S (3D view)

Step 10: Circle Draw the upper arc of the second S (3D view)

Step 11: Return each axis of the ACS to the 0-degree position

Directions:

In this exercise, you program the MiniBOT to draw two side-by-side S letters to

demonstrate your ability to use the blending motion control command. You only

need to display the two S tracks in the 3D View and don’t forget that the first S

command is buffered. Once the robot moves to the space between the two S

tracks, you need to use NMC_GroupStopAll to stop for 3 seconds and then

move to the second S track to complete the blending command. Remember,

after the trajectory is planned, return each axis to the 0-degree position.

Page 99: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 89 All Rights Reserved.

11.3. Practice Exercise 2: Tool Calibrations

Scenario: Your company just purchased a new two-finger gripper tool for the

robot on the production line. The gripper tool’s two fingers have different lengths.

You are instructed by your supervisor to program the tool to work with the active

robot.

Figure 61. Tool pieces: A gripper and a suction cup

Practice Exercise 2: Tool Calibrations

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training Handbook, and the 6-axis MiniBOT.

Action: You will demonstrate proficiency with setting up the tools for

a robot by:

Starting the controller

Using the four-point positioning method

Detecting the current coordinates of the two sets of tools

Inputting the returned values of the two sets of tools

Verifying that the returned values of the two sets of tools

are the same as the value in the Read Tool Index

parameters tables

Criteria: You will complete this task with 100% accuracy. Ability to

meet the requirements will be determined through instructor

observation and feedback.

Steps Description

Step 1: Use the four-point positioning method to obtain the offset data

between the two sets of tools and the end point of the robotic arm.

Step 2: Start the controller after setting the conversion relationship

Step 3: Input the two sets of Tool conversion data obtained from step 1 to

Tool space.

Page 100: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 90 All Rights Reserved.

Step 4: Get the actual positions of the two sets of tools and the current

posture of the arm.

Step 5: Compare the Tool parameter tables and determine if objects of

different tools to see if the positions obtained in step 4 are the

same.

Directions:

In this exercise, you calibrate the robot with the new gripper tool. The tool

calibration needs to use the four-point coordinate positioning, below are the two

sets of tool's four-point positioning coordinates for this exercise.

Tool index 0 Four-point Positioning Coordinates

1 2 3 4

X 351.214 430.768 388.662 379.679

Y -6.539 -14.371 43.77 -72.459

Z 468.366 448.954 451.685 446.667

A 111.849 19.599 81.063 -56.654

B -68.57 -41.008 -37.019 -64.152

C 66.696 150.065 119.896 -133.361

Tool index 1 Four-point Positioning Coordinates

1 2 3 4

X 250 250 260 250

Y -10 10 0 0

Z 564 564 564 564

A 0 0 0 0

B 0 0 9.567 0

C -169.3 170.38 180 180

Page 101: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 91 All Rights Reserved.

11.4. Practice Exercise 3: Base Calibration

Scenario: Your supervisor summoned you to his office and told you that based

on the production performance report from last month, a new robotic arm needs

to be added to the production platform system B5 to boost the productivity. You

are assigned with the task of calibrating the robot to a new production platform

and get it ready to handle the cylinder-shape products.

Figure 62. Diagram of a robotic arm next to a production platform

Practice Exercise 3: Base Calibration

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training curriculum, and the 6-axis MiniBOT.

Action: You will demonstrate proficiency with calibrating the base of a

robot by:

Starting the controller

Setting up the origin coordinates of the base

Calculating the relative conversion relationship of the

robotic arm and base

Changing the coordinates based on the relative

conversion base index

Verifying the PCS coordinates are (0, 0, 0) after changing

to Base index 0

Criteria: You will complete this task with 100% accuracy. Ability to

meet the requirements will be determined through instructor

observation and feedback.

Page 102: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 92 All Rights Reserved.

Steps Description

Step 1: Start the controller.

Step 2: Move the robotic arm to the desired Base origin position.

Step 3: Input the current robot coordinates into the Base Calibration

function to calculate the relative relationship.

Step 4: Input the relative conversion relationship data into Base Index 0.

Step 5: Switch coordinates to Base Index 0 and confirm whether the

current PCS coordinates are (0, 0, 0).

Directions:

Typically, there are different production lines in a factory. In this exercise, you

calibrate the base of the robot that is going to be added to a production platform.

The base calibration starts with getting the control of the controller, move the

robotic arm to the desired origin point position, get the current coordinates for

the base, then use the Base Calibration function to calculate the relative

conversion relationship and enter the result into the Base Index 0 (X = 330, Y

= -200, Z = 194). Don’t forget you need to switch base coordinates to Base

Index 0 and ensure that the current PCS coordinates equate to (0, 0, 0).

Page 103: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 93 All Rights Reserved.

11.5. Application Scenarios

In this topic, you will use the motion control methods you have learned and try

to work on the real-world cases by yourself. Examine the given scenarios and

tips carefully, evaluate the equipment/tool you have currently, and then

determine how to resolve the scenarios in the most optimal ways.

Scenario 1: Serving Coffee

Recently unmanned convenience stores are widely spread and coffee

machines are indispensable for convenience stores. You are assigned to

design motion control steps for a robotic arm to serve brewed coffee.

Scenario 1: Serving Coffee

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training curriculum, the 6-axis MiniBOT, a

pneumatic gripper tool, takeout coffee cups, and a coffee

machine.

Motion

Control

Guidelines:

Step 1: Move the robotic arm to Step 1 starting position.

Step 2: Use the DO to control the gripper jaws to clamp the

cup.

Step 3: Control the Z-axis in LINE mode to move the cup

upward.

Step 4: Move the cup to Step 4 position using PTP.

Step 5: Use LINE mode move the arm to Step 5 position.

Step 6: Remove the cup from the coffee machine in LINE

mode when the coffee cup is full.

Page 104: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 94 All Rights Reserved.

Tips:

The motion control steps for coffee serving vary based on the gripper tool that

you choose to use. Pneumatic and electric grippers are commonly used to pick

up coffee cups. Don’t forget to calibrate the gripper tool first. The above

guidelines are based on a pneumatic gripper, and the pneumatic switch uses

the DO control to clamp or loosen the grip of the coffee cup.

In step 1, you can use PTP to move the arm to the coffee cup, and then control

the DO to pick up the cup. Take the cup out of the LINE controlled Z-axis and

move it to Step 4 position. Control the arm to drop the cup in LINE mode. Wait

until the coffee machine finished filling up the cup, then take the cup out of the

coffee machine by LINE control to complete the coffee serving process.

Page 105: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 95 All Rights Reserved.

Scenario 2: Dealing Cards

The primary use of industrial robots is material handling. Robots transfer

workpieces to and from different places. A fixed sorting motion control, like

dealing cards, is frequently programmed for robotic operations.

Scenario 2: Dealing Cards

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training curriculum, the 6-axis MiniBOT, a suction

cup tool, and a deck of playing cards.

Motion

Control

Guidelines:

Step 1: Move to Step 1 starting position.

Step 2: Control DO to pick up the top card of the deck.

Step 3: Move to the position of Step 3.

Step 4: Control DO to lay down the card.

Step 5: Move back to the original Step 1 position and pick up

another card from the top of the deck.

Step 6: Move to Step 6 position.

Step 7: Control the DO to lay the card down.

Step 8: Move back to the original Step1 point and pick up

another card from the top of the deck.

Step 9: Move to Step 9 position.

Step 10: Control DO to lay the card down.

Repeat the above steps until the deck of cards at the Step 1

position are all gone.

Page 106: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 96 All Rights Reserved.

Tips:

The motion control design of dealing cards is not complicated. It is mainly based

on the software to calculate the number of cards, and the various positions of

the cards, and then to control the DIO to move or lay down the cards.

First thing you need to do is to calibrate the suction cup tool you are going to

use. You can use the suction cup tool to pick up a card and move the card to

the designated location. In the beginning, the card will be placed at a fixed

location. You can dedicate three or four positions in the program for the place

where you want to put the cards. Move one card at a time until all of the cards

are dealt.

Notice that in this scenario, the cards were dealt face down; therefore, no need

to use a visual tool to detect colors and shapes.

Page 107: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 97 All Rights Reserved.

Scenario 3: Writing An Alphabet

You can program your robot to write “handwritten” alphabets or characters with

a pen. Writing alphabets is another common task that industrial robots can

perform. Let us start with a single alphabet—A.

Scenario 3: Writing An Alphabet

Conditions: Given a computer installed with access to Visual Studio, the

GRC Basic Training curriculum, the 6-axis MiniBOT, a writing

pen, a piece of paper, a writing board, and a pen plotter.

Motion

Control

Guidelines:

Step 1: Move to the starting position of the alphabet “A”.

Step 2: Control the Z-axis to lower the pen to the starting

position.

Step 3: Use LINE to move the pen to the position of Step 3.

Step 4: Use LINE to move the pen to the position of Step 4

Step 5: Use LINE to move the pen to Step 5.

Step 6: Use LINE to move to the pen to Step 6.

Step 7: Control the Z-axis to lift the pen up.

Page 108: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 98 All Rights Reserved.

Tips:

When writing on a plane, it is better that you set the points of the alphabet as

the relative positions in case the platform may move. If the platform moves while

you are writing the alphabet, only the initial point before the writing needs to be

corrected.

The above motion control is designed with relative commands. Use the

absolute commands only on the part of moving the pen to the preset position

before writing the alphabet.

In this scenario, the alphabet A is used as a writing example. Assuming that the

initial pen position is in the Step 1 position in the diagram above, you only use

the absolute commands to move the end point of the arm to the top of the

starting point, and then you use the relative commands to write the alphabet.

Due to the characteristics of PTP, it is not recommended to use PTP for the

alphabet-writing movements. The best solution for this scenario is to use LINE,

Circ, and blending for the motion control design.

Page 109: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 99 All Rights Reserved.

Acronyms and Abbreviations

Acronym or

Abbreviation

Meaning

ACC Accelerate

ACS Axis Coordinate System. The axes of the ACS are connected to the real motor. This

coordinate system represents the positioning of the motor without taking care about the

position of the tool center point (TCP).

AI Artificial Intelligence is applied when a machine mimics "cognitive" functions that humans

associate with other human minds, such as "learning" and "problem solving".

AIoT The Artificial Intelligence of Things (AIoT) is the combination of artificial intelligence (AI)

technologies with the Internet of Things (IoT) infrastructure to achieve more efficient IoT

operations, improve human-machine interactions and enhance data management and

analytics.

API Application Programming Interface.

Automata Automata is a self-operating machine, or a machine or control mechanism designed to

automatically follow a preprogrammed sequence of operations or respond to

predetermined instructions.

C++ C++ is a general-purpose programming language. It has imperative, object-oriented and

generic programming features, while also providing facilities for low-level memory

manipulation.

Cartesian

coordinate system

A Cartesian coordinate system is a coordinate system that specifies each point uniquely in

a plane by a set of numerical coordinates, which are the signed distances to the point from

two fixed perpendicular oriented lines, measured in the same unit of length.

Cartesian Space A method for trajectory planning of robot in two- or three-dimensional space.

CNC Computer Numerical Control. CNC differentiates between machines that have a

“Controller” on it from those which are manually run.

DEC Decelerate

Delta Robot A type of parallel robot that consists of three arms connected to universal joints at the

base. The design feature is the use of parallelograms in the arms, which maintains the

orientation of the end effector, by contrast to Stewart platform that can change the

orientation to its end effector. Delta robots have popular usage in picking and packaging in

factories because they can be quite fast, some executing up to 300 picks per minute.

DI Digital Input

DO Digital Output

DOF Degrees of Freedom. The number or independent motions in which the end effector can

move, defined by the number of axes of motion of the manipulator.

Page 110: General Robot Control

Copyright © 2019 NEXCOBOT Co., Ltd. 100 All Rights Reserved.

EOAT End of Arm Tooling is a crucial aspect of robotic technology. It refers to the equipment that

interacts with parts and components, typically at the end of a robotic arm. For example, the

welding torch on a robotic welding system.

EtherCAT (Ethernet for Control Automation Technology) is an Ethernet-based fieldbus system. It is

suitable for both hard and soft real-time computing requirements in automation technology.

Flange Flanges provide for a precise connection between the robot wrist and the torch system.

GRC General Robot Control

GUI Graphic User Interface

I/O Input/Output is the communication between an information processing system, i.e. a

computer and the outside world. I/O signals

IoT Internet of Things

MCS Machine Coordinate System. This is by default a Cartesian coordinate system.

Programming of movements are usually done here and therefore the axes X, Y, and Z are

used. The backward transformation is calculating the positions for the axes coordinate

system. The axes in MCS are pure software axes and of type simulation encoder.

* Origin of coordinate system fixed on the base

* Commonly used Cartesian coordinate system

* Usually the Word Coordinates system is the same as this coordinate system

NIC Network Interface Card

Parallel Robot See Delta Robot

Parallelograms A parallelogram is a simple (non-self-intersecting) quadrilateral with two pairs

of parallel sides.

PCS Product/Work Coordinate System

* Origin of coordinate system is determined by user

* Commonly used Cartesian coordinate system

PoE Power over Ethernet (PoE) is a networking feature defined by the IEEE 802.3af and

802.3at standards. PoE lets Ethernet cables supply power to network devices over the

existing data connection.

Robot Payload Robot payload is the weight a robot arm can lift. It includes the weight of the end of arm

tooling (EOAT). Maximum payload varies from robot to robot.

SCARA Robot Selective Compliance Assembly Robot Arm or Selective Compliance Articulated Robot

Arm.

Servo Drive A servo drive is a special electronic amplifier used to power electric servomechanisms. A

servo drive monitors the feedback signal from the servomechanism and continually adjusts

for deviation from expected behavior.

Work Envelope A three-dimensional shape that defines the boundaries that the robot manipulator can

reach; also known as reach envelope.