8. Peripheral
8.1. Gripper Peripheral Configuration
8.1.1. Gripper program teaching steps
Step1: In the “Initial - PerfApplication of welding coordinate systemipheral - End-tool” menu bar, click “Adapter device” to enter the terminal peripheral configuration interface.
Select “Gripper Device” for the device type. The configuration information of the gripper is divided into gripper manufacturer, gripper type, software version and mounting location. Specific production requirements to configure the corresponding jaw information. If the user needs to change the configuration, first select the corresponding gripper number, click the “Clear” button to clear the corresponding button, and reconfigure according to the needs;

Figure 8.1-1 Gripper Jaw Configuration
Important
The corresponding gripper should be inactive before clicking Clear Configuration.
Step2: After the gripper configuration is completed, the user can view the corresponding gripper information in the gripper information table at the bottom of the page. If configuration errors are found, click the “Reset” button to reconfigure the grippers;

Figure 8.1-2 Gripper configuration information
Step3: Select the configured gripper and click the “Reset” button. After the page pops up and the command is successfully sent, click the “Activate” button to check the activation status in the gripper information table to determine whether the activation is successful;
Important
When the gripper is activated, the gripper must not have a gripping object
Step4: Select the “Gripper” command in the program teaching command interface. In the gripper command interface, the user can select the number of the gripper to be controlled (the gripper that has been configured and activated), and set the corresponding opening and closing state, opening and closing speed, and the maximum opening and closing torque that have been waiting for the gripper to move. time. After completing the settings, click Add Application. Additionally, gripper activation and reset commands can be added to deactivate/reset the gripper while running a program.

Figure 8.1-3 Gripper Command Edit
8.1.2. Gripper program teaching
S/N |
Instruction format |
notes |
---|---|---|
1 |
PTP(template2,100,-1,0) |
#Waiting for pinch point |
2 |
PTP(template1,100,-1,0) |
#Pinch point |
3 |
MoveGripper(1,255,255,0,1000,0) |
#Clamping jaws closed |
4 |
PTP(template2,100, -1,0) |
/ |
5 |
PTP(template3,100, -1,0) |
#Waiting for placement point |
6 |
PTP(template3,100, -1,0) |
#Placement point |
7 |
MoveGripper(1,0,255,0,1000,0) |
#Clamping jaws open |
8.2. Lua terminal open protocol configuration
8.2.1. Overview
Lua open protocol supports force sensor, single gripper, multiple grippers, force sensors and grippers in conjunction with each other.
8.2.2. Procedure
Step1:Enter the Tool App -> System upgrade, select the terminal firmware.bin file to upgrade the terminal firmware.
Important
You need to first confirm whether the terminal firmware version FV2.010.06 and later software versions are compatible. If the version does not match, the corresponding software firmware is upgraded, otherwise there is no need to upgrade the firmware.
Before uploading the terminal firmware upgrade package, you need to enter the boot mode.

Figure 8.2-1 Upgrade terminal firmware
Step2:Go to Peripheral -> End-tool -> Open protocol -> Protocol configuration, select the Lua terminal open protocols to be uploaded, and perform the upload operation.
Important
Before uploading the terminal protocol, you need to enter the boot mode. At the same time, the file name needs to start with AXLE_LUA.

Figure 8.2-2 Upload Lua terminal open protocol
Step3:Configure the terminal communication parameters, including baud rate, data bit, stop bit, etc. After the configuration is completed, click the “Set” button.

Figure 8.2-3 Configure terminal communication parameters
The detailed parameters of terminal communication are as follows:
Baud rate: supports 1-9600, 2-14400, 3-19200, 4-38400, 5-56000, 6-67600, 7-115200, 8-128000; The terminal RS485 driver chip is a low-speed 485, and the baud rate cannot be >200k;
Data bits:Data bits support (8,9), currently 8 is commonly used;
Stop bits: 1-1, 2-0.5, 3-2, 4-1.5, currently commonly used =1;
Check bit: 0-None, 1-Odd, 2-Even, currently commonly used as 0;
Timeout: 1~1000ms, this value needs to be combined with the peripherals to set reasonable time parameters;
Number of timeouts: 1~10, mainly for timeout retransmission, reducing occasional exceptions and improving user experience;
Periodic instruction time interval: 1~1000ms, mainly used for the time interval between each issuance of periodic instructions;
Step4:To enable Lua at the end, click the “Enable” button.

Figure 8.2-4 Terminal Lua enabled
When an exception occurs in a Lua file, a warning “Lua file exception at the end” is displayed, and you can choose to “not recover/recover”. Turn off the Lua enable button and the warning prompt will be closed.

Figure 8.2-5 Lua file exception
When the gripper device type is selected.
Open “Condition monitoring”: The right gripper status bar displays the real-time status information of the gripper’s running speed, torque, position, etc.
Close “Condition monitoring”: The right gripper data status bar is closed.

Figure 8.2‑6 Condition monitoring
8.3. Terminal peripheral configuration
8.3.1. Force sensor equipment
Device type select Force sensor equipment -> Enable Force sensor equipment, the Force transducer is displayed in the configured device. Click to enter FT interface to query force sensor data.

Figure 8.3-1 Enable force sensor
8.3.2. Gripper equipment
Step1: Device Type Select Gripper equipment -> Enable Gripper -> Select Gripper ID -> Check the function code that the gripper is adapted to -> Click Configure, and the ID and function code of the gripper will be displayed in the configured device.

Figure 8.3-2 Configure gripper
Note
As the end open function currently supports the gripper device address range of 1~8, the gripper device address should be adjusted through the gripper manufacturer’s host computer before use.
The ticked function code should be checked through the product manual provided by the gripper manufacturer to check the function of the gripper adapted, and it should keep corresponding with the terminal Lua function code, please consult 《Terminal Lua Adaptation Gripper Instruction Manual》for details.
Step2: Select Gripper ID -> Reset -> Active, the gripper is initialized once, please refer to the product manual provided by the gripper manufacturer for specific initialization.

Figure 8.3-3 Activate the gripper
Step3: Go to Program -> coding -> Gripper -> Add gripper motion instruction.

Figure 8.3-4 Add gripper motion command

Figure 8.3-5 Example of gripper movement command
8.3.3. Multiple grippers
Refer to the Gripper step for activation and motion control.

Figure 8.3-6 Configure Multiple Grippers
Note
As the end open function currently supports the gripper device address range of 1~8, the gripper device address should be adjusted through the gripper manufacturer’s host computer before use.
8.3.4. Force sensors and grippers
Configure and enable the reference force sensor and gripper steps.

Figure 8.3-7 Configure force sensors and grippers
8.3.5. Rotary gripper
Step1:Device Type Select Gripper equipment -> Enable Gripper -> Select Gripper ID -> Check the function code that the gripper is adapted to -> Click Configure, and the ID and function code of the gripper will be displayed in the configured device.

Figure 8.3‑8 Configuration of grippers and function codes
Note
The ticked function code should be checked through the product manual provided by the gripper manufacturer to check the function of the gripper adapted, and it should keep corresponding with the terminal Lua function code, please consult 《FR05-end-full-peripheral-protocol-V2.5-20241101.xlsx》for details.
Step2:Select Gripper ID -> Reset -> Active, the gripper is initialized once, please refer to the product manual provided by the gripper manufacturer for specific initialization.

Figure 8.3‑9 Activate gripper
Step3:Go to Program -> coding -> Gripper -> Add gripper motion instruction.

Figure 8.3‑10 Adding rotary gripper motion command

Figure 8.3‑11 Example of rotary gripper motion command
Note
The number of revolutions is the absolute number of revolutions, the maximum number of forward revolutions is 90 revolutions, the maximum number of reverse revolutions is 90 revolutions, and reset processing is required after rotation.
8.4. Spray gun peripheral configuration
8.4.1. Spray gun peripheral configuration steps
Step1: In the “Initial - Peripheral” menu bar, click “Spray” to enter the spray gun configuration interface.
User can quickly configure the DO required for spraying through the one-key configuration button of the spraying function (the default configuration DO10 is spraying start and stop, and DO11 is spraying cleaning gun). Users can also customize DO according to their own needs in the “IO Configuration” interface;
Important
Before using the spraying function, it is necessary to establish the corresponding tool coordinate system first, and apply the established tool coordinate system during program teaching.
Step2: After the configuration is complete, click the four buttons “Start Spraying”, “Stop Spraying”, “Start Cleaning the Gun” and “Stop Cleaning the Gun” to debug the spray gun.

Figure 8.4-1 Gun Configuration
Step3: Select the “spray” command on the program teaching command interface. According to the specific program teaching requirements, add and apply four commands “start spraying”, “stop spraying”, “start cleaning the gun” and “stop cleaning the gun” in the corresponding places.

Figure 8.4-2 Spray Gun Command Editing
8.4.2. Spray program teaching
S/N |
Instruction format |
notes |
---|---|---|
1 |
Lin(template1,100,-1,0,0) |
#Start spraying point |
2 |
SprayStart() |
#Start painting |
3 |
Lin(template2,100,-1,0,0) |
#Spray path |
4 |
Lin(template3,100,-1,0,0) |
#Stop spraying point |
5 |
SprayStop() |
#Stop spraying |
6 |
Lin(template4,100,-1,0,0) |
#Gun cleaning point |
7 |
PowerCleanStart() |
#Start to clean the gun |
8 |
WaitTime(5000) |
#Cleaning time ms |
9 |
PowerCleanStop() |
#Stop gun cleaning |
8.5. Peripheral configuration of welding machine
The welding efficiency and welding quality can be significantly improved when welding with the cooperative robot. FAIRINO cooperative robot can control welding through two methods: “Controller IO” or “Digital communication protocol”:
Controller IO:The robot controls the welding current and welding voltage by setting the analog output (0-10V) of the control box, controls the welding arc starting, wire feeding and gas feeding through the digital output of the control box, and collects the signal inputs such as welding machine preparation and successful arc starting through the digital input of the control box.
Digital communication protocol:the robot communicates with PLC through UDP, and the PLC communicates with the welding machine through CANOpen bus or other protocols, so as to control the welding voltage and current, arc starting, wire feeding, gas feeding and other operations of the welding machine (see Annex 1 for the UDP communication protocol of the robot).
Welding control by cooperative robot mainly includes the following steps: ① welding gun installation and signal wiring;②parameter configuration of welding machine; ③Write welding control program.
8.5.1. Welding torch installation
As shown in Figure 1, the welding torch is installed at the end of the robot through the adapter plate, and the welding torch cable needs to be fixed on the mechanical arm.

Figure 8.5-1 The welding gun is installed at the end of the robot
After the welding gun is fixed and installed, the tool coordinate system of the welding gun need to be calibrated by the six-point method and applied as the current tool coordinate system (Figure 2). The calibration accuracy of the tool coordinate system of the welding gun will affect the actual welding accuracy.

Figure 8.5-2 Calibration and application of robot tool coordinate system
8.5.2. Welding machine parameter configuration
The cooperative robot can control the welding process through “Controller IO” signal or “Digital communication protocol”. There are two main differences between the two modes:
①When using “Controller IO”, it is necessary to set the corresponding relationship between the actual control welding current(voltage) and the analog output value of the control box;
②Communication parameters need to be configured when using Digital Communication Protocol.
8.5.2.1. “Controller IO” welding control configuration
In the “Initial - Peripheral” menu bar, click “Welder” to enter the welding machine configuration interface. As shown in figure below.

Figure 8.5-3 Open the welding machine configuration
As shown in Figure 4, select the control type as “Control I/O”.

Figure 8.5-4 Selecting Control Type
8.5.2.1.1. Welding function I/O configuration
As shown in Figure 5, select the welding machine status signal DI input port and the welding machine control signal DO output port, and click the “Set” button. The meanings of each signal are as follows:

Figure 8.5-5 Setting welding machine signal port
Welder preparation:when the welding machine is ready for welding operation, the welding machine outputs the signal to the robot.
When the welding machine is not ready for other reasons, the welding machine does not input the signal to the robot, and at this time, the upper right corner of the robot WebApp prompts “Welding machine is not ready” (Figure 6). If your welding machine does not have a ready signal, you can set this port to “None” (Figure 7).

Figure 8.5-6 The welding machine is not ready to report an error

Figure 8.5-7 The welding machine preparation is set to “None”
Arc start success:the arc-starting of the welding machine has been successful. After the robot outputs the arc-starting signal to the welding machine, it waits for the arc-starting success signal from the welding machine to be fed back. If the robot fails to detect the arc-starting success signal within the set timeout, the robot reports an “Arc sticking timeout” error (Figure 8).
When using the robot welding function, welding can still be carried out if the arc starting success signal is not configured, but the robot will report the warning of “Arc successful DI not configured” (Figure 9); If your welding machine has a successful arc starting signal output, we suggest that you configure this signal for safer welding.

Figure 8.5-8 Error in Timeout of Arc Starting

Figure 8.5-9 Successful arcing DI is not configured with warning
Welding interruption recovery:The welding interruption will be triggered when the arc is unexpectedly interrupted or the operator stops welding actively during the welding process of the robot. After the welding interruption, when the external input signal to the robot changes from invalid to effective, the robot will automatically resume welding from the original interrupted position.
Welding Interruption Exit:The welding interruption will be triggered when the arc is unexpectedly interrupted during the welding process of the robot or the operator suspends the welding actively. When the signal input from outside to the robot changes from invalid to effective after the welding interruption, the robot will stop the welding, and the welding cannot be resumed after the welding termination.
Welding starting Arc:the robot controls the DO output port of arc starting of welding machine. When the robot program executes the arc starting instruction, the DO output port corresponding to arc starting of welding machine is valid.
Gas detection:the robot controls the DO output port of the gas feeding of the welding machine. When the robot executes the welding gas feeding instruction, the DO output port corresponding to the gas feeding automatically outputs effectively.
Forward wire feeding: the robot controls the DO output port of the welding machine for forward wire feeding. When the robot executes the forward wire feeding instruction, the DO output port corresponding to the forward wire feeding is automatically output effectively.
Reverse wire feeding:the robot controls the DO output port of reverse wire feeding of the welding machine. When the robot executes the reverse wire feeding instruction, the corresponding DO output port automatically outputs effectively.
8.5.2.1.2. Configuration of welding process parameters
As shown in Figure 10, the column of “Welding process parameters” is found on the welding configuration page, and the cooperative robot provides 100 groups of welding process parameters from 0 to 99, in which process number 0 means that welding process curves are not used, and process numbers 1 to 99 use welding process curves.

Figure 8.5-10 Configuration of welding process parameters
When using the welding process curve, take welding process number 1 as an example, enter the parameters of “Arc starting current” to “Arc ending time” as shown in Figure 8, click the “Set” button, and the actual welding process represented by the process parameters is as follows:
①Set welding current 200A and voltage 23V;
②Arc starting and wait for arcing success;
③After successful arcing, the arc remains 500ms(arc starting time, the robot does not move);
④Set welding current 150A, welding voltage 21V, and then the robot starts to move and weld;
⑤After welding to the end point, set the welding current to 100A, welding voltage to 19V(arc ending current, arc ending voltage);
⑥After the arc current and voltage are set, keep the arc burning for 500ms (the robot does not move), and finally extinguish the arc.
When the welding process curve is not used, that is, when the welding process parameter number is 0, as shown in Figure 11, the welding process is as follows:
①Set the welding current and welding voltage;
②The robot controls the arc starting of the welding machine, and waits for the arc to succeed;
③ After the arc is successful, the robot begins to move and weld;
④The robot immediately extinguishes the arc after welding to the end point.

Figure 8.5-11 Do Not use welding process curve
8.5.2.1.3. Set the relationship diagram between welding current and voltage and analog output
When the welding control type of the cooperative robot is set to Controller IO, the welding current and welding voltage are controlled by controlling the output of the analog output of the control box (the output voltage of the analog output of the control box ranges from 0 to 10V). In this case, the linear mapping between the output value of the analog output of the control box and the actual welding current and welding voltage needs to be configured.
As shown in Figure 12, find “Welding current voltage linear relationship with output analog” on the welding machine configuration page, where “A-V” indicates the correspondence between welding current and output analog voltage of control box, and “V-V” indicates the correspondence between welding voltage and output analog voltage of control box.
Select “A-V”, input welding current range 0-1000A, analog output voltage 0-10V, output AO as “Ctrl-AO0” (welding current control analog output port is AO0), click “Configure” button; Under this parameter, when the output analog voltage of the control box is 1.5V, the corresponding welding current is 150A.

Figure 8.5-12 Welding current voltage linear relationship with output analog
As shown in Figure 13, click “V-V” to set the corresponding relationship between welding voltage and analog output voltage of the control box. The input welding voltage range is 0-60V, the output voltage value of analog is 0-10V, and the output AO is “Ctrl-AO1” (the output port of welding current control analog is AO0). Click “Configure” button. If the control box AO1 analog output 3.5V, the actual control welding voltage is 21V.

Figure 8.5-13 Welding voltage linear relationship with output analog
8.5.2.1.4. Welding machine commissioning
As shown in Figure 14, find “Welding machine commissioning” in the configuration page of the welding machine, select process number 1, enter the timeout time as 1000ms, click “Gas on”, the robot will control the welding machine to start conveying protective gas, click “Gas OFF” button, the robot will control the welding machine to stop conveying protective gas. Other buttons “Arc”, “Forward”, “Reverse” and other operation methods are the same, no more details.

Figure 8.5-14 Welding machine commissioning
8.5.2.2. Digital Communication Protocol welding control configuration
Robot welding control through “Digital communication protocol”, in essence, robot and PLC through UDP communication, the arc starting, wire feeding, gas feeding, current, voltage and other control data is transmitted to the PLC through UDP communication, and then the PLC side further through CANOpen bus (or other ways) to control the welding machine. At the same time, the PLC end collects the actual welding current and voltage, and feedbacks the arc success signal to the robot. (See Attachment 1 for the robot UDP communication protocol).
In the “Initial - Peripheral” menu bar, click “Welder” to enter the welding machine configuration interface. As shown in figure below.

Figure 8.5-15 Open welding config
As shown in Figure 16, the control type is selected as “Digital communication protocol”. Since the robot communicates with PLC through UDP, UDP communication parameters need to be configured. The meanings of each parameter are as follows:
IP address:IP address of PLC for UDP communication;
Port number:PLC UDP communication port number;
Communication cycle:the cycle of UDP communication between the robot and the PLC, the default is 2ms;
Packet loss detection cycle and Packet loss times:When the number of lost packets in the packet loss detection period exceeds the specified value, the robot reports an error message indicating UDP Packet loss Exception and automatically cuts off the communication.
Communication interruption confirmation time:the robot does not receive a complete PLC feedback packet within this period of time, which will report “UDP communication interruption” error alarm, and cut off UDP communication.
Automatic reconnection after power off and restart:Does the robot automatically reconnect and restore after detecting a power outage and restart;
Automatic reconnection after communication interruption:whether the robot automatically reconnects after detecting UDP communication interruption;
Reconnection period and Num of reconnections:After automatic reconnection of UDP communication interruption is enabled and UDP communication interruption is detected, the robot reconnects at the set period. When the reconnection times reach the maximum set value and the connection is not successful, the robot reports an error alarm of “UDP communication interruption” and disconnects the UDP communication at the same time.
After configuring the above parameters, click the “Configure” and “Load” buttons successively.

Figure 8.5-16 Select Digital communication protocol
8.5.2.2.1. Welding function I/O configuration
As shown in Figure 17, select the welding machine status signal DI input port and the welding machine control signal DO output port, and click the “Set” button. The meanings of each signal are as follows:

Figure 8.5-17 Welding function I/O configuration
Welder preparation:when the welding machine is ready for welding operation, the welding machine outputs the signal to the robot; When the welding machine is not ready for other reasons, the welding machine does not input the signal to the robot, and at this time, the upper right corner of the robot WebApp prompts “Welding machine is not ready” (Figure 6). If your welding machine does not have a ready signal, you can set this port to “None” (Figure 7).

Figure 8.5-18 The welding machine is not ready to report an error

Figure 8.5-19 The welding machine preparation is set to “None”
Arc start success:the arc-starting of the welding machine has been successful. After the robot outputs the arc-starting signal to the welding machine, it waits for the arc-starting success signal from the welding machine to be fed back. If the robot fails to detect the arc-starting success signal within the set timeout, the robot reports an “Arc sticking timeout” error (Figure 20);
When using the robot welding function, welding can still be carried out if the arc starting success signal is not configured, but the robot will report the warning of “Arc successful DI not configured” (Figure 9); If your welding machine has a successful arc starting signal output, we suggest that you configure this signal for safer welding.

Figure 8.5-20 Error in Timeout of Arc Starting

Figure 8.5-21 Successful arcing DI is not configured with warning
Welding interruption recovery:The welding interruption will be triggered when the arc is unexpectedly interrupted or the operator stops welding actively during the welding process of the robot. After the welding interruption, when the external input signal to the robot changes from invalid to effective, the robot will automatically resume welding from the original interrupted position.
Welding Interruption Exit:The welding interruption will be triggered when the arc is unexpectedly interrupted during the welding process of the robot or the operator suspends the welding actively. When the signal input from outside to the robot changes from invalid to effective after the welding interruption, the robot will stop the welding, and the welding cannot be resumed after the welding termination.
Welding starting Arc:the robot controls the DO output port of arc starting of welding machine. When the robot program executes the arc starting instruction, the DO output port corresponding to arc starting of welding machine is valid.
Gas detection: the robot controls the DO output port of the gas feeding of the welding machine. When the robot executes the welding gas feeding instruction, the DO output port corresponding to the gas feeding automatically outputs effectively.
Forward wire feeding: the robot controls the DO output port of the welding machine for forward wire feeding. When the robot executes the forward wire feeding instruction, the DO output port corresponding to the forward wire feeding is automatically output effectively.
Reverse wire feeding:the robot controls the DO output port of reverse wire feeding of the welding machine. When the robot executes the reverse wire feeding instruction, the corresponding DO output port automatically outputs effectively.
8.5.2.2.2. Configuration of welding process parameters
As shown in Figure 10, the column of “Welding process parameters” is found on the welding configuration page, and the cooperative robot provides 100 groups of welding process parameters from 0 to 99, in which process number 0 means that welding process curves are not used, and process numbers 1 to 99 use welding process curves.

Figure 8.5-22 Configuration of welding process parameters
When using the welding process curve, take welding process number 1 as an example, enter the parameters of “Arc starting current” to “Arc ending time” as shown in Figure 8, click the “Set” button, and the actual welding process represented by the process parameters is as follows:
①Set welding current 200A and voltage 23V;
②Arc starting and wait for arcing success;
③After successful arcing, the arc remains 500ms(arc starting time, the robot does not move);
④Set welding current 150A, welding voltage 21V, and then the robot starts to move and weld;
⑤After welding to the end point, set the welding current to 100A, welding voltage to 19V(arc ending current, arc ending voltage);
⑥After the arc current and voltage are set, keep the arc burning for 500ms (the robot does not move), and finally extinguish the arc.
When the welding process curve is not used, that is, when the welding process parameter number is 0, as shown in Figure 11, the welding process is as follows:
①Set the welding current and welding voltage;
②The robot controls the arc starting of the welding machine, and waits for the arc to succeed;
③After the arc is successful, the robot begins to move and weld;
④The robot immediately extinguishes the arc after welding to the end point.

Figure 8.5-23 Do Not use welding process curve
8.5.2.2.3. Welding machine commissioning
As shown in Figure 14, find “Welding machine commissioning” in the configuration page of the welding machine, select process number 1, enter the timeout time as 1000ms, click “Gas on”, the robot will control the welding machine to start conveying protective gas, click “Gas OFF” button, the robot will control the welding machine to stop conveying protective gas. Other buttons “Arc”, “Forward”, “Reverse” and other operation methods are the same.

Figure 8.5-24 Welding machine commissioning
8.5.3. Welding programming
8.5.3.1. Programmed using welding process curves
When selecting the welding process curve (selecting the welding process parameter number 1-99), the voltage and current control during the welding process follows the curve parameter set by a certain process parameter number, and there is no need to add commands to set the welding voltage and current. As shown in Figure 25, click “Teaching” and “Program teaching” to create a new user program “testWeld.lua”.

Figure 8.5-25 Create”testWeld.lua”program
As shown in Figure 26, select “Welding command”.

Figure 8.5-26 Select”Welding command”
As shown in Figure 27, click “Welding” to open the page for adding welding command.

Figure 8.5-27 Click“Weld”
As shown in Figure 28, select the control type as “Controller I/O” (according to the actual configuration of the welding control mode) in the open welding instruction add page, select the welding process number as 1(process number 0 does not use the welding process curve, process number 1-99 uses the welding process curve), and the maximum waiting time is 10000ms. Click the “arc” button and the “arc” button in turn, and finally click “Apply”.

Figure 8.5-28 Add welding commands
As shown in Figure 29, at this time, arc starting and arc ending command for welding have been added in the “testWeld.lua” program. Since welding process curve number 1 is selected for arc starting and arc closing, the voltage and current control in the welding process follows the curve parameters set in process number 1, and there is no need to add commands for setting welding voltage and current.

Figure 8.5-29 Arc start end program
As shown in Figure 30, two linear motion command are added, and the order of command is adjusted, so that the robot first moves to the “P1” point, performs arcing, and then moves to the “P2” point, performs arcing, and realizes the robot welding from the “P1” point to the “P2” point.

Figure 8.5-30 Robot welding from “P1” to “P2”
8.5.3.2. Welding program without the use of welding process curves
If you choose not to use the welding process curve (that is, select the welding process parameter number 0), the welding program needs to add command to set welding voltage and current to control the actual welding parameters. As shown in Figure 31, click “Teaching” and “Program teaching” to create a new user program “testWeld.lua”.

Figure 8.5-31 Create“testWeld.lua”program
As shown in Figure 32, select “Welding command”.

Figure 8.5-32 Select“Welding command”
As shown in Figure 33, click “Welding” to open the page for adding welding command.

Figure 8.5-33 Click“Weld”
As shown in Figure 34, in the open welding instruction add page, select the control type as “Controller I/O” (according to the actual configuration of the welding control mode), select the welding process number as 0(process number 0 does not use the welding process curve, process number 1-99 uses the welding process curve), and set the welding current control AO to “Ctrl-AO0”. The welding current is 150A, click “Add” button; Set welding voltage control AO to “Ctrl-AO1”, welding voltage to 21V, click “Add” button; Set the maximum waiting time to 10000ms, click the “arc” button and “arc” button in turn, and finally click “Apply”.

Figure 8.5-34 Add welding commands
As shown in Figure 35, at this time, welding arc starting and welding arc closing command have been added in the “testWeld.lua” program. Since welding process number 0 is selected for welding arc starting and closing command, when the program is executed to set welding voltage and current command, The robot will automatically output the corresponding analog quantity of the control box according to the set welding voltage and current values and the “corresponding relationship between welding voltage, current and output analog quantity” set in the welder configuration page.

Figure 8.5-35 robot welding program set current and voltage
As shown in Figure 36, add two linear motion command, and adjust the order of command, so that the robot first moves to the “P1” point and arc starting, and then moves to the “P2” point and arc ending, so that the robot can weld from the “P1” point to the “P2” point.

Figure 8.5-36 robot weld from the “P1” point to the “P2” point
Before running the program, please check:
① whether the welding gun has been correctly installed, whether the welding gun tool coordinate system has been calibrated, and applied to the current tool coordinate system;
② Whether the welding power supply, gas and wire work normally;
③ Whether the signal lines between the robot and the welding machine are connected.
8.5.4. Welding interruption and recovery
Interruptions may occur during robot welding under the following conditions:
①The operator actively suspends the welding to observe the actual welding situation or clean the nozzle and other operations;
②Accidental interruption of welding arc;
③The collision of the robot leads to the suspension of welding;
When an interruption occurs during the robot welding process, the operator can switch the robot to manual mode, drag the robot to a safe position, and deal with the cause of the interruption.
After the problem is solved, the cobot can automatically move from the current position to the position where the welding interruption occurs to restart the arc and resume the welding. The specific operation process is as follows:
①Configuration of welding interruption recovery parameters;
②Perform the welding procedure and suspend the welding during the welding process to interrupt the welding;
③Switch the robot to manual mode, and deal with related problems, and then switch the robot to automatic mode after the processing is completed;
④Click the “Resume welding” button, and the robot will automatically resume welding.
8.5.4.1. Welding interrupt and resume parameter configuration
As shown in Figure 37, in the “Initial - Peripheral” menu bar, click “Welder” to enter the welding machine configuration interface, find the “Detection arc interruption parameter configuration” column, open “Enable”, enter “Confirmation time” as 20ms, and click “Configuration” button, that is, when the invalid signal of arc starting success exceeds 20ms during the welding process, the robot will report “welding arc interruption” error; Find the “Welding interrupt and Resume parameter configuration” column, open “Enable”, enter “Overlap distance” as 5mm, “Speed” as 10%, “Motion mode” as “PTP”, and click “Configure” button. The above three parameters are explained as follows:
Overlap distance:In order to ensure the continuity of the weld after recovery and the weld before interruption, the arc point of the recovery welding needs to have a certain overlap distance with the original weld.
Speed:After welding interruption, it is often necessary to move the robot to a safe position and process the weld. When welding recovery is performed after processing is completed, the robot will move from the current position to the welding rearc point. The “speed” means the speed at which the robot moves to the rearc point.
Motion mode:After welding interruption, it is often necessary to move the robot to a safe position and process the weld. When welding recovery is performed after processing is completed, the robot will move from the current position to the welding rearc point. The “motion mode” means the movement mode of the robot to the rearc point, and there are two options: “LIN” and “PTP”.

Figure 8.5-37 Welding interrupt and Resume parameter configuration
8.5.4.2. Usage of welding interrupt and resume parameter configuration
Take the program in Figure 38 as an example, switch the robot to the automatic mode, click the start button, and the robot will start welding. During the welding process, click the pause button, and the welding will be interrupted. A prompt box for resuming welding interruption will pop up in the upper right corner of the WebApp (Figure 39), and click the “Resume Welding” button, and the robot will automatically move to the arc restart point and perform the subsequent welding operation.

Figure 8.5-38 Performing the welding procedure

Figure 8.5-39 Welding recovery
Warning
The collaborative robot welding interruption recovery function can only be used for straight line welds or arc welds. When using the while (1) loop welding, nested multi-layer while loops are not supported, and conditional judgment statements containing local variables cannot be included. If the segment welding function is used, please pay attention to adding a feedback segment welding information interface.
8.5.5. Appendix 1: UDP communication protocol for robots
Warning
1)CRC check method: Modbus 16 check is used, but only the lower 8 bits are taken for check. Check data area D100-D176,D200-D273.
2)Arc tracking: The actual current feedback is to convert the actual current of the welding machine obtained by the PLC into an analog quantity of 0-4095 and transmit it to the analog quantity channel 0 of the UDP data protocol, namely D168.
3)Speed conversion logic: The robot sends the speed (unit mm/s) V÷lead×60=V’;
PLC converts the robot’s speed to V’×encoder resolution÷60=V” unit (pulse/s).
8.5.5.1. Robot controller -> PLC
Serial number |
Register address |
Data type |
Data value |
Variable name |
---|---|---|---|---|
1 |
D199 |
INT |
0x5A5A |
Frame header |
2 |
D200 |
INT |
1#Motor control word |
|
3 |
D201 |
DINT |
1#Target position input |
|
4 |
D202 |
DINT |
1#Target position input |
|
5 |
D203 |
INT |
1#Return to Zero Control Word |
|
6 |
D204 |
DINT |
1#Return to Zero High Speed Input |
|
7 |
D205 |
DINT |
1#Return to Zero High Speed Input |
|
8 |
D206 |
DINT |
1#Return to Zero Low Speed Input |
|
9 |
D207 |
DINT |
1#Return to Zero Low Speed Input |
|
10 |
D208 |
DINT |
1#Position offset (reserved) |
|
11 |
D209 |
DINT |
1#Position offset (reserved) |
|
12 |
D210 |
DINT |
1#Speed Offset (Reserved) |
|
13 |
D211 |
DINT |
1#Speed Offset (Reserved) |
|
14 |
D212 |
DINT |
1#Torque Offset (Reserved) |
|
15 |
D213 |
DINT |
1#Torque Offset (Reserved) |
|
16 |
D214 |
INT |
2#Motor control word |
|
17 |
D215 |
DINT |
2#Target position input |
|
18 |
D216 |
DINT |
2#Target position input |
|
19 |
D217 |
INT |
2#Return to Zero Control Word |
|
20 |
D218 |
DINT |
2#Return to Zero High Speed Input |
|
21 |
D219 |
DINT |
2#Return to Zero High Speed Input |
|
22 |
D220 |
DINT |
2#Return to Zero Low Speed Input |
|
23 |
D221 |
DINT |
2#Return to Zero Low Speed Input |
|
24 |
D222 |
DINT |
2#Position offset (reserved) |
|
25 |
D223 |
DINT |
2#Position offset (reserved) |
|
26 |
D224 |
DINT |
2#Speed Offset (Reserved) |
|
27 |
D225 |
DINT |
2#Speed Offset (Reserved) |
|
28 |
D226 |
DINT |
2#Torque Offset (Reserved) |
|
29 |
D227 |
DINT |
2#Torque Offset (Reserved) |
|
30 |
D228 |
INT |
3#Motor control word |
|
31 |
D229 |
DINT |
3#Target position input |
|
32 |
D230 |
DINT |
3#Target position input |
|
33 |
D231 |
INT |
3#Return to Zero Control Word |
|
34 |
D232 |
DINT |
3#Return to Zero High Speed Input |
|
35 |
D233 |
DINT |
3#Return to Zero High Speed Input |
|
36 |
D234 |
DINT |
3#Return to Zero Low Speed Input |
|
37 |
D235 |
DINT |
3#Return to Zero Low Speed Input |
|
38 |
D236 |
DINT |
3#Position offset (reserved) |
|
39 |
D237 |
DINT |
3#Position offset (reserved) |
|
40 |
D238 |
DINT |
3#Speed Offset (Reserved) |
|
41 |
D239 |
DINT |
3#Speed Offset (Reserved) |
|
42 |
D240 |
DINT |
3#Torque Offset (Reserved) |
|
43 |
D241 |
DINT |
3#Torque Offset (Reserved) |
|
44 |
D242 |
INT |
4#Motor control word |
|
45 |
D243 |
DINT |
4#Target position input |
|
46 |
D244 |
DINT |
4#Target position input |
|
47 |
D245 |
INT |
4#Return to Zero Control Word |
|
48 |
D246 |
DINT |
4#Return to Zero High Speed Input |
|
49 |
D247 |
DINT |
4#Return to Zero High Speed Input |
|
50 |
D248 |
DINT |
4#Return to Zero Low Speed Input |
|
51 |
D249 |
DINT |
4#Return to Zero Low Speed Input |
|
52 |
D250 |
DINT |
4#Position offset (reserved) |
|
53 |
D251 |
DINT |
4#Position offset (reserved) |
|
54 |
D252 |
DINT |
4#Speed Offset (Reserved) |
|
55 |
D253 |
DINT |
4#Speed Offset (Reserved) |
|
56 |
D254 |
INT |
Reserved |
|
57 |
D255 |
INT |
Welding mode setting (0-DC standard, 1-Pulse standard, 2-JOB mode, 3-Local control mode, 4-Separate mode, 5-CC/CV, 6-TIG, 7-CMT mode) |
|
58 |
D256 |
INT |
General output DO(0-15) |
|
59 |
D257 |
INT |
General output DO(16-31) |
|
60 |
D258 |
INT |
General output DO(32-47) |
|
61 |
D259 |
INT |
General output DO(48-63) |
|
62 |
D260 |
INT |
General output DO(64-79) |
|
63 |
D261 |
INT |
General output DO(80-95) |
|
64 |
D262 |
INT |
High speed output DO(96-111) |
|
65 |
D263 |
INT |
High speed output DO(112-127) |
|
66 |
D264 |
INT |
Analog output AO0 |
|
67 |
D265 |
INT |
Analog output AO1 |
|
68 |
D266 |
INT |
Analog output AO2 |
|
69 |
D267 |
INT |
Analog output AO3 |
|
70 |
D268 |
REAL |
Welding voltage |
|
71 |
D269 |
REAL |
Welding voltage |
|
72 |
D270 |
REAL |
Welding current |
|
73 |
D271 |
REAL |
Welding current |
|
74 |
D272 |
REAL |
Packet loss detection period |
|
75 |
D273 |
INT |
Number of packet loss |
|
76 |
D274 |
INT |
Frame Count (0-255) |
|
77 |
D275 |
INT |
CRC check code |
8.5.5.2. PLC -> robot controller
Serial number |
Register address |
Data type |
Data value |
Variable name |
---|---|---|---|---|
1 |
D99 |
INT |
0x5A5A |
Frame header |
2 |
D100 |
INT |
1#Motor status word |
|
3 |
D101 |
DINT |
1#Current position |
|
4 |
D102 |
DINT |
1#Current position |
|
5 |
D103 |
INT |
1#Return to zero status word |
|
6 |
D104 |
DINT |
1#Return to Zero High Speed Feedback |
|
7 |
D105 |
DINT |
1#Return to Zero High Speed Feedback |
|
8 |
D106 |
DINT |
1#Return to Zero Low Speed Feedback |
|
9 |
D107 |
DINT |
1#Return to Zero Low Speed Feedback |
|
10 |
D108 |
INT |
1#Fault code |
|
11 |
D109 |
DINT |
1#Servo deviation (reserved) |
|
12 |
D110 |
DINT |
1#Servo deviation (reserved) |
|
13 |
D111 |
DINT |
1#Speed feedback (reserved) |
|
14 |
D112 |
DINT |
1#Speed feedback (reserved) |
|
15 |
D113 |
DINT |
1#Real-time Torque (Reserved) |
|
16 |
D114 |
DINT |
1#Real-time Torque (Reserved) |
|
17 |
D115 |
INT |
2#Motor status word |
|
18 |
D116 |
DINT |
2#Current position |
|
19 |
D117 |
DINT |
2#Current position |
|
20 |
D118 |
INT |
2#Return to zero status word |
|
21 |
D119 |
DINT |
2#Return to Zero High Speed Feedback |
|
22 |
D120 |
DINT |
2#Return to Zero High Speed Feedback |
|
23 |
D121 |
DINT |
2#Return to Zero Low Speed Feedback |
|
24 |
D122 |
DINT |
2#Return to Zero Low Speed Feedback |
|
25 |
D123 |
INT |
2#Fault code |
|
26 |
D124 |
DINT |
2#Servo deviation (reserved) |
|
27 |
D125 |
DINT |
2#Servo deviation (reserved) |
|
28 |
D126 |
DINT |
2#Speed feedback (reserved) |
|
29 |
D127 |
DINT |
2#Speed feedback (reserved) |
|
30 |
D128 |
DINT |
2#Real-time Torque (Reserved) |
|
31 |
D129 |
DINT |
2#Real-time Torque (Reserved) |
|
32 |
D130 |
INT |
3#Motor status word |
|
33 |
D131 |
DINT |
3#Current position |
|
34 |
D132 |
DINT |
3#Current position |
|
35 |
D133 |
INT |
3#Return to zero status word |
|
36 |
D134 |
DINT |
3#Return to Zero High Speed Feedback |
|
37 |
D135 |
DINT |
3#Return to Zero High Speed Feedback |
|
38 |
D136 |
DINT |
3#Return to Zero Low Speed Feedback |
|
39 |
D137 |
DINT |
3#Return to Zero Low Speed Feedback |
|
40 |
D138 |
DINT |
3#Fault code |
|
41 |
D139 |
DINT |
3#Servo deviation (reserved) |
|
42 |
D140 |
DINT |
3#Servo deviation (reserved) |
|
43 |
D141 |
DINT |
3#Speed feedback (reserved) |
|
44 |
D142 |
DINT |
3#Speed feedback (reserved) |
|
45 |
D143 |
DINT |
3#Real-time Torque (Reserved) |
|
46 |
D144 |
DINT |
3#Real-time Torque (Reserved) |
|
47 |
D145 |
INT |
4#Motor status word |
|
48 |
D146 |
DINT |
4#Current position |
|
49 |
D147 |
DINT |
4#Current position |
|
50 |
D148 |
INT |
4#Return to zero status word |
|
51 |
D149 |
DINT |
4#Return to Zero High Speed Feedback |
|
52 |
D150 |
DINT |
4#Return to Zero High Speed Feedback |
|
53 |
D151 |
DINT |
4#Return to Zero Low Speed Feedback |
|
54 |
D152 |
DINT |
4#Return to Zero Low Speed Feedback |
|
55 |
D153 |
DINT |
4#Fault code |
|
56 |
D154 |
DINT |
4#Servo deviation (reserved) |
|
57 |
D155 |
DINT |
4#Servo deviation (reserved) |
|
58 |
D156 |
DINT |
4#Speed feedback (reserved) |
|
59 |
D157 |
DINT |
4#Speed feedback (reserved) |
|
60 |
D158 |
DINT |
Real-time Torque (Reserved) |
|
61 |
D159 |
DINT |
Real-time Torque (Reserved) |
|
62 |
D160 |
INT |
General input DI(0-15) |
|
63 |
D161 |
INT |
General input DI(16-31) |
|
64 |
D162 |
INT |
General input DI(32-47) |
|
65 |
D163 |
INT |
General input DI(48-63) |
|
66 |
D164 |
INT |
General input DI(64-79) |
|
67 |
D165 |
INT |
General input DI(80-95) |
|
68 |
D166 |
INT |
General input DI(96-111) |
|
69 |
D167 |
INT |
General input DI(112-127) |
|
70 |
D168 |
INT |
Analog AI0 |
|
71 |
D169 |
INT |
Analog AI1 |
|
72 |
D170 |
INT |
Analog AI2 |
|
73 |
D171 |
INT |
Analog AI3 |
|
74 |
D172 |
REAL |
Actual weld current feedback |
|
75 |
D173 |
REAL |
Actual weld current feedback |
|
76 |
D174 |
REAL |
Actual weld voltage feedback |
|
77 |
D175 |
REAL |
Actual weld voltage feedback |
|
78 |
D176 |
INT |
Fault code 0- no fault, 1- data packet loss |
|
79 |
D177 |
INT |
Frame count |
|
80 |
D178 |
INT |
CRC check code |
8.6. Sensor Peripheral Configuration
The FR cooperative robot is used in cooperation with the laser sensor, and the sensor can identify the characteristic positions such as welding seam to simplify programming and improve production efficiency. The cooperative robot can adapt to the laser sensors of Ruiniu, Chuangxiang and Quanshi, and only need to load the corresponding communication protocol when using different sensors.
8.6.1. Hardware wiring
Before using the laser sensor, it is necessary to install the laser sensor in a suitable position, and connect the network cable of the laser sensor directly or through a switch to any RJ45 interface of the robot control box.
8.6.2. Sensor configuration
Please make sure that your laser sensor and welding torch have been fixedly installed at the end of the robot, the laser sensor has been connected with the robot control box through a network cable, and the IP address of the laser sensor and the robot control box is in the same network segment. Turn on the power supply of the robot and the sensor. The figure below shows the installation of Ruiniu laser sensor.

Figure 8.6-1 Installation of laser sensor
As shown in the figure, in “Initial - Peripheral - Tracking”, click “Sensor”, enter the IP address and port number of the sensor in the communication configuration column, click the Configure button, the default sampling period is 25, and the coordinate system is “LXLYLZ”. Select the corresponding communication protocol according to your sensor model, and click the Load button.

Figure 8.6-2 Laser sensor configuration
As shown in the figure, find the “Tracking Sensor Test” column in the “Sensor Tracking” page, and click “Open sensor” and “Close sensor” in turn to observe whether the laser of the sensor is turned on or off. If the laser is turned on or off normally, it means that the communication between the robot and the sensor has been established normally. Otherwise, please check whether the parameters such as IP address and port number are correct, and whether the sensor is connected to the robot network correctly.

Figure 8.6-3 Communication test of laser sensor
8.6.3. Sensor calibration
It is necessary to calibrate the laser sensor before using it, and the calibration accuracy directly affects the tracking accuracy of the laser sensor. There are five-point method, six-point method and eight-point method for laser sensor calibration. Take the most commonly used five-point method in welding application scene as an example. Its calibration principle is to point to a fixed calibration point through a tool (welding torch), and then illuminate and identify the point from four different postures through the laser sensor.
Note
Please note: the calibration point must be accurately identified by the laser sensor, otherwise it cannot be accurately calibrated.
And then calculate the coordinate posture of the sensor, as follows.

Figure 8.6-4 Calibration point of laser sensor
Step1: Open the robot WebApp, Click “Initial - Base - Coordinates” in sequence, and click “TCP” to enter the tool coordinate system interface, select an unused tool coordinate system, and clickto change its name to “Welding “, tool type to “tool” and installation location to “end”, as shown in the figures.

Figure 8.6-5 Setting “Welding Coordinate System”

Figure 8.6-6 Setting the coordinate system of “Welding”
As shown in the figure, select an unused coordinate system again, change its name to “LaserSensor”, select the tool type as “sensor” and the installation location as “end”.

Figure 8.6-7 Setting the coordinate system of “laser sensor”
Step2: Calibrate the tool coordinate system of the welding torch by six-point method: select the “Welding” coordinate system, click the modify button, and calibrate the tool coordinate system of the welding torch by six-point method (refer to the FR document for the specific calibration method, which will not be repeated here).

Figure 8.6-8 “Welding” coordinate system calibration 1

Figure 8.6-9 “Welding” coordinate system calibration 2
Step3: As shown in the figure, in Tool Coordinate System Settings, select No.0 coordinate system (base coordinate system), and the default name is “toolcoord0”, and click “Apply” to switch the current coordinate system to the base coordinate system.

Figure 8.6-10 Sensor calibration step 1
Step4: As shown in the figure, select the previously set coordinate system of “LaserSensor” again (don’t click “Apply”), click the “Modify” button, select the tool type as “Sensor”, fix the sensor at the robot end, and select “Five Points Method” in the modification wizard.

Figure 8.6-11 Sensor Calibration Step 2
Step5: Drag the robot to aim the tip of the welding torch at the calibration point, select the coordinate system of “Welding”, click “Apply” and click “Set point 1”, as shown in the figure.

Figure 8.6-12 Sensor Calibration Step 3

Figure 8.6-13 Sensor Calibration Step 4
Step6: Select coordinate system No.0 again (“toolcoord0”) and click Apply; Then select the “Sensor” coordinate system (don’t click “Apply”) and click “Modify” to continue the calibration.

Figure 8.6-14 Sensor Calibration 5

Figure 8.6-15 Sensor Calibration 6
Step7: Move the position of the laser sensor so that the laser just scans to the calibration point, and click “Set Point 2”; At this time, the current sensor data will be displayed at the position corresponding to the serial number of the sensor output value on the left. If the data is normal, it means that the current calibration point is successful, otherwise it needs to be calibrated again.

Figure 8.6-16 Sensor Calibration 7

Figure 8.6-17 Sensor Calibration 8

Figure 8.6-18 Sensor Calibration 9
Step8: Make the laser irradiate the calibration points from three different postures in turn, and click “Setpoint 3”, “Setpoint 4” and “Setpoint 5” respectively, and finally click the “Calculate” button under the condition that the data of each point is normal.

Figure 8.6-19 Sensor Calibration 10
Step9: At this time, the calibration result and precision of the sensor are displayed on the WebApp, and click the “Apply” button to complete the calibration of the laser sensor. If the calibration accuracy is too poor, you can choose to click the “Cancel” button and calibrate again.

Figure 8.6-20 sensor calibration accuracy
8.6.4. laser sensor application

Figure 8.6-21 Application of welding coordinate system
Before using the laser sensor, apply the “Welding” tool coordinate system to the current tool coordinate system.
8.6.4.1. Laser sensor teaching point
As shown in the figure, drag the robot to make the laser sensor light point to the weld point to be taught. As shown in the figure, select the sensor as “Laser Sensor” in the WebApp, enter the sensor name as “laserPt”, and click the “Add” button. Create a new user program “testLaser.lua”, create a motion command LIN, select “laserPt” as the target point, and execute the command in one step. At this time, the welding torch will move to the pointing point of the previous laser sensor.

Figure 8.6-22 Laser Sensing Weld Point

Figure 8.6-23 Teaching sensor points

Figure 8.6-24 The welding points to the weld point
8.6.4.2. Laser Positioning+Tracking
It takes several steps for the cooperative robot to cooperate with the laser sensor to complete the laser positioning+laser tracking function:
The robot moves to a certain point outside the weld;
Laser positioning is started, and the robot carries the laser sensor to move to the weld position;
The laser sensor recognizes the weld, and the robot drives the welding torch to move to the weld recognition point;
Laser tracking starts, and at the same time, the robot moves to the end of the weld, and the laser sensor records the position in real time during the movement;
The welding torch moves along the position recorded by the laser sensor to realize the tracking effect.
Before positioning, tracking and debugging, please ensure that the sensor has been installed correctly, the coordinate system of the “welding” tool has been calibrated correctly, and the laser sensor has been calibrated correctly. As shown in the figure, assuming that the green straight line in the figure is the weld to be welded, the robot can automatically find the welding starting point A and weld to the point B, and the following commands need to be written:

Figure 8.6-25 Sensor Installation
8.6.4.2.1. Write the positioning command
As shown in the figure, create a new user program “laserTrack.lua” and select “welding command”.

Figure 8.6-26 Add location command
As shown in the figure, click “Laser” to pop up the laser tracking command adding page.

Figure 8.6-27 Laser tracking command
As shown in Figure 28, find the “Location command”, select the coordinate system as “LaserSensor”, and select “+x” as the direction to indicate that the robot is searching for the weld while moving with the laser sensor along the “+x” direction of the coordinate system of “Welding” from the current position, and “speed” is the moving speed of laser sensor seeking, and the length is the maximum seeking length of laser sensor, and the robot will report when the robot fails to find the weld when the seeking distance exceeds this length. Please enter the above parameters correctly according to the actual scene. Click the “Start locating” and “End locating” commands in turn, and click the “Apply” button.

Figure 8.6-28 Add loaction command
At this time, the corresponding commands for the start and end of laser positioning will be added in “laserTrack.lua”.

Figure 8.6-29 Locating procedure
8.6.4.2.2. Write the command of moving to seek position
Add LIN command of point-to-point motion, as shown in the figure, the target point is seamPos, that is, the laser sensor seeking point.
Note
Please note: seamPos point is the name of the point in the robot system dedicated to laser sensor seeking, so it is not necessary to teach this point, and the laser sensor will automatically store the seeking point information in seamPos point after seeking.
And the seeking point can be set with offset, and the offset type can be selected from “Base coordinate offset” and “tool coordinate offset”.

Figure 8.6-30 Locating Offset Option
As shown in the figure, when the seek offset function is enabled, the offset parameters can be set, where “dx” represents the offset distance along the X direction of the selected coordinate system and “drx” represents the rotation angle along the X axis of the selected coordinate system. Click the “Add” button and click the “Apply” button.

Figure 8.6-31 Setting of locating offset parameters
At this time, the command to move to the seeking point will be added in “testTrack.lua”, as shown in the figure.

Figure 8.6-32 Locating offset procedure
8.6.4.2.3. Writing laser tracking commands
Open the “Laser” command adding page again, as shown in the figure.

Figure 8.6-33 Laser Tracking
As shown in the figure, click the “Start Tracking” and “Stop Tracking” buttons in the “Laser Tracking” command addition page, and finally click the “Apply” button at the bottom of the page.

Figure 8.6-34 Start and Stop of Laser Tracking
The user program “testTrack.lua” at this time is shown in the figure:

Figure 8.6-35 Laser tracking program
8.6.4.2.4. Write commands for finding the starting point and tracking the ending point
Before laser positioning begins, it is necessary to specify a positioning starting point. The robot moves to the positioning starting point first, and then performs positioning along a certain direction and speed. As shown in the figure, the positioning starting point “seamStartPt” is taught near the point A where the laser sensor light is close to the starting point of the weld, and attention should be paid to matching the positioning starting point and the positioning direction to ensure that the robot can find the weld position within the set distance and the maximum positioning time.

Figure 8.6-36 Locating starting point
As shown in the figure, the tracking end point “trackEndpt” is taught at the weld end.

Figure 8.6-37 Finding the End Point
Add the above two points to the “testTrack.lua” user program, and the final user program is as follows:

Figure 8.6-38 Location tracking program
8.6.4.3. Laser Track Recording+Track Reproduction
The workflow of laser track recording+track reproduction is as follows:
A robot carries a laser sensor to move along a welding seam for a section of trajectory, and the laser sensor records the welding seam position trajectory data in real time during the movement;
After the trajectory recording is completed, the robot moves to the starting point of trajectory recording;
The robot performs trajectory reproduction along the trajectory recorded by the laser sensor.
8.6.4.3.1. Programming of Robot Trajectory Recording commands
Create a new user program “testRecord.lua”, click “LT-Rec” to open the laser recording command addition page, and find the “weld data record”, as shown in the figure. Select “Start recording”, click “Add” button, and select “Stop recording”, and click “Add” button again; Finally click the “Apply” button.

Figure 8.6-40 Laser recording

Figure 8.6-41 Start recording and stop recording
At this time, the track recording start and stop commands appear on the page.

Figure 8.6-42 Trajectory recording program
As shown in the figure, assuming that the green line segment AB in the figure is a weld, the laser is irradiated to the weld starting point A and the weld interruption B respectively, and the starting point “recordStartPt” and the ending point “recordendpt” of trajectory recording are taught.


Figure 8.6-43 Starting point and ending point of trajectory recording
Add two linear movement commands to “testRecord.lua”, namely, the starting point “recordStartPt” and the ending point “recordEndPt” when moving to the trajectory, and adjust the command positions to make the robot do the following operations: first move to the “recordStartPt” point, start the trajectory recording, and then move the robot to the “recordEndPt” point and stop the trajectory recording.

Figure 8.6-44 Trajectory recording program
8.6.4.3.2. Programming the command of the robot moving to the starting point of trajectory recording
As shown in the figure, click “LT-Rec” to open the page for adding laser recording commands, find the column of “Move to Weld Point”, select PTP as the motion mode, enter a certain motion speed, click “Movement to Starting Point” and click “Apply”.

Figure 8.6-45 Movement to the starting point of trajectory
At this time, the user program of “testRecord.lua” is as follows:

Figure 8.6-46 Program of Moving to the Starting Point of Trajectory
8.6.4.3.3. Compilation of Laser Sensor Track Reproduction command
Click “LT-Rec” to open the laser recording command addition page, and find “Weld Data Record”, as shown in the figure, select “Track reappearan”, click “Add” button, click “Laser Tracking” button, and finally click “Apply” button.

Figure 8.6-47 Trajectory Reproduction
The program after adding is as follows:

Figure 8.6-48 Trajectory Reproduction Program
8.6.4.3.5. Laser Sensor Adapter Controller Peripheral Open Protocol (Only for Linux Systems)
Step1: If you need to use “Open Protocol Connection” and “Control Laser Sensor”, in the sensor tracking configuration, select “Controller Open Protocol” for the “Protocol Type” option. If the original solution is adopted, select “Adapted Laser Device”, and configure the laser peripheral in the tracking sensor interface.

Figure 8.6‑50 “Open Protocol Connection” and “Control Laser Sensor” Configuration Interface
Step2: Then, in “Initial Settings” -> “Peripherals” -> “Control Box” -> “Peripheral Open Protocol”, upload the corresponding laser sensor’s peripheral open protocol. After successful upload, select the protocol number and the uploaded file name, click configure, and run the uploaded laser sensor in the device operation and status to establish a connection with the corresponding laser sensor.

Figure 8.6‑51 Laser Sensor Connection Established
8.7. Laser point picking motion function
During the welding process, the laser point taking motion can be configured to achieve the desired posture when the robot reaches the position point. It can easily adapt to special scenarios such as diagonal welds and bevel welds.
8.7.1. Operation process of laser point picking motion function
Step 1: Before using the laser sensor, apply the “welding gun” tool coordinate system to the current tool coordinate system. Open the teaching page, click on “Initial Settings”, “Fundamentals”, “Coordinate System”, “Tools” in sequence, select the coordinate system name “Welding Gun” and apply it. The tool coordinate system in the upper left corner of the system page will be displayed as Tool1.

Figure 8.7-1 Application of Welding Gun Coordinate System
Step 2: Write a Lua program for laser point picking motion. Click on “Teaching Program”, “Program Programming”, “New Button” in sequence, and create a new user program “testPointRecord. lua”.

Figure 8.7-2: Creating a new laser point motion program
Step 3: Configure reference posture teaching points (optional). Drag the robot to the desired welding posture in manual mode. On the teaching page, click on “Teaching Point Record”, “Naming Points”, and then save the posture teaching point “referencePoint” in sequence.

Figure 8.7-3 Save Attitude Reference Teaching Points
Step 4: Generate a laser point motion program. Click on “Teaching Program”, “Program Programming”, “Welding Instructions”, “Laser Tracking”, and slide down the content to the sensor sampling motion. Select the desired “Motion Mode”, “Debugging Speed”, and attitude reference point to generate the corresponding laser sampling LUA program.
If no attitude reference point is selected, the default motion is to maintain the attitude when taking the point. If an attitude reference point is selected, it will run to the laser point with the reference attitude.

Figure 8.7-4 Select Attitude Reference Teaching Point
Perform laser sampling motion. Drag the robot to direct the laser sensor light towards the desired welding seam point for teaching, and the laser sensor will obtain the welding seam position for point taking. After performing the laser sampling motion, the welding gun will run in a reference posture to the point scanned by the laser sensor.

Figure 8.7-5 Laser Acquisition of Weld Seam Position

Figure 8.7-6 Welding gun pointing at the weld position with reference posture
8.7.2. Find the intersection coordinates of three and four points
When it is inconvenient to directly teach the position of the fillet weld, the collaborative robot can calculate the intersection point of the collected points on the two planes to generate the position of the fillet weld by manually teaching or locating the plane positions of the plates on both sides of the fillet weld.
For right angle welds, the three-point positioning method can be used to find the intersection coordinates; For non right angle welds, the four point positioning method is used to find the intersection coordinates.
Provide instructions and Lua scripts to obtain the coordinates of the intersection point, perform positioning motion, and configure reference posture. The robot carrying the welding gun can move to the intersection point with the reference teaching point posture.
8.7.2.1. Command intersection point
8.7.2.1.1. Find the coordinates of the intersection point at three points
Step 1: Collect three plane contact points and save them as teaching points, configure reference teaching points;

Figure 8.7-7 Select three search points from
The collected contact points consist of three points, with two points located in the same plane and another point located in a vertical plane.
Note: If no attitude reference point is selected, the generated intersection point attitude will be consistent with point P3 by default. If attitude reference point is selected, it will be consistent with the attitude of the reference teaching point.
Step 2: On the teaching page, click on “Initial Settings”, “Peripherals”, “Tracking”, “Sensors” in sequence, and find the function module for calculating the intersection coordinates of three and four points.

Figure 8.7-8 Select the location for finding the intersection point coordinates
Step 3: Select the three-point positioning from the drop-down menu, select the three contact points collected in sequence, click calculate, check if the display of the generated intersection points in the 3D model is correct, name and save the intersection points;

Figure 8.7-9 Calculate intersection coordinates and save
Step 4: Save the teaching points and perform teaching exercises.

Figure 8.7-10 Save intersection coordinates as teaching points
8.7.2.1.2. Find the coordinates of the intersection point at four points
Step 1: Collect four plane contact points and save them as teaching points, and configure reference teaching points.

Select four search points from Figure 8.7-11
The collected contact points consist of four points, with the first two points located in the same plane and the last two points located in the vertical plane.
Note: If no attitude reference point is selected, the generated intersection point attitude will be consistent with point P4 by default. If attitude reference point is selected, it will be consistent with the attitude of the reference teaching point.
Step 2: On the teaching page, click on “Initial Settings”, “Peripherals”, “Tracking”, “Sensors” in sequence, and find the function module for calculating the intersection coordinates of three and four points.

Figure 8.7-12 Select the finding point and reference point for finding the intersection coordinates
Step 3: Select the four point positioning from the drop-down menu, select the four contact points collected in sequence, click calculate, check if the displayed intersection points generated in the 3D model are correct, name and save the intersection points;

Figure 8.7-13 Calculate intersection coordinates and save
Step 4: Save the teaching points and perform teaching exercises.

Figure 8.7-14 Save intersection coordinates as teaching points
8.7.2.2. Lua script for finding intersection points and positioning motion
8.7.2.2.1. Find the coordinates of the intersection point at three points
Step 1: Collect three plane contact points and save them as teaching points, and configure reference teaching points.

Select three search points from Figure 8.7-15
The collected contact points consist of three points, with two points located in the same plane and another point located in a vertical plane.
Note: If no attitude reference point is selected, the generated intersection point attitude will be consistent with point P3 by default. If attitude reference point is selected, it will be consistent with the attitude of the reference teaching point.
Step 2: Write a Lua program for three-point intersection point positioning motion. Click on “Teaching Program”, “Program Programming”, “New Button” in sequence, and create a new user program “test3point.lua”.

Figure 8.7-16: Creating a three-point intersection point positioning motion program
Step 3: Generate a three-point intersection point positioning motion program. Click on “Teaching Program”, “Program Programming”, “Welding Instructions”, “Laser Tracking”, and slide down the content to find the intersection point motion. Select the “three-point positioning” method, and then select the collected contact points “Point 1”, “Point 2”, “Point 3” and attitude reference points from the drop-down box. Select the desired “Motion Method” and “Debugging Speed”, and click the “Add” and “Apply” buttons to generate the corresponding three-point intersection point positioning motion program.

Figure 8.7-17 Three point Intersection Point Finding Motion
Step 4: Click the run button in automatic mode to automatically perform three-point intersection calculation. The robot drags the welding gun to move to the intersection position with reference posture.
8.7.2.2.2. Find the coordinates of the intersection point at four points
Step 1: Collect four plane contact points and save them as teaching points, and configure reference teaching points.

Select four search points from Figure 8.7-18
The collected contact points consist of four points, with two points located in the same plane and the last two points located in another plane.
Note: If no attitude reference point is selected, the generated intersection point attitude will be consistent with point P4 by default. If attitude reference point is selected, it will be consistent with the attitude of the reference teaching point.
Step 2: Write a Lua program for finding the intersection point and positioning motion of four points. Click on “Teaching Program”, “Program Programming”, “New Button” in sequence, and create a new user program “test4point. lua”.

Figure 8.7-19 Create a new four point intersection point positioning motion program
Step 3: Generate a four point intersection point positioning motion program. As shown in Figure 2-14, click on “Teaching Program”, “Program Programming”, “Welding Instruction”, “Laser Tracking”, and slide down the content to find the intersection point motion. Select the “Four Point Positioning” method, and then select the collected contact points “Point 1”, “Point 2”, “Point 3”, “Point 4” and attitude reference points from the drop-down menu. Select the desired “Motion Method” and “Debugging Speed”, and click the “Add” and “Apply” buttons to generate the corresponding four point intersection point positioning motion program.

Figure 8.7-20 Four point Intersection Point Finding Motion
Step 4: Click the run button in automatic mode to automatically calculate the four point intersection point. The robot drags the welding gun to move to the intersection point position with reference posture.
8.8. Extended Axis Peripheral Configuration
In “Initial - Peripheral”, click “Ext. axis” to enter the extended axis configuration interface. Click the picture to select the combination method according to the communication method to configure the corresponding extended axis peripherals. The interface for the first entry of the extended axis configuration is as follows:

Figure 8.8‑1 Expanded axis configuration first entry interface
Currently, the combination methods are divided into the following two types according to the communication method:
Controller + PLC (UDP communication).
Controller + Servo Drive (485 communication).
8.8.1. Controller + PLC (UDP communication)
Before using the extended axis function, it is necessary to establish the corresponding extended axis coordinate system, and apply the established tool coordinate system during program teaching. The extended axis function is mainly used in conjunction with the welder function and the laser tracking sensor function.

Figure 8.8‑2 Application of extended axis coordinate system and display of current extended axis scheme
When you only need to modify the current extended axis coordinate system, select the coordinate system in the peripheral extended axis configuration interface to apply it. When you need to change the extended axis solution, you need to enter the “Initial - Base - Coordinate - Ext. axis” interface to modify it. For specific operations, refer to Chapter 6.1 of the User Manual.
When the extended axis scheme is “0-single degree of freedom linear guide”, “1-two degrees of freedom L-type positioner”, “2-three degrees of freedom”, “3-four degrees of freedom” and “4-single degree of freedom positioner”, the “UDP extended axis” and “positioning completion time setting” contents are displayed after the UDP communication configuration is successful. When the extended axis scheme is “5-two degrees of freedom trolley”, the interface displays the “two degrees of freedom trolley test” content.
8.8.1.1. UDP communication configuration
Step1:Configure the expansion axis UDP communication parameters: set the IP address, port number, communication cycle, packet loss detection cycle, packet loss times and other parameters. The reconnection cycle and reconnection times can only be configured after the automatic reconnection switch is turned on when the communication is interrupted.
IP address:IP address;
Port number: defined according to actual situation;
Communication cycle: defined according to actual situation, unit ms;
Packet loss detection communication cycle: 10 ~ 1000 ms;
Number of packet losses: 1 ~ 100;
Communication interruption confirmation time: 0 ~ 500 ms;
Automatic reconnection after power off and start: On/Off;
Automatic reconnection after communication interruption: On/Off;
Reconnection period: 1 ~ 1000 ms;
Number of reconnections: 1 ~ 100.

Figure 8.8‑3 Extension axis UDP communication parameter configuration
Important
After setting the communication disconnection confirmation time, the communication will be confirmed disconnected and an error will be reported only when the communication abnormality exceeds this time.
After UDP communication is disconnected, a UDP disconnection error is triggered (resettable). You can click the Clear Warning Message button to establish UDP communication again.
Step2:After the communication parameters are configured successfully, click the “Load” button to establish UDP communication. After the communication is successful, the button in front of “UDP Communication Configuration” turns green. The extended axis status in the various states of the robot shows that the extended axis has been servoed in place.

Figure 8.8‑4 Extended axis UDP to establish communication

Figure 8.8‑5 Extension axis servo in place
Important
When the UDP communication connection is not established, the UDP extended axis number information cannot be configured and viewed;
Before loading the extended axis UDP communication, be sure to configure and apply the extended axis coordinate system except for sequence number 0.
8.8.1.2. UDP extension axis
Note

Name:Enable button
Function:Extended axis enable status, click the button to enable the extended axis
Note

Name:Disable button
Function:Disable the extended axis. Click the button to enable the extended axis
Note

Name:Return to zero button
Function:Return to zero button; Function: Setting the return to zero mode of the extended axis
Step1:Select any extended axis number (currently only 1, 2, 3, 4), click the “Edit” button behind the extended axis number to enter the detailed configuration interface. Set the axis type, axis direction, running speed, acceleration, positive limit, negative limit, lead, encoder resolution, starting point offset, manufacturer, model and mode, and click Configure to complete the configuration.
Axis types:linear guides, rotary axes and infinitely rotating axes;
Axis direction:positive/negative;
Operating speed:0~2000mm/s;
Acceleration:0 ~ 2000 mm/s²;
Positive direction limit:0 ~ 50000;
Reverse limit:-50000 ~ 0;
Lead:0~1000;
Encoder resolution:0 ~ 10000000;
Starting offset:0 ~ 10000mm;
Manufacturers: Hechuan, Huichuan and Panasonic;
Model:Automatically match the model list according to the manufacturer;
Mode:Incremental system and absolute position system.

Figure 8.8‑6 Extended axis parameter configuration
Step2:After the extended axis parameters are configured, click the “Disable” button to enable the corresponding extended axis number. After successful enabling, you can set the zero return mode and extended axis test. When the extended axis is not enabled, you cannot set the zero return mode and extended axis test.

Figure 8.8‑7 Extended axis enable/disable
Step3:If the extended axis is not enabled successfully, you cannot enter the setting interface and the button will be grayed out. After the extended axis is enabled successfully, click the “Return to Zero” button to enter the return to zero setting interface. Set the return to zero method, zero search speed and zero point clamp speed. Click the “Set” button and the extended axis will start to return to zero. The return to zero status will be displayed in the blank space below the axis direction. When the “Return to Zero Completed” prompt appears, it means that the extended axis zero point setting is successful.
Zero return mode:Current position zero return, negative limit zero return and positive limit zero return;
Zero seeking speed:0~2000mm/s;
Zero point gripper speed:0~2000mm/s;

Figure 8.8‑8 Zero return mode setting
Step4:If the extended axis is not enabled successfully, you cannot enter the setting interface and the button is grayed out; after the extended axis is enabled successfully and the zero return method is set, click the “Test” button to enter the extended axis test interface. Set the running speed, acceleration and maximum distance, and test the extended axis in forward and reverse rotation. During the rotation process, you can click the “Stop” button to test whether the extended axis can stop normally.

Figure 8.8‑9 Extended axis test
Step5:The extension axis is usually used in conjunction with a laser sensor. In this case, the laser sensor is usually installed externally. The sensor reference point configuration needs to be calibrated using the three-point method, rather than the six-point method used previously. Align the tool center to the middle point at the bottom of the right cross section (the side close to the camera) and set point 1. Align the tool center to the middle point at the bottom of the left cross section of the other cross section and set point 2. Move the tool center to the middle point on the upper edge of the right cross section of the sensor and set point 3. Calculate and save. Click Apply to complete the three-point calibration.

Figure 8.8‑10 Sensor three-point calibration
Step6:In the “Program - Coding” interface, select the “Extended Axis” command of the peripheral instruction. Add instructions in the corresponding place according to the specific program teaching requirements.

Figure 8.8‑11 Extended axis command editing
8.8.1.3. Extended axis with laser tracking welding teaching program
S/N |
Instruction format |
notes |
---|---|---|
1 |
EXT_AXIS_PTP(1,1,laserstart) |
#External axis movement laser sensor starting point |
2 |
PTP(laserstart,10,-1,0) |
#Starting point of robot motion laser sensor |
3 |
LTSearchStart(3,20,10,10000) |
#Start searching |
4 |
LTSearchStop() |
#Stop seeking |
5 |
EXT_AXIS_PTP(1,1,seamPos) |
#Start point of external axis movement weld |
6 |
Lin(seamPos,20,-1,0,0,0) |
#Start point of robot moving weld |
7 |
LTTrackOn() |
#Laser tracking |
8 |
ARCStart(0,10000) |
#Arc striking of welder |
9 |
EXT_AXIS_PTP(1,1,laserend) |
#End point of external axis movement weld |
10 |
Lin( laserend,10,-1,0,0) |
#End point of robot moving weld |
11 |
ARCEnd(0,10000) |
#Arc extinguishing of welder |
12 |
LTTrackOff |
#Laser Tracking Off |
8.8.1.4. Positioning completion time
After the expansion axis establishes UDP communication, enter the time and click the “Configure” button to complete the setting. This configuration item is used to monitor the time when the expansion axis stops moving.

Figure 8.8‑12 Positioning completion time configuration
8.8.2. Two-degree-of-freedom car test
When the extended axis scheme is configured as “5-two degrees of freedom trolley” in the extended axis coordinate system, this content will be displayed after entering the UDP communication interface. Otherwise, it cannot be viewed.

Figure 8.8‑13 The extended axis solution is the “5-two degrees of freedom trolley” interface
Important
The two-DOF car uses extended axis numbers 1 and 2 by default. After UDP communication is successful, check whether the extended axis 1 and 2 servos are in place through the extended axis status in the robot’s various states.

Figure 8.8‑14 Two-DOF trolley extension axis servo in place
Note

Name:Enable button
Function:Extended axis enable status, click the button to enable the extended axis
Note

Name:Disable button
Function:Disable the extended axis. Click the button to enable the extended axis
Step1:After UDP communication is successful, click the “Disable” button to enable the corresponding extended axis of the two-DOF car. Check the extended axis status in the robot’s various states to see whether the extended axis 1 and 2 servos are enabled.

Figure 8.8‑15 Two-DOF trolley extension axis enabled
Step2:After the extended axis is enabled successfully, click the “Return to Zero” button to set the current position of the extended axis to return to zero. After the return to zero is successful, the test button is highlighted, otherwise it is grayed out.

Figure 8.8‑16 The current position of the two-degree-of-freedom car returns to zero successfully
Step3:After the current position of the two-degree-of-freedom car returns to zero successfully, click the “Test” button to enter the interface, select the motion mode, enter the parameters for motion test, and click the “Stop” button during the motion to test the stop function.
Sports mode:LIN/ARC;
Distance:-5000~5000mm(LIN);
Radius:1~5000mm(LIN);
Angle:-360~360°(ARC);
Speed:1~100%


Figure 8.8‑17 Two-degree-of-freedom car test
8.8.3. Controller + Servo Drive (485 communication)
8.8.3.1. Hardware cable connection
Before using RS485 communication to control the servo expansion axis, please first connect the RS485 communication interface of the servo driver to the RS485 communication interface on the robot control box. The electrical interface diagram of the FAIRINO Robot Easy Manufacturing control box is as follows:

Figure 8.8‑18 Schematic diagram of electrical interface of FR robot integrated mini control box
Take the Dynatech servo drive FD100-750C model as an example, refer to the terminal diagram of the drive panel and the definition of the X3A-IN terminal of FD100-750C. When the robot is configured to communicate with the FD100-750C servo expansion axis, the 485-A0 terminal and the 485-B0 terminal on the control box need to be connected to the 4th and 5th pins of the drive X3A-IN terminal respectively. (Please note: You can see a plug terminal with a “485” logo on the servo drive panel. This terminal is not open to users for use. Please do not connect your RS485 communication cable to this terminal). At the same time, if multiple servo drives are connected and this drive is the last one in the chain, the RS485 communication interruption resistor DIP switch (DIP 2) on the panel needs to be turned on.

Figure 8.8‑19 FD100-750C Driver Panel

Figure 8.8‑20 X3A-IN terminal definition of FD100-750C
8.8.3.2. Communication layout
After ensuring that your RS485 communication cable is correctly connected and the robot and servo expansion axis are powered on normally, open the robot WebApp and click “Initial Settings - Peripherals - Expansion Axis” to enter the “Extension Axis Configuration” interface. As shown in the figure below:

Figure 8.8‑21 RS485 expansion axis configuration
In the “Extended Axis Configuration” interface, click the picture with the combination of “controller + servo drive” to enter the detailed configuration interface. In the servo drive configuration, select the number “1” (please note: when multiple servos are connected, this number is used to distinguish different servos, and we will mention this number many times later), the manufacturer is “Dynatek”, select the corresponding servo drive model, here the model is “FD00-750C”, the software version is V1.0, fill in the resolution corresponding to the servo drive, here is 131072, fill in the mechanical transmission ratio according to your mechanism model, here is 15.45, and click the “Configure” button.

Figure 8.8‑22 Servo drive configuration
So far, we have completed the 485 communication configuration between the robot and the servo drive. You can view the real-time status information of the servo in the “Servo Status Bar” on the right side of the WebApp. As shown in the figure below:

Figure 8.8‑23 Servo Status Bar
Now you need to enable and set the zero return mode of the expansion axis device in sequence, and then you can perform certain motion tests. Please follow this manual to perform the following test operations while ensuring safety.
8.8.3.3. Configured servo drive
Note

Name:Enable button
Function:Servo drive enable status, click the button to enable the servo drive
Note

Name:Disable button
Function:Servo drive is disabled, click the button to enable the servo drive
8.8.3.3.1. Servo control mode and enable
In “Configured Servo Drives”, select the control mode as “Position Mode”, select the corresponding servo number, and click the “Disable” button. The servo drive number will be set first, and the control mode will be set after the setting is successful. After the control mode is set successfully, the servo drive will be enabled (please note: after switching the control mode, you need to first disable the servo drive and then enable the servo drive, so that the servo control mode switch will take effect).

Figure 8.8‑24 Servo control mode and enable
After the servo is successfully enabled, check the “Servo” status light in the “Servo” column of the robot’s status bar to see that the “Servo Enable” status light is on, indicating that the servo driver has been enabled. Click the “Enable” status button to disable the servo driver, and the “Servo Enable” status light will go out.

Figure 8.8‑25 Servo drive status bar
8.8.3.3.2. Servo zero return
After the servo drive is enabled successfully, the “Return to Zero” button is highlighted. Click the button to enter the setting interface. Select the return to zero mode as “Current Position Return to Zero”, the return to zero speed is 5mm/s, and the zero point clamp speed is 1mm/s; click the “Set” button to complete the servo current position return to zero operation. In the “Servo” in the various status bars of the robot, you can observe that the current “Servo Position” is 0; (Please read this manual completely before selecting the return to zero mode as “Negative Limit Return to Zero” or “Positive Limit Return to Zero” for the return to zero test).

Figure 8.8‑26 Servo zero return
8.8.3.3.3. Servo motion
Before actually controlling the servo motor, please first understand the “position mode” and “speed mode” of the servo motor. Here are some reminders:
Position Mode: You can enter a certain movement speed and target position parameters, and the servo will move to the target position at the set speed. After moving to the target position, the servo will stop moving.
Speed Mode: You can enter a certain target speed, and the servo will move at the target speed you set until you set the target speed to 0 or disable the servo motor.
When switching the control mode, the “Current Control Mode” display will automatically switch (please note: after switching the control mode, you need to first disable the servo and then enable the servo for the servo control mode switch to take effect). If your servo is not currently in “position mode”, please switch your servo to position mode. Enter the “target position” as 50mm and the running speed as 5mm/s. After confirming that it is safe, click the “Set” button. At this time, the servo motor will move according to the parameters you set. You can observe the position and speed of the servo in real time in the “Servo” in the various status bars of the robot.

Figure 8.8‑27 Servo motion debugging (position mode)
Change the servo control mode to “speed mode”, click the “enable” status button to disable the servo driver, and then click the “disable” status button. The servo will now switch to speed mode (please note: after the servo motor is moving, the servo motor can only be stopped by setting the target speed to 0). Enter the target speed as 5mm/s, click the “set” button, and the servo motor will keep moving at a speed of 5mm/s. You can also observe the position and speed of the servo in real time in the “Servo” in the status bar of the robot.

Figure 8.8‑28 Servo motion debugging (speed mode)
8.8.3.4. Advanced Settings
If the robot collides, presses the emergency stop button, or other emergency situations, the expansion axis can trigger an emergency stop and stop moving at the set emergency stop deceleration. After the collision alarm is restored, instructions can continue to be issued to resume the expansion axis. You need to set the servo acceleration and deceleration and the servo emergency stop acceleration and deceleration in the advanced settings, as shown in the figure below:

Figure 8.8‑29 Advanced Settings
8.8.3.5. Extension axis programming
Create a new user program “testServo.lua” in “Program - Coding” and select “Peripheral command”.

Figure 8.8‑30 Open peripheral command
Click “Eaxis” to open the interface of adding extension axis commands.

Figure 8.8‑31 Open the Add Extended Axis Instruction page
In the Add Extended Axis Instruction page, select the combination mode as “Controller + Servo Drive (485)”, set the control mode to “Position Mode”, and click the “Add” button on the right.

Figure 8.8‑32 Set the control mode of the extended axis
Scroll to the bottom of the Add Extended Axis Instructions interface and click the “Apply” button.

Figure 8.8‑33 Applying extended axis instructions
At this time, a set of instructions for switching the servo control mode appears in the “testServo.lua” program. You can switch the robot to automatic mode and execute the program.

Figure 8.8‑34 Setting the servo control mode procedure
How to control servo motion through user program? Open the Add Extended Axis Instruction interface as shown below, find the parameter configuration bar, take the position mode as an example, enter the target position and running speed, and click the “Add” button; turn the Add Extended Axis Instruction interface to the bottom, click the “Apply” button, and close the Add Extended Axis Instruction interface.

Figure 8.8‑35 Add position mode motion instructions
The servo motion instruction “AuxServoSetTargetPos(1,50,5)” has been added to the “testServo.lua” program. The three parameters in the instruction function have the following meanings:
1:Servo number is 1.
50:Target location.
5:Target speed.

Figure 8.8‑36 Position Mode Servo Motion Program
Switch the robot to automatic mode, run the program, and your servo will move to a position of 50mm at a speed of 5mm/s.
So far, we have completed the preliminary configuration and testing of the RS485 controlled servo expansion axis. You can write a program that combines robot motion and servo motion according to the actual situation, as shown in the following figure.
8.8.3.5.1. Example of cooperative motion program between extension axis and robot
S/N |
Instruction format |
notes |
---|---|---|
1 |
AuxServoSetTargetPos(1,50,5) |
#The extended axis moves to the reset point |
2 |
if(GetDI(8,0) == 1) then |
#If the CI0 input is valid |
3 |
AuxServoSetTargetPos(1,50,5) |
#Expansion shaft movement to 50mm |
4 |
PTP(testptp1,100,-1,0) |
#Robot moves to point testptp1 |
5 |
else if(GetDI(9,0) == 1) then |
#If the CI1 input is valid |
6 |
AuxServoSetTargetPos(1,150,5) |
#Expansion shaft movement to 150mm |
7 |
PTP(testptp2,100,-1,0) |
#Robot moves to point testptp2 |
8 |
else |
#If both CI0 and CI1 inputs are invalid |
9 |
AuxServoSetTargetPos(1,300,5) |
#The expansion shaft moves to 300mm |
10 |
PTP(testptp3,100,-1,0) |
#Robot moves to testptp3 |
11 |
end |
8.8.3.6. Summary
In summary, there are the following points to note when configuring the RS485 communication between the cooperative robot and the servo expansion axis:
Correctly connect the RS485 communication cable between the cooperative robot and the servo driver;
Correctly select the control mode of the servo extension axis;
After switching the control mode, you must first remove the enable and then enable the servo so that the control mode switch can take effect.
8.8.4. Welding trolley control
8.8.4.1. Welding trolley configuration
The cooperative robot communicates with the PLC through UDP to control the movement of the welding trolley. Therefore, before configuring and controlling the welding trolley, please check the network connection between the robot and the PLC to ensure that the network connection is normal and the related equipment is powered on. The configuration steps of the welding trolley include:
①The selection of the type of the extension axis and the application of the extension axis coordinate system; ②UDP communication configuration and loading; ③The welding trolley enables and homing;
Specific operations are as follows:
Enter the robot teaching device interface, and click “Initial”, “Base”, “Coordinate”, “Ext.axis” in turn; Select an extended axis coordinate system.
Note
Note that it cannot be exaxis0.

Figure 8.8‑37 Select the extension axis coordinate system
Click “Modify”, find the “Modify Wizard”, select the extension axis scheme as “5-Two-degree-of-freedom car”, and click the “Apply” button in the “Modify Wizard” and the “Apply” button in the “Current extension axis coordinate system” successively.

Figure 8.8‑38 Selecting an extension axis scheme
Then click “Initial”, “Peripheral”, “Ext. axis”, and select the combination mode as “Controller +PLC (UDP)”. Enter the corresponding UDP communication configuration parameters. The default parameters are shown in the figure. Click the “Configure” and “Load” buttons successively to establish the UDP network connection between the robot and PLC.

Figure 8.8‑39 Setting UDP communication parameters
8.8.4.2. The welding trolley enable and homing
Since the “5-Two-degree-of-freedom car” extension axis scheme and the corresponding extension axis coordinate system have been applied in the above steps, the current extension axis scheme is displayed on the page as “5-Two-degree-of-freedom car”; Click the “Enable” button to enable the welding trolley automatically;

Figure 8.8‑40 Enabling the welding trolley
In the status bar of UDP extension axis on the right side of the teaching page, you can monitor whether the trolley is enabled. The left and right wheels of the trolley correspond to the extension axis 1 axis and 2 axis respectively.

Figure 8.8‑41 Extension axis status monitoring
After confirming that both trolley axles are enabled, click “Current position homing”, and then the two trolley axles homing according to the current position in turn.

Figure 8.8‑42 Welding trolley homing
8.8.4.3. Welding trolley motion control
Before the trolley moves, please ensure that the extension axis scheme “5-Two-degree-of-freedom car” has been selected and the corresponding extension axis coordinate system has been applied to complete the configuration and loading of UDP communication, and complete the enabling and homing of the trolley.
Linear motion of welding trolley: Open the teaching interface, click “Initial”, “Peripheral” and “Ext. axis” successively, select the combination mode as “Controller +PLC (UDP)”, confirm that the current extension axis scheme is “5-Two-degree-of-freedom car”, in the “Extended axis test”, select the movement mode as “Line”, enter the movement distance and speed, and click the “Motion” button after confirming the safety. The trolley moves in a straight line according to the set distance and speed. When the moving distance is positive, the trolley moves forward. When the moving distance is negative, the trolley moves backward. Click the “Stop” button during the trolley movement, and the trolley will stop immediately.

Figure 8.8‑43 Linear motion of the welding trolley
Arc motion of welding trolley: Open the teaching interface, click “Initial”, “Peripheral” and “Ext. axis” in turn, select the combination mode as “Controller +PLC (UDP)”, confirm that the current extension axis scheme is “5-Two-degree-of-freedom car”, in the “Extended axis test”, select the motion mode as “Arc”, enter the radius, Angle and speed, confirm the safety, click the “Motion” button. The trolley moves in an arc according to the set radius and Angle. When the Angle value is positive, the trolley turns to the right. When the Angle value is negative, the trolley turns to the left. Click the “Stop” button during the trolley movement, and the trolley will stop immediately.

Figure 8.8‑44 Arc motion of the welding trolley
8.9. Conveyor Tracking Configuration
8.9.1. Conveyor Tracking Configuration Steps
Step1: Select the “Conveyor” menu item in “Initial - Peripheral - Tracking” to enter the conveyor tracking configuration interface, click the “Configure Conveyor Belt IO” button to quickly configure the IO required for the conveyor belt function, and then configure the corresponding parameters according to the actual use of the function. Here, there is no visual Take the tracking and grabbing function as an example, you need to configure the conveyor belt encoder channel, resolution, lead, visual matching, select No, and click Configure.

Figure 8.9-1 Conveyor configuration
Step2: Next, set the grab point compensation value, which is the compensation distance in the three directions of X, Y, and Z, which can be set according to the actual situation during the debugging process.

Figure 8.9-2 Conveyor Grab Point Compensation Configuration
Step3: Turn on the conveyor belt, move the calibrated object to the defined point A, and stop the conveyor belt. Move the robot, align the sharp point of the calibration rod at the end of the robot with the sharp point of the object to be calibrated, click the start point A button, a dialog box will pop up, displaying the current encoder value and robot pose, and click Calibrate to complete the start point A calibration.

Figure 8.9-3 Starting Point A Configuration
Step4: Click the reference point button to enter the reference point calibration. When recording the reference point, record the height and attitude of the robot when it is grasping. Every time it tracks, it will track and grasp with the height and attitude area of the recorded reference point. It can be different from the AB point. Click Calibrate to complete the reference point calibration.

Figure 8.9-4 Reference point configuration
Step5: Turn on the conveyor belt, move the calibrated object to the defined point B, and stop the conveyor belt. Move the robot, align the sharp point of the calibration rod at the end of the robot with the sharp point of the object to be calibrated, click the end point B button, a dialog box will pop up, displaying the current encoder value and robot pose, click the calibration to complete the end point B calibration.

Figure 8.9-5 Terminal B configuration
8.9.2. Conveyor belt tracking teaching program
S/N |
Instruction format |
notes |
---|---|---|
1 |
PTP(conveyorstart,30,-1,0) |
#Robot grabbing starting point |
2 |
While(1) do |
#Loop Grab |
3 |
ConveyorIODetect(10000) |
#IO real-time detection of objects |
4 |
ConveyorGetTrackData(1) |
#Object position acquisition |
5 |
ConveyorTrackStart(1) |
#Conveyor tracking start |
6 |
Lin(cvrCatchPoint,10,-1,0,0) |
#Robot reaches the grab point |
7 |
MoveGripper(1,255,255,0,10000) |
#Gripper claw grabs objects |
8 |
Lin(cvrRaisePoint,10,-1,0,0) |
#Robot lifting |
9 |
ConveyorTrackEnd() |
#End of belt tracking |
10 |
PTP(conveyorraise,30,-1,0) |
#Robot arrives at holding point |
11 |
PTP(conveyorend,30,-1,0) |
#Robot reaches the placement point |
12 |
MoveGripper(1,0,255,0,10000) |
#Gripper release |
13 |
PTP(conveyorstart,50,-1,0) |
#The robot returns to the starting point again and waits for the next capture |
14 |
end |
#End |
8.10. Attitude Adaptive Configuration
8.10.1. Attitude adaptive configuration steps
Step1: Select the “Tracking attitude configuration” button in the user peripherals configuration interface to enter the attitude adjustment configuration interface, select the plate type and the actual working direction of the robot, adjust the robot attitude, and set the attitude point A, attitude point B and attitude point C respectively, usually A is the attitude point of the plane, B is the attitude point of the rising edge, and C is the attitude point of the falling edge.

Figure 8.10-1 Attitude Adjustment Configuration
Important
The attitude change between A posture and B posture, A posture and C posture is as small as possible under the condition that the application requirements are met. The posture adaptive function is an auxiliary application function, usually used in conjunction with seam tracking.
Step2: Select the “Adjust” command on the program teaching command interface. According to the specific program teaching requirements, add instructions in the corresponding places.

Figure 8.10-2 Attitude Adjustment Command Edit
8.10.2. Attitude self-adaptive with extended axis and laser tracking welding teaching program
S/N |
Instruction format |
notes |
---|---|---|
1 |
EXT_AXIS_PTP(1,1,laserstart) |
#External axis movement laser sensor starting point |
2 |
PTP(laserstart,10,-1,0) |
#Starting point of robot motion laser sensor |
3 |
LTSearchStart(3,20,10,10000) |
#Start searching |
4 |
LTSearchStop() |
#Stop searching |
5 |
EXT_AXIS_PTP(1,1,seamPos) |
#Start point of external axis movement weld |
6 |
Lin(seamPos,20,-1,0,0,0) |
#Start point of robot moving weld |
7 |
LTTrackOn() |
#Laser tracking |
8 |
ARCStart(0,10000) |
#Arc striking of welder |
9 |
PostureAdjustOn(0,PosA,PosC,PosB,1000) |
#Attitude adaptive adjustment on |
10 |
EXT_AXIS_PTP(1,1,laserend) |
#End point of external axis movement weld |
11 |
Lin( laserend,10,-1,0,0) |
#End point of robot moving weld |
12 |
ARCEnd(0,10000) |
#Arc extinguishing of welder |
13 |
PostureAdjustOff(0) |
#Attitude adaptive adjustment off |
14 |
LTTrackOff |
#Laser tracking off |
8.11. Force/Torque Sensor Peripheral Configuration
8.11.1. Force/Torque Sensor Configuration Steps
Step1: In the menu bar of “Initial - Peripheral - End -tool”, click “Adapter device” to enter the terminal peripheral configuration interface.
Select “Force Sensor Device” for the device type. The force sensor configuration information is divided into manufacturer, type, software version and mounting location. Configure the corresponding force sensor information. If the user needs to change the configuration, he can first select the corresponding number, click the “Clear” button to clear the corresponding information, and reconfigure according to the needs;

Figure 8.11-1 Force/Torque Sensor Configuration
Important
The corresponding sensor should be inactive before clicking Clear Configuration.
Step2: After the configuration of the force sensor is completed, the user can view the corresponding force sensor information in the information table at the bottom of the page. If a configuration error is found, the user can click the “Reset” button to reconfigure.

Figure 8.11-2 Force/Torque Sensor Configuration Information
Step3: Select the configured force sensor number and click the “Reset” button. After the page pops up and the command is sent successfully, click the “Activate” button to check the activation status in the force sensor information table to determine whether the activation is successful; in addition, the force sensor will There is an initial value, and the user can select “zero point correction” and “zero point removal” according to the usage requirements. The force sensor zero point correction needs to ensure that the force sensor is horizontal and vertical, and the robot is not equipped with a load.
Step4: After the configuration of the force sensor is completed, the sensor type tool coordinate system needs to be configured, and the value of the sensor tool coordinate system can be directly input and applied according to the distance between the sensor and the center of the end tool.
8.11.2. Force/Torque Sensor Load Identification
Select “Force/Torque Sensor Load” in the robot configuration interface to configure.
Specific attitude recognition: clear the end load data, configure the force sensor, establish the sensor coordinate system, adjust the end attitude of the robot to be vertically downward, perform “zero point correction” and install the end load. First, select the corresponding sensor tool coordinate system, adjust the robot so that the sensor and tool are vertically downward, record data, and calculate the quality. Next, adjust the three different postures of the robot, record three sets of data respectively, calculate the center of mass, and click Apply after confirming that it is correct.
Dynamic identification: After clearing the end load data and configuring the force sensor, establish the sensor coordinate system, adjust the end posture of the robot to be vertically downward, perform “zero point correction” and install the end load. Click “Identification On”, drag the robot to move, and then click “Identification Off”, the load result can be automatically applied to the robot.
Automatic Zero Calibration: After the sensor records the initial position, it can be automatically zeroed.

Figure 8.11-3 Force/Torque Sensor Load Identification
8.11.3. Force/Torque Sensor Assisted Drag
After the sensor is configured, it can be used with the sensor to better assist the dragging robot. When using it for the first time, you can configure it according to the data in the picture on the right. After the application is completed, you don’t need to enter the drag mode at this time, and you can directly drag the end force sensor to control the robot to move in a fixed posture. (The data in the figure below is a reference standard.)

Figure 8.11-4 Force/Torque Sensor Drag Lock
Note
The singularity point strategy is a singularity point crossing and avoidance function developed under force sensor assisted locking.
The singularity avoidance strategy is the default function option. When assisted dragging is turned on, the avoidance function is turned on by default. Singularity avoidance is a function that applies virtual force to keep the robot away from a singular configuration when the robot is in a singular configuration.
Strange configuration:
Elbow singularity: Rotation axes 2, 3, and 4 are in the same plane. At this time, the elbow joint is fully extended or fully contracted. Due to the mechanical limitation of the FR robot, the robot cannot reach this position of full contraction.
Wrist singularity: Rotation axes 4 and 6 are parallel. At this time, due to the mechanical limitation of the FR robot, the robot cannot reach this position.
Shoulder singularity: The wrist center point is located in the plane formed by rotation axes 1 and 2.
Singularity crossing function, select “Singularity strategy” as “Crossing” and apply it. When the robot detects that the current posture is in a singular configuration, it automatically switches to the current loop drag mode. When the detection exits the singular configuration, the drag mode switches to force sensor assisted dragging to continue moving.
Adaptive selection: Turn it on when assembly is required. After turning it on, dragging becomes heavier;
Inertia Parameter: Adjust the feel during dragging. It needs to be operated with caution under the guidance of technical personnel.
Damping parameters:
Translation direction: It is recommended to set the parameter between [100-200];
Rotation direction: It is recommended to set the parameters between [3-10], among which the RZ direction setting range is [0.1-5];
Effect: When dragging with the help of a sensor, increasing the damping will make it difficult to drag, and reducing the damping will make it too easy to drag the robot (it is recommended not to be too small);
The overall range of damping parameters: translation XYZ: [100-1000]; rotation RX, RY: [3-50], RZ: [2-10];
The maximum drag force is 50 and the maximum drag speed is 180.
Stiffness parameter: All are set to 0;
Drag force threshold: Translation XYZ is [5-10]; rotation RX, RY, RZ is [0.5-5];
Important
Locking is achieved by increasing the force threshold in the translation direction XYZ or rotation direction RX, RY, RZ.
8.11.4. Force/Torque Sensor Collision Detection
Command description: “FT_Guard” command is a collision detection command. Select the corresponding sensor coordinate system, check the effective torque direction detection, set the current value, the maximum collision threshold and the minimum collision threshold. The normal range of the collision detection condition is (current value-minimum threshold, current value+maximum threshold), set “Open” and “Close” commands are added to the program.

Figure 8.11-5 FT_Guard Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
FT_Guard(1,1,1,1,1,0,0,0,5,0,0,0,0,0,10,0,0,0,0,0,5,0,0,0,0,0) |
#Force/moment collision detection on |
2 |
PTP(template1,100,-1,0) |
#Motion command |
3 |
FT_Guard(0,1,1,1,1,0,0,0,5,0,0,0,0,0,10,0,0,0,0,0,5,0,0,0,0,0) |
#Force/moment collision detection off |
8.11.5. Force/Torque Sensor Force Control Motion
Instruction description: The “FT_Control” instruction is a force control motion instruction, which can make the robot move near the set force, and is often used in grinding scenes. Select the corresponding sensor coordinate system, check the effective torque direction detection, set the detection threshold, and the PID proportional coefficient in each direction (generally set p to 0.001), set the maximum adjustment distance (corresponding to X, Y, Z) and maximum adjustment angle (corresponding to RX, RY, RZ), add the “open” and “close” instructions to the program.

Figure 8.11-6 FT_Control Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
FT_Control(1,11,1,0,1,0,0,0,10,0,5,0,0,0,0.001,0,0,0,0,0,0,0,0,10,5) |
#Force/torque motion control ON |
2 |
Lin(template3,100,-1,0,0) |
#Motion command |
3 |
FT_Control(0,11,1,0,1,0,0,0,10,0,5,0,0,0,0.001,0,0,0,0,0,0,0,10,5) |
#Force/torque motion control off |
8.11.6. Force/Torque Transducer Screw Insertion
Instruction description: The “FT_Spiral” instruction is a spiral line exploration and insertion, which is generally used for the shaft hole assembly action of a cylindrical shaft. Before running the action, you need to drag the end of the robot to the approximate position of the hole. According to the current scene, set the parameters of the command and add it to the program. After running, the robot will explore in a spiral motion.

Figure 8.11-7 FT_Spiral Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
FT_Control(1,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control ON |
2 |
FT_SpiralSearch(0,0.7,0,60000,5) |
#Spiral insertion |
3 |
FT_Control(0,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control off |
8.11.7. Force/Torque Transducer Rotary Insertion
Instruction description: The “FT_Rot” instruction is a rotation exploration insertion, which is generally used to undertake the helical insertion action, and is used for the shaft hole assembly of the key shaft. Before running the action, you need to move the end of the robot to the hole found by the helical exploration or the fully aligned teaching hole. According to the current scene, set the parameters of the command and add it to the program. After running, the robot will slowly Spin to explore.

Figure 8.11-8 FT_Rot Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
FT_Control(1,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control ON |
2 |
FT_RotInsertion(0,3,0,5,1,0,1) |
#Rotate Insert |
3 |
FT_Control(0,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control off |
8.11.8. Force/Torque Transducer Straight Insertion
Instruction description: “FT_Lin” instruction is rotation exploration insertion, generally used to undertake helical insertion action or rotation insertion action, and is used for shaft hole assembly of key shaft. Before running the action, you need to move the end of the robot to the hole found by the helical exploration, rotate the end of the insertion action or the fully aligned teaching hole, set the parameters of the command according to the current scene, add it to the program, and run After that, the robot will move in a straight line in the set direction.

Figure 8.11-9 FT_Lin Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
FT_Control(1,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control ON |
2 |
FT_LinInsertion(0,50,1,0,100,1) |
#Line insertion |
3 |
FT_Control(0,10,0,0,1,0,0,0,0,0,5,0,0,0,0.0005,0,0,0,0,0,0,10,0) |
#Force/torque motion control off |
8.11.9. Force/Torque Sensor Surface Orientation
Instruction description: The “FT_FindSurface” instruction is for surface positioning, and is generally used to find the surface of an object. According to the current scene, set the corresponding coordinate system, moving direction, moving axis, exploring linear speed, exploring linear acceleration, maximum exploring distance, action termination force threshold and other parameters, add them to the program, run the program, the action starts to execute, and the end of the robot starts to slow down Move in the direction of the surface.

Figure 8.11-10 FT_FindSurface Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
PTP(1,30,-1,0) |
#Initial position |
2 |
FT_FindSurface(0,1,3,1,0,100,5) |
#Plane positioning |
8.11.10. Force/Torque Transducer Centering
Instruction description: The “FT_CalCenter” instruction is for center positioning, and is generally used to find the middle plane surface of two surfaces. According to the current scene, set the corresponding coordinate system, moving direction, moving axis, exploring linear speed, exploring linear acceleration, maximum exploring distance, action termination force threshold and other parameters, find the A plane and B plane respectively, add them to the program, and run the program. The action starts to execute, and the robot slowly moves towards the direction of surface A. After positioning on surface A, the robot slowly moves towards the direction of surface B. After positioning on surface B, the position of the center plane can be calculated.

Figure 8.11-11 FT_CalCenter Command Edit
Program example:
S/N |
Instruction format |
notes |
---|---|---|
1 |
PTP(1,30,-1,0) |
#Initial position |
2 |
FT_CalCenterStart() |
#Surface positioning start |
3 |
FT_Control(1,10,0,0,1,0,0,0,0,0,-10,0,0,0,0.00001,0,0,0,0,0,0,100,0) |
#Force/torque motion control ON |
4 |
FT_FindSurface(1,2,2,10,0,200,5) |
#Positioning plane A |
5 |
FT_Control(0,10,0,0,1,0,0,0,0,0,-10,0,0,0,0.00001,0,0,0,0,0,0,100,0) |
#Force/torque motion control off |
6 |
PTP (1,30, - 1,0) – initial position |
#Initial position |
7 |
FT_Control(1,10,0,0,1,0,0,0,0,0,-10,0,0,0,0.00001,0,0,0,0,0,0,100,0) |
#Force/torque motion control ON |
8 |
FT_FindSurface(1,1,2,20,0,200,5) |
#Positioning plane B |
9 |
FT_Control(0,10,0,0,1,0,0,0,0,0,-10,0,0,0,0.00001,0,0,0,0,0,0,100,0) |
#Force/torque motion control off |
10 |
pos = {} |
#Acquire Cartesian pose of positioning center |
11 |
pos = FT_CalCenterEnd() |
#Acquire Cartesian pose of positioning center |
12 |
MoveCart(pos,GetActualTCPNum(),GetActualWObjNum(),30,10,100,-1,0) |
#Move to the center of positioning |
8.12. Extended IO device peripheral configuration
8.12.1. Extended IO device configuration steps
Step1: In “Initial - Peripheral - End - tool”, click the “Adapter device” menu item to enter the terminal peripheral configuration interface.
Select “Extended IO Device” for the device type. The configuration information of the extended IO device is divided into manufacturer, type, software version and mounting location. Users can select according to specific production needs. To configure the corresponding device information. If the user needs to change the configuration, he can first select the corresponding number, click the “Clear” button to clear the corresponding information, and reconfigure according to the needs;

Figure 8.12-1 Extended IO device configuration
Important
The corresponding device should be inactive before clicking Clear Configuration.
Step2: After the configuration of the extended IO device is completed, the user can click the “Smart Tool” function menu in the auxiliary application to enter the function configuration page, and the user can customize the functions of each button on the end handle, including (new program, hold program, PTP , Lin, ARC, start of weaving, end of weaving, IO port).

Figure 8.12-2 Extended IO device function configuration
8.13. Palletizing system configuration
8.13.1. Palletizing system configuration steps
Step1: In “Initial - Peripheral”, click the “Palletization” menu item to enter the palletizing system configuration interface.
For the first time use, you need to create a recipe first. Click “Create Recipe”, enter the name of the recipe, click “Create”, and click “Start Configuration” after the creation is successful. Enter the palletizing configuration page.

Figure 8.13-1 Palletizing recipe configuration
Step2: Click “Configure” in the workpiece configuration bar to enter the workpiece configuration pop-up window, set the “length”, “width”, “height” of the workpiece and the grabbing point of the workpiece, click “confirm configuration” to complete the workpiece information setting.

Figure 8.13-2 Palletizing workpiece configuration
Step3: Click “Configure” in the tray configuration bar to enter the tray configuration pop-up window, set the tray “front”, “side” and “height”, then set the station and station transition point, click “confirm configuration” to complete the tray information setting.

Figure 8.13-3 Palletizing pallet configuration
Step4: Click “Configure” in the size configuration column of the palletizing equipment to enter the size configuration pop-up window. Set the devices “X”, “Y”, “Z”, and “Angle”, and click “Confirm Configuration” to complete the size configuration information setting of the palletizing equipment.
Important
X, Y, and Z are the absolute values of the coordinates of the point at the upper right corner of the left tray or the upper left corner of the right tray relative to the robot’s base coordinate system. Angle is the rotation angle during the robot’s installation, which is recommended to be 0 during installation.

Figure 8.13-4 Size configuration of palletizing equipment
Step5: Click “Configure” in the pattern configuration column to enter the mode configuration pop-up window.
Pattern B on/off: on: Can switch pattern A/B, Configure B mode of palletizing each layer mode; off: Mode B cannot be switched, and mode B of each layer mode of palletizing cannot be configured;
Pattern A/B switching: Select mode A: Add the workpiece as mode A, and the workpiece serial numbers are A1, A2…, and the transparency of the workpiece cannot be adjusted; select mode B: Add the workpiece as mode B, and the workpiece serial numbers are B1, B2…, and you can turn on / Turn off the “Display Mode A Configuration” display mode A artifact;
Display pattern A on/off: on: Adjust the transparency of the mode B artifacts to see whether the A/B mode configuration effect is reasonable. At this time, only the mode B artifacts can be selected, added, batch added, deleted and deleted; off: Unable to set mode B artifact transparency;
Important
When configuring workpieces, if there is a collision between workpieces, the background color of the workpiece will turn red, and the above operations cannot be performed at this time. If you need to operate, please configure the workpiece to be collision-free.
When configuring workpieces, first set the workpiece interval. The frame on the right simulates the placement of workpieces on the right pallet. You can add them individually or in batches. Then set the number of palletizing layers and the mode of each layer, and click “Confirm Configuration” to complete the mode information setting.
Important
Stacking direction: Taking the right pallet as an example, the lower right corner is the farthest point. From the lower right corner, a row of workpieces is placed vertically or horizontally, and then the workpieces are placed horizontally or vertically in the upper row, and so on (the web page has been marked Palletizing direction, please check carefully).
The left pallet places workpieces mirroring the right pallet pattern.

Figure 8.13-5 Palletizing pattern A configuration

Figure 8.13-6 Palletizing pattern B configuration
Step6: Click “Advanced Configuration” in the teaching program generation column to enter the advanced configuration pop-up window. At this time, configure the “Material Lifting Height”, “First Offset Distance”, “Second Offset Distance” and “Suction Waiting Time”.
Material Lifting Height: The user defines the lifting height after the material is successfully retrieved from the grabbing point;
First/Second Offset Distance: User-defined configuration of the offset distance for tilted stacking of the robot to the target point;
Suction Waiting Time: The user can configure the waiting time for material suction, monitor the negative pressure arrival signal after suction, and repeat the suction action when it is not in place;
Smooth transition: Turn on the smooth transition button to configure parameters related to palletizing/depalletizing PTP smoothing time and LIN smoothing radius.
PTP smoothing time: No smooth transition time/Level 1 (200ms)/Level 2 (400ms)/Level 3 (600ms)/Level 4 (800ms)/Level 5 (1000ms)
LIN smooth radius: No smooth transition radius/Level 1 (200mm)/Level 2 (400mm)/Level 3 (600mm)/Level 4 (800mm)/Level 5 (1000mm)

Figure 8.13-7 Advanced palletizing configuration
Step7: Click “Generate Program” to open the “Palletizing Monitoring Page”, where you can display and view the “Generation Information”, “Alarm Information” and “Palletizing Program”.

Figure 8.13-8 Palletizing system monitoring
Step8: After an error is reported in the middle of the palletizing running program, the program stops. After the user clears the error first, select the palletizing program to run again. At this time, the “Last Program Interruption” pop-up box will pop up. Click the “Continue” button to continue running, and click “Restart” button to restart the program.

Figure 8.13-9 Palletizing program continues
8.14. Polishing equipment configuration
8.14.1. Polishing equipment configuration step
Step1: Click the “Polishing” menu item under the “Initial - Peripheral” menu bar to enter the polishing equipment configuration page.
Configure the communication information, you need to configure the IP address, port, sampling period and communication protocol. After the configuration is successful, it will be automatically displayed next time.
Step2: After completing the communication configuration, the communication can be established by loading/unloading the grinding equipment.
Step3: Device functions. Operations such as device enabling, error clearing, and force sensor zeroing can be performed.
Step4: Parameter configuration. The rotation speed, contact force, reach distance and control mode of the polishing equipment can be set. After successful setting, the corresponding data and status can be displayed in the “Polish” status feedback column on the right.

Figure 8.14-1 Polishing equipment configuration page
8.15. Virtual Wall Function Based on Force Sensor
Based on the virtual wall function of force sensor, the virtual wall can be set artificially to limit the workspace of the robot and avoid direct collision and contact.
8.15.1. Installation configuration of force sensor
Step1: Take “Kunwei” sensor as an example. During installation, the coordinate system direction of the force sensor should be consistent with the end flange coordinate system, as shown in Figure 1 (in Figure 1, red is the end flange coordinate system X+ direction, green is the end flange coordinate system Y+ direction, and blue is the end flange coordinate system Z+ direction);


Figure 8.15-1 Installation of Force Sensor
Step2: In the menu bar of “Initial - Peripheral - End -tool”, click “Adapter device” to enter the terminal peripheral configuration interface.
The equipment type is “Force Sensor Equipment”, and the configuration information of force sensor is divided into manufacturer, type, software version and mounting location. Users can configure the corresponding force sensor information according to specific production requirements. If the user needs to change the configuration, he can first select the corresponding number and click the “Clear” button to clear the corresponding information and reconfigure according to the requirements; The specific operation is shown in Figure 2.
Step3: Select the number of the configured force sensor and click the “Reset” button. After the page pop-up command is successfully sent, click the “Activate” button to check the activation status in the force sensor information table to judge whether the activation is successful. In addition, the force sensor will have an initial value, and the user can choose “zero point correction” and “zero point removal” according to the use requirements. The zero correction of force sensor needs to ensure that the force sensor is horizontal and vertical, and the robot is not equipped with load.

Figure 8.15-2 Force sensor configuration

Figure 8.15-3 Force sensor activation
8.15.2. Virtual wall configuration
With the help of the force sensor, it is necessary to install a drag handle under the force sensor and configure the tool coordinate system. The specific operation is shown in Figure 4. At this time, the way to detect the interference zone is based on the set tool coordinate system position, and the end flange is used as the reference when it is not set.
Step1: In the menu bar of “Application - Tool App - Interference area”, click “Single” to enter the interference area configuration function interface;
Step2: The interference mode and the operation of entering the interference zone need to be configured; The interference mode is “cube interference”, and the drag configuration when entering the interference area is “unrestricted drag”, and the motion configuration when entering the interference area can be used;
Step3: According to the requirements, the parameter configuration can be modified. The detection method can be divided into “command position” and “feedback position”, the interference zone mode can be divided into “in-range interference” and “out-of-range interference”, the reference coordinate system is selected as “base coordinate”, and the setting is selected according to the actual use. The detailed operation is shown in Figure 5.


Figure 8.15-4 Install the drag handle and set the tool coordinate system

Figure 8.15-5 Parameter Configuration of Virtual Wall
Step4: The interference zone modes under parameter configuration are divided into “in-range interference” and “out-of-range interference”;

Figure 8.15-6 In-range interference

Figure 8.15-7 Out of range interference
Step5: Establish the interference zone, as shown in Figures 7 and 8. It is suggested that the interference area should be set as large as possible when selecting “out-of-range interference”.

Figure 8.15-8 Two-point method to establish interference zone

Figure 8.15-9 center point+side length method to establish interference zone
8.15.3. Force sensor assisted drag
Step1: In the menu bar of “Application - Tool App”, click “Drag locking” to enter the drag lock function interface.
Step2: Set the parameters as shown in Figure 9 to realize the virtual wall function based on the force sensor. The concrete effects are as follows: near the virtual wall, the resistance becomes larger; Away from the virtual wall, the auxiliary drag function based on the force sensor is normal.

Figure 8.15-10 Parameter setting of auxiliary drag of force sensor
Specific function of parameters:
Adaptive selection: Turn it on when assembly is required. After turning it on, dragging becomes heavier;
Inertia Parameter: Adjust the feel during dragging. It needs to be operated with caution under the guidance of technical personnel.
Damping parameters:
Translation direction: It is recommended to set the parameter between [100-200];
Rotation direction: It is recommended to set the parameters between [3-10], among which the RZ direction setting range is [0.1-5];
Effect: When dragging with the help of a sensor, increasing the damping will make it difficult to drag, and reducing the damping will make it too easy to drag the robot (it is recommended not to be too small);
The overall range of damping parameters: translation XYZ: [100-1000]; rotation RX, RY: [3-50], RZ: [2-10];
The maximum drag force is 50 and the maximum drag speed is 180.
Stiffness parameter: All are set to 0;
Drag force threshold: Translation XYZ is [5-10]; rotation RX, RY, RZ is [0.5-5];
Maximum Drag force: 50;
Maximum Drag speed: 180;
8.15.4. Six -dimensional force and joint impedance hybrid drag
8.15.4.1. Summary
Six -dimensional force and joint impedance mixed drag function are to perceive the external force by the help of sensors. The robot is auxiliary drag in the drag mode. It can obtain a different drag experience by adjusting the gain coefficient. The joint impedance is limited to the drag force with impedance control.
8.15.4.2. Installation configuration and zero calibration operation of force sensor
Installation configuration of force sensor
The detailed operation of the force sensor installation configuration is shown above: Virtual wall configuration based on force sensor.
Zero calibration of force sensor
In order to drag the robot conveniently, it is necessary to install a drag handle under the sensor, as shown in Figure 1.

Figure 8.15-11 Drag the handle
Step1: According to the length of the actual handle, set the tool coordinate system, as shown in Figure 2.
Step2: In the “Initial” -> “Base” -> “Payload” menu bar, click “FT payload” to enter the force/torque sensor load interface.
Use the dragging button to adjust the level of the robot’s end level, click the “Record Initial Location” button in the “Sensor Automatic School Zero” column of the “Power/Torque Sensor Load” interface. Then, switch the robot mode as an automatic mode, click the “Automatic School Zero” button. After the program is running, it is to complete the sensor school zero work. The detailed operation is shown in Figure 3.

Figure 8.15-12 Tool coordinate system setting

Figure 8.15-13 Automatic zero calibration of force/torque sensor
8.15.4.3. Six -dimensional force and joint impedance hybrid drag
Auxiliary drag
Step1: In the menu bar of “Application” -> “Tool App”, click “Drag locking” to enter the drag lock function interface.
Step2: In the column of “Six dimensions and joint impedance mixed drag”, set the control status to “open”, the impedance opening state is “closed”, set the drag gain, the end line speed is 1000mm/s, the angle speed The limit is 100 °/s, and then click the “Apply” button to enable the function. The specific configuration is shown in Figure 4.
Step3: Switch the robot mode to drag mode to drag the robot. The specific effect is: drag the end of the robot, the drag is easy, and the experience is good; drag the robot joint and drag weight.

Figure 8.15-14 configuration parameters of six dimensions assisted drag
joint impedance control
The role of impedance control is to limit the drag power and drag position, and its default state is “closed”.
The specific operation is shown in Figure 5. The setting status of the setting impedance is “open”, and then sets the damping coefficient and stiffness coefficient according to Figure 5. Among them, the function of the rigidity coefficient has not yet been opened.

Figure 8.15-15 Configuration parameters of joint impedance
Specific function of parameters:
Control status: After opening, this function can be used in the drag mode.
Impedance control opening: After opening, you need to configure stiffness parameters and damping parameters. The role is to limit the drag power and drag position.
Drag gain: The parameter is recommended between [0-5]. The parameter is set to 0, and the robot cannot be dragged. The parameter is set to 1, and the drag effect has not improved. The parameters are greater than 1, dragged lightly, and the drag experience is good. The larger the parameters, the easier it is to drag.
Stiffness gain: set to 0, and its role is to return to the initial position before dragging after dragging.
Damping gain: The role is to limit the drag power. The range of 1-3 joint parameters is [0-0.5], and the range of 4-5 joint parameters is [0-0.1]; 6-joint parameter range is [0-0.05].
Ending speed: 1000mm/s, when the speed limit of the end line speed, the robot switching mode to the manual mode, and the TCP speed is
Angle speed limit: 100 °/s, when the angle speed is limited, the robot switching mode to the manual mode, and prompt TCP speeding.
8.16. Welding tracking function at fixed-point using ext-axis and laser
8.16.1. 1Robot fixed-point tracking welding system using ext-axis and laser

Figure 8.16‑1 Robot fixed-point tracking welding system composition
In the system, (a) is a computer, (b) is a robot and its control box, (c) is a positioner and driving equipment, (d) a welding seam tracking laser sensor, and (e) is a welding machine and supporting equipment.

Figure 8.16‑2 Schematic diagram of peripheral installation
The weld tracking laser sensor and welding gun (b) are mounted on the end flange of the robot (a), and the positioner (c) is fixed outside the robot.
8.16.2. Ext-axis communication configuration
The robot communicates with the expansion axis using UDP or RS485.

Figure 8.16‑3 Externed axis configuration page
Click the “Initial”, “Peripherals”, and “Ext. Axis” buttons on the robot operation interface to enter the extended axis configuration page. For example, if you use a PLC to connect to a robot through UDP communication, click the “UDP Communication” icon to enter the expansion axis configuration page of UDP communication.

Figure 8.16‑4 UDP communication configuration interface
On the UDP communication ext-axis configuration page, you can select the corresponding ext-axis number, connect and configure UDP communication parameters (address, port, cycle, packet loss detection, etc.), and the completion time of the ext-axis positioning.
The configuration content of the ext-axis is not the focus of this function introduction, and the detailed configuration is shown in the corresponding part of the user manual.
8.16.3. Weld seam tracking laser sensor connection configuration
Connect the weld tracking laser sensor via the following configuration page:

Figure 8.16‑5 Laser Sensor Connection & Configuration page
Click the “Initial”, “Peripherals”, “Tracking”, and “Sensor” buttons to enter the configuration page. The configuration page includes “Sensor Configuration”, “Communication Configuration and Loading”, “Benchmark Calculation”, “Three-point and Four-point Finding and Intersection Coordinate Function”, click “Sensor Configuration” to set the sensor input filtering parameters, and click “Communication Configuration and Loading” to enter the corresponding communication parameters to connect the laser sensor.
The configuration content of the laser sensor is not the focus of this function introduction, and the detailed configuration is shown in the corresponding part of the user manual.
8.16.4. Welder connection configuration
Configure the welder from the following configuration pages:

Figure 8.16‑6 Welder configuration page
The welding machine communication can use IO communication or RS485 communication, click “Initial”, “Peripherals”, “Welder” to enter the configuration and connection interface, and you can configure “Control Type”, “I/O configuration”, “Welding Process Parameters”, “Welding Machine Debugging” and other modules.
The configuration content of the welding machine is not the focus of this function introduction, and the detailed configuration is shown in the corresponding part of the user manual.
8.16.5. The tool coordinate and laser sensor coordinate calibration
After the welding torch is installed at the end of the robot, the welding torch and the laser sensor external parameters are calibrated:

Figure 8.16‑7 Tool coordinate system configuration page
Click “Initial”, “Basic”, “Coordinate”, “TCP” to enter the tool coordinate system setting page.
Select an empty coordinate system and select the 6-point method for torch tool calibration.

Figure 8.16‑8 Select 6-point method to calibrate the welding gun
Select an empty coordinate system and select the 5-point method for laser sensor calibration.

Figure 8.16‑9 Select 5-point method to calibrate the laser sensor
The calibration content of the tool coordinate system and the laser sensor coordinate system is not the focus of this function introduction, and the detailed calibration method is shown in the corresponding part of the user manual.
8.16.6. Ext-axis and laser fixed-point tracking function
There are two methods of extended axis and laser fixed-point tracking, the tracking strategy of “recording first and then reproducing” is implemented in the transformation mode of laser data, and the tracking strategy of “reproduction while recording” is implemented in the non-transformation mode of laser data.
8.16.6.1. Ext-axis coordinate system calibration
When using the ext-axis coordinate system to realize the synchronous laser tracking between the ext-axis and the robot, the ext-axis coordinate system needs to be calibrated.

Figure 8.16‑10 Ext-axis coordinate system settings page
Click “Initial”, “Basics”, “Ext. axis” to enter the Ext-Axis coordinate system setting interface, select the Ext-Axis number that needs to be set, click the Edit button, select “4-Single Degree of Freedom Positioner” and save.

Figure 8.16‑11 Ext-axis calibration page
When calibrating the expansion axis, pay attention to selecting “Robot Relative Expansion Axis Position” as “Outside the Expansion Axis”. In the case of positioners, the 4-point method is selected for calibration.
The content of the ext-axis calibration is not the focus of this function introduction, and the detailed calibration method is shown in the corresponding part of the user manual.
8.16.6.2. Ext-axis synchronized with the robot’s laser tracking
8.16.6.2.1. Transformation type laser tracking
The ext-axis under the base coordinate system and the robot synchronous laser tracking do not need to calibrate the ext-axis, and the rest of the function settings are consistent with the synchronous tracking under the composition and ext-axis coordinate system.
First, configure the laser tracking data and set the laser tracker data to data with transformation type.

Figure 8.16‑12 Transformation type for setting up laser data
Click “Initial Settings”, “Peripherals”, “Tracking”, “Sensor”, click “Sensor Configuration” in the drop-down box on the page, and adjust “Data Processing” to data with transformation type.

Figure 8.16‑13 Laser tracking feature page
This function is realized by a combination of multi-functional modules, the main functional modules are included in the “Laser Tracking” function. Click “Program”, “Coding”, “Laser” to enter the laser tracking page.

Figure 8.16‑14 Add a command to start recording laser data
A command to start recording laser data is added after the ext-axis movement has reached the welding start point.

Figure 8.16‑15 Added a stop recording laser data command
Add a stop recording laser data command after the ext-axis movement has reached the weld end point.
After the robot records the movement trajectory of the weld during the movement of the ext-axis in situ, it can return the ext-axis to the starting point of the weld, ready to start synchronous tracking welding.
At the beginning of welding, the welding torch needs to be moved to the starting point of the data recorded by the laser sensor, and the movment to the welding point command needs to be added:

Figure 8.16‑16 Add move to weld joint command
Click the “Program”, “Coding”, “LT-Rec” buttons, select “Move to Welding Point”, set the movement mode and speed, click the “Starting Point” button and apply.

Figure 8.16‑17 Add a command to reproduce the data recorded by the laser on the trajectory
On the “Laser” page, select the “Data Record” and “Track Reappearance” commands, click “Add” and apply. In the command, the waiting time is set to 0ms by default, and the speed is the ratio of the reproduction speed to the recorded speed, which is recommended to be greater than 50%.
After the ” Track Reappearance ” command, the ext-axis motion command is added to realize the synchronous movement of the extended axis and the robot laser tracking.
The following is a typical LUA procedure for ext-axis movement with laser fixed-point tracking:

Figure 8.16‑18 Ext-axis movment with laser fixed-point tracking sample program
The robot performs the process of “scanning first and tracking later”, first recording the change trajectory of the weld seam of the workpiece when the ext-axis is moving, and then synchronous execution of the ext-axis and trajectory replication during welding.
8.16.6.2.2. Non-transformation type laser tracking
Fixed-point tracking using laser data without transformation eliminates the need to calibrate the extended axis coordinate system.
Set the laser tracking sensor data to a non-transformation type.

Figure 8.16‑19 Set up transformation type laser data
Click “Initial Settings”, “Peripherals”, “Tracking”, “Sensors”, click “Sensor Configuration” in the drop-down box of the page, and adjust “Data Processing” to data without transformation.

Figure 8.16‑20 Laser tracking feature page
Click “Program”, “Codeing”, “Laser Tracking” to enter the laser tracking page, or click “Laser Recording” to directly enter the recording page.

Figure 8.16‑21 Added a reproduce while recording command
On the “LT-Rec” page, select the “Record and reproduce” command, click “Add” and apply. In the command, you can select “Delay Time” or “Delay Distance” (recommended delay distance), the compensation sensitivity coefficient is adjusted according to the actual sensor laser data, the lower the value, the lower the adjustment sensitivity, the better the anti-interference, and the default reproduction speed is 100%.
Add the extended axis motion command after the “Reproducing while recording” command to realize the synchronous movement of the extended axis and the robot laser tracking.
The following is a typical LUA procedure for untransformed, fixed-point tracking of extended axis plus laser data:

Figure 8.16‑22 Extended axis plus laser data non-transformation fixed-point tracking sample program
After the welding torch aligns the offset at the front laser, the robot expands the axis movement and executes the process of “reproducing while recording”, and the laser tracker on the front first records the change trajectory of the workpiece weld when the extended axis moves, and then adjusts it at the welding gun after setting the delay distance or time.
8.17. FOCAS-based CNC Function Package (For Linux Systems Only)
8.17.1. Overview
To automate the loading and unloading process in machine tool operations, a CNC function package based on FOCAS communication has been developed. This package enables communication interaction and collaborative motion between collaborative robots and CNC machine tools.
As shown in the figure, FOCAS communication is Ethernet-based. By connecting the robot control box’s network port to the embedded network port of the machine tool via an Ethernet cable, FOCAS communication between the robot and the machine tool can be established, enabling CNC control and machine tool status monitoring on the robot side.

Figure 8.17‑1 FOCAS Communication Topology Between Robot and CNC
Currently, the CNC function package based on FOCAS communication supported by the control box includes the following machine tool control and status feedback functions, as shown in the table.
Table 8.17-1 Supported Functions of the FOCAS-based CNC Function Package
No. |
Function Name |
Description |
1 |
Machine Tool Type |
Status Feedback |
2 |
FOCAS Communication Status |
Status Feedback |
3 |
Automatic Mode Operation |
Control, Status Feedback |
4 |
Alarm Status |
Status Feedback |
5 |
Safety Door |
Status Feedback |
6 |
Chuck |
Control, Status Feedback |
7 |
Emergency Stop |
Control, Status Feedback |
8.17.2. Operation Instructions
8.17.2.1. FOCAS Communication Establishment
FOCAS communication is Ethernet-based. It requires the robot, CNC machine tool, and PC to form a local area network (LAN) to establish a physical link. The final FOCAS communication is achieved through the robot’s open protocol.
8.17.2.1.1. Network Configuration
Step1: First, change the IP address of the PC to the same subnet as the robot control box. The IP address of the robot control box is “192.168.58.2”.
If no switch is used for networking, the two built-in network ports on the robot control box can be used for networking. The steps are as follows: Log in to the robot’s WebAPP, go to System Settings -> General Settings -> Network Settings, and set the IP address of Port 0 to 192.168.58.2 and Port 1 to 192.168.57.2. Simultaneously, set WebAPP to Port 0 and WebRecovery to Port 1, as shown in the figure. After completing all settings, click “Set Network”.

Figure 8.17‑2 Robot Network Configuration Diagram
Step2: Restart the control box and connect it to the PC via Port 0. Log in to the robot’s WebApp. Configure the IP address of the CNC machine tool to be in the same subnet as the PC and the robot control box, i.e., 192.168.58.xx, and change the machine tool’s port to 8193. This completes all network configurations.
8.17.2.1.2. Open Protocol File Configuration
Step1: Next, configure the peripheral open protocol. First, create a Lua file named with the prefix “CtrlDev_CNC” as the open protocol file for establishing FOCAS communication, such as “CtrlDev_CNC_demo.lua”.
This file needs to set the open protocol ID and use the CNCComSet function to establish or disconnect the connection with the CNC. The parameters of the CNCComSet function are described in the table below. Example code is provided.
Table 8.17-2 CNCComSet Function Parameter Description
No. |
Function Name |
Description |
1 |
Machine Tool Manufacturer |
0-Invalid, 1-Machine Tool (FOCAS) |
2 |
Communication Command |
1-Establish Connection, 1001-Disconnect |
3 |
Machine Tool IP Address |
– |
4 |
Machine Tool Port Number |
– |
Example Code for Establishing FOCAS Communication Connection:
1local id = 1 --Open LUA Protocol ID
2--FOCAS Disconnect
3CNCComSet(1, 1001, '192.168.57.100', 8193)
4sleep_ms(1000)
5--FOCAS Connect
6CNCComSet(1, 1, '192.168.57.100', 8193)
7sleep_ms(1000)
8while(1) do
9sleep_ms(5000)
10end
Step2: After completing the open protocol Lua file, open the WebAPP, select “Initial Settings” -> “Peripherals” -> “Control Box” -> “Peripheral Open Protocol”, upload the “CtrlDev_CNC_demo.lua” file, select the ID set in the file, and click “Configure”. This is shown in the figure.

Figure 8.17‑3 Open Protocol File Upload and Configuration
Step3: Check that all communication links are normal and ensure the CNC machine tool is powered on. Click the “Connect” button in the open protocol. The status of the CNC -> FOCAS communication can be confirmed in the status feedback column on the right (Red: Connected; Gray: Disconnected), as shown in the figure.

Figure 8.17‑4 FOCAS Communication Connection Establishment
8.17.2.2. CNC Status Feedback Description
The status feedback of the CNC machine tool is displayed in the CNC icon in the peripheral status feedback section on the far right of the WebAPP, as shown in the figure. Clicking it will display the current status of the machine tool, including the manufacturer, machine tool type, FOCAS communication status, alarm flag, machine tool operation status, machine tool door status, machine tool chuck status, and machine tool emergency stop status.

Figure 8.17‑5 CNC Status Feedback Panel
The meanings of the status feedback indicator lights for the CNC are shown in the table below.
Table 8.17-3 CNC Status Feedback Indicator Light Meanings
No. |
Function Name |
Description |
1 |
FOCAS Communication Status |
Gray-Communication Disconnected, Red-Communication Normal |
2 |
Alarm Flag |
Gray-No Warning, Red-Warning Exists |
3 |
Machine Tool Operation Status |
Gray-Stopped, Green-Running |
4 |
Machine Tool Door Status |
Gray-Door Closed, Green-Door Open |
5 |
Machine Tool Chuck Status |
Gray-Chuck Released, Green-Chuck Clamped |
6 |
Machine Tool Emergency Stop Status |
Gray-Emergency Stop Inactive, Green-Emergency Stop Active |
8.17.2.3. CNC Control Description
CNC machine tool control is located in the peripheral open protocol. After completing the FOCAS communication connection, click the upper right corner of the configured peripheral open protocol to open the CNC control page, as shown in the figure.
Note
The control buttons include door control (Open, Close), chuck control (Clamp, Release), start/stop control (Run, Stop), and emergency stop control (Emergency Stop, Inactive). All control signals are edge-triggered.

Figure 8.17‑6 CNC Control Page
8.17.2.4. CNC Teaching Program Description
The CNC function package supports calling control commands in teaching programs and real-time acquisition of machine tool status. Open “Teaching Program” -> “Program Programming” -> “Peripheral Commands” -> “CNC” to see all supported CNC teaching commands, as shown in the figure.

Figure 8.17‑7 CNC Teaching Commands
Note
The control commands correspond one-to-one with CNC controls and are edge-triggered. After executing a start command, the stop command must be executed before the next start command can take effect.
“Machine Tool Current Status Acquisition” is a Lua function that returns nine parameters, as described in the table below.
Table 8.17-4 “Machine Tool Current Status Acquisition” Return Value Description
No. |
Name |
Meaning |
1 |
Manufacturer |
0-Invalid, 1-Other-Reserved |
2 |
FOCAS Communication Status |
0-Communication Normal, Other-Communication Disconnected |
3 |
Machine Tool Model (string) |
‘15’ : Series 150/150i ‘16’ : Series 160/160i ‘18’ : Series 180/180i ‘21’ : Series 210/210i ‘30’ : Series 300i ‘31’ : Series 310i ‘32’ : Series 320i ‘0’ : Series 0i |
4 |
Machine Tool Model (string) |
‘15’ : Series 150/150i ‘16’ : Series 160/160i ‘18’ : Series 180/180i ‘21’ : Series 210/210i ‘30’ : Series 300i ‘31’ : Series 310i ‘32’ : Series 320i ‘0’ : Series 0i |
5 |
Machine Tool Operation Status |
0-Stopped, 1-Running |
6 |
Machine Tool Emergency Stop Status |
0-Emergency Stop Active, Other-Emergency Stop Inactive |
7 |
Machine Tool Alarm Status |
0-No Warning, Other-Warning Exists |
8 |
Machine Tool Door Status |
0-Door Open, 1-Door Closed |
9 |
Machine Tool Chuck Status |
0-Chuck Released, 1-Chuck Clamped |
An example Lua teaching program for the robot loading and unloading process is provided. This example program includes controlling the CNC to close the door, open the door, start running, stop running, release the chuck, and clamp the chuck. It uses the current status of the CNC as a condition for decision-making and sets the robot to move between three points: the safe point, the pick-up point, and the place point, as shown in the code.
Example Lua Teaching Program for Collaborative Motion Between Robot and CNC:
1 while (1) do
2 CNCDoorClose()
3 CNCWorkStart()
4 WaitMs(1000)
5 t1,t2,t3,t4,t5,t6,t7,t8,t9=CNCGetStatus()
6 if t5 == 1 then
7 PTP(CNCsafe,100,-1,0)
8 else
9 CNCWorkStop()
10 CNCDoorOpen()
11 WaitMs(1000)
12 PTP(CNCg1,100,-1,0)
13 WaitMs(1000)
14 CNCChuckOpen()
15 PTP(CNCg2,100,-1,0)
16 PTP(CNCsafe,100,-1,0)
17 end
18 t1,t2,t3,t4,t5,t6,t7,t8,t9=CNCGetStatus()
19 if t8 == 0 then
20 if t5 == 0 then
21 PTP(CNCg2,100,-1,0)
22 PTP(CNCg1,100,-1,0)
23 CNCChuckFastening()
24 WaitMs(1000)
25 PTP(CNCsafe,100,-1,0)
26 end
27 end
28end
8.18. Robot Conveyor Tracking System Configuration
8.18.1. Conveyor Encoder Data Communication Connection Method
To achieve automated loading/unloading in machining processes, a CNC function package based on FOCAS communication was developed, enabling communication interaction and coordinated movement between collaborative robots and CNC machines.
As shown in the diagram, FOCAS communication is Ethernet-based. By connecting the robot controller’s Ethernet port with the machine’s built-in Ethernet port via network cable, FOCAS communication between the robot and machine can be established, enabling CNC control and machine status monitoring from the robot side.

Figure 8.18‑1 Robot Conveyor Tracking System Topology
In the system: (a) represents the computer, (b) represents the robot and its controller, and (c) represents the conveyor system consisting of conveyor belt, photoelectric sensor and encoder. The robot controller connects to the photoelectric sensor and conveyor via digital I/O communication, and to the conveyor encoder via RS485.
8.18.2. Conveyor Configuration
Access the conveyor tracking function configuration interface through “Basic Settings” > “Peripherals” > “Tracking” > “Conveyor” on the robot web page.

Figure 8.18‑2 Conveyor Tracking Configuration Page
On the conveyor tracking configuration page, click the “Conveyor I/O One-click Configuration” button to automatically configure the physical connections. Then select “Tracking Motion” from the “Function Selection” dropdown under “Parameter Configuration”, followed by configuring encoder properties, tracking workpiece coordinate system axes, vision pairing, and selecting “Chasing Motion” from the “Tracking Type” dropdown. At this point, you can input the tracking start distance and tracking end distance.
Tracking start distance: After the tracking signal is triggered, the robot starts moving when the conveyor reaches the set distance. When set to -1, it triggers automatically. Tracking end distance: The maximum distance the robot moves synchronously with the conveyor after starting motion.
8.18.3. Tracking Coordinate System Configuration
Tracking motion uses the workpiece coordinate system as the conveyor coordinate system, so the workpiece coordinate system needs to be set.
Click “Initial Settings” -> “Basic”, select “Workpiece Coordinate System” under “Coordinate System”, then choose a workpiece coordinate system other than “wobjcoord0” for calibration (calibration methods are not described here).

Figure 8.18‑3 Tracking Coordinate System Setup
8.18.4. Conveyor Tracking Chasing Motion Function
Chasing motion is a type of conveyor tracking motion. Compared with regular tracking motion, chasing motion doesn’t require teaching motion points directly above the workpiece coordinate system. Teaching can be done at any position in the workpiece coordinate system, and synchronization between the end effector and conveyor is achieved through the “tracking start distance” parameter, making it a more flexible tracking method.
8.18.4.1. Introduction to Conveyor Tracking Chasing Motion Function
Below is an example to illustrate the motion characteristics.

Figure 8.18‑4 Conveyor Tracking Chasing Motion Teaching Example
Where: x represents the conveyor movement direction in the workpiece coordinate system, a is the conveyor plane, b is the target workpiece to be grasped, c is the photoelectric sensor, d is the tracking start distance, and e is the tracking end distance. P1 to P4 are taught waypoints in sequential order, with P2 to P3 being the same point including gripper motion.

Figure 8.18‑5 Conveyor Tracking Chasing Motion Execution Example
When the above taught program starts running and the workpiece triggers the photoelectric switch signal, the robot will wait for the target to move below P1 before starting the tracking motion. The robot gripper will move along the trajectory shown above.
8.18.4.2. Chasing Motion Program Teaching
The chasing motion program logic is essentially the same as regular tracking motion logic, consisting of trigger signal acquisition, conveyor data acquisition, and tracking motion initiation.
Step 1: Click “Teaching Program” > “Program Programming”, then select and click the “Conveyor” button under “Peripheral Instructions” to access the conveyor instruction configuration page.

Figure 8.18‑6 I/O Real-time Monitoring Instruction
Step 2: Click “I/O Real-time Monitoring” and set the “Maximum Wait Teaching (ms)” to detect the tracking trigger signal in real time. Click “Add” and “Apply” to add the instruction to the program.

Figure 8.18‑7 Position Real-time Detection Instruction
Step 3: Click “Position Real-time Detection” and select “Tracking Motion” as the working mode. Click “Add” and “Apply” to add the instruction to the program.

Figure 8.18‑8 Tracking Enable Instruction
Step 4: Click “Tracking Enable” and select “Tracking Motion” as the working mode. Click “Add” and “Apply” to add the instruction to the program.
Step 5: Teach the Cartesian space motion and gripper peripheral motion after tracking is enabled. During motion, synchronization with the conveyor tracking will be maintained.

Figure 8.18‑9 Tracking Disable Instruction
Step 6: Click “Tracking Disable” and click “Add” and “Apply” to add the instruction to the program.

Figure 8.18‑10 A Typical Conveyor Program Tracking Motion Program
When two identical tracking motion targets are taught consecutively (which may include offset distance), the robot motion will block at this target position, achieving continuous synchronous tracking until the tracking distance reaches the termination distance.

Figure 8.18‑11 A Typical Conveyor Blocking Tracking Grasping Motion Program
When two identical tracking motion targets are taught consecutively (which may include offset distance) with gripper motion inserted in between, the robot will continue tracking the conveyor at this target position until the gripper motion is completed, achieving blocking tracking grasping.
8.19. Controller Peripheral Open Protocol - Welding Machine Protocol
8.19.1. Overview
The Controller Peripheral Open Protocol is typically a runnable LUA program. The program includes communication setup commands, cyclic instructions to write control data to slave devices, and read real-time status data. When executing this LUA program, the robot establishes communication with the device and exchanges data. The LUA program allows customization of communication parameters such as IP address, port number, and cycle time. Users must modify the protocol content according to the actual device configuration. Supported devices include grinding heads, laser sensors, CNC machines, welding machines, etc. The protocol file name must start with CtrlDev_
, e.g., CtrlDev_Welding.lua
. A maximum of 4 open protocols can run simultaneously.
In the robot WebApp, navigate to “Initial Setup” → “Peripherals” → “Control Box” → “Controller Peripheral Open Protocol,” click the “Upload” button, and upload the completed LUA program file to the controller. Select an open protocol ID and name, then click “Configure” (the protocol ID must match the ID written in the open protocol file).

Figure 8.19‑1 Uploading and Configuring the Controller Peripheral Open Protocol
For configured protocols, click the “Load” button. The running status indicator will light up, indicating the protocol is loaded successfully.

Figure 8.19‑2 Loading and Running Status Indicator for the Controller Peripheral Open Protocol
8.19.2. Welding Machine Open Protocol
The robot communicates with the welding machine via ModbusTCP using the Controller Peripheral Open Protocol. The LUA file defines the welding machine’s ModbusTCP registers, including communication parameters (IP address, port number) and control registers (arc start, wire feed, etc.). Upload and load this protocol to enable communication between the robot and the welding machine.
8.19.2.1. Welding Machine Open Protocol Example
1local id = 1 -- Protocol ID, must match the ID configured in WebApp
2local ctrlValues = {0, 0, 0, 0, 0, 0}
3local realTimeState = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
4ModbusTCPMasterClose(id)
5ModbusTCPMasterCreate('192.168.58.45', 502, 1, id)
6while(1) do
7setArcStart, setWireForward, setWireReverse, setShieldingGas, setTouchEnable, setRobotError,setRobotEnableState,default1,default2, default3, default4, setCurrent, setVoltage, SetMode = WeldingGetCtrlState()
8local ctrlWord = 0
9ctrlWord = SetBitWithIndex(ctrlWord, 0, setArcStart)
10ctrlWord = SetBitWithIndex(ctrlWord, 1, setWireForward)
11ctrlWord = SetBitWithIndex(ctrlWord, 2, setWireReverse)
12ctrlWord = SetBitWithIndex(ctrlWord, 3, setShieldingGas)
13ctrlWord = SetBitWithIndex(ctrlWord, 4, setTouchEnable)
14ctrlWord = SetBitWithIndex(ctrlWord, 7, setRobotError)
15ctrlValues[1] = setRobotEnableState
16ctrlValues[2] = ctrlWord
17ctrlValues[3] = 0
18ctrlValues[4] = setCurrent
19ctrlValues[5] = setVoltage
20ctrlValues[6] = 0
21ModbusTCPMasterSetHoldRegs(id, 201, 6, ctrlValues, "U16")
22localtmpCtrlMode={0,0,0,0}
23tmpCtrlMode[1]=SetMode
24ModbusTCPMasterSetHoldRegs(id,0x1000,1,tmpCtrlMode,"U16")
25sleep_ms(10)
26
27getWeldState, getCurrent, getVoltage,default1, default2, getWelderErrorCode = ModbusTCPMasterGetHoldRegs(id, 211, 6, "U16")
28realTimeState[1] = GetBitWithIndex(getWeldState, 0) + GetBitWithIndex(getWeldState, 1) * 2 --welderType
29realTimeState[2] = GetBitWithIndex(getWeldState, 5) --arc state(WCR)
30realTimeState[3] = GetBitWithIndex(getWeldState, 4) --touch state
31realTimeState[4] = GetBitWithIndex(getWeldState, 7) --welder error state
32realTimeState[12] = getCurrent --current
33realTimeState[13] = getVoltage --voltage
34realTimeState[14] = getWelderErrorCode --welder error code
35realTimeState[15] = getWeldState / 255 --heart jump
36WeldingSetRealtimeState(realTimeState)
37
38local stopFlag = GetOpenLUAStopFlag(id)
39if(stopFlag ~= 0) then
40ModbusTCPMasterClose(id)
41break
42end
43
44sleep_ms(10)
45end
8.19.2.2. Welding Machine Open Protocol Breakdown
The welding machine open protocol consists of three parts:
① Establish Communication: Specify the protocol ID (must match the ID set when loading the protocol), welding machine IP address, port number, etc., and use ModbusTCPMasterCreate()
to establish a ModbusTCP connection.
② Cyclic Writing of Control Data: The protocol reads welding control data from the robot controller and writes it to the welding machine. The WeldingGetCtrlState()
function returns values as defined in Table 8.19-1.
Table 8.19-1 WeldingGetCtrlState() Return Values
No. |
Type |
Name |
Description |
1 |
uint16_t |
setArcStart |
Arc start signal: 0-OFF, 1-ON |
2 |
uint16_t |
setWireForward |
Forward wire feed: 0-Stop, 1-Forward |
3 |
uint16_t |
setWireReverse |
Reverse wire feed: 0-Stop, 1-Reverse |
4 |
uint16_t |
setShieldingGas |
Shielding gas control: 0-OFF, 1-ON |
5 |
uint16_t |
setTouchEnable |
Wire touch sensing enable: 0-Disable, 1-Enable |
6 |
uint16_t |
setRobotError |
Robot error: 0-No error, 1-Error |
7 |
uint16_t |
setRobotEnableState |
Robot enable state: 0-Disabled, 1-Enabled |
8 |
uint16_t |
default1 |
Reserved |
9 |
uint16_t |
default2 |
Reserved |
10 |
uint16_t |
default3 |
Reserved |
11 |
uint16_t |
default4 |
Reserved |
12 |
uint16_t |
setCurrent |
Set welding current (0.1A) |
13 |
uint16_t |
setVoltage |
Set welding voltage (0.01V) |
14 |
uint16_t |
SetMode |
Set welding mode: 0-DC monoplex, 1-Pulse monoplex, 2-JOB mode, 3-Local control mode, 4-Separate mode, 5-CC/CV, 6-TIG, 7-CMT mode |
15 |
uint16_t |
default6 |
Reserved |
16 |
uint16_t |
default7 |
Reserved |
17 |
uint16_t |
default8 |
Reserved |
18 |
uint16_t |
default9 |
Reserved |
19 |
uint16_t |
default10 |
Reserved |
20 |
uint16_t |
default11 |
Reserved |
③ Cyclic Reading of Status Data: The protocol reads real-time status data from the welding machine via ModbusTCP and writes it to the robot controller. The WeldingSetRealtimeState()
function parameters are defined in Table 8.19-2.
Table 8.19-2 WeldingSetRealtimeState() Parameters
Type |
Name |
Array Index |
Description |
uint16_t[20] |
realTimeState |
1 |
Welding machine model |
uint16_t[20] |
realTimeState |
2 |
Arc state: 0-OFF, 1-ON |
uint16_t[20] |
realTimeState |
3 |
Wire touch state: 0-Not touched, 1-Touched |
uint16_t[20] |
realTimeState |
4 |
Welding machine error state: 0-No error, 1-Error |
uint16_t[20] |
realTimeState |
5 |
Reserved |
uint16_t[20] |
realTimeState |
6 |
Reserved |
uint16_t[20] |
realTimeState |
7 |
Reserved |
uint16_t[20] |
realTimeState |
8 |
Reserved |
uint16_t[20] |
realTimeState |
9 |
Reserved |
uint16_t[20] |
realTimeState |
10 |
Reserved |
uint16_t[20] |
realTimeState |
11 |
Reserved |
uint16_t[20] |
realTimeState |
12 |
Real-time welding current (0.1A) |
uint16_t[20] |
realTimeState |
13 |
Real-time welding voltage (0.01V) |
uint16_t[20] |
realTimeState |
14 |
Welding machine error code |
uint16_t[20] |
realTimeState |
15 |
Communication heartbeat data |
uint16_t[20] |
realTimeState |
16 |
Reserved |
uint16_t[20] |
realTimeState |
17 |
Reserved |
uint16_t[20] |
realTimeState |
18 |
Reserved |
uint16_t[20] |
realTimeState |
19 |
Reserved |
uint16_t[20] |
realTimeState |
20 |
Reserved |
8.19.2.3. Uploading and Loading the Welding Machine Open Protocol
Navigate to “Initial Setup” → “Peripherals” → “Control Box” → “Peripheral Open Protocol,” click “Upload,” and upload the welding machine open protocol file (e.g., CtrlDev_WELDING.lua
).

Figure 8.19‑3 Uploading the Welding Machine Open Protocol
In “Protocol Configuration,” select a protocol ID (must match the ID in the protocol file), e.g., ID 1, and select the protocol file. Click “Configure.”

Figure 8.19‑4 Configuring the Welding Machine Open Protocol
Click “Connect” to load the protocol. The running status indicator lights up when communication is established.

Figure 8.19‑5 Loading the Welding Machine Open Protocol
8.19.2.4. Welding Debugging and Program Writing
The robot controls the welding machine in three ways:
① Digital/Analog (Control Box I/O): Use DO/AO ports for arc start, wire feed, gas control, etc.
② Digital Communication (UDP): Communicate with a PLC via UDP, which then controls the welding machine.
③ Digital Communication (ModbusTCP): Load the welding machine open protocol for direct control.
8.19.2.4.1. Welding Debugging
Ensure the protocol is loaded and register addresses are correct. Navigate to “Initial Setup” → “Peripherals” → “Welding Machine,” select “Digital Communication (ModbusTCP).”

Figure 8.19‑6 Selecting “Digital Communication (ModbusTCP)”
Click “Arc Start,” “Arc Stop,” “Gas ON,” etc., and verify the welding machine responds correctly.

Figure 8.19‑7 Welding Debugging
8.19.2.4.2. Writing a Welding Program
Navigate to “Initial Setup” → “Teach Program” → “Program Editing,” and create a new program (e.g., testWeld.lua
).

Figure 8.19‑8 Creating a Welding LUA Program
Select “Welding Instructions.”

Figure 8.19‑9 Selecting “Welding Instructions”
Click “Welding,” then add arc start/stop instructions.

Figure 8.19‑10 Adding Welding Instructions
Add welding start/end points. Switch to auto mode and run the program.

Figure 8.19‑13 Welding Program
8.19.2.5. Unloading the Welding Machine Open Protocol
Navigate to “Initial Setup” → “Peripherals” → “Control Box” → “Peripheral Open Protocol,” and click “Unload.”

Figure 8.19‑14 Unloading the Open Protocol
The status indicator turns off.

Figure 8.19‑15 Open Protocol Unloaded
An error will appear if the protocol is not loaded during welding.

Figure 8.19‑16 “Protocol Not Loaded” Error
8.20. Using Open Protocol to Adapt Welding Handles
8.20.1. Protocol Configuration
When using the open protocol to adapt a welding handle, you need to first enter the web interface to upload and configure the open protocol after the robot is powered on.
Step-by-step operation: Click “Initial Settings” -> “Peripherals” -> “End Tool” -> “Open Protocol”, then click “End Protocol Communication”, click “Enter Boot”, and finally click “Upload” to upload the open protocol. After the upload is complete, restart the device to enable the end Lua open protocol for welding handle adaptation.

Figure 8.20‑1 Uploading End Open Protocol
Step-by-step operation: Click “Initial Settings” -> “Peripherals” -> “End Tool” -> “Open Protocol”, then click “Enable End Protocol”, select the device type as “Welding Handle”, and click “Enable” to complete the adaptation. After enabling, the parameters will be retained after power cycling.

Figure 8.20‑2 Enabling End Open Protocol
8.20.2. Protocol Template
Example for Jasic-compatible protocol:
function Getbit(X,Bit) --Extract specified bit from X
return ((X&(1<<Bit))>>Bit)
end
while(1)
do
IwdgTaskHandle()
MainLoop()
UpDownLoadHandle()
SdoRwPara()
EndErrClear()
local BFlag=LuaBreak()
if(BFlag==1)then
break
end
RxData={}
T0={0x7D,0x08,0x22,0xB3,0x01,0x00}
T1={0x7D,0x08,0x22,0xB4,0x03,0x00}
T2={0x7D,0X08,0X22,0XB5,0x1E,0x00}
DelayMs(5)
RxLen=WeldToolMasterGetCmd(RxData) --Gets commands from welding torch (master mode)
if (RxData[1]==0x7D)and(RxData[2]==0x08)and(RxData[3]==0x22) then
if(RxData[4] == 0xB3)then --Function code 0xB3 (set welding params)
local SetParams={A2=RxData[7],A1=RxData[8],A6=(ByteToDwFloat(RxData[9],RxData[10],RxData[11],RxData[12]))*1000,
A8=(ByteToDwFloat(RxData[13],RxData[14],RxData[15],RxData[16])),A7=(ByteToDwFloat(RxData[17],RxData[18],RxData[19],RxData[20])),
A4=(ByteToDwFloat(RxData[21],RxData[22],RxData[23],RxData[24]))*1000,A5=(ByteToDwFloat(RxData[25],RxData[26],RxData[27],RxData[28]))*1000}
SetWeldParams(SetParams) --Sets welding parameters (3 zones: A,B,C)
Dword=GetRobotState() --Gets robot status (bit0: enable, bit1: fault, bit2: motion)
T0[7]=((Dword)&(1<<1))
T0[8],T0[9]=WeldToolCrcValue(T0) --Custom CRC check
T0[10]=0x0E
EndTxWeldData(T0) --Sends response packet
DelayMs(5)
end
if(RxData[4] == 0xB4)then --0xB4 real-time control
local key={K0=Getbit(RxData[7],0),K1=Getbit(RxData[7],1),K2=Getbit(RxData[7],2),K3=Getbit(RxData[7],3),
K4=Getbit(RxData[7],4),K5=Getbit(RxData[7],5),K6=Getbit(RxData[7],6),K7=Getbit(RxData[7],7),
K8=Getbit(RxData[8],0),K9=Getbit(RxData[8],1),K10=Getbit(RxData[8],2),K11=Getbit(RxData[8],3),
K12=Getbit(RxData[8],4),K13=Getbit(RxData[8],5),K14=Getbit(RxData[8],6),K15=Getbit(RxData[9],0),
K16=Getbit(RxData[9],1),K17=Getbit(RxData[9],2),K18=Getbit(RxData[9],3),K19=Getbit(RxData[9],4),
K20=Getbit(RxData[9],5),K21=Getbit(RxData[9],6),K22=Getbit(RxData[9],7),K23=Getbit(RxData[10],0),
K24=Getbit(RxData[10],1)} --Key values per protocol
SetWeldToolKeys(key) --Uploads button states
Dword=GetRobotState()
T1[7]=(Dword)&(0x1)
T1[8]=(Dword>>1)&(0x1)
T1[9]=(Dword>>2)&(0x1)
T1[10],T1[11]=WeldToolCrcValue(T1)
T1[12]=0X0E
EndTxWeldData(T1)
DelayMs(5)
end
if(RxData[4] == 0xB5)then --Read welding params
local wldpams={"A2","A1","A6","A8","A7","A4","A5"}
GetWeldParams(wldpams) --Retrieves parameter values
T2[7]=wldpams[1]
T2[8]=wldpams[2]
wldpams[3]=wldpams[3]/1000
wldpams[6]=wldpams[6]/1000
wldpams[7]=wldpams[7]/1000
for i=0,4 do
T2[9+(i*4)+3],T2[9+(i*4)+2],T2[9+(i*4)+1],T2[9+(i*4)+0]=DwFloatToByte(wldpams[3+i])
end
for i=0,7 do
T2[29+i]=0
end
T2[37],T2[38]=WeldToolCrcValue(T2)
T2[39]=0x0E
EndTxWeldData(T2)
DelayMs(5)
end
end
LuaGc()
end
8.20.3. Supported Commands
Table 8.20-1 Supported Commands
Bit |
Description |
0 |
Clear program |
1 |
Save program |
2 |
Generate safety point (LIN) |
3 |
Generate linear motion point (LIN) |
4 |
Add arc transition point |
5 |
Add arc endpoint (ARC) |
6 |
Toggle mode (default: manual) |
7 |
Toggle robot operation state |
8 |
Toggle drag mode |
9 |
Start spot welding |
10 |
Add weave start |
11 |
Add weave end |
12 |
Jog +X |
13 |
Jog -X |
14 |
Jog +Y |
15 |
Jog -Y |
16 |
Jog +Z |
17 |
Jog -Z |
18 |
Jog +RX |
19 |
Jog -RX |
20 |
Jog +RY |
21 |
Jog -RY |
22 |
Jog +RZ |
23 |
Jog -RZ |
24 |
Generate home point |
25 |
PTP |
26 |
Fixed-pose drag |
27 |
Welding recovery |
28 |
Welding abort |
29 |
SetDO |
30 |
Offline |
31 |
Parameter update |
32 |
ArcStart |
33 |
ArcEnd |
34 |
Lin+ArcStart+weaveStart |
35 |
Lin+ArcEnd+weaveEnd |
36 |
Lin+ArcStart |
37 |
Lin+ArcEnd |
38 |
Undo program |
39 |
Reserved |
… |
Reserved |
63 |
Reserved |
8.20.4. Configurable Parameters
Table 8.20-2 Configurable Parameters
Index |
Parameter |
Type |
Range |
0 |
Welding speed |
float |
0-100% |
1 |
Travel speed |
float |
0-100% |
2 |
Arc start/end timeout |
float |
0-65535(ms) |
3 |
Weave left dwell |
float |
0-99999(ms) |
4 |
Weave right dwell |
float |
0-99999(ms) |
5 |
Spot weld time |
float |
0-99999(ms) |
6 |
Weave width |
float |
0-1000(0.1mm) |
7 |
Weave frequency |
float |
0-100(0.1Hz) |
8 |
Welder control type (0=IO box, 1=UDP) |
float |
0-255 |
9 |
Process ID |
float |
0-99 |
10 |
Weave type |
float |
0-255 |
11 |
Current analog output |
float |
0-1 |
12 |
Voltage analog output |
float |
0-1 |
13 |
DO port |
float |
0-15 |
14 |
Weave parameter ID |
float |
0-255 |
15 |
Manual mode speed |
float |
0-100% |
16 |
Auto mode speed |
float |
0-100% |
17 |
Welding current |
float |
0-999990(0.1A) |
18 |
Welding voltage |
float |
0-999990(0.1V) |
19 |
Max jog distance |
float |
0-1000(0.1mm) |
20 |
Welder ready DI |
float |
0-127 |
21 |
Arc success DI |
float |
0-127 |
22 |
Recovery DI |
float |
0-127 |
23 |
Abort DI |
float |
0-127 |
24 |
Arc start DO |
float |
0-127 |
25 |
Gas check DO |
float |
0-127 |
26 |
Wire feed+ DO |
float |
0-127 |
27 |
Wire feed- DO |
float |
0-127 |
28 |
Recovery enable |
float |
0-1 |
29 |
Recovery speed |
float |
0-100% |
30 |
Motion type |
float |
0-1 |
31 |
Arc loss detection |
float |
0-1 |
32 |
Include wait time |
float |
0-1 |
33 |
Weave callback ratio |
float |
0-100% |
34 |
Weave position wait type |
float |
0-255 |
35 |
Arc start time |
float |
0-65535(ms) |
36 |
Arc end time |
float |
0-65535(ms) |
37 |
Arc loss confirm time |
float |
0-65535(ms) |
38 |
Overlap distance |
float |
0-1000(0.1mm) |
39 |
Arc start current |
float |
0-999990(0.1A) |
40 |
Arc start voltage |
float |
0-999990(0.1V) |
41 |
Arc end current |
float |
0-999990(0.1A) |
42 |
Arc end voltage |
float |
0-999990(0.1V) |
43 |
Min welding current |
float |
0-999990(0.1A) |
44 |
Max welding current |
float |
0-999990(0.1A) |
45 |
Min current analog out |
float |
0-100(0.1A) |
46 |
Max current analog out |
float |
0-100(0.1A) |
47 |
Min welding voltage |
float |
0-2000(0.1V) |
48 |
Max welding voltage |
float |
0-2000(0.1V) |
49 |
Min voltage analog out |
float |
0-100(0.1V) |
50 |
Max voltage analog out |
float |
0-100(0.1V) |
51 |
Triangle weave left length |
float |
0-1000(0.1mm) |
52 |
Triangle weave right length |
float |
0-1000(0.1mm) |
53 |
Weave direction azimuth |
float |
-1800-1800(0.1°) |
54 |
Weave direction tilt |
float |
-1800-1800(0.1°) |
55 |
Triangle apex dwell |
float |
0-99999(ms) |