IO channel combination multiplexing method and device, equipment and storage medium
By configuring and allocating the physical channels logical channel, building a channel data processing logic system is solved, the problems of module idleness and resource waste are realized, the combination multiplexing and data processing of IO channels are realized, and resource utilization is improved.
Patent Information
- Application Number
- CN202411354978.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-03
AI Technical Summary
When existing modules collect fixed-type data information, some channels are idle, resulting in waste of resources. Modules are needed to collect other types of data, forming channel redundancy and cannot be effectively reused.
By configuring the physical channel logical channel, obtaining the logical channel that supports multiplexing and corresponding configuration information, distributing memory, building a channel data processing logic system, and reporting the pending data to the functional block for data processing, realizing the IO channel Combination and multiplexing.
It effectively reduces unnecessary resource waste, realizes flexible configuration and data processing of channels, avoids increasing the demand for modules, and improves resource utilization.
Smart Images

Figure CN119248495A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an IO channel combination multiplexing method, device, equipment and storage medium. Background Art
[0002] At present, the original module is designed to collect fixed-type data information. In a certain usage scenario, some channels of a module collect data, and some channels are idle. When other types of data need to be collected, corresponding modules need to be added, resulting in the current situation of channel redundancy and module redundancy, and resulting in a waste of memory resources. For this usage environment, a channel reuse technical solution is needed. The reusable channels can be configured according to specific needs to collect corresponding types of data without the need to continuously add modules. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide an IO channel combination multiplexing method, device, equipment and storage medium, which can effectively realize the combination multiplexing of IO channels and reduce unnecessary resource waste. The specific scheme is as follows:
[0004] In a first aspect, the present application provides an IO channel combination multiplexing method, comprising:
[0005] Performing logical channel configuration on the current physical channel to obtain logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information;
[0006] Based on the logical channel configuration information, a memory allocation operation corresponding to each of the logical channels is completed to obtain a corresponding channel data processing logic system;
[0007] Acquire the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system;
[0008] By reporting the data to be processed to a function block of a corresponding type, the corresponding data processing operation is completed.
[0009] Optionally, performing logical channel configuration on the current physical channel to obtain logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information includes:
[0010] Get the type information of the current physical channel that supports multiplexing;
[0011] Performing logical channel configuration based on the type information to obtain logical channels supported by the physical channel for multiplexing; wherein the logical channels include analog input channels, analog output channels, and digital input channels;
[0012] Based on each of the logical channels, multiplexing channels are combined and the number of combinable fixed channels is configured to obtain corresponding logical channel configuration information.
[0013] Optionally, the performing a memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information includes:
[0014] The memory allocation application operation corresponding to each of the logical channels is completed by compiling according to the logical channel configuration information to complete the corresponding memory allocation operation and obtain the corresponding memory allocation information; wherein the memory allocation information includes the allocated input and output memory information corresponding to each of the logical channels.
[0015] Optionally, completing the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information to obtain a corresponding channel data processing logic system includes:
[0016] The memory allocation operation corresponding to each of the logical channels is completed based on the logical channel configuration information, and the channel information download file generated based on the user configuration is used to obtain the corresponding channel data processing logic system.
[0017] Optionally, the acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system includes:
[0018] Based on the channel data processing logic system, the to-be-processed data uploaded by the physical channel is acquired from the input and output memories respectively corresponding to each of the logical channels.
[0019] Optionally, the completing a corresponding data processing operation by reporting the data to be processed to a function block of a corresponding type includes:
[0020] Reporting the data to be processed to a function block of a corresponding type;
[0021] By executing the corresponding code segment and calling the corresponding function block, the data processing operation is completed and the corresponding processing result is obtained.
[0022] Optionally, the acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system includes:
[0023] Based on the channel data processing logic system, the data to be processed that is uploaded to the corresponding memory by the physical channel based on a preset period is obtained.
[0024] In a second aspect, the present application provides an IO channel combination multiplexing device, comprising:
[0025] A channel configuration module is used to perform logical channel configuration on the current physical channel to obtain various logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information;
[0026] A memory allocation module, used to complete the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information to obtain a corresponding channel data processing logic system;
[0027] A data acquisition module, used for acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system;
[0028] The data processing module is used to complete the corresponding data processing operation by reporting the data to be processed to the corresponding type of function block.
[0029] In a third aspect, the present application provides an electronic device, including:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the steps of the aforementioned IO channel combination multiplexing method.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the aforementioned IO channel combination multiplexing method.
[0033] It can be seen that in this application, the current physical channel is configured with a logical channel to obtain the logical channels supported by the physical channel for multiplexing and the corresponding logical channel configuration information; based on the logical channel configuration information, the memory allocation operation corresponding to each of the logical channels is completed to obtain the corresponding channel data processing logic system; based on the channel data processing logic system, the data to be processed uploaded to the corresponding memory by the physical channel is obtained; by reporting the data to be processed to the functional block of the corresponding type, the corresponding data processing operation is completed. In other words, this application obtains the corresponding logical channels and logical channel configuration information by configuring all types of channels supported by the current physical channel for multiplexing. Then, memory allocation is performed based on the logical channel configuration information to construct the corresponding channel data processing logic system, and then the corresponding data processing is completed based on the channel data processing logic system. In this way, the combined multiplexing of IO channels can be effectively realized, reducing unnecessary waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flow chart of an IO channel combination multiplexing method provided in this application;
[0036] Figure 2 A specific logic channel configuration flow chart provided for this application;
[0037] Figure 3 A specific memory allocation flow chart provided for this application;
[0038] Figure 4 A specific data processing flow chart provided for this application;
[0039] Figure 5 A schematic diagram of a specific functional block type provided for this application;
[0040] Figure 6 A schematic diagram of the structure of an IO channel combination multiplexing device provided in this application;
[0041] Figure 7 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] At present, for the original module to collect fixed type data information design, in a certain use scenario, some channels of a module collect data, and some channels are idle, and when other types of data need to be collected, it is necessary to add corresponding types of modules, forming the status quo of channel redundancy module redundancy, and leading to the waste of memory resources. For this kind of use environment, a technical solution of channel multiplexing is needed to solve it. The reusable channel can be configured according to specific needs to collect corresponding types of data without the need to continuously add modules. To this end, the present application provides an IO channel combination multiplexing scheme, which can effectively realize the combination multiplexing of IO channels.
[0044] See also Figure 1As shown, an embodiment of the present invention discloses an IO channel combination multiplexing method, including:
[0045] Step S11: Perform logical channel configuration on the current physical channel to obtain logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information.
[0046] Specific, combined Figure 2 As shown, in this embodiment, the current physical channel is configured with logical channels to obtain the logical channels supported by the physical channel for multiplexing and the corresponding logical channel configuration information, which may specifically include: obtaining the type information of the current physical channel supporting multiplexing; performing logical channel configuration based on the type information to obtain the logical channels supported by the physical channel for multiplexing; wherein the logical channels include analog input (AnalogInput, AI) channels, analog output (Analog Output, AO) channels, and digital input (Digital Input, DI) channels; performing multiplexing channel combination based on each of the logical channels and configuring the number of fixed channels that can be combined to obtain the corresponding logical channel configuration information. That is, in the process of configuring the channel, the corresponding logical channel is configured according to the type of multiplexing that the physical channel can support, and the channel can be multiplexed into n types, and n types of channels are configured in the logic. And the combined multiplexed channel configuration has a fixed number of channels that can be combined, and the combined channels cannot be arbitrarily combined and must be fixedly combined and split. Among them, regarding IO (Input Output, input and output) single channel multiplexing, a single channel can be multiplexed into a single channel of other types, and the memory size occupied by the channel allocation is the same. Regarding IO multi-channel combination multiplexing, multiple channels are merged into a single channel, and the memory occupied by multiple channels is the same as that of the merged single channel; a single channel is split into multiple channels for use, and the memory occupied by the split multiple channels is the same as that of the single channel. In this way, a single physical channel can be multiplexed into different types, multiple single channels can be combined and multiplexed into a certain type, and a certain channel can be split into multiple single channels for multiplexing.
[0047] Step S12: completing a memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information to obtain a corresponding channel data processing logic system.
[0048] Combination Figure 3As shown, in this embodiment, the memory allocation operation corresponding to each of the logical channels is performed based on the logical channel configuration information, which may specifically include: completing the memory allocation application operation corresponding to each of the logical channels by compiling according to the logical channel configuration information to complete the corresponding memory allocation operation and obtain the corresponding memory allocation information; wherein the memory allocation information includes the allocated input and output memory information corresponding to each of the logical channels.
[0049] In this embodiment, the memory allocation operation corresponding to each of the logical channels is completed based on the logical channel configuration information to obtain the corresponding channel data processing logic system, including: completing the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information, and using the channel information download file generated based on the user configuration configuration to obtain the corresponding channel data processing logic system. That is to say, in the process of memory allocation, according to the logical channel configuration information, the memory allocation application is compiled for each of the logical channels, and all types of channels that can be reused will be applied for memory. Then the channel information configured by the user configuration is compiled to generate a channel information download file, and the module configures each channel according to the specific configuration information of the received channel information download file to generate each type of channel data processing logic system POU (Programming Organisation Unit).
[0050] Step S13: based on the channel data processing logic system, obtain the data to be processed uploaded to the corresponding memory by the physical channel.
[0051] Combination Figure 4 As shown, in this embodiment, the acquisition of the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system may specifically include: acquiring the data to be processed uploaded by the physical channel from the input and output memories corresponding to each of the logical channels based on the channel data processing logic system. The acquisition of the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system includes: acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on a preset period based on the channel data processing logic system. Among them, the preset period can be specifically configured and adjusted accordingly based on actual needs. It can be understood that when the physical channel reports data, the physical channel collects actual data according to the specific type configured by the user, and then reports the data to the corresponding input and output memory applied for allocation during the compilation process through periodic data.
[0052] Step S14: completing the corresponding data processing operation by reporting the data to be processed to a function block of a corresponding type.
[0053] Specific, combined Figure 4 As shown, in this embodiment, the corresponding data processing operation is completed by reporting the data to be processed to the function block of the corresponding type, including: reporting the data to be processed to the function block of the corresponding type; performing the corresponding function block call by executing the corresponding code segment to complete the data processing operation and obtain the corresponding processing result. In other words, regarding data processing, the running process obtains the reported data from the allocated memory through the system POU, reports the data to the type function block, executes the call function block, completes the data processing, and then displays the result to the user. Among them, the specific function block (FB) type is as follows Figure 5 As shown, including but not limited to AI type, AO type, DI type, DOV type, PI (Pulse Input) type, RTD (Resistance Temperature Detector) type, SSI (Small-Scale Integration, which refers to the integrated circuit technology that integrates a small number of electronic components on a single chip) type.
[0054] It should be understood that the data processing is described by taking the AI type function block as an example. You can first define the AI (function block) type measurement point variable PN1_AAC, and the system POU obtains the memory data and reports it to the AI function block instance PN1_AAC. The following code segment can be obtained.
[0055] PN1_AAC.IN:=%IW36; Get the address %IW36 allocated by the corresponding channel memory data compilation
[0056] PN1_AAC.MT:=HDWP12A_AI; Module type
[0057] PN1_AAC.INQ:=SHR(%IB68, 2*(4-((0 MOD 4) + 1))) AND 16#03; Get quality bit data
[0058] PN1_AAC.EVENPAR:=BYTE_TO_BOOL(SHR(%IB72,8 - ((0 MOD 8) + 1)) AND 16#01);
[0059] PN1_AAC.DEVDIAG:=FIO1_1_4.MST; module online and offline
[0060] PN1_AAC.CHDIAG:=FIO1_1_4.ChState[1]; Get module diagnostic information
[0061] PN1_AAC();
[0062] Furthermore, regarding the subsequent function block call data processing process:
[0063] / / Note that MU, MU, WU, and WD are the upper and lower limits of the intermediate variable code value and the upper and lower limits of the range respectively;
[0064] RALECT:=(MU-MD) * PN1_AAC.IN / 16#FFFF + MD; / / Calculate the actual electrical signal value
[0065] TMPR1:=(RALECT-tld_) / (tlu_-tld_); / / tlu, tld current and voltage range upper and lower lines, calculate the proportion of electrical signals
[0066] RALOUT:=(MU-MD)*TMPR1+MD; / / RALOUT real range display value
[0067] (The Q quality is calculated based on the actual bit operation of the channel diagnosis variable)
[0068] (*Channel disconnection is written to the first bit of Q*)
[0069] IF ((N1_AAC.CHDIAG AND 16#0004)=16#0004) THEN
[0070] Q:=Q OR 16#0002;
[0071] ELSE
[0072] Q:=Q AND 16#FFFD;
[0073] END_IF
[0074] (*Channel short circuit writes to the second bit of Q*)
[0075] IF ((N1_AAC.CHDIAG AND 16#0002)=16#0002) THEN
[0076] Q:=Q OR 16#0004;
[0077] ELSE
[0078] Q:=Q AND 16#FFFB;
[0079] END_IF
[0080] (*Over range is written to bit 3 of Q*)
[0081] IF ((N1_AAC.CHDIAG AND 16#0200)=16#0200) THEN
[0082] Q:=Q OR 16#0008;
[0083] ELSE
[0084] Q:=Q AND 16#FFF7;
[0085] END_IF
[0086] (*Under range is written to bit 4 of Q*)
[0087] IF ((N1_AAC.CHDIAG AND 16#0100)=16#0100) THEN
[0088] Q:=Q OR 16#0010;
[0089] ELSE
[0090] Q:=Q AND 16#FFEF;
[0091] END_IF
[0092] IF (PN1_AAC.INQ AND 16#03)=16#02 THEN (*02- bad, set Q quality bad*)
[0093] Q:=Q OR 16#0040;
[0094] ELSIF (PN1_AAC.INQ AND 16#03)=16#01 THEN (*01-good, clear Q quality bad*)
[0095] Q:=Q AND 16#FFBF;
[0096] IF((RALPAR XOR EVENPAR)=TRUE) THEN
[0097] Q:=Q OR 16#0020;
[0098] ELSE
[0099] Q:=Q AND 16#FFDF;
[0100] END_IF
[0101] ELSIF (PN1_AAC.INQ AND 16#03) =16#00 THEN (*00-suspicious, keep Q quality bad*)
[0102] Q := Q OR (preQ AND 16#0040);
[0103] ELSE
[0104] AV:=RALOUT; / / AV is the current output range value
[0105] RALCHD:=PN1_AAC.CHDIAG;
[0106] After completing the above processing logic, the final output values AV (current value), Q (quality bit value), and RALCHD (channel diagnostic value) can be obtained.
[0107] It can be seen that in the embodiment of the present application, the current physical channel is configured with a logical channel to obtain the logical channels supported by the physical channel for multiplexing and the corresponding logical channel configuration information; based on the logical channel configuration information, the memory allocation operation corresponding to each of the logical channels is completed to obtain the corresponding channel data processing logic system; based on the channel data processing logic system, the data to be processed uploaded to the corresponding memory by the physical channel is obtained; by reporting the data to be processed to the functional block of the corresponding type, the corresponding data processing operation is completed. In other words, the present application obtains the corresponding logical channels and the logical channel configuration information by configuring all types of channels supported by the current physical channel for multiplexing. Then, memory allocation is performed based on the logical channel configuration information to construct the corresponding channel data processing logic system, and then the corresponding data processing is completed based on the channel data processing logic system. In this way, the combined multiplexing of IO channels can be effectively realized.
[0108] See also Figure 6 As shown, the embodiment of the present application also discloses an IO channel combination multiplexing device, including:
[0109] The channel configuration module 11 is used to perform logical channel configuration on the current physical channel to obtain the logical channels supported by the physical channel for multiplexing and the corresponding logical channel configuration information;
[0110] A memory allocation module 12, used to complete the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information to obtain a corresponding channel data processing logic system;
[0111] A data acquisition module 13, used for acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system;
[0112] The data processing module 14 is used to complete the corresponding data processing operation by reporting the data to be processed to the corresponding type of function block.
[0113] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0114] It can be seen that in the embodiment of the present application, the current physical channel is configured with a logical channel to obtain the logical channels supported by the physical channel for multiplexing and the corresponding logical channel configuration information; based on the logical channel configuration information, the memory allocation operation corresponding to each of the logical channels is completed to obtain the corresponding channel data processing logic system; based on the channel data processing logic system, the pending data uploaded to the corresponding memory by the physical channel is obtained; by reporting the pending data to the corresponding type of functional block, the corresponding data processing operation is completed. In other words, the present application obtains the corresponding logical channels and the logical channel configuration information by configuring all types of channels supported by the current physical channel for multiplexing. Then, memory allocation is performed based on the logical channel configuration information to construct the corresponding channel data processing logic system, and then the corresponding data processing is completed based on the channel data processing logic system. In this way, the combined multiplexing of IO channels can be effectively realized.
[0115] In some specific embodiments, the channel configuration module 11 may specifically include:
[0116] An information acquisition unit, used to obtain type information of the multiplexing supported by the current physical channel;
[0117] A logical channel acquisition unit, configured to perform logical channel configuration based on the type information to obtain each logical channel supported by the physical channel for multiplexing; wherein the logical channel includes an analog input channel, an analog output channel, and a digital input channel;
[0118] The channel combination multiplexing unit is used to perform multiplexing channel combination based on each of the logical channels and configure the number of combinable fixed channels to obtain corresponding logical channel configuration information.
[0119] In some specific embodiments, the memory allocation module 12 may specifically include:
[0120] A memory allocation unit is used to complete the memory allocation application operation corresponding to each of the logical channels by compiling according to the logical channel configuration information to complete the corresponding memory allocation operation and obtain corresponding memory allocation information; wherein the memory allocation information includes the allocated input and output memory information corresponding to each of the logical channels.
[0121] In some specific embodiments, the memory allocation module 12 may specifically include:
[0122] The system construction unit is used to complete the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information, and use the channel information download file generated based on the user configuration to obtain the corresponding channel data processing logic system.
[0123] In some specific embodiments, the data acquisition module 13 may specifically include:
[0124] The first data acquisition unit is used to acquire the to-be-processed data uploaded by the physical channel from the input and output memories respectively corresponding to each of the logical channels based on the channel data processing logic system.
[0125] In some specific embodiments, the data processing module 14 may specifically include:
[0126] A data reporting unit, used for reporting the to-be-processed data to a function block of a corresponding type;
[0127] The processing result acquisition unit is used to perform corresponding function block calls by executing corresponding code segments, complete data processing operations, and obtain corresponding processing results.
[0128] In some specific embodiments, the data acquisition module 13 may specifically include:
[0129] The second data acquisition unit is used to acquire the to-be-processed data uploaded to the corresponding memory by the physical channel based on a preset period based on the channel data processing logic system.
[0130] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0131] Figure 7 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the IO channel combination multiplexing method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0132] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0133] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0134] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the IO channel combination multiplexing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0135] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the IO channel combination multiplexing method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0136] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0137] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0138] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0139] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0140] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for combining and multiplexing IO channels, characterized in that: include: Performing logical channel configuration on the current physical channel to obtain logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information; Based on the logical channel configuration information, a memory allocation operation corresponding to each of the logical channels is completed to obtain a corresponding channel data processing logic system; Acquire the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system; By reporting the data to be processed to a function block of a corresponding type, the corresponding data processing operation is completed.
2. The IO channel combination multiplexing method according to claim 1, characterized in that: The performing logical channel configuration on the current physical channel to obtain each logical channel supported by the physical channel for multiplexing and corresponding logical channel configuration information includes: Get the type information of the current physical channel that supports multiplexing; Performing logical channel configuration based on the type information to obtain logical channels supported by the physical channel for multiplexing; wherein the logical channels include analog input channels, analog output channels, and digital input channels; Based on each of the logical channels, multiplexing channels are combined and the number of combinable fixed channels is configured to obtain corresponding logical channel configuration information.
3. The IO channel combination multiplexing method according to claim 1, characterized in that: The performing of the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information includes: The memory allocation application operation corresponding to each of the logical channels is completed by compiling according to the logical channel configuration information to complete the corresponding memory allocation operation and obtain the corresponding memory allocation information; wherein the memory allocation information includes the allocated input and output memory information corresponding to each of the logical channels.
4. The IO channel combination multiplexing method according to claim 1, characterized in that: The memory allocation operation corresponding to each of the logical channels is completed based on the logical channel configuration information to obtain a corresponding channel data processing logic system, including: The memory allocation operation corresponding to each of the logical channels is completed based on the logical channel configuration information, and the channel information download file generated based on the user configuration is used to obtain the corresponding channel data processing logic system.
5. The IO channel combination multiplexing method according to claim 3, characterized in that: The acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system includes: Based on the channel data processing logic system, the to-be-processed data uploaded by the physical channel is obtained from the input and output memories respectively corresponding to each of the logical channels.
6. The IO channel combination multiplexing method according to claim 1, characterized in that: The corresponding data processing operation is completed by reporting the data to be processed to a function block of a corresponding type, including: Reporting the data to be processed to a function block of a corresponding type; By executing the corresponding code segment and calling the corresponding function block, the data processing operation is completed and the corresponding processing result is obtained.
7. The IO channel combination multiplexing method according to any one of claims 1 to 6, characterized in that: The acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system includes: Based on the channel data processing logic system, the data to be processed that is uploaded to the corresponding memory by the physical channel based on a preset period is obtained.
8. An IO channel combination multiplexing device, characterized in that: include: A channel configuration module is used to perform logical channel configuration on the current physical channel to obtain various logical channels supported by the physical channel for multiplexing and corresponding logical channel configuration information; A memory allocation module, used to complete the memory allocation operation corresponding to each of the logical channels based on the logical channel configuration information to obtain a corresponding channel data processing logic system; A data acquisition module, used for acquiring the data to be processed uploaded to the corresponding memory by the physical channel based on the channel data processing logic system; The data processing module is used to complete the corresponding data processing operation by reporting the data to be processed to the corresponding type of function block.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the IO channel combination multiplexing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the IO channel combination multiplexing method as described in any one of claims 1 to 7.
Citation Information
Cited By
New energy equipment communication channel configuration method based on short-distance communication
CN120547060A
New energy equipment communication channel configuration method and device based on short distance communication
CN120547060B
