You're reading the documentation for an older, but still supported version (1.33.4).
For information on the latest version, please have a look at 1.33.5.

app_weld_set_interface_eip_m2r_process2

Definition
DRFLEx.h within class CDRFLEx, public section

bool app_weld_set_interface_eip_m2r_process2(CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2 pConfigdigitalweldinginterfaceprocess2)
{
    return _app_weld_set_interface_eip_m2r_process2(_rbtCtrl, pConfigdigitalweldinginterfaceprocess2);
};

Features

This function configures the communication interface for using a welder that supports EtherNet/IP communication. It defines the interlocking signals transmitted from the welder to the robot controller, specifically for “Process 2” signals. This setup enables synchronization between the welding device’s execution states and the robot motion sequence.

Refer to the communication signal datasheet of the corresponding welder for precise signal mapping details.

Note

To properly use the EtherNet/IP-based welding function, all 8 interface setup functions must be configured:

Arguments

Argument Name

Data Type

Default Value

Description

pConfigdigitalweldinginterfaceprocess2

CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2

Digital welding interface “Process 2” settings structure

Structure Fields

Field Name

Data Type

Default Value

Description

_bEnable

unsigned char

Enable flag
(0: Disabled, 1: Enabled)

_nDataType

unsigned char

Data type:
(0: On/Off, 1: Selection, 2: Value)

_nPositionalNumber

unsigned char

Data digit representation
(0: 1, 1: 0.1, 2: 0.001)

_fMinData

float

Minimum signal data range

_fMaxData

float

Maximum signal data range

_nByteOffset

unsigned char

Byte index in EtherNet/IP M2R communication map (1-255)

_nBitOffset

unsigned char

Bit index (1-255)

_nComnDataType

unsigned char

Communication data size
0: 1-bit(Disable Low)
1: 1-bit(Disable High)
2: 2-bit
3: 4-bit
4: 8-bit
5: 15-bit
6: 16-bit(short)
7: 32-bit(int)

_nMaxDigitSize

unsigned char

Effective bit width of signal data

Return

Value

Description

0

Error

1

Success

Example

// Create and assign EIP M2R Process2 configuration
CONFIG_DIGITAL_WELDING_INTERFACE_PROCESS2 processData;
memset(&processData, 0x00, sizeof(processData));

processData._tCurrentFlow._bEnable = 1;    // Enable signal mapping
processData._tCurrentFlow._nDataType = 0;    // On/Off type
processData._tCurrentFlow._nPositionalNumber = 0;  // Integer
processData._tCurrentFlow._fMinData = 0.0;  // Minimum data (OFF)
processData._tCurrentFlow._fMaxData = 1.0;  // Maximum data (ON)
processData._tCurrentFlow._nByteOffset = 5;    // Located at byte index 5
processData._tCurrentFlow._nBitOffset = 2;    // Bit offset 2
processData._tCurrentFlow._nComnDataType = 0;   // 1Bit
processData._tCurrentFlow._nMaxDigitSize = 1;    // Bit width = 1

// The other Process 2 signals use the same On/Off mapping, one bit each in byte 5
CONFIG_DIGITAL_WELDING_IF_MAPPING_DATA* signals[] = {
    &processData._tProcessActive,    // Process active
    &processData._tMainCurrent,      // Main current
    &processData._tMachineReady,     // Welding machine ready
    &processData._tCommReady         // Communication ready
};
for (int i = 0; i < 4; i++) {
    *signals[i] = processData._tCurrentFlow;
    signals[i]->_nBitOffset = 3 + i;   // Bits 3 to 6
}

bool result = Drfl.app_weld_set_interface_eip_m2r_process2(processData);

This example defines EtherNet/IP M2R Process 2 communication mapping, assigning welder-to-robot feedback signals (current flow, process active, main current, machine ready and communication ready). These signals are used to synchronize the robot’s motion sequence with the welder’s operating state during real-time execution.