A method and apparatus for read-only acquisition of welding process data
By using a read-only interface whitelist and serial reading via a single acquisition thread, combined with atomic snapshot and downgrade snapshot mechanisms, the problems of mis-sent control commands, data misalignment, and interface timeout in welding process data acquisition were solved, enabling accurate traceability of welding process data.
Patent Information
- Application Number
- CN202611675302.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing welding process data acquisition technologies have problems such as the risk of issuing control commands erroneously, data item time misalignment, reading failure leading to false records, robot interface timeout causing acquisition interruption, and incorrect assignment of job labels. It is difficult to achieve the ability to distinguish and correctly assign the same source, true value and missing value without changing the welding control logic.
The robot controller is invoked through a read-only interface whitelist. A single acquisition thread is used to execute the data serially, read and encapsulate it into an immutable atomic snapshot, generate a degraded snapshot with a degrade flag, and replace the atomic snapshot to provide an encoded response when the interface times out or an exception occurs. The process is repeated until the welding state changes to unwelded.
This ensures the consistency of welding process data, the distinguishability and correct attribution of true and missing values, and avoids false records, thus ensuring the continuity and accuracy of data acquisition, without changing the welding control logic.
Smart Images

Figure CN123168528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot data acquisition technology, and in particular to a read-only acquisition method and device for welding process data. Background Technology
[0002] In high-requirement welding production such as nuclear power and pressure vessels, the management platform needs to associate and save the welding current, voltage, travel speed, and oscillation parameters of each weld with the operation identifiers of the welder, workpiece, and weld bead to achieve quality traceability. Such production lines are usually performed by industrial robots. The data acquisition gateway periodically reads the registers on the acquisition side via industrial protocols such as Modbus TCP and uploads them to the cloud platform. The basic unit of traceability is a record for each weld. Only when the record is correctly attributed, all items in the frame are taken from the same reading, and the true value and missing value can be distinguished, does the record have traceability value.
[0003] Existing data acquisition processes typically consist of three stages: parameter sourcing, reading, and uploading. These three stages are not interconnected, leading to the following problems: (1) The acquisition program directly calls the control interface of the robot controller or runs in the controller, which is coupled with the welding control and poses a risk of sending control commands incorrectly; (2) The gateway polls the register one by one according to the data item. Each item is taken from different times. The current, voltage and welding status in the same frame are out of time. (3) When reading fails or data is not ready, the register is filled with 0 or old value. The platform cannot distinguish between the actual value of 0 and the case of missing data due to reading failure. If the soldering status is unknown and it is inferred that it is not soldered, the entire false zero value record will be uploaded. (4) The walking speed and swing parameters (half swing amplitude, frequency, dwell time) set in the welding program are program instruction parameters. The controller's read-only interface does not read back, and the end speed given by the read-only interface includes the swing component, which is not equal to the weld walking speed. (5) When the robot response times out or the interface hangs, the data acquisition program is blocked, and the response to the gateway is interrupted. (6) The work identification is entered manually. If the old weld number is automatically restored after a power outage and restart, it will take effect without confirmation and the data of the new weld will be assigned to the previous weld.
[0004] The above problems are interconnected. For example, in order to solve problem (4), the welding program mirrors the process parameters to the system variables, which adds the situation that the variables have not yet been published and the default values are read back, making problem (3) appear in a more difficult-to-identify form. In order to solve problem (2), all readings are serialized in a single thread, which makes any interface blockage directly turn into problem (5). Therefore, the above defects need to be solved by the same set of acquisition processes and cannot be separated and processed separately.
[0005] A search revealed Chinese Patent Publication No. CN121535789A, which discloses a method, system, and device for cross-system acquisition and reconstruction of signed variables in welding robots. This scheme determines the sign of a signed variable in a numerical register, performs unsigned maximum value addition and bitwise XOR operations on negative numbers, and assigns the result to the group output signal GO. GO is then split into multiple digital output signals DO, which are acquired by the PLC and reassembled using an inverse operation. This enables reliable transmission of signed data through an unsigned communication channel, allowing the acquisition of process parameters such as robot coordinates, welding current, and voltage. However, this scheme requires splitting GO into multiple DO signals, consuming a large number of digital I / O channels and is limited by… The robot-side I / O resources rely on strict synchronization between the communication cycle and the PLC scanning cycle. Once the synchronization is off or the signal is lost, the value reconstructed by the PLC may be incorrect, and it will be impossible to distinguish between the true reading and the transmission missing. At the same time, this solution mainly solves the encoding, transmission and restoration of signed values in the unsigned channel. When the robot interface times out or hangs, the PLC can only read the unupdated or incorrect state, which makes it difficult to guarantee the continuity of acquisition and the validity of data. In addition, different variables may be assigned values at different times, and the PLC scan may read values at different times, resulting in parameter time misalignment. Moreover, the lack of operation identification confirmation and intra-frame homogeneity guarantee makes it difficult to directly use as a record item for welding quality traceability.
[0006] Therefore, the technical problem that needs to be solved is how to ensure that the data acquisition gateway can obtain a frame of welding process data records that are of the same origin within each frame, can distinguish between real and missing values, and are correctly assigned, under the premise of strict read-only operation on the acquisition side and without issuing any control commands to the robot controller. Summary of the Invention
[0007] The purpose of this invention is to overcome the defects of the prior art by providing a read-only acquisition method and apparatus for welding process data.
[0008] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a read-only data acquisition method for welding process is provided, applied to an acquisition device, the acquisition device communicating with a robot controller and a data acquisition gateway, comprising: The robot controller is invoked through a pre-defined read-only interface whitelist, and all invocations to the robot controller are executed serially by a single acquisition thread. The system variables of the robot controller are read as mirror variables through the read-only interface. The system variables contain the process parameters set for each weld segment by the welding program running on the robot controller before the arc is started. The single acquisition thread responds to the periodic query of the data acquisition gateway, performs a serial read based on the read-only interface whitelist, binds data quality to each field read, and encapsulates the process data, acquisition time and job identifier of this read into an immutable atomic snapshot; The register image is encoded only once using the atomic snapshot. Fields with abnormal data quality are written with invalid values that are pre-configured for them, and responses are intercepted according to the request range of the data acquisition gateway. When the interface of the robot controller times out, hangs, or disconnects, a degraded snapshot with a degrade flag is generated, and the atomic snapshot is replaced by the degraded snapshot for encoding and timely response is provided. Repeat the above process until the welding status changes to unwelded, at which point the recording of this weld segment ends.
[0009] As a preferred technical solution, the process parameters include walking speed and swing parameters. The swing parameters include swing switch, half swing amplitude, swing frequency, inner dwell time, and outer dwell time. The serial reading also calculates the swing speed based on the mirrored variable. The swing speed is calculated as follows: Swing speed = F × D × 60 ÷ [1 - F × (T)] 内 +T 外 ]], where F is the oscillation frequency in Hz; D is the half-amplitude in mm; T 内 T 外 The inner and outer dwell times of the welding torch oscillation are respectively, in seconds; the oscillation speed is in mm / min; the oscillation speed is considered invalid when the denominator is not greater than 0 or any input is negative; when the oscillation switch data quality is normal and the value is off, the oscillation speed takes the true zero value.
[0010] As a preferred technical solution, the mirror variable of the swing switch is a Boolean type, and the default value of the undefined Boolean variable is the same as the value of the swing switch when it is closed. When the swing switch reads back false, the reading result of the swing switch is determined to be invalid only when all swing value mirror variables read the default value of the undefined value variable; otherwise, the reading result of the swing switch is determined to be truly closed. When the swing switch reads back true, it is determined to be truly open.
[0011] As a preferred technical solution, the read-only interface whitelist includes establishing a connection, disconnecting a connection, querying the SDK version, querying the controller version, reading numerical system variables, reading boolean system variables, reading the instruction speed of the robot end effector, and reading the global speed multiplier. The SDK version query and the controller version query are each called only once when establishing the connection.
[0012] As a preferred technical solution, the data quality includes normal, invalid, and unavailable; wherein, normal includes reading a finite number or a valid Boolean value, or being set to a true zero value or closed state because the welding status is believed to be unwelded; invalid includes reading a non-finite number of values, a Boolean variable returning an illegal value, or a numerical mirror variable reading the default value of an undefined variable; unavailable includes failing to read due to interface timeout, suspension, or disconnection; the process data includes welding status, welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner dwell time, and outer dwell time.
[0013] As a preferred technical solution, in a single serial read, if and only if the data quality of the welding state is normal and the value is "not welded", the reading of the remaining process data other than the welding state is skipped, the data is set to the true zero value or the off state and marked as normal; otherwise, the remaining process data is read and the data quality is bound, and the welding state is not inferred to be "not welded".
[0014] As a preferred technical solution, the register image is defined by a preset register mapping. The register mapping verifies that each data acquisition data source appears exactly once at startup. Each acquisition field is explicitly configured with an invalid value, and the invalid value can be written to the corresponding register. The invalid value of a Boolean field is different from its true and false values. The register image includes a holding register, an input register, and a coil bit. The welding status and the swing switch are provided in both register and coil bit forms. The coil bit outputs 1 only when the data quality is normal and the value is true.
[0015] As a preferred technical solution, the job identifier is a confirmed job identifier, which refers to the job identifier written into the effective storage after being verified item by item according to the encoding and byte capacity of the external protocol; the job identifier obtained by starting recovery is only used as a value to be confirmed, and the job identifier register of the external response outputs an invalid value before the confirmation is completed; the weld number obtained by incrementing based on the previous effective value is only used as a value to be confirmed, and the job identifier register of the external response keeps outputting the previous effective value before the confirmation is completed.
[0016] As a preferred technical solution, the serial read operation has a waiting limit, which is the longest duration during which the acquisition device waits for the single acquisition thread to return the serial read result when responding to a gateway read request. If the acquisition device waits beyond the waiting limit, it continues encoding and responding with the downgraded snapshot. If the duration of a single interface call exceeds a preset multiple of the waiting limit but is not less than a preset number of seconds, it is determined that the interface is suspended, and subsequent read requests continue encoding and responding directly with the downgraded snapshot. If the connection with the robot controller fails or the read fails, the connection is closed and reconnection is performed exponentially, with each actual failure advancing the backoff timer. If the valid reading of a single field exceeds the representable range of its register, the field is downgraded to an invalid value, and the remaining fields are encoded according to their read values.
[0017] According to a second aspect of the present invention, a read-only acquisition device for welding process data is also provided, comprising a memory and a processor, wherein the memory stores a computer program and the processor executes the read-only acquisition method for welding process data.
[0018] Compared with the prior art, the present invention has the following advantages: 1. This invention uses a whitelist of read-only interfaces to call the robot controller on the acquisition side, without issuing any control commands to the robot controller, thus completing the acquisition without changing the welding control logic. Simultaneously, all calls are executed serially by a single acquisition thread, ensuring that all data items within a frame originate from the same read, avoiding time misalignment within the frame caused by item-by-item polling. During reading, data quality is bound to each field, allowing for field-by-field differentiation between true values and unreadable missing values. Furthermore, an immutable atomic snapshot encapsulates the process data, acquisition time, and job identifier of this read, and the response is encoded solely with this atomic snapshot. This ensures that the data acquisition gateway can obtain a frame of welding process data records that are of the same origin within the frame, with distinguishable true and missing values, and correctly assigned within the response timeout period for each periodic query.
[0019] 2. In this invention, the welding program running on the robot controller writes the process parameters set for each weld segment into the system variable as a mirror variable before the arc is started. This allows the welding program settings that the read-only interface could not read back to be read by the acquisition device through the read-only interface. Since the release point is fixed before the arc is started, the asynchronously arriving gateway query will definitely read the parameters of the current execution segment and will not read the parameters of the previous segment or those that have not yet been released. Moreover, the parameters that have not been released can be clearly identified.
[0020] 3. This invention binds data quality to each field while reading data. Fields with abnormal data quality are uploaded with an explicit invalid value instead of being replaced with zero or an old value. At the same time, the remaining process data are only set to a true zero value or turned off when the welding status data quality is normal and the value is "not welded". If the welding status is unreliable, no "not welded" inference is made, thereby avoiding the generation of false zero value records.
[0021] 4. This invention encodes the register image only once using an atomic snapshot, and the entire frame is encoded in one go, avoiding the failure of the entire frame due to a field being out of range or missing; addresses within the gateway's reading range that do not have a data source on the robot side are declared as constant entries and noted that they do not represent measured values, making the address range continuously readable, while also making constants, measured values, and missing values separable.
[0022] 5. This invention generates a degraded snapshot with a degraded flag when the robot controller interface times out, is suspended, or disconnected. This degraded snapshot is used to replace the atomic snapshot for encoding and responds on time, so that the main process is not interrupted, the current frame is responded to on time, and the frame contains a missing flag. Late reading results do not overwrite the already responded results, and the reading of the job identifier register is not affected by robot abnormalities.
[0023] 6. This invention cyclically executes reading, encapsulation, encoding, and response until the welding state changes to unwelded, thus ending the recording of this weld segment. Frame by frame, the records are arranged in chronological order to form a complete record from arc initiation to arc termination. Simultaneously, the operation identifier is written into the effective storage after being tested and encoded item by item. The start-up recovery value and the automatically incrementing weld number are only used as values to be confirmed. Data is not uploaded without confirmation, thereby preventing the old weld number from being assigned to the previous weld after a power outage and restart. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a timing diagram illustrating the generation of an atomic snapshot and the response of the entire frame triggered by a single gateway query according to the present invention. Figure 3 This is a schematic diagram of the device architecture of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] Example 1: like Figure 1 and Figure 2As shown, this invention provides a read-only data acquisition method for welding processes, applicable to welding production scenarios such as nuclear power plants and pressure vessels where full traceability of welding parameters for each weld seam is required. The method is applied to a data acquisition device that communicates with both a robot controller and a data acquisition gateway. In this embodiment, the acquisition device is a 64-bit Windows 10 / 11 industrial control computer, communicating with both the robot controller and the data acquisition gateway via Ethernet. All three are on the same network segment. The welding robot is a Ufubo mobile welding robot MWR-10-S, whose control system provides a Remote Procedure Call (RPC) interface. This method only uses the read-only methods within this interface. The acquisition device acts as a Modbus TCP slave, with port 502 and unit number 1. The data acquisition gateway is a Modbus... The TCP master station and the acquisition device software are implemented in Python. The acquisition device software requires no installation and deployment; it includes a built-in RPC runtime library for the control system. This runtime library contains both control-class methods and read-only methods. The acquisition device calls this runtime library through a read-only robot adapter. The adapter has a whitelist containing only read-only methods, and automated testing intercepts calls outside the whitelist, ensuring that the acquisition device only calls read-only methods. In terms of software module division of labor, the graphical interface executes S1; a single acquisition thread and the read-only robot adapter execute S4; snapshot objects and register mapping execute S5 and S6; the Modbus TCP slave station executes S3 and S7; S2 is executed by the welding program running on the robot controller, and the acquisition device software only reads the image variables published by S2 through the read-only interface; S8 is a complete loop, where the acquisition device repeatedly executes S3 to S7 in response to periodic queries from the gateway until the welding state changes to unwelded. Figure 2 This demonstrates the timing interaction process of a data acquisition gateway (acquisition box) triggering atomic snapshot generation and full-frame response through a single periodic query, such as... Figure 2 As shown in the diagram, the data acquisition gateway (master station), Modbus TCP slave station, acquisition thread, and robot controller (read-only interface) are included. The specific message sending and receiving process is as follows: First, the data acquisition gateway sends a read request (FC01~FC04) to the Modbus TCP slave station. After receiving the request, the slave station performs S3 verification and data source distribution. If it is determined that the robot needs to be read, the slave station sends an acquisition trigger message to the acquisition thread. After receiving the trigger, the acquisition thread executes S4 to initiate a serial read to the read-only interface of the robot controller, receiving the feedback data such as welding status, current, voltage, and image variables, and binding the data quality along with the read. Subsequently, the acquisition thread executes S5 to freeze the data into an immutable atomic snapshot and sends the atomic snapshot back to the slave station. After receiving the snapshot, the slave station executes S6 to encode the register image only with the snapshot, writing invalid values to fields with abnormal quality. Finally, it executes S7 to capture the frame of the requested range and return a response frame to the data acquisition gateway.
[0027] The method of the present invention performs the following steps in chronological order: Step S1: Confirm the job identifier is effective.
[0028] The data acquisition device receives six job identifiers entered by the operator: welder number, machine type, project section, manufacturing number, weld number, and equipment number. When saving, it attempts to encode each item according to the encoding and byte capacity of the external protocol. The byte capacities of the six job identifiers are 6, 8, 16, 16, 8, and 10 bytes respectively. It attempts to encode according to ASCII encoding. If any item cannot be encoded or exceeds the capacity, it will refuse to save and retain the previous effective value. After all the attempts are successful, the data is written to the effective storage and atomically persisted. The effective storage is persisted by first writing to a temporary file, then forcibly flushing to disk, and finally atomically renaming the file.
[0029] The job identifier restored from the persistent file at startup is only used as a value to be confirmed. Before confirmation is completed, the job identifier register in the external response outputs an invalid value (empty string, all 0x00). The weld number obtained by incrementing the previous effective value is only used as a value to be confirmed. Before confirmation is completed, the job identifier register in the external response keeps outputting the previous effective value. The clear operation only clears the first five items and retains the 10-digit equipment number to avoid repeated entry errors when changing parts or handing over shifts. This step obtains the effective job identifier of this weld, which is used to import the snapshot in step S5.
[0030] Since the job identification is entered manually, if the old weld number automatically restored after a power outage and restart takes effect without confirmation, the data of the new weld will be assigned to the previous weld. This step, through item-by-item trial coding and confirmation mechanism, ensures that job identifications that have not been confirmed by the operator will not be included in the uploaded data, thereby making the attribution controllable.
[0031] Step S2: Mirror release of process parameters.
[0032] Before each weld segment is started, the welding program writes the set walking speed, swing switch, half swing amplitude, swing frequency, and inner and outer dwell time of that segment into system variables accessible via a read-only interface in the robot controller; the acquisition device reads the system variables via the read-only interface as mirror variables. Six system variables are created on the teach pendant: g_MoveL_V for storing walking speed, g_Weave_On for storing swing switch, g_Weave_Amp for storing half swing amplitude, g_Weave_Fq for storing swing frequency, g_Weave_Time_In for storing inner dwell time, and g_Weave_Time_Out for storing outer dwell time. Before the arc-starting command, the walking speed (mm / s), half swing amplitude (mm), frequency (Hz), and inner / outer dwell time (ms) are written in the same script block, and g_Weave_On is set to true. After the arc-ending command, g_Weave_On is set to false by the script. For welds with multiple segments of different speeds, g_MoveL_V is written before each segment, with values filled according to the teach pendant's display units. These values differ from the RPC programming units (m / s, m) by a factor of one thousand, thus matching the settings seen by the welder on the teach pendant. The welding status, welding current, and voltage are maintained by the control system itself; these three variables are not written in the welding program.
[0033] The data acquisition device only calls the robot controller through a read-only interface whitelist and does not have the ability to issue control commands. Therefore, the process parameters set by the welding program cannot be written by the data acquisition device. To address this, the welding program actively writes the process parameters of each weld segment into the system variables before the arc is started, so that the data acquisition device can read them through the read-only interface. Since the publication point is fixed before the arc is started, the gateway query that arrives asynchronously during the welding process will definitely read the parameters of the current segment, and will not read the parameters of the previous segment or those that have not yet been published.
[0034] Step S3: Verification and routing of read requests.
[0035] The acquisition device acts as a Modbus TCP slave. It verifies each read request frame step by step according to the unit number, function code, request length and quantity, and mapping coverage. If there is a discrepancy, it responds with the corresponding error code. The slave first verifies the Modbus Application Protocol header (MBAP). If it is invalid, it directly disconnects the connection. Then it verifies step by step according to the unit number, function code (FC01~FC04 only: read coil, read discrete input, read holding register, read input register), request length and quantity (register 1~125, coil 1~2000), and mapping coverage. If there is a discrepancy, it responds with error codes 0x0B, 0x01, 0x03, and 0x02 respectively.
[0036] After the verification is successful, the address range of the request is determined according to the data source to see if it contains fields from the robot: if it does, proceed to step S4; if it does not (e.g., read-only job identifier register or read-only constant register), skip step S4, generate a snapshot directly with the effective job identifier from step S1 and the robot source field marked as unavailable, and execute steps S5 to S7 as usual. Therefore, it is not affected by robot read timeout. If the job identifier is missing or has not been confirmed, the robot is not read (see E5). Through traffic splitting, the request for read-only job identifier register does not depend on the robot, ensuring that the job identifier is still readable when the robot is abnormal.
[0037] Step S4: One serial read-only acquisition, with data quality bound to the read.
[0038] A single acquisition thread reads data from the robot once via a read-only whitelist. The robot's adapter interface defines only four members: connection, disconnection, connection status query, and one-time read. The vendor methods that can be called are eight items in a closed whitelist: establish connection, disconnect connection, SDK version query, controller version query, read numeric system variables, read boolean system variables, read end-point command speed, and read global speed multiplier. The two version queries are each called once during connection establishment. If the handshake fails, the connection is disconnected and reconnected to avoid mismatch in subsequent responses and requests. The end-point speed and speed multiplier are only used in the explicitly configured backup data retrieval mode. During normal cycles, only two system variable reads are called. Automated testing intercepts the calls with test stubs. Methods outside the whitelist are judged to fail as soon as they are called. All calls are executed serially by a single thread named robot-acquisition via a queue.
[0039] Reading order: First read the welding status; if and only if the data quality of the field is normal and the value is "not welded", skip reading the other eight items, set them to the true value 0 or the off state and mark them as normal; if the welding status is not normal, do not make this inference, otherwise continue to read the welding current, welding voltage and the mirror variable of step S2, convert according to the variable unit, and calculate the swing speed not directly given by the read-only interface from the swing frequency, half swing amplitude and inner and outer dwell time. While reading, bind the value, data quality, source and failure reason for each field: if the value is not a finite number or the Boolean variable returns an illegal value, it is judged as invalid; if the numerical mirror variable reads back the default value of the controller for the undefined variable, it is judged as invalid and recorded as the variable not published; fields with abnormal data quality are not replaced with 0 or old values. This step obtains nine process data items, each with data quality, including welding status, welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner dwell time and outer dwell time. Among them, the swing frequency is only used for calculation and is not uploaded separately.
[0040] Reading and Conversion: Walking speed × 60 is converted to mm / min, which must be greater than 0 and not exceed 300,000 mm / min; otherwise, it will be considered invalid and no other data acquisition method will be used; Dwell time × 0.001 is converted to s; Swing speed = F × D × 60 ÷ [1 - F × (T)] 内 +T 外 ]], F is frequency (Hz); D is half-amplitude (mm); T 内 T 外 These represent the inner and outer dwell times (s) of the welding torch oscillation, where the inner dwell time refers to the dwell time when the welding torch oscillates to one side of the weld center, and the outer dwell time refers to the dwell time when the welding torch oscillates to the other side of the weld center; the result is in mm / min; the denominator is not greater than 0 or any input is negative and is considered invalid; when the oscillation switch is trusted to be closed, the oscillation speed takes the true value of 0.
[0041] Data quality assessment: Each field is encapsulated as a composite value containing a numerical value, data quality, source, and reason. Data quality is categorized as normal, invalid, unusable, and may also include expired. Expired data is only marked by derived quantities using their input flags; the acquisition path itself does not generate it. When a numeric mirror variable reads back the default value of an undefined numeric variable (-1 in this embodiment), it is judged as the variable not being published. This criterion only applies to numeric variables because speed, amplitude, frequency, and dwell time are all non-negative, making it impossible to legally obtain the default value. Boolean swing switches are different: the controller treats the default value of an undefined Boolean variable as the actual closed state. When the swing switch reads back false, if all swings... If all mirrored numerical variables read default values for undefined numerical variables, the reading result of the swing switch is determined to be invalid; if any swing numerical mirror variable has been published, the reading result of the swing switch is determined to be truly closed; when the swing switch reads back true, it is determined to be truly open. If the controller rejects the variable name due to an application layer exception, the field is determined to be invalid and added to the unpublished list on the interface, but it is not involved in the above Boolean criteria; if the transport layer exception is determined to be a connection-level failure, the connection is disconnected and reconnected, and the interface lists the unpublished variable names as variables that have not yet been published by the robot program, and only records one log entry when the set changes; after the welding program rewrites the variable, it will be restored on the next read.
[0042] Single-threaded serial reading ensures that all nine data items in a frame come from the same reading pass and share the same acquisition time, without interleaving with other frames, i.e., same source within the frame; data quality binding during reading makes it possible to distinguish between true values and missing values, avoiding filling with 0 or old values.
[0043] Step S5: Freeze as an atomic snapshot.
[0044] The effective job identifier of step S1, the nine process data of step S4, and the acquisition time of this reading are encapsulated into an immutable atomic snapshot. After that, no field in this frame will be updated separately. A record entry is formed here. The request of the read-only job identifier register generates a separate snapshot without robot data. This snapshot is not published to the interface to avoid overwriting the most recent real welding data.
[0045] Step S6: Encode the entire frame using the same snapshot.
[0046] The complete image of the holding register, input register, and coil is encoded once using only the atomic snapshot from step S5. The register mapping is defined in JSON and verified at startup: each of the fifteen acquisition data sources appears exactly once in the mapping; the fifteen acquisition data sources include nine process data items: welding status, welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner stop, and outer stop, as well as six operation identifiers: welder number, machine type, project section, manufacturing number, weld number, and equipment number; each acquisition field is explicitly configured with an invalid value, and the invalid value can be written to the corresponding register after trial encoding; the invalid values of the two Boolean fields must also be different from their true and false values. In terms of layout, registers 0-31 maintain the fixed-length ASCII values for six job identifiers, padding with 0x00 if necessary; input register 0 represents the welding status, using Boolean form, with 0 for false, 1 for true, and 65535 for invalid; input registers 1-15 represent welding current, welding voltage, travel speed, swing switch, half swing amplitude, swing speed, inner stop, and outer stop, respectively. Welding current, welding voltage, travel speed, half swing amplitude, swing speed, inner stop, and outer stop each occupy two registers, with floating-point entries being 32-bit big-endian and invalid values being -9999.0; the swing switch occupies one register with an invalid value of 65535; coil 0 and coil 1 represent the bit form of the welding status and the swing switch, respectively.
[0047] Fields with abnormal data quality are written to the register mapping as invalid values explicitly configured for that field; each field in the coil has only one bit, which cannot represent the unknown, and only outputs 1 when the data quality is normal and the value is true. The separability of missing values is handled by the register form of the same field; for addresses located within the gateway's single read range but without a data source on the robot side (input registers 16~17), they are declared as constant entries in the mapping and noted that they do not represent measured values, making the address range continuously readable, and making constants, measured values, and missing values separable. During encoding, if the valid reading of a field exceeds the range that its register can represent, only the field is downgraded to an invalid value.
[0048] The entire frame is encoded once using the same snapshot, ensuring that the job identifier in the response frame is taken from step S1, and each process data item is taken from the same read in step S4. Missing fields are explicitly invalid values, forming a record entry.
[0049] Step S7: Capture and respond according to the requested range.
[0050] The gateway frames the address range of the current request from the image in step S6. Adjacent fields are encoded and merged into a continuous block. A large-scale read across fields (such as input register 0~17) by the gateway can be satisfied by a single slice. Each response records the source IP, transaction number, function code, address, quantity, time consumption, and the collection time and data quality of the snapshot used. The collection time of the snapshot used for each frame can be verified. The gateway uploads each frame to the cloud platform. The platform archives them according to the job identifier within the frame. Invalid values are identified as not being readable rather than the real value 0.
[0051] Step S8: Frame-by-frame loop and weld closure.
[0052] The gateway repeats steps S3 to S7 periodically. Each frame is based on the job identifier confirmed in step S1 and the mirror variable of the current execution segment in step S2. After the welding program terminates the arc and resets the swing switch, the welding status changes to a reliable unwelded state. Step S4 sets the remaining eight items to the true value 0 accordingly, and the frame sequence of this weld segment is closed. After the weld number is incremented and confirmed, step S1 is re-executed, and the welding program executes step S2 of the next segment. It then returns to step S3 to start the next weld. The record entries of each frame constitute a complete record of the weld from arc start to arc termination in chronological order. The interface also takes a snapshot every 2 seconds through the same acquisition thread for local preview, which is not included in the gateway query statistics.
[0053] Handling abnormal operating conditions: E1 Acquisition Timeout: The serial read has a waiting limit, which is the longest duration during which the acquisition device waits for the single acquisition thread to return the serial read result when responding to a gateway read request; when the waiting time in step S4 exceeds the limit, the snapshot with the degradation mark is used as the snapshot of step S5 to continue executing steps S6 and S7, and the current frame is responded to on time; the late read result does not overwrite the already responded result.
[0054] E2 interface suspension: When the duration of a single interface call exceeds a preset multiple of the waiting limit but is not less than a preset number of seconds, it is determined to be suspended. Subsequent requests will not be queued, and steps S6 and S7 will be executed directly with a downgraded snapshot.
[0055] E3 Connection Interruption: When a connection or read fails, the connection is closed and reconnection is backed up exponentially. The backoff timer is only advanced by actual connection or read failures. The gateway’s stable periodic queries will not cause the backoff timer to postpone reconnection indefinitely.
[0056] E4 encoding degradation: When the valid reading of a single field exceeds the representable range of its register, only the field is downgraded to its own invalid value, without affecting the entire frame.
[0057] E5 Job Identifier Missing or Unconfirmed: This frame does not read the robot and directly marks the entire frame as an unusable snapshot to execute steps S6 and S7: all nine process data registers are written with invalid values, and the six unconfirmed items in the job identifier register after startup recovery are also written with invalid values; this frame responds on time, and the reason for the missing item is marked on the local interface. After the operator completes and confirms the missing item, the next cycle will be restored.
[0058] The common features of the above scenarios are that the main process is not interrupted, the frame is responded to on time, and the frame contains a missing marker, which the platform can distinguish from the actual reading. Only in the extreme case of failure of the entire frame encoding itself will the platform respond with a device fault error code, and the connection will not be disconnected. The gateway can retry in the next cycle.
[0059] Time limit and self-recovery parameters: The vendor SDK socket read timeout is 5.0s; the maximum waiting time for data acquisition is 2.5s, which is the longest duration during which the acquisition device waits for a single acquisition thread to return a serial read result when responding to a gateway read request. A timeout is responded to with a downgraded snapshot and the message "Robot read timeout" (E1). A single interface call can exceed the maximum waiting time; if the duration of a single interface call exceeds three times the maximum waiting time and is not less than 30s, it is considered suspended (E2). Robot reconnection backoff increments from 1s, up to a maximum of 10s (E3). After a Modbus slave exits abnormally, backoff increments from 1s, up to a maximum of 30s, for reconstruction. Stable operation exceeding the set timeout period results in a reset, and the listening port is exclusively bound. Gateway connections disconnect after 120s of inactivity to avoid half-open connections caused by power outages or disconnections of the acquisition box. If the gateway remains silent for more than 30s, the interface will display "Acquisition box has not been queried for a long time."
[0060] To facilitate understanding, the above steps are illustrated using a specific weld section as an example. This weld section is set with a travel speed of 0.006 m / s, a half-swing amplitude of 0.002 m, a frequency of 1.6 Hz, and 300 ms dwell time on both the inner and outer sides. In step S2, before arc ignition, the welding program writes g_MoveL_V=6, g_Weave_Amp=2, g_Weave_Fq=1.6, g_Weave_Time_In=g_Weave_Time_Out=300, and sets g_Weave_On to true. The half-swing amplitude is displayed as 2 mm on the teach pendant. In step S4, after a single acquisition thread reads back the above mirrored variables, the travel speed is calculated to be 6 × 60 = 360 mm / m. The half-swing amplitude is 2mm, the dwell time is 300×0.001=0.3s, and the swing speed is 1.6×2×60÷[1-1.6×(0.3+0.3)]=192÷0.04=4800mm / min. This set of values, along with the welding current, voltage, and welding status read in the same instance, are entered into the same atomic snapshot in step S5. In step S6, these values are encoded as input registers 0~17. The gateway reads and uploads the data in step S7. If a certain numerical mirror variable has not yet been published, the field is read back as -1. In step S4, this value is deemed invalid. In step S6, -9999.0 is written to the corresponding register. The remaining fields are uploaded as usual. Based on this, the platform can determine which item is missing in this frame and will not mistakenly identify it as a real reading.
[0061] This invention utilizes a read-only interface whitelist and a single acquisition thread for serial reading. Without issuing any control commands to the robot controller, the data acquisition gateway can obtain a frame of welding process data records with intra-frame homogeneity, distinguishable true values from missing values, and correctly assigned to each cycle of query. By leveraging mirrored variables published by the welding program before arc ignition, process parameters that cannot be read back by the read-only interface can be acquired. Through data quality binding during reading, unique atomic snapshot encoding, and downgraded snapshot responses in case of anomalies, the invention ensures that the records are authentic and separable, responses are uninterrupted, and ultimately forms a complete weld record from arc ignition to arc termination.
[0062] Example 2: like Figure 3 As shown, the present invention also provides a read-only data acquisition device for welding processes, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in Embodiment 1. In one implementation, when the processor executes the computer program, it forms the following functional units: a read-only robot adaptation unit, an acquisition thread unit, an input and confirmation unit, a snapshot unit, a register mapping unit, and a slave unit. The acquisition device communicates with the robot controller and the data acquisition gateway, respectively. The following provides a detailed description of each unit and their collaborative operation.
[0063] 1. Read-only robot adapter unit The read-only robot adapter unit encapsulates the robot controller's RPC runtime library, allowing the data acquisition device to access the robot controller only through a read-only interface. This unit exposes only four members: connection, disconnection, connection status query, and one-time read. The adapter layer internally sets up a whitelist of read-only interfaces, which consists only of read-only interfaces, including connection establishment, connection disconnection, SDK version query, controller version query, reading numerical system variables, reading boolean system variables, reading end-point command speed, and reading global speed multiplier. Among these, the SDK version query and controller version query are each called once during connection establishment. If the handshake fails, the connection is disconnected and reconnected to avoid mismatch between subsequent responses and requests. The end-point command speed and global speed multiplier are only used in the explicitly configured backup data retrieval mode. During normal cycles, only the reading numerical system variables and reading boolean system variables are called.
[0064] Methods from vendors not on the whitelist are not called by the adaptation layer. The adaptation layer does not provide any entry point for calling control methods. Therefore, the acquisition device does not have the ability to issue control commands at the code level. To ensure read-only functionality, the system also sets up automated testing to intercept calls to the RPC runtime library using test stubs. Once a method not on the whitelist is called, it is judged as a failure. In this way, even if the runtime library itself contains control methods, the acquisition device will only call the read-only methods. The addition of the acquisition function does not change the welding control logic and does not introduce the risk of miscontrol.
[0065] The read-only robot adapter unit outputs the read-back values to the acquisition thread unit. The read-back values include welding status, welding current, welding voltage, and mirror variables published by the welding program.
[0066] 2. Acquisition Thread Unit The acquisition thread unit is the core scheduling unit of the acquisition device. It is responsible for the serial execution of all calls to the robot controller and for binding data quality to the read-back values. This unit maintains a single thread called robot-acquisition. All interface calls to the robot controller are executed serially through the queue of this thread, ensuring that all data items within a frame originate from the same read and share the same acquisition time, without interleaving with other frames. This is how the intra-frame common-origin constraint is implemented.
[0067] The acquisition thread unit responds to the periodic query of the data acquisition gateway, triggering a serial read. The reading order is as follows: first, read the welding status; if and only if the data quality of this field is normal and the value is "not welded", skip the reading of the other eight items, set the remaining process data to the true value 0 or the off state and mark it as normal; if the welding status is not normal, no such inference is made, otherwise continue to read the welding current, welding voltage and mirror variable, convert according to the variable unit, and calculate the swing speed from the swing frequency, half swing amplitude and inner and outer dwell time. The process data includes welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner dwell time and outer dwell time, plus welding status, for a total of nine items.
[0068] During the reading process, the acquisition thread unit binds a value, data quality, source, and failure reason to each field. Data quality includes at least normal, invalid, and unavailable. Normal includes reading a finite number, a true value, or a false value, or being set to a true zero value or closed state because the welding status is believed to be unwelded. Invalid includes reading a non-finite number, a Boolean variable returning an illegal value, or reading the default value of an undefined variable for a numeric mirror variable. It also includes situations such as walking speed exceeding a preset range, the denominator not being greater than 0 or any input being negative when calculating the swing speed, and the variable name being rejected by the robot controller due to an application layer exception. Unavailable includes failure to read due to interface timeout, suspension, or disconnection, as well as situations such as missing job identifiers or failure to read the robot controller before confirmation after startup and recovery. Fields with abnormal data quality are not replaced with 0 or old values, thereby ensuring that true values and missing values can be distinguished.
[0069] The acquisition thread unit is also responsible for exception handling. When the acquisition device responds to a gateway read request, the longest duration for waiting for the single acquisition thread to return the serial read result is the waiting limit. The waiting limit is configured by the slave unit and can be adjusted according to the response characteristics of the robot controller. When the acquisition device waits for more than the waiting limit, it no longer waits for the read result. The snapshot unit generates a downgraded snapshot, the register mapping unit encodes the downgraded snapshot, and the slave unit responds on time. When the duration of a single interface call exceeds a preset multiple of the waiting limit but is not less than a preset number of seconds, it is determined that the interface is suspended. Subsequent read requests are no longer queued and are directly encoded and responded to using the downgraded snapshot. When the connection with the robot controller fails or the read fails, the connection is closed and reconnection is backed up exponentially. Each actual failure advances the backoff timer. The stable polling of the gateway will not delay reconnection indefinitely. When the interface times out, is suspended, or disconnects, the acquisition thread unit outputs a downgrade flag to the snapshot unit. Late read results do not overwrite already responded results.
[0070] The acquisition thread unit outputs the process data, after binding the data quality, to the snapshot unit.
[0071] 3. Input and Confirmation Unit The input and confirmation unit receives six job identifiers entered by the operator: welder number, machine model, project section, manufacturing number, weld number, and equipment number. During saving, this unit attempts to encode each identifier according to the encoding and byte capacity specified in the external protocol. The byte capacities for the six job identifiers are 6, 8, 16, 16, 8, and 10 bytes respectively, and the encoding is performed using ASCII. If any identifier cannot be encoded or exceeds the capacity, the save is rejected, and the previous valid value is retained. After all entries pass, the value is written to the valid storage and atomically persisted. The valid storage is persisted by first writing to a temporary file, then forcibly flushing to disk, and finally atomically renaming the file to ensure that the value is not lost or damaged during power outages.
[0072] At startup, the job identifier recovered from the persistent file is only used as a value to be confirmed. Before confirmation is completed, the job identifier register in the external response outputs an invalid value (empty string, all 0x00). The weld number obtained by incrementing the previous effective value is only used as a value to be confirmed. Before confirmation is completed, the job identifier register in the external response keeps outputting the previous effective value. The clear operation only clears the first five items and retains the 10-digit equipment number to avoid duplicate entry errors when changing parts or handing over shifts.
[0073] The input and confirmation unit outputs the job identifier to the snapshot unit. Through item-by-item trial coding and confirmation mechanism, it ensures that job identifiers that have not been confirmed by the operator will not be included in the uploaded data, thereby making the record ownership controllable and preventing the old weld number that is automatically restored after a power outage and restart from assigning the data of the new weld to the previous weld.
[0074] 4. Snapshot Unit The snapshot unit is used to freeze the job identifier, the process data read in this instance, and the acquisition time into an immutable atomic snapshot. Specifically, the snapshot unit receives the job identifier output by the input and confirmation unit, the process data and quality field output by the acquisition thread unit, and the acquisition time of this instance, and encapsulates them into an atomic snapshot. After encapsulation, no field within this frame will be updated individually, and a record entry is formed at this point.
[0075] When the acquisition thread unit outputs a degradation flag, the snapshot unit generates a degradation snapshot to replace the atomic snapshot. The degradation snapshot contains the job identifier and acquisition time, and the data quality of its process data fields is marked as unavailable or invalid. When the register mapping unit encodes the degradation snapshot, it writes these fields to its pre-configured invalid values. The immutability of the degradation snapshot ensures that late read results will not overwrite the already responded results.
[0076] For requests to the read-only job identifier register, the snapshot unit generates a separate snapshot without robot data. This snapshot is not published to the interface to avoid overwriting the most recent actual welding data.
[0077] The snapshot unit outputs atomic snapshots or downgrade snapshots to the register mapping unit.
[0078] 5. Register Mapping Unit The register mapping unit is used to encode the register image once using only the atomic snapshot output by the snapshot unit. The register mapping is defined in JSON and is verified at startup: each of the fifteen acquisition data sources appears exactly once in the mapping; each acquisition field is explicitly configured with an invalid value, and the invalid value can be written to the corresponding register after trial encoding; the invalid values of the two Boolean fields must also be different from their true and false values. In terms of layout, registers 0 to 31 are kept as fixed-length ASCII characters for six job identifiers, padded with 0x00 if necessary; input register 0 is the welding status, in Boolean form, false is 0, true is 1, and invalid is 65535; input registers 1 to 15 are welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner stop and outer stop, respectively. Among them, welding current, welding voltage, walking speed, half swing amplitude, swing speed, inner stop and outer stop each occupy two registers, floating point items are 32-bit big-endian, and the invalid value is -9999.0. The swing switch occupies one register, and the invalid value is 65535; coil 0 and coil 1 are the bit forms of welding status and swing switch, respectively.
[0079] Fields with abnormal data quality are written to the register mapping as explicitly configured invalid values for that field. Each field in the coil has only one bit, which cannot represent the unknown. It only outputs 1 when the data quality is normal and the value is true. The separability of missing values is handled by the register form of the same field. For addresses located within the gateway's single read range but without a data source on the robot side (input registers 16~17), they are declared as constant entries in the mapping and noted that they do not represent measured values, making the address range continuously readable and ensuring that constants, measured values, and missing values are separable. During encoding, if the valid reading of a field exceeds the range that its register can represent, only that field is downgraded to an invalid value, without affecting the entire frame.
[0080] The register mapping unit outputs the encoded register image to the slave unit.
[0081] 6. Slave Unit The slave unit is used to intercept and respond to frames according to the request range of the data acquisition gateway. In this embodiment, the unit acts as a Modbus TCP slave. It verifies each frame read request step by step according to the unit number, function code, request length and quantity, and mapping coverage. First, it verifies the Modbus Application Protocol header (MBAP). If it is invalid, it disconnects the connection directly. Then, it verifies step by step according to the unit number, function code (FC01~FC04 only: read coil, read discrete input, read holding register, read input register), request length and quantity (register 1~125, coil 1~2000), and mapping coverage. If they do not match, they respond with exception codes 0x0B, 0x01, 0x03, and 0x02 respectively.
[0082] After the verification is successful, the unit determines whether the address range of the request contains fields from the robot according to the data source: if it does, the acquisition thread unit is triggered to perform a serial read; if it does not, the read of the robot is skipped, and a snapshot is directly generated with the job identifier and the robot source field marked as unavailable. The response is encoded as usual, so it is not affected by the robot read timeout.
[0083] This unit extracts the address range of the current request from the register image output by the register mapping unit to frame and respond to the gateway. Adjacent fields are encoded and merged into a contiguous block. A large-range read across fields by the gateway in one operation (such as input registers 0-17) can be satisfied by a single slice. Each response records the source IP, transaction number, function code, address, quantity, time consumption, and the acquisition time and data quality of the snapshot used. The acquisition time of the snapshot used for each frame can be verified.
[0084] Device working process: After the device is powered on, the input and confirmation unit restores the job identifier from the persistent file, but only as a value to be confirmed; after the operator inputs and confirms the six job identifiers through the graphical interface, the input and confirmation unit writes them to the effective storage and atomically persists them.
[0085] Before each weld segment is started, the welding program writes the process parameters set for that segment into the system variables of the robot controller as mirror variables; after the arc is extinguished, the mirror variables of the swing switch are set to off.
[0086] The data acquisition gateway initiates queries periodically, and the slave unit verifies and distributes the requests: if the request does not contain the robot field, the snapshot unit generates a separate snapshot without robot data. This snapshot consists of the job identifier and the robot source field marked as unusable, and is encoded and responded as usual; if the request contains the robot field, the acquisition thread unit is triggered to perform a serial read. The acquisition thread unit controls the read-only robot adapter unit to serially call the robot controller through the read-only interface whitelist, read the welding status, welding current, voltage, and mirror variables, bind data quality for each field, and output it to the snapshot unit. The snapshot unit freezes the job identifier, process data, and acquisition time into an immutable atomic snapshot and outputs it to the register mapping unit. The register mapping unit only encodes the register image with this atomic snapshot. Fields with abnormal data quality are written with pre-configured invalid values and output to the slave unit. The slave unit extracts frames according to the request range and responds to the gateway. The gateway uploads each frame to the cloud platform, and the platform archives them according to the job identifier within the frame.
[0087] When the robot controller interface times out, hangs, or disconnects, the acquisition thread unit outputs a degradation flag to the snapshot unit. The snapshot unit generates a degradation snapshot, the register mapping unit encodes the degradation snapshot, and the slave unit responds on time.
[0088] The device responds to the periodic query from the data acquisition gateway by repeatedly executing the above process until the welding status changes to "not welded". After the welding program terminates and the swing switch is reset, the welding status changes to a reliable "not welded" state. Based on this, the acquisition thread unit sets the remaining process data to the true value of 0, and the recording of this weld segment ends. After the weld number is incremented and confirmed, the entry and confirmation unit becomes active again, the welding program executes the next segment's mirror variable publication, the device returns to read request verification and routing, and begins the acquisition of the next weld.
[0089] The aforementioned units of the device of the present invention work together to ensure that, under the premise of strict read-only operation on the acquisition side and no control commands are issued to the robot controller, serial reading by a single acquisition thread ensures that the data within the frame is of the same source, data quality binding during reading ensures that the true value and the missing value can be distinguished, unique encoding of atomic snapshots ensures that each item in the frame is taken from the same reading, degraded snapshots ensure that the response is not interrupted when the robot interface is abnormal, the input and confirmation unit ensures that unconfirmed job identifiers are not included in the uploaded data, and frame-by-frame looping and arc closing ensure that a complete weld record is obtained.
[0090] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A read-only data acquisition method for welding processes, applied to an acquisition device, wherein the acquisition device communicates with a robot controller and a data acquisition gateway respectively, characterized in that, include: The robot controller is invoked through a pre-defined read-only interface whitelist, and all invocations to the robot controller are executed serially by a single acquisition thread. The system variables of the robot controller are read as mirror variables through the read-only interface. The system variables contain the process parameters set for each weld segment by the welding program running on the robot controller before the arc is started. The single acquisition thread responds to the periodic query of the data acquisition gateway, performs a serial read based on the read-only interface whitelist, binds data quality to each field read, and encapsulates the process data, acquisition time and job identifier of this read into an immutable atomic snapshot; The register image is encoded only once using the atomic snapshot. Fields with abnormal data quality are written with invalid values that are pre-configured for them, and responses are intercepted according to the request range of the data acquisition gateway. When the interface of the robot controller times out, hangs, or disconnects, a degraded snapshot with a degrade flag is generated, and the atomic snapshot is replaced by the degraded snapshot for encoding and timely response is provided. Repeat the above process until the welding status changes to unwelded, at which point the recording of this weld segment ends.
2. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The process parameters include walking speed and swing parameters. The swing parameters include swing switch, half swing amplitude, swing frequency, inner dwell time, and outer dwell time. Each serial read also calculates the swing speed based on the mirrored variable. The swing speed is calculated as follows: Swing speed = F × D × 60 ÷ [1 - F × (T)] 内 +T 外 ]], where F is the oscillation frequency in Hz; D is the half-amplitude in mm; T 内 T 外 The inner and outer dwell times of the welding torch oscillation are respectively, in seconds; the oscillation speed is in mm / min; the oscillation speed is considered invalid when the denominator is not greater than 0 or any input is negative; when the oscillation switch data quality is normal and the value is off, the oscillation speed takes the true zero value.
3. The method for reading-only acquisition of welding process data according to claim 2, characterized in that, The mirror variable of the swing switch is a Boolean type. The default value of the undefined Boolean variable is the same as the value when the swing is off. When the swing switch reads back false, the reading result of the swing switch is determined to be invalid only when all swing value mirror variables read the default value of the undefined value variable. Otherwise, the reading result of the swing switch will be determined as truly closed; When the swing switch reads a true value, it is determined that the switch is actually turned on.
4. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The read-only interface whitelist includes establishing a connection, disconnecting a connection, querying the SDK version, querying the controller version, reading numerical system variables, reading boolean system variables, reading the command speed of the robot end effector, and reading the global speed multiplier. The SDK version query and the controller version query are each called once when establishing a connection.
5. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The data quality includes normal, invalid, and unavailable; where normal includes reading a finite number or a valid Boolean value, or being set to a true zero value or closed state because the welding status is believed to be unwelded; invalid includes reading a non-finite number of values, a Boolean variable returning an illegal value, or a numerical mirror variable reading the default value of an undefined variable; unavailable includes failing to read due to interface timeout, suspension, or disconnection; the process data includes welding status, welding current, welding voltage, walking speed, swing switch, half swing amplitude, swing speed, inner dwell time, and outer dwell time.
6. The method for reading-only acquisition of welding process data according to claim 5, characterized in that, In a single serial read, if and only if the data quality of the welding state is normal and the value is "not welded", the reading of the remaining process data other than the welding state is skipped, the data is set to the true zero value or the off state and marked as normal; otherwise, the remaining process data is read and the data quality is bound, and the welding state is not inferred to be "not welded".
7. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The register image is defined by a preset register mapping. The register mapping verifies that each data acquisition data source appears exactly once at startup. Each acquisition field is explicitly configured with an invalid value, and the invalid value can be written to the corresponding register. The invalid value of a Boolean field is different from its true and false values. The register image includes a holding register, an input register, and a coil bit. The welding status and the swing switch are provided in both register and coil bit forms. The coil bit outputs 1 only when the data quality is normal and the value is true.
8. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The job identifier is a confirmed job identifier, which refers to the job identifier that has been written into the effective storage after being verified item by item according to the encoding and byte capacity of the external protocol. The job identifier obtained by starting recovery is only used as a value to be confirmed. Before the confirmation is completed, the job identifier register of the external response outputs an invalid value. The weld number obtained by incrementing based on the previous effective value is only used as a value to be confirmed. Before the confirmation is completed, the job identifier register of the external response keeps outputting the previous effective value.
9. The method for reading-only acquisition of welding process data according to claim 1, characterized in that, The serial read operation has a waiting limit, which is the longest duration during which the acquisition device waits for the single acquisition thread to return the serial read result when responding to a gateway read request. When the acquisition device waits for longer than the waiting limit, it continues to encode and respond using the downgraded snapshot; when the duration of a single interface call exceeds a preset multiple of the waiting limit but is not less than a preset number of seconds, it is determined that the interface is suspended, and subsequent read requests continue to encode and respond using the downgraded snapshot; when the connection with the robot controller fails or the reading fails, the connection is closed and reconnection is performed exponentially, with each actual failure advancing the backoff timer. When a valid reading of a single field exceeds the representable range of its register, the field is downgraded to an invalid value, and the remaining fields are encoded according to their read values.
10. A read-only data acquisition device for welding process, characterized in that, The method includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Cross-system acquisition and restoration method, system and equipment for symbolic variables of welding robot
CN121535789A
