---
version: "1.32"
variant: "Publish"
language: "en"
---
# API manual(V1.32)

## Preface

The Doosan Robotics API was developed with the programming language C/C++, and can be used to directly control the Doosan robot controller from a user application, not from a teach pendant. This API manual describes the API functions.

The contents of this manual are current as of the date this manual was written, and product-related information may be modified without prior notification to the user.

For more information on the revised manual, please visit our Robot LAB website. (<https://robotlab.doosanrobotics.com/>)

### Copyright

The copyright and intellectual property rights of the contents of this manual are held by Doosan Robotics. It is therefore prohibited to use, copy, or distribute the contents without written approval from Doosan Robotics. In the event of abuse or modification of the patent right, the user will be fully accountable for the consequences.

While the information in this manual is reliable, Doosan Robotics will not be held accountable for any damage that occurs due to errors or typos. The contents of this manual may be modified according to product improvement without prior notification.

© Doosan Robotics Inc., All rights reserved

### History of Document Creation/Revision

| **Revision No.** |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  **Creation/Revision Pages and Contents**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | **Revision Date** |
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| 1.0              | Initial Creation and Distribution                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | 2018-06-29        |
| 1.1              | Update new commands                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | 2020-05-20        |
| 1.11             | Update function name(DRL style)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | 2020-05-28        |
| 1.12             | Split the header(add DRCFEx class)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 2020-06-08        |
| 1.13             | Add flange_serial function, etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | 2020-10-19        |
| 1.14             | Correction of typos / Correction of some functions (movesj/set_safe_stop_reset_type/ close_connection, etc.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 2020-10-19        |
| 1.15             | Add missing function set_user_home / Flange_serial_read parameter added (timeout)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | 2021-03-19        |
| 1.16             | Add missing function servo_off function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | 2021-03-24        |
| 1.17             | Modify version information : GL010110                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | 2021-06-09        |
| 1.18             | Modify version information : GL010111 Add new function : get_override_speed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 2021-09-15        |
| 1.19             | Modify version information : GL010112 Add new function . ikin(extension) . set_monitoring_robot_system . change_collision_detection . add_sw_module . del_sw_module . update_sw_module . release_protective_stop . set_on_monitoring_update_module                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 2021-11-22        |
| 1.2              | Modifyversion information : GL010112 Add new function . add new function for real-time control(refer to the other manual). . set_safety_mode . set_on_monitoring_state                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 2021-12-16        |
|                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                   |
| 1.23             | 3.3.21: Change the argument part TOnMonitoringSafetyState -\> TOnMonitoringSafetyStateCB Add strcut.MESSAGE_PROGRESS 3.7.14: Argument part TYPE_TYPE -\> change to DATA_TYPE Added enum constants SAFETY_MODE / SAFETY_EVENT 3.8.11 Modify the argument to enum -\> enum.MODBUS_REGISTER_TYPE Add enum constant COORDINATE_SYSTEM Resolve enum constant ROBOT_STATE notation error delete get_override_speed add realtime control(chapter 4)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 2022-03-10        |
| 1.24             | Edited content related to enum.SAFETY_MODE_EVENT Fixed content related to SAFETY_MODE_EVENT parameter in set_safety_mode example Add port parameter to flange_serial related command (specify available for new flange) Change version information -\> GL010115 Add new function - set_workpiece_weight - set_mode_tool_analog_input - set_tool_digital_output_type - set_tool_digital_output_level - get_tool_analog_input Add enum.COG_REFERNCE Add enum.ADD_UP Add enum.OUTPUT_TYPE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 2022-04-29        |
| 1.25             | delete port parameter in flange_serial_open / close function add cause sentence for set_tool / set_workpiece_weight function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 2022-05-04        |
| 1.26             | Fixed enum.CONTROL_SPACE fixed set_on_monitoring_safety_state fixed enum.MOVE_REFERENCE fixed change_operation_speed fixed TOnRobotSystemCB add new property function get_current_posj get_control_space get_current_velj get_desired_posj get_current_tool_flange_posx get_current_velx get_desired_velx get_joint_torque get_external_torque get_tool_force add enum.ROBOT_SPACE add struct.ROBOT_VEL / struct.ROBOT_FORCE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 2022-06-02        |
| 1.27             | fixed drl_stop function parameter : enum.STOP_TYPE -\> unsigned char                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 2022-07-04        |
| 1.28             | Fix enum.ROBOT_STATE description Add contents of enum.ROBOT_MODE delete enum.ROBOT_SPACE duplicates Add set_palletizing_mode command add move_home notice                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | 2023-02-20        |
| 1.29             | Add query_modbus_data_list                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 2023-03-24        |
| 1.30             | Update Features * Add Arm64 Drfl Binary * Support for Ubuntu 22.04 Version * Improve Realtime Performance * Fix Blending Motion Related Issues * Change return value of flange_serial_read Update Definition * Add enum: MOVE_ORIENTATION, SPIRAL_DIR, ROT_DIR, DR_SERVOJ_TYPE * Add struct: SAFETY_CONFIGURATION_EX2, CONFIG_SAFETY_IO_OP * Add parameters for adjusting speed and acceleration of each axis in movej * Add extended movejx parameters * Add extended amovej parameters * Add extended amovejx parameters * Add extended servoj parameters Update Function * Add get_safety_configuration(Extension) * Update ikin(Add_iter_threshold) * Update ikin_norm * Update movec(Extension) * Update amovec(Extension) * Update move_spiral(Extension) * Update amove_spiral(Extension) * Update servoj(Extension)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 2024-11-27        |
| 1.31             | Update Features * Add option of Controller(DRCF) version( #define DRCF_VERSION) Update Definition * Add MONITORING_CTRLIO_EX2 * Add READ_CTRLIO_INPUT_EX2 * Add READ_CTRLIO_OUTPUT_EX2 * Update GPIO_CTRLBOX_DIGITAL_INDEX for v3 controller * Add SAFETY_CONFIGURATION_EX2_V3 Update Function * Update get_safety_configuration_ex * Update get_safety_configuration with new feature * Remove SetOnMonitoringData (due to overlap with set_on_monitoring_data) * Remove SetOnMonitoringCtrlIO (due to overlap with set_on_monitoring_ctrl_io)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | 2024-12-03        |
| 1.32             | Update Features * Add welding-related APIs Update Definition * struct.ROBOT_WELDING_DATA * struct.WELDING_CHANNEL * struct.CONFIG_WELDING_INTERFACE * struct.CONFIG_WELD_SETTING * struct.GET_WELDING_SETTING_RESPONSE * struct.ADJUST_WELDING_SETTING * struct.CONFIG_TRAPEZOID_WEAVING_SETTING * struct.CONFIG_ZIGZAG_WEAVING_SETTING * struct.CONFIG_CIRCULE_WEAVING_SETTING * struct.CONFIG_SINE_WEAVING_SETTING * struct.CONFIG_WELDING_DETAIL_INFO * struct.CONFIG_ANALOG_WELDING_INTERFACE * struct.CONFIG_ANALOG_WELDING_SETTING * struct.ANALOG_WELDING_ADJUST_SETTING * struct.CONFIG_DIGITAL_WELDING_IF_MAPPING_DATA * struct.CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS * struct.CONFIG_DIGITAL_WELDING_INTERFACE_MODE * struct.CONFIG_DIGITAL_WELDING_INTERFACE_TEST * struct.CONFIG_DIGITAL_WELDING_INTERFACE_CONDITION * struct.CONFIG_DIGITAL_WELDING_INTERFACE_OPTION * struct.CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2 * struct.CONFIG_DIGITAL_WELDING_INTERFACE_MONITORI * NG struct.CONFIG_DIGITAL_WELDING_INTERFACE_OTHER * struct.DIGITAL_WELDING_RESET * struct.CONFIG_DIGITAL_WELDING_MODE * struct.CONFIG_DIGITAL_WELDING_CONDITION * struct.CONFIG_DIGITAL_WELDING_ADJUST * struct.MEASURE_TCP_WELDING * struct.TACK_WELDING_SETTING * struct.DIGITAL_FORCE_WRITE_DATA * struct.ROBOT_DIGITAL_WELDING_DATA * struct.DIGITAL_WELDING_COMM_STATE Update Function * set_on_monitoring_welding_data * set_on_monitoring_analog_welding_data * set_on_monitoring_digital_welding_data * app_weld_weave_cond_trapezoidal * app_weld_weave_cond_zigzag * app_weld_weave_cond_circular * app_weld_weave_cond_sinusoidal * app_weld_enable_analog * app_weld_set_weld_cond_analog * app_weld_adj_welding_cond_analog * app_weld_set_interface_eip_m2r_process * app_weld_set_interface_eip_r2m_mode * app_weld_set_interface_eip_r2m_process * app_weld_set_interface_eip_r2m_test * app_weld_set_interface_eip_r2m_condition * app_weld_set_interface_eip_r2m_option * app_weld_set_interface_eip_m2r_process2 * app_weld_set_interface_eip_m2r_monitoring | 2024-01-15        |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_adj\_motion\_offset

## Functions

This function applies Y and Z offsets to the robot's motion path.

## Arguments

|  Field   | DataType | Value |    Remarks    |
|----------|----------|-------|---------------|
| fOffsetY | float    | -     | Y Offset (mm) |
| fOffsetZ | float    | -     | Z Offset (mm) |

## Return

| **Value** | Remarks |
|-----------|---------|
| 0         | Failure |
| 1         | Success |

## Example

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| float fOffsetY = 2.0; // Y Offset(mm) float fOffsetZ = 3.0; // Z Offset(mm) // app_weld_adj_motion_offset Call bool result = Drfl.app_weld_adj_motion_offset(fOffsetY, fOffsetZ); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_adj\_welding\_cond\_analog

## Features

This function adjusts welding and weaving conditions during analog welding. It is typically used immediately before calling motion commands (`movel()`, `movec()`, `moveb()`, `movesx()`) when you want to change welding conditions for each section in a continuous path.

When you input adjustment parameters with this command, the corresponding welding and weaving conditions are adjusted. In this case, you cannot adjust the welding/weaving conditions in real-time in the welding monitoring information window of the TP (Teaching Pendant).

To return to the original conditions (welding/weaving conditions set by `app_weld_set_weld_cond_analog()` and `app_weld_weave_cond_trapezoidal()`, etc.) from the adjusted conditions, execute with `flag_reset=1`. When `flag_reset=1` is set, it returns to the final condition adjusted in real-time from the TP (the ratio of the weaving width (wv_width_ratio), which cannot be adjusted in real-time, is changed to 1), and you can adjust the welding conditions in real-time from the TP.

## Arguments

| Argument Name |   Data Type   |         Default Value         |                                         Description                                          |
|---------------|---------------|-------------------------------|----------------------------------------------------------------------------------------------|
| `bRealTime`   | unsigned char | 0: present \<br\> 1: realtime |                                                                                              |
| `bResetFlag`  | unsigned char | -                             | 0: Apply adjusted value 1: Apply reference target (`app_weld_set_weld_cond_analog()`) value  |
| `fTargetVol`  | float         | -                             | Target voltage (V)                                                                           |
| `fFeedingVel` | float         | -                             | Feeding speed (m/min)                                                                        |
| `fTargetVel`  | float         | -                             | Target speed (mm/sec) Note that the input unit of the teaching pendant is different (Cm/min) |
| `fOffsetY`    | float         | -                             | Weave coordinate system, y-direction offset (mm)                                             |
| `fOffsetZ`    | float         | -                             | Weave coordinate system, z-direction offset (mm)                                             |
| `fWidthRate`  | float         | -                             | Ratio of changed weaving width to set weaving width (0\~2)                                   |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // app_weld_set_weld_cond_analog Call unsigned char bRealTime = 0; unsigned char bResetFlag = 0; float fTargetVol = 0; float fFeedingVel = 0; float fTargetVel = 0; float fOffsetY = 0; float fOffsetZ = 0; float fWidthRate = 0; bool result = Drfl.app_weld_adj_welding_cond_analog(bRealTime, bResetFlag,  fTargetVol,  fFeedingVel,  fTargetVel,  fOffsetY,  fOffsetZ,  fWidthRate); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_adj\_welding\_cond\_digital

## Features

This function adjusts welding and weaving conditions during welding with a communication-based welder. It is typically used immediately before calling motion commands (`movel()`, `movec()`, `moveb()`, `movesx()`) when you want to change welding conditions for each section in a continuous path.

When you input adjustment parameters with this command, the corresponding welding and weaving conditions are adjusted. In this case, you cannot adjust the welding/weaving conditions in real-time in the welding monitoring information window of the TP (Teaching Pendant).

To return to the original conditions (welding/weaving conditions set by `app_weld_set_weld_cond_digital()` and `app_weld_weave_cond_trapezoidal()`, etc.) from the adjusted conditions, execute with `flag_reset=1`. When `flag_reset=1` is set, it returns to the final condition adjusted in real-time from the TP (the ratio of the weaving width (`wv_width_ratio`), which cannot be adjusted in real-time, is changed to 1), and you can adjust the welding conditions in real-time from the TP.

## Arguments

|         Argument Name         |            Data Type            | Default Value |                       Description                       |
|-------------------------------|---------------------------------|---------------|---------------------------------------------------------|
| `pConfigdigitalweldingadjust` | `CONFIG_DIGITAL_WELDING_ADJUST` | None          | Digital welding condition adjustment settings structure |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

    CONFIG_DIGITAL_WELDING_ADJUST adjustData;
    adjustData._bRealTime = 1; // Real-time adjustment status (1: Real-time)
    adjustData._bResetFlag = 0; // Reset flag (0: Current value)
    adjustData._fTargetVel = 110.0; // Target speed setting
    adjustData._fOffsetY = 12.0; // Weave Y offset setting
    adjustData._fOffsetZ = 6.0; // Weave Z offset setting
    adjustData._fWidthRate = 1.2; // Weave width ratio setting
    adjustData._fDynamicCor = 0.8; // Dynamic correction value setting
    adjustData._fVoltageCor = 22.0; // Voltage correction value setting
    adjustData._nJobNumber = 1; // Job number setting
    adjustData._nSynergicID = 1; // Synergic ID setting

    // Call the app_weld_adj_welding_cond_digital function (corrected typo)
    bool result = Drfl.app_weld_adj_welding_cond_digital(adjustData);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_enable\_analog

## Features

This function activates the analog welding function. It takes the connection and environment information of the welder, which can be connected via analog input/output and digital signal output, as input parameters.

The target welder must support the analog interface method and be able to receive target current and target voltage commands from the analog output channels of the connected controller.

**Analog Output Configuration:**

* Set the channel number (1 or 2) and output mode (current/voltage) of the physically connected analog channel to `ch_v_out` and `ch_f_out`, respectively.

* The analog input/output range of the controller is 0\~10V for voltage mode and 4\~20mA for current mode.

* Ensure that the setting mode and output range for each channel are compatible with the input specifications and range of the welder.

  * For example, if the target value input range of the welder is 0\~10V, it is appropriate to set the output channel of the controller to voltage mode (0\~10V output range).

  * As another example, if the input channel specification of the welder is 2\~15V, set the corresponding analog channel of the controller to current mode (4\~20mA output range) and connect a 75 ohm resistor to the output line to output a voltage in the range of 3\~15V. In this case, commands cannot be given in the range between 2V and 3V, which cannot be set by the controller.

* It is recommended to configure the settings to include as much of the input range required by the welder as possible.

* Set the maximum and minimum analog output range of the controller and the maximum and minimum output range of the welder in `spec_v_out` and `spec_f_out`.

  * `spec_v_out`/`spec_f_out` first item = `WO_min`

  * `spec_v_out`/`spec_f_out` second item = `CO_min`

  * `spec_v_out`/`spec_f_out` third item = `WO_max`

  * `spec_v_out`/`spec_f_out` fourth item = `CO_max`

  where `WO_min` and `WO_max` are the minimum and maximum output specifications of the welder, and `CO_min` and `CO_max` are the analog output values of the controller corresponding to `WO_min` and `WO_max`, respectively.

**Welding Current and Monitoring:**

* The welding current output from the welder varies depending on the wire feeding speed, the material of the base material, the material/type/discharge length of the welding wire, the welding voltage, etc., and this must be checked by connecting a welder or a separately mounted current sensor.

* To check the voltage/current measurement value being welded, an analog output type welder or a separate sensor must be connected. Set the analog input channel number and input mode of the controller corresponding to this to `ch_v_in` and `ch_c_in`.

* Set the maximum and minimum analog input range of the controller and the maximum and minimum measurement range of the sensor in `spec_v_in` and `spec_c_in`.

  * `spec_v_in`/`spec_c_in` first item = `SO_min`

  * `spec_v_in`/`spec_c_in` second item = `CI_min`

  * `spec_v_in`/`spec_c_in` third item = `SO_max`

  * `spec_v_in`/`spec_c_in` fourth item = `CI_max`

  where `SO_min` and `SO_max` are the minimum and maximum measurement values of the sensor, respectively, and `CI_min` and `CI_max` are the input values of the controller corresponding to `SO_min` and `SO_max`, respectively.

**Digital Signal Configuration:**

* Set the channel numbers for ARC-ON/OFF (welding output signal-start/end), GAS-ON/OFF (gas output signal-start/end), INCHING-Forward-ON/OFF (forward wire feeding signal-start/end), INCHING-Backward-ON/OFF (reverse wire feeding signal-start/end), and BlowOut-ON/OFF (torch cleaning gas output signal-start/end) connected to the welder in a digital contact method.

* Selectively enter signal outputs other than the ARC-ON/OFF signal according to whether the welder supports the corresponding function.

## Arguments

|          Argument Name          |             Data Type             | Default Value |            Description             |
|---------------------------------|-----------------------------------|---------------|------------------------------------|
| `pConfiganalogweldinginterface` | `CONFIG_ANALOG_WELDING_INTERFACE` | -             | Analog welding interface structure |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Define CONFIG_ANALOG_WELDING_INTERFACE CONFIG_ANALOG_WELDING_INTERFACE config; config._bMode = 1; // Start mode // Target Voltage Configuration config._tTargetVoltage._iChannel = 1; config._tTargetVoltage._iChannelType = 1; // Voltage config._tTargetVoltage._iRealMinOut = 0.0; config._tTargetVoltage._iMinOut = 0.0; config._tTargetVoltage._iRealMaxOut = 200.0; config._tTargetVoltage._iMaxOut = 200.0; // Feeding Speed Configuration config._tFeedingSpeed._iChannel = 1; config._tFeedingSpeed._iChannelType = 0; // Current config._tFeedingSpeed._iRealMinOut = 0.0; config._tFeedingSpeed._iMinOut = 0.0; config._tFeedingSpeed._iRealMaxOut = 150.0; config._tFeedingSpeed._iMaxOut = 150.0; // Welding Voltage Configuration config._tWeldingVoltage._iChannel = 1; config._tWeldingVoltage._iChannelType = 1; // Voltage config._tWeldingVoltage._iRealMinOut = 0.0; config._tWeldingVoltage._iMinOut = 0.0; config._tWeldingVoltage._iRealMaxOut = 200.0; config._tWeldingVoltage._iMaxOut = 200.0; // Welding Current Configuration config._tWeldingCurrent._iChannel = 1; config._tWeldingCurrent._iChannelType = 0; // Current config._tWeldingCurrent._iRealMinOut = 0.0; config._tWeldingCurrent._iMinOut = 0.0; config._tWeldingCurrent._iRealMaxOut = 150.0; config._tWeldingCurrent._iMaxOut = 150.0; // Other Configuration config._iArcOnDO = 1; config._iGasOnDO = 1; config._iInchPDO = 1; config._iInchNDO = 1; config._iBlowOutValue = 1; // app_weld_enable_analog Call Drfl.app_weld_enable_analog(config); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_enable\_digital

## Features

This function activates the welding function using a communication interface. Only EtherNet/IP interface is supported.

## Arguments

| Argument Name |   Data Type   | Default Value |                 Description                  |
|---------------|---------------|---------------|----------------------------------------------|
| `bMode`       | unsigned char | None          | Digital welding mode setting (0: Deactivate) |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|------------------------------------------------------------------------------------------------------------------------|
| // Digitan welding mode unsigned char bMode = 0; // 0: deactivated bool result = Drfl.app_weld_disable_digital(bMode); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_reset\_interface

## Features

This function resets the welding interface to its initial state.

## Arguments

| Argument Name | Data Type | Default Value | Description |
|---------------|-----------|---------------|-------------|
| (none)        |           |               |             |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|-----------------------------------|
| Drfl.app_weld_reset_interface(1); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_m2r\_monitoring

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It sets up the interface related to welding status monitoring among the communication data sent from the welder to the robot controller.

Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|               Argument Name                |                   Data Type                   | Default Value |                       Description                       |
|--------------------------------------------|-----------------------------------------------|---------------|---------------------------------------------------------|
| `pConfigdigitalweldinginterfacemonitoring` | `CONFIG_DIGITAL_WELDING_INTERFACE_MONITORING` | None          | Digital welding interface monitoring settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Creating a structure for EIP M2R monitoring data settings and setting values CONFIG_DIGITAL_WELDING_INTERFACE_MONITORING monitoringData; monitoringData._tWeldingVoltage = {0,}; monitoringData._tWeldingCurrent = {0,}; monitoringData._tWireFeedSpeed = {0,}; monitoringData._tWireStick = {0,}; monitoringData._tError = {0,}; monitoringData._tErrorNumber = {0,}; bool result = Drfl.app_weld_set_interface_eip_m2r_monitoring(monitoringData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_m2r\_other

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It allows you to set up the interface for additional functions needed beyond the default settings provided by the following commands:

* `app_weld_set_interface_eip_m2r_process()`

* `app_weld_set_interface_eip_m2r_monitoring()`

* `app_weld_set_interface_eip_m2r_other()`

This configuration involves communication data that is sent from the welder to the robot controller. Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|             Argument Name             |                Data Type                 | Default Value |                    Description                     |
|---------------------------------------|------------------------------------------|---------------|----------------------------------------------------|
| `pConfigdigitalweldinginterfaceother` | `CONFIG_DIGITAL_WELDING_INTERFACE_OTHER` | None          | Digital welding interface other settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                          Description                                                                           |
|----------------------|---------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \* 1-bit (disable Low): 0 \* 1-bit (disable High): 1 \* 2-bit: 2 \* 4-bit: 3 \* 8-bit (byte): 4 \* 15-bit: 5 \* 16-bit (short): 6 \* 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Create a structure for EIP M2R additional data settings and set values. CONFIG_DIGITAL_WELDING_INTERFACE_OTHER otherData; otherData._tOption1 = {0,}; otherData._tOption2 = {0,}; otherData._tOption3 = {0,}; otherData._tOption4 = {0,}; otherData._tOption5 = {0,}; otherData._tOption6 = {0,}; otherData._tOption7 = {0,}; otherData._tOption8 = {0,}; otherData._tOption9 = {0,}; otherData._tOption10 = {0,}; bool result = Drfl.app_weld_set_interface_eip_m2r_other(otherData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_m2r\_process

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It allows you to set the interface for the interlocking signals between the controller and the welder, which are necessary for welding execution, among the communication data sent from the welder to the robot controller.

Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly execute the welding function using an EtherNet/IP communication method welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

* Robot motion start is interlocked with the `current_flow` signal from the welder, but when the `main_current` item is set, it is interlocked with that signal.

* Robot motion end is interlocked with the `current_flow` signal from the welder, but when the `process_active` item is set, it is interlocked with that signal.

## Arguments

|   Argument Name   | Data Type | Default Value |                  Description                  |
|-------------------|-----------|---------------|-----------------------------------------------|
| `_tCurrentFlow`   | See below | See below     | Current flow during welding (welder specific) |
| `_tProcessActive` |           |               | Welding process activation (welder specific)  |
| `_tMainCurrent`   |           |               | Main welding current flow (welder specific)   |
| `_tMachineReady`  |           |               | Welder standby (welder specific)              |
| `_tCommReady`     |           |               | Communication standby (welder specific)       |

The data type, default value, and description of the arguments are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                  Description                                                                  |
|----------------------|---------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 Used: 1                                                                                                                             |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                 |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                            |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                            |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                            |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                    |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                     |
| `_nComnDataType`     | unsigned char | None          | Data size 1-bit (disable Low): 0, 1-bit (disable High): 1, 2-bit: 2, 4-bit: 3, 8-bit (byte): 4, 15-bit: 5, 16-bit (short): 6, 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size, Value (bit)                                                                                                              |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2 process2Data; process2Data._tCurrentFlow = {0,}; process2Data._tProcessActive = {0,}; process2Data._tMainCurrent = {0,}; process2Data._tMachineReady = {0,}; process2Data._tCommReady = {0,}; // app_weld_set_interface_eip_m2r_process2 Call bool result = Drfl.app_weld_set_interface_eip_m2r_process2(process2Data); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_m2r\_process2

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It allows you to set up the interface for interlocking signals between the controller and the welder for welding execution, specifically for "Process 2". This configuration involves communication data that is sent from the welder to the robot controller.

Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

* Robot motion start is interlocked with the `current_flow` signal from the welder, but when the `main_current` item is set, it is interlocked with that signal.

* Robot motion end is interlocked with the `current_flow` signal from the welder, but when the `process_active` item is set, it is interlocked with that signal.

## Arguments

|              Argument Name               |                  Data Type                  | Default Value |                       Description                        |
|------------------------------------------|---------------------------------------------|---------------|----------------------------------------------------------|
| `pConfigdigitalweldinginterfaceprocess2` | `CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2` | None          | Digital welding interface "Process 2" settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Create a structure for setting EIP M2R mode data and set values. CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2 process2Data; process2Data._tCurrentFlow = {0,}; process2Data._tProcessActive = {0,}; process2Data._tMainCurrent = {0,}; process2Data._tMachineReady = {0,}; process2Data._tCommReady = {0,}; bool result = Drfl.app_weld_set_interface_eip_m2r_process2(process2Data); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_r2m\_condition

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It sets up the interface related to welding condition settings among the communication data sent from the robot controller to the welder.

Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|               Argument Name               |                  Data Type                   | Default Value |                      Description                       |
|-------------------------------------------|----------------------------------------------|---------------|--------------------------------------------------------|
| `pConfigdigitalweldinginterfacecondition` | `CONFIG_DIGITAL_WELDING_INTERFACE_CONDITION` | None          | Digital welding interface condition settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CONFIG_DIGITAL_WELDING_INTERFACE_CONDITION conditionData; conditionData._tJobNumber = {0,}; conditionData._tSynegicID = {0,}; conditionData._tWireFeedSpeed = {0,}; conditionData._tArclengthCorrection = {0,}; conditionData._tDynamicCorrection = {0,}; bool result = Drfl.app_weld_set_interface_eip_r2m_condition(conditionData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_r2m\_mode

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It sets up the interface related to welding modes among the communication data sent from the robot controller to the welder.

You can add additional mode selection functions as needed through the option item (`wm_opt1`). Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|            Argument Name             |                Data Type                | Default Value |            Description            |
|--------------------------------------|-----------------------------------------|---------------|-----------------------------------|
| `pConfigdigitalweldinginterfacemode` | `CONFIG_DIGITAL_WELDING_INTERFACE_MODE` | -             | Refer to the structure definition |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Create a structure for setting EIP R2M mode data and set values. CONFIG_DIGITAL_WELDING_INTERFACE_MODE modeData; modeData._tWeldingMode = {0,}; modeData._t2T2TSpecial = {0,}; modeData._tPulseMode = {0,}; modeData._tWMopt1 = {0,}; // app_weld_set_interface_eip_r2m_mode call bool result = Drfl.app_weld_set_interface_eip_r2m_mode(modeData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_r2m\_option

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It allows you to set up additional functions required beyond the default settings provided by the following commands:

* `app_weld_set_interface_eip_r2m_process()`

* `app_weld_set_interface_eip_r2m_mode()`

* `app_weld_set_interface_eip_r2m_test()`

* `app_weld_set_interface_eip_r2m_condition()`

This configuration involves communication data that is sent from the robot controller to the welder. Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|             Argument Name              |                 Data Type                 | Default Value |                     Description                     |
|----------------------------------------|-------------------------------------------|---------------|-----------------------------------------------------|
| `pConfigdigitalweldinginterfaceoption` | `CONFIG_DIGITAL_WELDING_INTERFACE_OPTION` | None          | Digital welding interface option settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // Create a structure for setting EIP R2M mode data and set values. CONFIG_DIGITAL_WELDING_INTERFACE_OPTION optionData; optionData._tOption1 = {0,}; optionData._tOption2 = {0,}; optionData._tOption3 = {0,}; optionData._tOption4 = {0,}; optionData._tOption5 = {0,}; optionData._tOption6 = {0,}; optionData._tOption7 = {0,}; optionData._tOption8 = {0,}; optionData._tOption9 = {0,}; optionData._tOption10 = {0,}; optionData._tOption11 = {0,}; optionData._tOption12 = {0,}; optionData._tOption13 = {0,}; optionData._tOption14 = {0,}; optionData._tOption15 = {0,}; bool result = Drfl.app_weld_set_interface_eip_r2m_option(optionData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_r2m\_process

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It sets up the interface for interlocking signals between the robot controller and the welder for welding execution. This configuration involves communication data that is sent from the robot controller to the welder.

Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|              Argument Name              |                 Data Type                  | Default Value |                   Description                   |
|-----------------------------------------|--------------------------------------------|---------------|-------------------------------------------------|
| `pConfigdigitalweldinginterfaceprocess` | `CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS` | -             | Refer to the structure definition and see below |

Sheets로 내보내기  

|  Argument Name  | Data Type | Default Value |               Description               |
|-----------------|-----------|---------------|-----------------------------------------|
| `welding_start` | See below | See below     | Welding start command (welder specific) |
| `robot_ready`   |           |               | Robot status (welder specific)          |
| `error_reset`   |           |               | Welder error reset (welder specific)    |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS processSetting; processSetting._tWeldingStart = {0,}; processSetting._tRobotReady = {0,}; processSetting._tErrorReset = {0,}; Drfl.app_weld_set_interface_eip_r2m_process(processSetting); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_interface\_eip\_r2m\_test

## Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It sets up the interface related to test signal settings among the communication data sent from the robot controller to the welder.

You can add additional test signal settings as needed through the option items (`ts_opt1`, `ts_opt2`). Refer to the communication signal datasheet of the corresponding welder for details related to the settings below.

**Note:**

* To properly use the welding function with an EtherNet/IP communication-capable welder, all 8 types of interface setting commands must be configured:

  * `app_weld_set_interface_eip_r2m_process()`

  * `app_weld_set_interface_eip_r2m_mode()`

  * `app_weld_set_interface_eip_r2m_test()`

  * `app_weld_set_interface_eip_r2m_condition()`

  * `app_weld_set_interface_eip_r2m_option()`

  * `app_weld_set_interface_eip_m2r_process()`

  * `app_weld_set_interface_eip_m2r_monitoring()`

  * `app_weld_set_interface_eip_m2r_other()`

## Arguments

|            Argument Name             |                Data Type                | Default Value |                    Description                    |
|--------------------------------------|-----------------------------------------|---------------|---------------------------------------------------|
| `pConfigdigitalweldinginterfacetest` | `CONFIG_DIGITAL_WELDING_INTERFACE_TEST` | None          | Digital welding interface test settings structure |

The data type, default value, and description of the arguments within the structure are the same as below:  

|    Argument Name     |   Data Type   | Default Value |                                                                                          Description                                                                                           |
|----------------------|---------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `_bEnable`           | unsigned char | None          | Unused: 0 \<br\> Used: 1                                                                                                                                                                       |
| `_nDataType`         | unsigned char | None          | Data type (on/off: 0, selection: 1, value: 2)                                                                                                                                                  |
| `_nPositionalNumber` | unsigned char | None          | Data digit (1: 0, 0.1: 1, 0.01: 2)                                                                                                                                                             |
| `_fMinData`          | float         | None          | Minimum data value                                                                                                                                                                             |
| `_fMaxData`          | float         | None          | Maximum data value                                                                                                                                                                             |
| `_nByteOffset`       | unsigned char | None          | Communication data location (byte): 1\~255                                                                                                                                                     |
| `_nBitOffset`        | unsigned char | None          | Communication data location (bit): 1\~255                                                                                                                                                      |
| `_nComnDataType`     | unsigned char | None          | Data size \<br\> 1-bit (disable Low): 0 \<br\> 1-bit (disable High): 1 \<br\> 2-bit: 2 \<br\> 4-bit: 3 \<br\> 8-bit (byte): 4 \<br\> 15-bit: 5 \<br\> 16-bit (short): 6 \<br\> 32-bit (int): 7 |
| `_nMaxDigitSize`     | unsigned char | None          | Effective data size \<br\> Value (bit)                                                                                                                                                         |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CONFIG_DIGITAL_WELDING_INTERFACE_TEST testData; testData._tGasTest = {0,}; testData._tInchingP = {0,}; testData._tInchingM = {0,}; testData._tBlowOutTorch = {0,}; testData._tSimulation = {0,}; testData._tTSopt1 = {0,}; testData._tTSopt2 = {0,}; bool result = Drfl.app_weld_set_interface_eip_r2m_test(testData); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_weld\_cond\_analog

## Features

This function sets the analog welding conditions. These conditions are only valid within the welding section defined from weld activation (`app_weld_enable_analog()`) to deactivation (`app_weld_disable_analog()`), and executing it outside this section will result in an error.

The welding process parameters (`weld_proc_param`) within the welding conditions define detailed settings such as gas/condition maintenance time at the start/end of welding.

Only one welding condition is allowed within a single welding section. During welding, you can adjust these conditions using the `app_weld_adj_welding_cond_analog()` command, or adjust the voltage/feeding speed/speed (and weave offset) from the welding condition adjustment popup on the teaching pendant. However, adjusting welding conditions from the teaching pendant is only possible when the welding condition adjustment state is RESET (that is, when using the welding condition settings specified by `app_weld_set_weld_cond_analog()`).

The welding current output from the welder varies depending on factors like wire feeding speed, base material, welding wire material/type/extension, and welding voltage. You need to monitor this by connecting a welder or a separately mounted current sensor.

## Arguments

|         Argument Name         |            Data Type            | Default Value |           Description            |
|-------------------------------|---------------------------------|---------------|----------------------------------|
| `pConfigAnalogWeldingSetting` | `CONFIG_ANALOG_WELDING_SETTING` | -             | Analog welding setting structure |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| // CONFIG_ANALOG_WELDING_SETTING Struct Initialized CONFIG_ANALOG_WELDING_SETTING config; config._iVirtualWelding = 0; // Welding mode config._fTargetVoltage = 200.0; // Target Voltage (V) config._fTargetCurrent = 150.0; // Target Current (A) config._fTargetVel = 10.0; // Target Speed (mm/sec) config._fMinVel = 10.0; // Minimum Speed (mm/sec) config._fMaxVel = 100.0; // Maximum Speed (mm/sec) config._tDetail._fRs = 0.5; // ratio start config._tDetail._fTss = 0.3; // Shielding Gas Release Time config._tDetail._fTas = 2.0; // Start Current time config._tDetail._fTwc = 1.0; // Welding condition changed time config._tDetail._fRf = 0.7; // ratio finish config._tDetail._fTaf = 0.4; // Terminated Current Time config._tDetail._fTsf = 0.7; // Terminated shieldimg gas release time config._tDetail._fStartVoltage = 0.6; // Start Voltage Condition config._tDetail._fEndVoltage = 1.5; // Terminated Voltage Condition config._fTargetFeedingSpeed = 0.0; // Target Feeding Speed // app_weld_set_weld_cond_analog Call bool result = app_weld_set_weld_cond_analog(config); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_set\_weld\_cond\_digital

## Features

This function sets the welding conditions for a communication-based welder. These conditions are only valid within the welding section defined from weld activation (`app_weld_enable_digital()`) to deactivation (`app_weld_disable_digital()`), and executing it outside this section will result in an error.

The items that can be set as welding conditions are limited to those for which communication interface settings with the welder have been completed using the following commands:

* `app_weld_set_interface_eip_r2m_mode()`

* `app_weld_set_interface_eip_r2m_condition()`

* `app_weld_set_interface_eip_r2m_option()`

Only one welding condition is allowed within a single welding section. During welding, you can adjust these conditions using the `app_weld_adj_welding_cond_digital()` command, or adjust the voltage correction/dynamic factor adjustment/feeding speed/speed (and weave offset) from the welding condition adjustment popup on the teaching pendant. However, adjusting welding conditions from the teaching pendant is only possible when the welding condition adjustment state is RESET (that is, when using the welding condition settings specified by `app_weld_set_weld_cond_digital()`).

**Note:**

* Voltage correction: Adjusts the arc length.

* Dynamic factor adjustment: Adjusts the arc characteristics.

## Arguments

|          Argument Name           |             Data Type              | Default Value |                 Description                  |
|----------------------------------|------------------------------------|---------------|----------------------------------------------|
| `pConfigdigitalweldingcondition` | `CONFIG_DIGITAL_WELDING_CONDITION` | None          | Digital welding condition settings structure |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

    CONFIG_DIGITAL_WELDING_ADJUST adjustData;
    adjustData._bRealTime = 1; // Real-time adjustment status (1: Real-time)
    adjustData._bResetFlag = 0; // Reset flag (0: Current value)
    adjustData._fTargetVel = 110.0; // Target speed setting
    adjustData._fOffsetY = 12.0; // Weave Y offset setting
    adjustData._fOffsetZ = 6.0; // Weave Z offset setting
    adjustData._fWidthRate = 1.2; // Weave width ratio setting
    adjustData._fDynamicCor = 0.8; // Dynamic correction value setting
    adjustData._fVoltageCor = 22.0; // Voltage correction value setting
    adjustData._nJobNumber = 1; // Job number setting
    adjustData._nSynergicID = 1; // Synergic ID setting

    // Call the app_weld_adj_weld_cond_digital function
    bool result = Drfl.app_weld_adj_weld_cond_digital(adjustData);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_weave\_cond\_circular

## Features

This function sets the circular weaving conditions. These conditions are only valid within the welding section defined from weld activation (`app_weld_enable_analog()`/`app_weld_enable_digital()`) to deactivation (`app_weld_disable_analog()`/`app_weld_disable_digital()`), and executing it outside this section will result in an error.

Weaving conditions are defined in the weave coordinate system, where:

* The direction of the weld path is the weave x-axis.

* The direction of the vector product (cross-product) of the weave x-axis and the TCP-z direction is the weave y-axis.

Only one weaving condition is allowed within a single welding section. You can adjust the offset or weaving width during welding using the `app_weld_adj_welding_cond_analog()`/`app_weld_set_weld_cond_digital()` command, or adjust the (voltage/current/speed and) offset from the welding condition adjustment popup on the teaching pendant. However, adjusting welding conditions from the teaching pendant is only possible when the welding condition adjustment state is RESET (i.e., the welding condition setting specified by `app_weld_set_weld_cond_analog()`/`app_weld_set_weld_cond_digital()`).

## Arguments

| Argument Name | Data Type  | Default Value |                                             Description                                             |
|---------------|------------|---------------|-----------------------------------------------------------------------------------------------------|
| `fOffsetY`    | float      | 0.0           | Offset in the Y direction of the weave coordinate system (mm)                                       |
| `fOffsetZ`    | float      | 0.0           | Offset in the Z direction of the weave coordinate system (mm)                                       |
| `fGradient`   | float      | 0.0           | Rotation angle of the weaving plane with respect to the X-axis of the weave coordinate system (deg) |
| `fwWdt`       | float\[2\] | {3.0, 3.0}    | \[0\] Weaving width 1 (mm) \[1\] Weaving width 2 (mm)                                               |
| `fwT`         | float\[2\] | {0.3, 0.3}    | \[0\] Weaving cycle 1 (sec) \[1\] Weaving cycle 2 (sec)                                             |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| float fOffsetY = 0.0; float fOffsetZ = 0.0; float fGradient = 0.0; float fwWdt[2] = {3.0, 3.0}; float fwT[2] = {0.3, 0.3}; Drfl.app_weld_weave_cond_circular(fOffsetY, fOffsetZ, fGradient, fwWdt, fwT); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_weave\_cond\_sinusoidal

## Functions

Setting the sine weaving conditions. The weaving conditions are valid only within the welding section defined from the activation of the welding function (app_weld_enable_analog()/app_weld_enable_digital()) to its deactivation (app_weld_disable_analog()/app_weld_disable_digital()), and an error will occur if executed outside this section. The weaving conditions are defined in the weaving coordinate system, where the direction of the welding path is the weaving x-axis, and the direction obtained by the cross-product of the weaving x-axis and the TCP z-direction is the weaving y-axis. Please refer to the figure below for the coordinate system and weaving setting parameters. Only one weaving condition is allowed within a single welding section, and during welding, you can adjust the offset or weaving width using the app_weld_adj_welding_cond_analog()/app_weld_set_weld_cond_digital() commands, or adjust the offset (and voltage/current/speed) from the welding condition adjustment popup on the teaching pendant. However, adjustments to the welding conditions from the teaching pendant are only possible when the welding condition adjustment state through commands is in the RESET state (i.e., the welding condition set by app_weld_set_weld_cond_analog()/app_weld_set_weld_cond_digital()).

## Arguments

| **Field Name**  | **Data Type** | **Default Value** |                                          **Description**                                           |
|-----------------|---------------|-------------------|----------------------------------------------------------------------------------------------------|
| `fOffsetY`      | `float`       | 0.0               | Y-direction Offeset (in mm) in weaving coordinate                                                  |
| `fOffsetZ`      | `float`       | 0.0               | Z-direction Offeset (in mm) in weaving coordinate                                                  |
| `fGradient`     | `float`       | 0.0               | The rotation angle of the weaving plane based on the X-axis of the weaving coordinate system.(deg) |
| `fWeavingWidth` | `float`       | 3.0               | Weaving Width (mm)                                                                                 |
| `fWeavingCycle` | `float`       | 0.6               | Weaving Period (sec)                                                                               |

## Return

| **Value** | **Description** |
|-----------|-----------------|
| 0         | Error           |
| 1         | Success         |

## Example

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| float fOffsetY = 0.0; float fOffsetZ = 0.0; float fGradient = 0.0; float fWeavingWidth= 3.0; float fWeavingCycle= 0.6; Drfl.app_weld_weave_cond_sinusoidal(fOffsetY, fOffsetZ, fGradient, fWeavingWidth, fWeavingCycle); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_weave\_cond\_trapezoidal

## Features

This function sets the trapezoidal weaving conditions. These conditions are only valid within the welding section defined from weld activation (`app_weld_enable_analog()`/`app_weld_enable_digital()`) to deactivation (`app_weld_disable_analog()`/`app_weld_disable_digital()`), and an error will occur if executed outside of this section.

Weaving conditions are defined in the weave coordinate system, where the direction of the weld path is the weave x-axis, and the direction of the vector product (cross-product) of the weave x-axis and the TCP-z direction is the weave y-axis. Refer to the figure below for the coordinate system and weave setting parameters.

[새 창에서 열기](https://www.researchgate.net/figure/Weaving-parameters-of-weaving-welding_fig1_360913664)

![image-20250113-042601.png](https://manual.doosanrobotics.com/__attachments/a_ef4e0cc9340b6c625696dfdf3a506d6e80f04ca20ad5e70cf4731a3ce2ab5501/image-20250113-042601.png?cb=c600172b1a2422244a58c9e02e403b34)

Weaving Coordinate System and Parameters

Only one weaving condition is allowed within a single welding section. During welding, you can adjust the offset or weaving width using the `app_weld_adj_welding_cond_analog()`/`app_weld_set_weld_cond_digital()` command, or adjust the (voltage/current/speed and) offset from the welding condition adjustment popup on the teaching pendant. However, adjusting the welding conditions from the teaching pendant is only possible when the welding condition adjustment state is RESET (i.e., the welding condition setting specified by `app_weld_set_weld_cond_analog()`/`app_weld_set_weld_cond_digital()`).

## Arguments

| Argument Name |     Data Type     |                   Default Value                   |                                                                                                                                                                                                    Description                                                                                                                                                                                                    |
|---------------|-------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `wv_offset`   | float\[2\]        | \[0, 0\]                                          | \[0\] Weave coordinate system, y-direction offset (mm) \[1\] Weave coordinate system, z-direction offset (mm)                                                                                                                                                                                                                                                                                                     |
| `wv_angle`    | float             | 0                                                 | Rotation angle of the weaving plane with respect to the weave coordinate system - x-axis (deg)                                                                                                                                                                                                                                                                                                                    |
| `wv_param`    | list(float\[10\]) | \[0, 1.5, 0, -1.5, 0.3, 0.1, 0.3, 0.3, 0.1, 0.3\] | \[0\] Weaving point 1 - x (mm) \[1\] Weaving point 1 - y (mm) \[2\] Weaving point 2 - x (mm) \[3\] Weaving point 2 - y (mm) \[4\] Weaving point 1 → 2 time (sec) \[5\] Weaving point 1 → 2 acceleration/deceleration time (sec) \[6\] Weaving point 1 dwell time (sec) \[7\] Weaving point 2 → 1 time (sec) \[8\] Weaving point 2 → 1 acceleration/deceleration time (sec) \[9\] Weaving point 2 dwell time (sec) |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CONFIG_TRAPEZOID_WEAVING_SETTING weaving_trap; weaving_trap._fOffsetY = 0; weaving_trap._fOffsetZ = 0; weaving_trap._fGradient = 0; weaving_trap._fwPT1[0] = 0; weaving_trap._fwPT1[1] = 3; weaving_trap._fwPT2[0] = 0; weaving_trap._fwPT2[1] = -3; weaving_trap._fwT1 = 0.3; weaving_trap._fwTAcc1 = 0.1; weaving_trap._fwTTD1 = 0.2; weaving_trap._fwT2 = 0.3; weaving_trap._fwTAcc2 = 0.1; weaving_trap._fwTTD2 = 0.2; Drfl.app_weld_weave_cond_trapezoidal(weaving_trap); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# app\_weld\_weave\_cond\_zigzag

## Features

This function sets the zigzag weaving conditions. These conditions are only valid within the welding section defined from weld activation (`app_weld_enable_analog()`/`app_weld_enable_digital()`) to deactivation (`app_weld_disable_analog()`/`app_weld_disable_digital()`), and an error will occur if executed outside of this section.

Weaving conditions are defined in the weave coordinate system, where the direction of the weld path is the weave x-axis, and the direction of the vector product (cross-product) of the weave x-axis and the TCP-z direction is the weave y-axis. Refer to the figure below for the coordinate system and weave setting parameters.

Only one weaving condition is allowed within a single welding section. During welding, you can adjust the offset or weaving width using the `app_weld_adj_welding_cond_analog()`/`app_weld_set_weld_cond_digital()` command, or adjust the (voltage/current/speed and) offset from the welding condition adjustment popup on the teaching pendant. However, adjusting the welding conditions from the teaching pendant is only possible when the welding condition adjustment state is RESET (i.e., the welding condition setting specified by `app_weld_set_weld_cond_analog()`/`app_weld_set_weld_cond_digital()`).

## Arguments

|  Argument Name  | Data Type | Default Value |                                             Description                                             |
|-----------------|-----------|---------------|-----------------------------------------------------------------------------------------------------|
| `fOffsetY`      | float     | 0.0           | Offset in the Y direction of the weave coordinate system (mm)                                       |
| `fOffsetZ`      | float     | 0.0           | Offset in the Z direction of the weave coordinate system (mm)                                       |
| `fGradient`     | float     | 0.0           | Rotation angle of the weaving plane with respect to the X-axis of the weave coordinate system (deg) |
| `fWeavingWidth` | float     | 5.0           | Weaving width (mm)                                                                                  |
| `fWeavingCycle` | float     | 0.7           | Weaving cycle (sec)                                                                                 |

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| float fOffsetY = 0.0; float fOffsetZ = 0.0; float fGradient = 0.0; float fWeavingWidth = 5.0; float fWeavingCycle = 0.7; Drfl.app_weld_weave_cond_zigzag(fOffsetY, fOffsetZ, fGradient, fWeavingWidth, fWeavingCycle); |

---
version: "1.32"
variant: "Publish"
language: "en"
---
# Application Command

---
version: "1.32"
variant: "Publish"
language: "en"
---
# Basic Control Functions

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.add\_modbus\_signal

## Features

This is a function for using the Modbus I/O signal by registering it in advance. The modbus I/O signal registered using this function should be reset after rebooting, as it is stored in the memory. However, if it is registered in the T/P application, it can be reused, as it is added in the initialization process.

## Parameter

|--------------------|----------------|-------------------|------------------------------------------------------------------------------------------------------------------------|
| **Parameter Name** | **Data Type**  | **Default Value** | **Description**                                                                                                        |
| strSymbol          | string         | -                 | modbus signal Name                                                                                                     |
| strIpAddress       | string         | -                 | modbus module ip address                                                                                               |
| nPort              | unsigned short | -                 | modbus module port                                                                                                     |
| eRegType           | enum           | -                 | Refer to the Definition of Constant and Enumeration Type                                                               |
| iRegIndex          | unsigned short | -                 | Index of Modbus signal                                                                                                 |
| nRegValue          | unsigned short | 0                 | Output value when type is MODBUS_REGISTER_TYPE_COILS or MODBUS_REGISTER_TYPE_HOLDING_REGISTER (ignored in other cases) |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    /*
    Example of connecting Modbus IO and allocating contact point 
    Modbus IO IP: 192.168.127.254
    input 2 points: "di1","di2"
    */

    // set <modbus> input : "di1", "di2" 
    drfl.add_modbus_signal("di1", "192.168.127.254" , 502, MODBUS_REGISTER_TYPE_DISCRETE_INPUTS, 0, 0);

    drfl.add_modbus_signal("di2", "192.168.127.254" , 502, MODBUS_REGISTER_TYPE_DISCRETE_INPUTS, 0, 0);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.add\_tcp

## Features

This is a function for using robot TCP information by registering it in advance for security reasons. The TCP information registered using this function should be reset after rebooting, as it is stored in the memory. However, if it is registered in the T/P application, it can be reused, as it is added in the initialization process.

## Parameter

|--------------------|---------------|-------------------|-----------------|
| **Parameter Name** | **Data Type** | **Default Value** | **Description** |
| strSymbol          | string        | -                 | TCP Name        |
| fPosition          | float\[6\]    | -                 | TCP Information |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    float fTCP[6] = { 10, 10, 10, 0, 0, 0 };
    // Registers TCP.
    drfl.add_tcp("tcp#1", fTCP);

    // Sets current TCP
    drfl.set_tcp("tcpl#1");

    // Releases registration of TCP.
    drfl.del_tcp("tcp#1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.add\_tool

## Features

This is a function for using tool information that will be installed on the edge of the robot by registering it in advance for security reasons. The tool information registered using this function should be reset after rebooting, as it is stored in the memory. However, if it is registered the in T/P application, it can be reused, as it is added in the initialization process.

## Parameter

|--------------------|---------------|-------------------|---------------------|
| **Parameter Name** | **Data Type** | **Default Value** | **Description**     |
| strSymbol          | string        | -                 | Tool Name           |
| fCog               | float\[3\]    | -                 | Center of gravity   |
| fWeight            | float         | -                 | Tool Weight         |
| fInertia           | float\[6\]    | -                 | Inertia information |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    float fCog[3]  = {10, 10, 10};
    float finertia[6] = { 0, 0, 0, 0, 0, 0 };
    // Registers tool.
    drfl.add_tool("tool#1", 5.3f, fCog, finertia);

    // Selects currently mounted tool.
    drfl.set_tool("tool#1");

    // Releases registration of tool.
    drfl.del_tool("tool#1");

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.align\_axis

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.align\_axis(eTargetVec, eSourceVec, eTaskAxis, eTargetRef)

## Features

This function matches the given vect direction(eTargetVec) based on the ref coordinate(eTargetRef) and the designated axis of the tool frame. The robot TCP moves to the pos position.

## Parameter

| Parameter Name |       Data Type        | Default Value |                       Description                        |
|----------------|------------------------|---------------|----------------------------------------------------------|
| eTargetVec     | float\[3\]             | -             | vector                                                   |
| eSourceVec     | float\[3\]             |               | vector                                                   |
| eTaskAxis      | enum.TASK_AXIS         | -             | Refer to the Definition of Constant and Enumeration Type |
| eTargetRef     | enum.COORDINATE_SYSTEM | -             | Refer to the Definition of Constant and Enumeration Type |

## Return

| Value | Description |
|-------|-------------|
| 0     | Failed      |
| 1     | Success     |

## Example

C++

    float v1[3] = {400, 400, 500};
    float v2[3] = {350, 37, 430};
    Drfl.align_axis(v1, v2, TASK_AXIS_X, COORDINATE_SYSTEM_BASE);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.align\_axis(fTargetPos1, fTargetPos2, fTargetPos3, fSourceVec, eTaskAxis, eTargetRef)

## Features

This function matches the normal vector of the plane consists of points(fTargetPos1, fTargetPos2, fTargetPos3) based on the ref coordinate(eTargetRef)) and the designated axis of the tool frame. The robot TCP moves to the pos position.

## Parameter

|--------------------|------------------------|-------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value** | **Description**                                          |
| fTargetPos1        | float\[6\]             | -                 | Target task location for six axes                        |
| fTargetPos2        | float\[6\]             |                   | Target task location for six axes                        |
| fTargetPos3        | float\[6\]             |                   | Target task location for six axes                        |
| fSourceVec         | float\[3\]             |                   | vector                                                   |
| eTaskAxis          | enum.TASK_AXIS         | -                 | Refer to the Definition of Constant and Enumeration Type |
| eTargetRef         | enum.COORDINATE_SYSTEM | -                 | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Failed          |
| 1         | Success         |

## Example

C++

    float x1[6] = {0, 500, 700, 30, 0, 0};                
    float x2[6] = {500, 0, 700, 0, 0, 0};                 
    float x3[6] = {300, 100, 500, 0, 0, 0};                
    float pos[3] = {400, 400, 500};
    Drfl.align_axis(x1, x2, x3, pos, TASK_AXIS_X, COORDINATE_SYSTEM_BASE);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.alter\_motion

## Features

This function applies altering amount of motion trajectory when the alter function is activated. The meaning of the input values is defined from enable_alter_motion().

This function is only available in M2.4 version or higher.

Caution  
* alter_motion can be executed only in user thread.

Note  
* alter_motion can be excuted only in user thread

* Alter motion can be adjusted through setting value fLimitDpos or fLimitDposPer in enable_alter_motion function

* Orientation of Input pose follows fixed XYZ notation.

## Parameter

|--------------------|---------------|-------------------|-----------------|
| **Parameter Name** | **Data Type** | **Default Value** | **Description** |
| pos                | float\[6\]    | -                 | position list   |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Failed          |
| 1         | Success         |

## Example

C++

    DWORD WINAPI ThreadFunc(void *arg){
    	while(true){
      		float pos[6] = {10, 0, 0, 10, 0, 0};
      		Drfl.alter_motion(pos);
      	}
    }
    ...
    int _tmain (int argc, _TCHAR* argv[]){
      HANDLE hThread; 
      DWORD dwThreadID;
      hThread = CreateThread(NULL, 0, ThreadFunc, NULL, 0, &dwThreadID);
      if (hThread == 0) {
        printf("Thread Error\n");
        return 0;
      }
      float limit_dPOS[2] = {50, 90};
      float limit_dPOS_per[2] = {50, 50};
      Drfl.enable_alter_motion(5, PATH_MODE_DPOS, COORDINATE_SYSTEM_BASE, limit_dPOS, limit_dPOS_per);
    }

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amove\_periodic

## Features

As an asynchronous move_periodic, it operates the same as the move_periodic() function except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion. A new motion command generated before the motion is terminated by move_periodic() function causes errors for security reasons. Therefore, the termination of the amove_periodic() motion must be confirmed using mwait() function between the amove_periodic() function and the following motion command before the new motion command is executed.

This command performs a cyclic motion based on the sine function of each axis (parallel and rotation) of the reference coordinate (eMoveReference) input as a relative motion that begins at the current position. The attributes of the motion on each axis are determined by amplitude and period, and the acceleration/deceleration time and the total motion time are set by the interval and repetition count.

## Parameter

|--------------------|---------------------|---------------------|-----------|-------------------------------------------------------------------------|
| **Parameter Name** | **Data Type**       | **Default Value**   | **Range** | **Description**                                                         |
| fAmplitude         | float\[6\]          | -                   | \>=0      | Amplitude(motion between -fAmplitude and +fAmplitude) \[mm\] or \[deg\] |
| fPeriodic          | float\[6\]          | -                   | \>=0      | period(time for one cycle)\[sec\]                                       |
| fAccelTime         | float               | -                   | \>=0      | Acc-, dec- time \[sec\]                                                 |
| nRepeat            | unsigned char       | -                   | \> 0      | Repetition count                                                        |
| eMoveReference     | enum.MOVE_REFERENCE | MOVE_REFERENCE_TOOL | -         | Refer to the Definition of Constant and Enumeration Type                |

Note  
* fAmplitude refers to the amplitude. The input is a list of six elements that are the amp values for the axes (x, y, z, rx, ry, and rz). However, the amp input on the axis that does not have a periodic motion must be 0.

* fPeriodic refers to the time needed to complete a motion in the direction, and the input is a list of six elements that are the amp values for the axes (x, y, z, rx, ry, and rz).

* fAccelTime refers to the acceleration and deceleration time at the beginning and end of the periodic motion. The largest of the inputted acceleration/deceleration times and maximum period\*1/4 is applied. An error is generated when the inputted acceleration/deceleration time exceeds 1/2 of the total motion time.

* nRepeat refers to the number of repetitions of the axis (reference axis) that has the largest period value and determines the total motion time. The number of repetitions for each of the remaining axes is determined automatically according to the motion time.

* If the motion terminates normally, the motions for the remaining axes can be terminated before the reference axis's motion terminates so that the end position matches the starting position. If the motions of all axes are not terminated at the same time, the deceleration section will deviate from the previous path. Refer to the following image for more information.

* ![image2021-12-2_13-23-14.png](https://manual.doosanrobotics.com/__attachments/a_d2d0140501476a3fbf7d444979200170c3440a71f83c1f7b57209dde7faf213a/image2021-12-2_13-23-14.png?cb=aa532b3c5cec7a0eed64a31047feb22a)
* eMoveReference refers to the reference coordinate system of the repeated motion.

* If a maximum velocity error is generated during a motion, adjust the amplification and period using the following formula.

  **velocity=Amplification(fAmplitude)\*2\*pi(3.14)/Period(** fPeriodic**)**

  **(i,e., Max. velocity=62.83 mm/sec if amp=10 mm, period=1)**

* This function does not support online blending of previous and subsequent motions.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // Repeats the x-axis (10 mm amp and 1 sec. period) motion and y rotating axis (0.5 deg amp and 1 sec. period) motion in the tool coordinate system
    // 5 times.
    // SET(1) the Digital_Output channel no. 1, 1 second after the periodic motion begins.
    float fAmplitude[NUM_TASK] = {10, 0, 0, 0, 0.5, 0};
    float fPeriod[NUM_TASK] = { 1, 1, 1, 1, 1, 1};
    Drfl.amove_periodic(fAmplitude, fPeriod, 0.5, 5, MOVE_REFERENCE_TOOL);
    Sleep(1000);
    Drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);
    Drfl.mwait();

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amove\_spiral

## Features

As an asynchronous move_spiral, it operates the same as the move_spiral() function except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion.

A new motion command generated before the motion is terminated by amove_spiral() function causes errors for security reasons. Therefore, the termination of the amove_spiral() motion must be confirmed using the mwait() function between amove_spiral() and the following motion command before the new motion command is executed.

The radius increases in a radial direction and the robot moves in parallel with the rotating spiral motion in an axial direction. It moves the robot along the spiral trajectory on the surface that is perpendicular to the axis on the coordinate specified as eMoveReference and the linear trajectory in the axis direction.

## Parameter

|--------------------|---------------------|---------------------|-----------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**       | **Default Value**   | **Range** | **Description**                                          |
| eTaskAxis          | enum.TASK_AXIS      | -                   | -         | Refer to the Definition of Constant and Enumeration Type |
| fRevolution        | float               | -                   | rev \> 0  | Total number of revolutions \[revolution\]               |
| fMaximuRadius      | float               | -                   | rmax \> 0 | Final spiral radius \[mm\]                               |
| fMaximumLength     | float               | -                   |           | Distance moved in the axis direction \[mm\]              |
| fTargetVel         | float\[2\]          | -                   |           | Linear Velocity, Angular Velocity                        |
| fTargetAcc         | float\[2\]          | -                   |           | Linear Acceleration, Angular Acceleration                |
| fTargetTime        | float               | 0.0                 | time ≥ 0  | Total execution time \<sec\>                             |
| eMoveReference     | enum.MOVE_REFERENCE | MOVE_REFERENCE_TOOL |           | Refer to the Definition of Constant and Enumeration Type |

Note  
* fRevolution refers to the total number of revolutions of the spiral motion.

* fMaximuRadius refers to the maximum radius of the spiral motion.

* fMaximumLength refers to the parallel distance in the axis direction during the motion. A negative value means the parallel distance in the --axis direction.

* fTargetVel refers to the moving velocity of the spiral motion.

* fTargetAcc refers to the moving acceleration of the spiral motion.

* When fTargetTime is specified, values are processed based on fTargetTime , ignoring fTargetVel and fTargetAcc.

* eTaskAxis defines the axis that is perpendicular to the surface defined by the spiral motion.

* eMoveReference refers to the reference coordinate system defined by the spiral motion.

* This function does not support online blending of previous and subsequent motions.

Caution  
* If the rotating angular acceleration calculated by the spiral path is too great, an error can be generated to ensure safe motion.

  In this case, reduce the fTargetVel, fTargetAcc or fTargetTime value.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 3 seconds after the spiral motion begins
    float rev = 3;
    float rmax = 50;
    float lmax = 50;
    float tvel = { 50, 50 };
    float tacc = { 100, 100 };
    Drfl.amove_spiral(TASK_AXIS_Z, rev, rmax, lmax, tvel, tacc);
    Sleep(3000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

![image2021-12-2_13-21-28.png](https://manual.doosanrobotics.com/__attachments/a_e574124060d4b57b826c8eba21f5f5a491ab98aacab9baef34a8785305849b4d/image2021-12-2_13-21-28.png?cb=c8eed12131dc9519b371249f92625a93)

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amove\_spiral(Extension)

We don't have a way to export this macro.

## Features

As an asynchronous move_spiral, it operates the same as the move_spiral() function except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion.

A new motion command generated before the motion is terminated by amove_spiral() function causes errors for security reasons. Therefore, the termination of the amove_spiral() motion must be confirmed using the mwait() function between amove_spiral() and the following motion command before the new motion command is executed.

The radius increases in a radial direction and the robot moves in parallel with the rotating spiral motion in an axial direction. It moves the robot along the spiral trajectory on the surface that is perpendicular to the axis on the coordinate specified as eMoveReference and the linear trajectory in the axis direction.

## Parameter

| Parameter Name |      Data Type      |    Default Value    |  Range   |                       Description                        |
|----------------|---------------------|---------------------|----------|----------------------------------------------------------|
| eTaskAxis      | enum.TASK_AXIS      | -                   | -        | Refer to the Definition of Constant and Enumeration Type |
| fRevolution    | float               | -                   | rev \> 0 | Total number of revolutions \[revolution\]               |
| fTargetPos     | float\[3\]          | -                   | -        | Target location                                          |
| fTargetVel     | float\[2\]          | -                   |          | Linear Velocity, Angular Velocity                        |
| fTargetAcc     | float\[2\]          | -                   |          | Linear Acceleration, Angular Acceleration                |
| fTargetTime    | float               | 0.0                 | time ≥ 0 | Total execution time \<sec\>                             |
| eMoveReference | enum.MOVE_REFERENCE | MOVE_REFERENCE_TOOL |          | Refer to the Definition of Constant and Enumeration Type |
| eMoveMode      | enum.MOVE_MODE      | MOVE_MODE_ABSOLUTE  |          | Refer to the Definition of Constant and Enumeration Type |
| eSpiralDir     | enum.SPIRAL_DIR     | DR_SPIRAL_OUTWARD   |          | Refer to the Definition of Constant and Enumeration Type |
| eRotDir        | enum.ROT_DIR        | DR_ROT_FORWARD      |          | Refer to the Definition of Constant and Enumeration Type |

Note  
* fRevolution refers to the total number of revolutions of the spiral motion.

* fTargetVel refers to the moving velocity of the spiral motion.

* fTargetAcc refers to the moving acceleration of the spiral motion.

* When fTargetTime is specified, values are processed based on fTargetTime , ignoring fTargetVel and fTargetAcc.

* eTaskAxis defines the axis that is perpendicular to the surface defined by the spiral motion.

* eMoveReference refers to the reference coordinate system defined by the spiral motion.

* This function does not support online blending of previous and subsequent motions

Caution  
* If the rotating angular acceleration calculated by the spiral path is too great, an error can be generated to ensure safe motion.

  In this case, reduce the fTargetVel, fTargetAcc or fTargetTime value.

## Return

| Value | Description |
|-------|-------------|
| 0     | Error       |
| 1     | Success     |

## Example

C++

    // D-Out 3 seconds after the spiral motion begins
    float rev = 3;
    float rmax = 50;
    float lmax = 50;
    float tvel = { 50, 50 };
    float tacc = { 100, 100 };
    Drfl.amove_spiral(TASK_AXIS_Z, rev, rmax, lmax, tvel, tacc);
    Sleep(3000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

![image2021-12-2_13-21-28.png](https://manual.doosanrobotics.com/__attachments/a_e19dc4d55bfd38c0eab7c07de41a22dc45d4ea12020269a97361a0801263fbb8/image2021-12-2_13-21-28.png?cb=c8eed12131dc9519b371249f92625a93)

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amoveb

## Features

As an asynchronous moveb, it operates the same as the moveb() function except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion. A new motion command generated before the motion is terminated by amovesj() function causes errors for security reasons. Therefore, the termination of the amoveb() motion must be confirmed using the mwait() function between amovesj() and the following motion command before the new motion command is executed.

## Parameter

|--------------------|--------------------------------------|---------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**                        | **Default Value**   | **Description**                                          |
| tTargetPos         | struct MOVE_POSB \[MAX_MOVEB_POINT\] | -                   | Maximum 25 path information                              |
| nPosCount          | unsigned char                        | -                   | Number of valid paths                                    |
| fTargetVel         | float\[2\]                           | -                   | Linear Velocity, Angular Velocity                        |
| fTargetAcc         | float\[2\]                           | -                   | Linear Acceleration, Angular Acceleration                |
| fTargetTime        | float                                | 0.f                 | Reach Time \[sec\]                                       |
| eMoveMode          | enum.MOVE_MODE                       | MOVE_MODE_ ABSOLUTE | Refer to the Definition of Constant and Enumeration Type |
| eMoveReference     | enum.MOVE_REFERENCE                  | MOVE_REFERENCE_BASE | Refer to the Definition of Constant and Enumeration Type |

Note  
* When fTargetTime is specified, values are processed based on fTargetTime ignoring fTargetVel and

* When eMoveMode is MOVE_MODE_RELATIVE, each pos on the posb list is defined as a relative coordinate for the preceding pos.

* This function does not support online blending of previous and subsequent motions.

Caution  
* A user input error is generated if the blending radius in tTargetPos is 0.

* A user input error is generated due to the duplicated input of Line if contiguous Line-Line segments have the same direction.

* If the blending condition causes a rapid change in direction, a user input error is generated to prevent sudden acceleration.

* This function does not support online blending of previous and subsequent motions.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 3 seconds after the motion through all paths of xb begins
    MOVE_POSB xb[4];
    memset(xb, 0x00, sizeof(xb));
    int segNum = 4;
    float tvel = { 50, 50 };
    float tacc = { 100, 100 };
    xb[0]._iBlendType = 0;	// line
    xb[0]._fBlendRad  = 50;
    xb[0]._fTargetPos[0][0] = 559; 
    xb[0]._fTargetPos[0][1] = 234.5; 
    xb[0]._fTargetPos[0][2] = 651.5;
    xb[0]._fTargetPos[0][3] = 0; 
    xb[0]._fTargetPos[0][4] = 180;  
    xb[0]._fTargetPos[0][5] = 0;				
    xb[1]._iBlendType = 1;	// circle
    xb[1]._fBlendRad  = 50;
    xb[1]._fTargetPos[0][0] = 559;
    xb[1]._fTargetPos[0][1] = 234.5;
    xb[1]._fTargetPos[0][2] = 451.5;
    xb[1]._fTargetPos[0][3] = 0;
    xb[1]._fTargetPos[0][4] = 180;
    xb[1]._fTargetPos[0][5] = 0;
    xb[1]._fTargetPos[1][0] = 559;
    xb[1]._fTargetPos[1][1] = 434.5;
    xb[1]._fTargetPos[1][2] = 451.5;
    xb[1]._fTargetPos[1][3] = 0;
    xb[1]._fTargetPos[1][4] = 180;
    xb[1]._fTargetPos[1][5] = 0;				
    xb[2]._iBlendType = 0;	// line
    xb[2]._fBlendRad = 50;
    xb[2]._fTargetPos[0][0] = 559;
    xb[2]._fTargetPos[0][1] = 434.5;
    xb[2]._fTargetPos[0][2] = 251.5;
    xb[2]._fTargetPos[0][3] = 0;
    xb[2]._fTargetPos[0][4] = 180;
    xb[2]._fTargetPos[0][5] = 0;
    xb[3]._iBlendType = 0;	// line
    xb[3]._fBlendRad  = 50;
    xb[3]._fTargetPos[0][0] = 559;
    xb[3]._fTargetPos[0][1] = 234.5;
    xb[3]._fTargetPos[0][2] = 251.5;
    xb[3]._fTargetPos[0][3] = 0;
    xb[3]._fTargetPos[0][4] = 180;
    xb[3]._fTargetPos[0][5] = 0;
    drfl.moveb(xb, segNum, tvel, tacc);
    Sleep(3000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amovec

## Features

As an asynchronous movec, it operates the same as movec except for not having the fBlendingRadius argument for blending. However, the command returns with motion start at the same time and executes the next line without waiting for the termination of motion due to the characteristic of the asynchronous type.

## Parameter

|--------------------|--------------------------|-------------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**            | **Default Value**             | **Description**                                          |
| fTargetPos\[0\]    | float\[6\]               | -                             | Waypoint                                                 |
| fTargetPos\[1\]    | float\[6\]               |                               | Target location                                          |
| fTargetVel         | float\[2\]               | -                             | Linear Velocity, Angular Velocity                        |
| fTargetAcc         | float\[2\]               | -                             | Linear Acceleration, Angular Acceleration                |
| fTargetTime        | float                    | 0.f                           | Reach Time \[sec\]                                       |
| eMoveMode          | enum.MOVE_MODE           | MOVE_MODE_ ABSOLUTE           | Refer to the Definition of Constant and Enumeration Type |
| eMoveReference     | enum.MOVE_REFERENCE      | MOVE_REFERENCE_BASE           | Refer to the Definition of Constant and Enumeration Type |
| fTargetAngle2      | float                    | 0.f                           | angle1                                                   |
| fTargetAngle2      | float                    | 0.f                           | angle2                                                   |
| eBlendingType      | enum.BLENDING_SPEED_TYPE | BLENDING_SPEED_TYPE_DUPLICATE | Refer to the Definition of Constant and Enumeration Type |

Note  
* If an argument is inputted to fTargetVel (e.g., fTargetVel = {30, 0}), the input argument corresponds to the linear velocity of the motion, while the angular velocity is determined proportionally to the linear velocity.

* If an argument is inputted to fTargetAcc (e.g., fTargetAcc = {60, 0}), the input argument corresponds to the linear acceleration of the motion, while the angular acceleration is determined proportionally to the linear acceleration.

* If fTargetTime is specified, values are processed based on fTargetTime, ignoring fTargetVel and fTargetAcc.

* If the eMoveMode is MOVE_MODE_RELATIVE, fTargetPos\[0\] and fTargetPos\[1\] are defined in the relative coordinate system of the previous position. (fTargetPos\[0\] is the relative coordinate from the starting point, while fTargetPos\[1\] is the relative coordinate from fTargetPos\[0\].)

* If fTargetAngle1 is more than 0, and fTargetAngle2 is equal to 0, the total rotated angle on the circular path is applied to fTargetAngle1.

* When fTargetAngle1 and fTargetAngle2 are more than 2, fTargetAngle1 refers to the total rotating angle moving at a constant velocity on the circular path, while fTargetAngle2 refers to the rotating angle in the rotating section for acceleration and deceleration. In that case, the total moving angle fTargetAngle1+ 2 X fTargetAngle2 moves along the circular path.

* Refer to the motion description of movej() for blending according to option eBlendingType and fTargetVel / fTargetAcc.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 3 seconds after the circle motion through two points of x1 begins
    float x1[2][6] = { { 559, 434.5, 651.5, 0, 180, 0 }, { 559, 434.5, 251.5, 0, 180, 0 } };
    float tvel = {50, 50}; # Set the task velocity to 50(mm/sec) and 50(deg/sec).
    float tacc = {100, 100}; # Set the task acceleration to 100(mm/sec2) and 100(deg/sec2). 
    drfl.amovec(x1, tvel, tacc);
    Sleep(3000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amovej

## Features

As an asynchronous movej, it operates the way same as the movej function except for not having the fBlendingRadius argument for blending. However, the command returns with motion start at the same time and executes the next line without waiting for the termination of motion due to the characteristic of the asynchronous type.

## Parameter

|--------------------|--------------------------|--------------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**            | **Default Value**              | **Description**                                          |
| fTargetPos         | float\[6\]               | -                              | Target joint location for six axes                       |
| fTargetVel         | float/float\[6\]         | -                              | Velocity                                                 |
| fTargetAcc         | float/float\[6\]         | -                              | Acceleration                                             |
| fTargetTime        | float                    | 0.f                            | Reach Time \[sec\]                                       |
| eMoveMode          | enum.MOVE_MODE           | MOVE_MODE_ ABSOLUTE            | Refer to the Definition of Constant and Enumeration Type |
| eBlendingType      | enum.BLENDING_SPEED_TYPE | BLENDING_SPEED_ TYPE_DUPLICATE | Refer to the Definition of Constant and Enumeration Type |

Note  
* When fTargetTime is specified, values are processed based on fTargetTime ignoring fTargetVel and

* Refer to the motion description of movej() for blending according to option eBlendingType and fTargetVel / fTargetAcc.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    float q0[6] = { 0, 0, 90, 0, 90, 0 };
    float q1[6] = { 90, 0, 90, 0, 90, 0 };
    float q99[6] = { 0, 0, 0, 0, 0, 0 };
    float jvel=10;
    float jacc=20;
    drfl.amovej(q0, jvel, jacc);
    Sleep(3000);

    Drfl.amovej(q1, jvel, jacc);
    drfl.mwait(); // Temporarily suspends the program execution until the motion is terminated 

    Drfl.movej(q99, jvel, jacc);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amovel

## Features

As an asynchronous movel, it operates the same as the movel function except for not having the fBlendingRadius argument for blending. However, the command returns with motion start at the same time and executes the next line without waiting for the termination of motion due to the characteristic of the asynchronous type.

## Parameter

|--------------------|--------------------------|-------------------------------|-----------------------------------------------------------------------------------------------------------|
| **Parameter Name** | **Data Type**            | **Default Value**             | **Description**                                                                                           |
| fTargetPos         | float\[6\]               | -                             | Target TCP Position for six axes                                                                          |
| fTargetVel         | float\[2\]               | -                             | Linear Velocity, Angular Velocity                                                                         |
| fTargetAcc         | float\[2\]               | -                             | Linear Acceleration, Angular Acceleration                                                                 |
| fTargetTime        | float                    | -                             | Reach Time \[sec\] \* If the time is specified, values are processed based on time, ignoring vel and acc. |
| eMoveMode          | enum.MOVE_MODE           | MOVE_MODE_ ABSOLUTE           | Refer to the Definition of Constant and Enumeration Type                                                  |
| eMoveReference     | enum.MOVE_REFERENCE      | MOVE_REFERENCE_BASE           | Refer to the Definition of Constant and Enumeration Type                                                  |
| eBlendingType      | enum.BLENDING_SPEED_TYPE | BLENDING_SPEED_TYPE_DUPLICATE | Refer to the Definition of Constant and Enumeration Type                                                  |

Note  
* If an argument is inputted to fTargetVel (e.g., fTargetVel = {30, 0}), the input argument corresponds to the linear velocity of the motion, while the angular velocity is determined proportionally to the linear velocity.

* If an argument is inputted to fTargetAcc (e.g., fTargetAcc = {60, 0}), the input argument corresponds to the linear acceleration of the motion, while the angular acceleration is determined proportionally to the linear acceleration.

* If fTargetTime is specified, values are processed based on fTargetTime, ignoring fTargetVel and fTargetAcc.

* Refer to the motion description of movel() for blending according to option eBlendingType and fTargetVel / fTargetAcc.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 2 seconds after the motion starts with x1
    float x1[6] = { 559, 434.5, 651.5, 0, 180, 0 };
    float tvel = { 50, 50 };
    float tacc = { 100, 100 };
    drfl.amovel(x1, tvel, tacc);
    Sleep(2000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amovesj

## Features

As an asynchronous movesj, it operates the same as movesj() except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion. A new motion command generated before the motion is terminated by amovesj() causes errors for security reasons. Therefore, the termination of the amovesj() motion must be confirmed using mwait() between amovesj() and the following motion command before the new motion command is executed.

## Parameter

|--------------------|---------------------------------|---------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**                   | **Default Value**   | **Description**                                          |
| fTargetPos         | Float\[MAX_SPLINE_POINT\] \[6\] | -                   | Maximum 100 waypoint list                                |
| nPosCount          | unsigned char                   | -                   | Number of valid waypoints                                |
| fTargetVel         | float/float\[6\]                | -                   | Velocity                                                 |
| fTargetAcc         | float/float\[6\]                | -                   | Acceleration                                             |
| fTargetTime        | float                           | 0.0                 | Reach Time \[sec\]                                       |
| eMoveMode          | enum.MOVE_MODE                  | MOVE_MODE_ ABSOLUTE | Refer to the Definition of Constant and Enumeration Type |

Note  
* When fTargetTime is specified, values are processed based on fTargetTime, ignoring fTargetVel and

* When eMoveMode is MOVE_MODE_RELATIVE, each pos on the position list is defined as a relative coordinate for the preceding pos. (If position list=\[q1, q2, ...,q(n-1), q(n)\], q1 is the relative angle of the starting point, while q(n) is the relative coordinate of q(n-1))

* This function does not support online blending of previous and subsequent motions.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 3 seconds after the spline motion through all points of jpos begins
    float jpos[4][6];
    float jvel=10;
    float jacc=10;
    int jposNum = 4;
    jpos[0][0]=0; jpos[0][1]=0; jpos[0][2]=-30; jpos[0][3]=0; jpos[0][4]=-30; jpos[0][5]=0;
    jpos[1][0]=90; jpos[1][1]=0; jpos[1][2]=0; jpos[1][3]=0; jpos[1][4]=0; jpos[1][5]=0;
    jpos[2][0]=0; jpos[2][1]=0; jpos[2][2]=-30; jpos[2][3]=0; jpos[2][4]=-30; jpos[2][5]=0;
    jpos[3][0]=-90; jpos[3][1]=0; jpos[3][2]=0; jpos[3][3]=0; jpos[3][4]=0; jpos[3][5] = 0;

    drfl.movesj(jpos, jposNum, jvel, jacc);
    Sleep(3000);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.amovesx

## Features

As an asynchronous movesx, it operates the same as movesx() except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion. A new motion command generated before the motion is terminated by amovesj() causes errors for security reasons. Therefore, the termination of the amovesx() motion must be confirmed using mwait() between the amovesx function () and the following motion command before the new motion command is executed.

## Parameter

|--------------------|----------------------------------|--------------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**                    | **Default Value**              | **Description**                                          |
| fTargetPos         | float \[MAX_SPLINE_ POINT\]\[6\] | -                              | Maximum 100 waypoint information                         |
| nPosCount          | unsigned char                    | -                              | Number of valid waypoints                                |
| fTargetVel         | float\[2\]                       | -                              | Linear Velocity, Angular Velocity                        |
| fTargetAcc         | float\[2\]                       | -                              | Linear Acceleration, Angular Acceleration                |
| fTargetTime        | float                            | 0.0                            | Reach Time \[sec\]                                       |
| eMoveMode          | enum.MOVE_MODE                   | MOVE_MODE_ ABSOLUTE            | Refer to the Definition of Constant and Enumeration Type |
| eMove Reference    | enum.MOVE_REFERENCE              | MOVE_REFERENCE_BASE            | Refer to the Definition of Constant and Enumeration Type |
| eVelOpt            | enum.SPLINE_VELOCITY_OPTION      | SPLINE_VELOCITY_OPTION_DEFAULT | Refer to the Definition of Constant and Enumeration Type |

Note  
* If an argument is inputted to fTargetVel (e.g., fTargetVel = {30, 0}), the input argument corresponds to the linear velocity of the motion, while the angular velocity is determined proportionally to the linear velocity.

* If an argument is inputted to fTargetAcc (e.g., fTargetAcc = {60, 0}), the input argument corresponds to the linear acceleration of the motion, while the angular acceleration is determined proportionally to the linear acceleration.

* If fTargetTime is specified, values are processed based on fTargetTime, ignoring fTargetVel and fTargetAcc .

* When eMoveMode is MOVE_MODE_RELATIVE, each pos on the position list is defined as a relative coordinate for the preceding pos. (If position list=\[q1, q2, ...,q(n-1), q(n)\], q1 is the relative angle of the starting point, while q(n) is the relative coordinate of q(n-1))

* This function does not support online blending of previous and subsequent motions.

Caution  
The constant velocity motion according to the distance and velocity between the input waypoints cannot be used if the "SPLINE_VELOCITY_OPTION_CONST" option (constant velocity option) is selected for eVelOpt, and the motion is automatically switched to the variable velocity motion (eVelOpt =SPLINE_VELOCITY_OPTION_DEFAULT) in that case.

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    // D-Out 3 seconds after the spline motion through all points of xpos begins
    float xpos[4][6];
    int xposNum = 4;
    float tvel={ 50, 100 };
    float tacc={ 50, 100 }; 
    xpos[0][0]=559; xpos[0][1]=434.5; xpos[0][2]=651.5; 
    xpos[0][3]=0; xpos[0][4]=180; xpos[0][5]=0;
    xpos[1][0]=559; xpos[1][1]=434.5; xpos[1][2]=251.5; 
    xpos[1][3]=0; xpos[1][4]=180; xpos[1][5]=0;
    xpos[2][0]=559; xpos[2][1]=234.5; xpos[2][2]=251.5; 
    xpos[2][3]=0; xpos[2][4]=180; xpos[2][5]=0;
    xpos[3][0]=559; xpos[3][1]= 234.5; xpos[3][2]=451.5; 
    xpos[3][3]=0; xpos[3][4]=180; xpos[3][5]=0;
    drfl.amovesx(xpos, xposNum, tvel, tacc, 0, MOVE_MODE_ABSOLUTE);
    drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.calc\_coord

## Features

This function returns a new user cartesian coordinate system by using up to 4 input poses (\[x1\]\~\[x4\]), input mode \[mod\] and the reference coordinate system \[ref\]. The input mode is only valid when the number of input robot poses is 2.

In the case that the number of input poses is 1, the coordinate system is calculated using the position and orientation of x1.

In the case that the number of input poses is 2 and the input mode is 0, X-axis is defined by the direction from x1 to x2, and Z-axis is defined by the projection of the current Tool-Z direction onto the plane orthogonal to the x-axis. The origin is the position of x1.

In the case that the number of input poses is 2 and the input mode is 1, X-axis is defined by the direction from x1 to x2, and Z-axis is defined by the projection of the z direction of x1 onto the plane orthogonal to the X-axis. The origin is the position of x1.

In the case that the number of input poses is 3, X-axis is defined by the direction from x1 to x2. If a vector v is the direction from x1 to x3, Z-axis is defined by the cross product of X-axis and v (X-axis cross v). The origin is the position of x1.

In the case that the number of input poses is 4, the definition of axes is identical to the case that the number of input poses is 3, but the origin is the position of x4.

This function is only available in M2.5 version or higher.

## Parameter

|--------------------|------------------------|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value**      | **Description**                                                                                                                                                            |
| nCnt               | unsigned short         | -                      | input count                                                                                                                                                                |
| nInputMode         | unsigned short         | -                      | input mode (only valid when the number of input poses is 2)  0: defining z-axis based on the current Tool-z direction  1: defining z-axis based on the z direction of x1 |
| eTargetRef         | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_BASE | Refer to the Definition of Constant and Enumeration Type                                                                                                                   |
| fTargetPos1        | float\[6\]             |                        | Target task location for six axes                                                                                                                                          |
| fTargetPos2        | float\[6\]             |                        | Target task location for six axes                                                                                                                                          |
| fTargetPos3        | float\[6\]             |                        | Target task location for six axes                                                                                                                                          |
| fTargetPos4        | float\[6\]             |                        | Target task location for six axes                                                                                                                                          |

## Return

|-----------------|----------------------------------------------------------|
| **Value**       | **Description**                                          |
| enum.ROBOT_POSE | Refer to the Definition of Constant and Enumeration Type |

## Example

C++

    float pos1[6] = {500, 30, 500, 0, 0, 0};
    float pos2[6] = {400, 30, 500, 0, 0, 0};
    float pos3[6] = {500, 30, 600, 45, 180, 45};
    float pos4[6] = {500, -30, 600, 0, 180, 0};
    ROBOT_POSE* pose_user1 = Drfl.calc_coord(4, 0, COORDINATE_SYSTEM_BASE, pos1, pos2, pos3, pos4);
    for (int i=0; i<NUM_TASK; i++)
    {
        cout << pose_user1->_fPosition[i] << endl;
    }

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.change\_collision\_sensitivity

## Features

This is a function to configure the collision sensitivity in the robot controller.

## Parameter

|--------------------|---------------|-------------------|-------------------------------|
| **Parameter Name** | **Data Type** | **Default Value** | **Description**               |
| fSensitivity       | float         | -                 | Collision Sensitivity(0\~100) |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Error           |
| 1         | Success         |

## Example

C++

    Drfl.change_collision_sensitivity(20);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.change\_operation\_speed

## Features

This function adjusts the operation velocity. The argument is the relative velocity in a percentage of the currently set velocity and has a value from 1 to 100. Therefore, a value of 50 means that the velocity is reduced to 50% of the currently set velocity.

## Parameter

|--------------------|---------------|-------------------|---------------------------|
| **Parameter Name** | **Data Type** | **Default Value** | **Description**           |
| speed              | float         | -                 | operation speed(10\~100)% |

## Return

|-----------|-----------------|
| **Value** | **Description** |
| 0         | Failed          |
| 1         | Success         |

## Example

C++

    Drfl.change_operation_speed(10);
    string strDrlProgram = "loop = 0\nwhile loop < 3:\n  movej(posj(10,10.10,10,10.10), vel=60, acc=60)\n  movej(posj(00,00.00,00,00.00), vel=60, acc=60)\n  loop+=1\n  movej(posj(10,10.10,10,10.10), vel=60, acc=60)";

    if (Drfl.get_robot_state() == STATE_STANDBY) {
        Drfl.set_robot_mode(ROBOT_MODE_AUTONOMOUS);
        if (Drfl.get_robot_mode() == ROBOT_MODE_AUTONOMOUS) {
        // Autonomous Mode
        ROBOT_SYSTEM eTargetSystem = ROBOT_SYSTEM_VIRTUAL;
        Drfl.drl_start(eTargetSystem, strDrlProgram);
        }
    }

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_force\_condition

## Features

This function checks the status of the given force. It disregards the force direction and only compares the sizes. This condition can be repeated with the while or if statement. Measuring the force, eForceAxis is based on the ref coordinate(eTargetRef) and measuring the moment, eForceAxis is based on the tool coordinate.

## Parameter

|--------------------|------------------------|------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value**      | **Description**                                          |
| eForceAxis         | enum.FORCE_AXIS        | -                      | Refer to the Definition of Constant and Enumeration Type |
| fTargetMin         | float                  | -                      | Minimum value                                            |
| fTargetMax         | float                  | -                      | Maximum value                                            |
| eForceReference    | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|------------------------|
| **Value** | **Description**        |
| 1         | The condition is True  |
| 0         | The condition is False |

## Example

C++

    bool fcon1 = Drfl.check_force_condition(FORCE_AXIS_Z, 5, 10, COORDINATE_SYSTEM_WORLD);
    bool fcon2;
    bool pcon1;
    while(true){
        fcon2 = Drfl.check_force_condition(FORCE_AXIS_C, 30, -10000);
        pcon1 = Drfl.check_position_condition_abs(FORCE_AXIS_X, 0, 0.1);
        if(fcon2 && pcon1)
        {
            break;
        }
    }

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_motion

## Features

This function checks the status of the currently active motion.

## Parameter

None

## Return

|-----------|-------------------------|
| **Value** | **Description**         |
| 0         | no motion in action     |
| 1         | motion being calculated |
| 2         | motion in operation     |

## Example

C++

    float q0[6] = {0, 0, 90, 0, 90, 0};
    float q99[6] = {0, 0, 0, 0, 0, 0};
    Drfl.amovej(q0, 60, 30); // Executes the next command immediately after the motion to q0.
    while(true)
    {
        if(Drfl.check_motion() == 0) // A motion is completed
        {
            Drfl.movej(q99, 60, 30); // Joint motion to q99.
            break;
        }
    }

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_orientation\_condition

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_orientation\_condition(eForceAxis, fTargetMin, fTargetMax, fTargetPos, eForceReference)

## Features

This function checks the difference between the current pose and the rotating angle range of the robot end effector. It returns the difference (in rad) between the current pose and the rotating angle range with the algorithm that transforms it to a rotation matrix using the "AngleAxis" technique. It returns True if the difference is positive (+) and False if the difference is negative (-). It is used to check if the difference between the current pose and the rotating angle range is + or -. For example, the function can be used to set the rotating angle range to min and max at any reference position, and then determine the orientation limit by checking if the difference from the current position is + or -. This condition can be repeated with the while or if statement.

* Setting Min only: True if the difference is + and False if -

* Setting Min and Max: True if the difference from min is - while the difference from max is + and False if the opposite.

* Setting Max only: True if the maximum difference is + and False otherwise

![image2022-1-10_16-18-24.png](https://manual.doosanrobotics.com/__attachments/a_dd4170e8d585fd96440f495111a7a18468067484949959dab7ba219f7e8c26d0/image2022-1-10_16-18-24.png?cb=234aaf704e1a7fadfcfdf0d53963232c)

Note  
Range of rotating angle: This means the relative angle range (min, max) based on the specified axis from a given position based on the ref coordinate.

## Parameter

|--------------------|------------------------|------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value**      | **Description**                                          |
| eForceAxis         | enum.FORCE_AXIS        | -                      | Refer to the Definition of Constant and Enumeration Type |
| fTargetMin         | float                  | -                      | Minimum value                                            |
| fTargetMax         | float                  | -                      | Maximum value                                            |
| fTargetPos         | float\[6\]             | -                      | Target task location for six axes                        |
| eForceReference    | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|------------------------|
| **Value** | **Description**        |
| 1         | The condition is True  |
| 0         | The condition is False |

## Example

C++

    float posx1[6] = {400, 500, 800, 0, 180, 30};
    bool con1 = Drfl.check_orientation_condition(FORCE_AXIS_C, 0, 5, posx1);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_orientation\_condition(eForceAxis, fTargetMin, fTargetMax, eForceReference)

## Features

This function checks the difference between the current pose and the specified pose of the robot end effector. It returns the difference between the current pose and the specified pose in rad with the algorithm that transforms it to a rotation matrix using the "AngleAxis" technique. It returns True if the difference is positive (+) and False if the difference is negative (-). It is used to check if the difference between the current pose and the rotating angle range is + or -. For example, the function can use the direct teaching position to check if the difference from the current position is + or - and then create the condition for the orientation limit. This condition can be repeated with the while or if statement.

* Setting Min only: True if the difference is + and False if -

* Setting Min and Max: True if the difference from min is - while the difference from max is + and False if the opposite.

* Setting Max only: True if the maximum difference is + and False otherwise

![image2022-1-10_16-14-35.png](https://manual.doosanrobotics.com/__attachments/a_3ccb2a70a926c065d6133c4cf962f26abb289fce2d58248b099d1522ac52c264/image2022-1-10_16-14-35.png?cb=8337b1ffce47575496e0e1488502fca9)

## Parameter

|--------------------|------------------------|------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value**      | **Description**                                          |
| eForceAxis         | enum.FORCE_AXIS        | -                      | Refer to the Definition of Constant and Enumeration Type |
| fTargetMin         | float\[6\]             | -                      | Minimum value                                            |
| fTargetMax         | float\[6\]             | -                      | Maximum value                                            |
| eForceReference    | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|------------------------|
| **Value** | **Description**        |
| 1         | The condition is True  |
| 0         | The condition is False |

## Example

C++

    float posx1[6] = {400, 500, 800, 0, 180, 30};
    float posx2[6] = {400, 500, 500, 0, 180, 60};
    bool con1 = Drfl.check_orientation_condition(FORCE_AXIS_C, posx1, posx2);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_position\_condition

## Features

This function checks the status of the given position. This condition can be repeated with the while or if statement. Axis and pos of input paramets are based on the ref coordinate(eTargetRef).

In case of eForceReference = COORDINATE_SYSTEM_TOOL, pos(fTargetPos) should be defined in BASE coordinate.

If eMode is MOVE_MODE_RELATIVE, check_position_condition_rel is called, and if MOVE_MODE_ABSOLUTE, check_position_condition_abs is called.

## Parameter

|--------------------|-------------------|------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**     | **Default Value**      | **Description**                                          |
| eForceAxis         | enum.FORCE_AXIS   | -                      | Refer to the Definition of Constant and Enumeration Type |
| fTargetMin         | float             | -                      | Minimum value                                            |
| fTargetMax         | float             | -                      | Maximum value                                            |
| fTargetPos         | float\[6\]        | -                      | Target task location for six axes                        |
| eMode              | enum.MOVE_MODE    | MOVE_MODE_ABSOLUTE     | Refer to the Definition of Constant and Enumeration Type |
| eForceReference    | COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|------------------------|
| **Value** | **Description**        |
| 1         | The condition is True  |
| 0         | The condition is False |

## Example

C++

    float posx1[6] = {400, 500, 800, 0, 180, 0};
    bool CON7 = Drfl.check_position_condition(FORCE_AXIS_Z, -10, -5, posx1, MOVE_MODE_ABSOLUTE);

---
version: "1.32"
variant: "Publish"
language: "en"
---
# CDRFLEx.check\_position\_condition\_abs

## Features

This function checks the status of the given position. This condition can be repeated with the while or if statement. Axis and pos of input paramets are based on the ref coordinate(eTargetRef).

In case of eForceReference = COORDINATE_SYSTEM_TOOL, pos(fTargetPos) should be defined in BASE coordinate.

→ Refer to the check_position_condition_rel function for relative movement criteria

## Parameter

|--------------------|------------------------|------------------------|----------------------------------------------------------|
| **Parameter Name** | **Data Type**          | **Default Value**      | **Description**                                          |
| eForceAxis         | enum.FORCE_AXIS        | -                      | Refer to the Definition of Constant and Enumeration Type |
| fTargetMin         | float                  | -                      | Minimum value                                            |
| fTargetMax         | float                  | -                      | Maximum value                                            |
| eForceReference    | enum.COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |

## Return

|-----------|------------------------|
| **Value** | **Description**        |
| 1         | The condition is True  |
| 0         | the condition is False |

## Example

C++

    bool CON1 = Drfl.check_position_condition_abs(FORCE_AXIS_X, -5, 0, COORDINATE_SYSTEM_WORLD);
    bool CON2 = Drfl.check_position_condition_abs(FORCE_AXIS_Y, -10000, 700);
    bool CON3 = Drfl.check_position_condition_abs(FORCE_AXIS_Z, -10, -5);
    bool CON4 = Drfl.check_position_condition_abs(FORCE_AXIS_Z, 30, -10000);
    bool CON5 = Drfl.check_position_condition_abs(FORCE_AXIS_Z, -10, -5, COORDINATE_SYSTEM_BASE);
    bool CON6 = Drfl.check_position_condition_abs(FORCE_AXIS_Z, -10, -5);

[Next Page](https://manual.doosanrobotics.com/llms-full.txt/1)
