Dry contact configuration method, device and power supply equipment thereof

By receiving and processing dry contact configuration commands, the function and level of the dry contact are dynamically configured, which solves the problems of cumbersome dry contact configuration and high maintenance costs, and realizes flexible system adaptability and simplified maintenance process.

CN120546293BActive Publication Date: 2025-11-07KEHUA DATA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511006535.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

In existing technologies, the functions and voltage levels of dry contacts are relatively fixed, making it difficult to adjust them flexibly according to different project requirements. This results in cumbersome configuration, response delays, and high maintenance costs.

Method used

By receiving configuration commands containing dry contact function bit identifiers and valid level identifiers, and determining the target level based on logical operations, the dynamic configuration of input/output dry contact functions and levels is realized, and the functions and valid levels of dry contacts can be conveniently set using a graphical interface.

Benefits of technology

It enhances the system's flexibility and adaptability, simplifies on-site debugging and maintenance, and meets diverse needs in different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120546293B_ABST
    Figure CN120546293B_ABST
Patent Text Reader

Abstract

The application provides a dry contact configuration method and device and a power supply equipment thereof. The method comprises the following steps: receiving a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information and a first level corresponding to at least one dry contact respectively, and the configuration information at least comprises a dry contact function bit identifier and an effective level identifier corresponding to the dry contact; for each dry contact, performing a first logical operation based on the effective level identifier and the first level, determining a target level of the dry contact, and storing the target level to a storage address corresponding to the dry contact function bit identifier.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the electrical technical field, in particular to a dry contact configuration method and device and a power supply equipment thereof. BACKGROUND

[0002] Dry contact is a signal interface commonly used in industrial control and automation systems, usually used to represent the on-off state or device triggering condition. It is characterized by being passive, low power consumption and strong anti-interference ability, and is widely used in various communication scenarios such as sensors, relays, safety interlocks, etc. In actual application, in order to realize flexible control logic, multiple dry contacts need to be configured to adapt to different input and output requirements.

[0003] In related technologies, the function and level relationship of the dry contact is generally defined by hardware jumpers or fixed settings. However, when facing complex or variable dry contact application scenarios, there are problems of complicated configuration, delayed response and high maintenance cost. SUMMARY

[0004] One of the purposes of the present application is to provide a dry contact configuration method, device and power supply equipment thereof to solve the problems of complicated configuration, delayed response and high maintenance cost in related technologies when facing complex or variable dry contact application scenarios.

[0005] In order to achieve the above purpose, the technical scheme of the embodiments of the present application is as follows:

[0006] In a first aspect, the embodiments of the present application provide a dry contact configuration method, which comprises:

[0007] receiving a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information and a first level corresponding to at least one dry contact respectively, and the configuration information at least comprises a dry contact function bit identifier and an effective level identifier corresponding to the dry contact;

[0008] For each dry contact, based on the effective level identifier and the first level, a first logical operation is performed to determine the target level of the dry contact, and the target level is stored in the storage address corresponding to the dry contact function bit identifier.

[0009] In a second aspect, the embodiments of the present application provide a dry contact configuration device, which comprises:

[0010] a receiving module configured to receive a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information and a first level corresponding to at least one dry contact respectively, and the configuration information at least comprises a dry contact function bit identifier and an effective level identifier corresponding to the dry contact;

[0011] The processing module is configured to, for each dry contact, perform a first logical operation based on the valid level identifier and the first level, determine a target level of the dry contact, and store the target level to a storage address corresponding to the dry contact function bit identifier.

[0012] In a third aspect, an embodiment of the present application provides a power supply device, which comprises:

[0013] at least one processor; and

[0014] The memory is in communication connection with the at least one processor, and the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement part or all steps of the dry contact configuration method according to the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores one or more computer programs, and the one or more computer programs are executable by one or more processors to implement part or all steps of the dry contact configuration method according to the first aspect.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement part or all steps of the dry contact configuration method according to the first aspect.

[0017] The dry contact configuration method, device and power supply device provided by the embodiments of the present application comprise the following steps: receiving a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information corresponding to at least one dry contact and a first level, and the configuration information at least comprises a dry contact function bit identifier and a valid level identifier corresponding to the dry contact; for each dry contact, performing a first logical operation based on the valid level identifier and the first level, determining a target level of the dry contact, and storing the target level to a storage address corresponding to the dry contact function bit identifier. In this way, by receiving the dry contact configuration instruction containing the configuration information and the first level, and performing the first logical operation based on the valid level identifier and the first level for each dry contact to generate the target level and store it to the corresponding storage address, the number and functions of input / output dry contacts in different projects can be flexibly configured, the adaptability and expansion capability of the system are improved, and the problem of fixed dry contact functions in the traditional scheme and the difficulty in adapting to various application scenarios is solved. BRIEF DESCRIPTION OF DRAWINGS

[0018] The drawings incorporated in the specification and forming a part thereof illustrate embodiments consistent with the present application and together with the description are used to explain the principles of the application.

[0019] Figure 1 A flowchart of an optional dry contact configuration method provided by an embodiment of the present application Figure 1 ;

[0020] Figure 2 An interface diagram of configuring multiple input dry contacts on a configuration interface of an optional input dry contact provided by an embodiment of the present application

[0021] Figure 3 An interface diagram of configuring multiple output dry contacts on a configuration interface of an optional output dry contact provided by an embodiment of the present application

[0022] Figure 4 A process diagram of storing a functional logic level of an optional input dry contact provided by an embodiment of the present application

[0023] Figure 5 A process diagram of storing a control level of an optional output dry contact provided by an embodiment of the present application

[0024] Figure 6 A flowchart of an optional dry contact configuration method provided by an embodiment of the present application Figure 2 ;

[0025] Figure 7 A flowchart of an optional dry contact configuration method provided by an embodiment of the present application Figure 3 ;

[0026] Figure 8 A structural block diagram of an optional input dry contact configuration method provided by an embodiment of the present application

[0027] Figure 9 A structural block diagram of an optional output dry contact configuration method provided by an embodiment of the present application

[0028] Figure 10 A flowchart of an optional input dry contact configuration method provided by an embodiment of the present application

[0029] Figure 11 A flowchart of an optional output dry contact configuration method provided by an embodiment of the present application

[0030] Figure 12 A definition process of configuration information of different types of dry contacts provided by an embodiment of the present application

[0031] Figure 13 A structural diagram of an optional dry contact configuration device provided by an embodiment of the present application

[0032] Figure 14An optional power supply device structure schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further described in detail below in combination with the drawings and embodiments, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0034] In the following description, “some embodiments” are referred to, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. The terms “first / second / third” referred to are only to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that “first / second / third” can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the present application and are not intended to limit the present application.

[0036] With the development of industrial automation and power electronic devices, dry contact as a common form of input / output signal is widely used in various power supply devices and control systems. In the traditional way, the function and level configuration of the dry contact are relatively fixed, and it is difficult to flexibly adjust according to different project requirements. For example, some systems may need to configure a dry contact as an emergency power off (EPO) function and set high level effective, while other systems may require the dry contact at the same location to be used for battery ground abnormality and set low level effective. Due to the lack of a unified configuration mechanism, the prior art usually relies on hardware or fixed software logic to achieve, resulting in high development cost, difficult maintenance and poor adaptability.

[0037] In order to solve the above problems, an embodiment of the present application provides a dry contact configuration method, which receives a configuration instruction containing a dry contact function bit identifier and an effective level identifier, and determines a target level based on logical operation, thereby realizing dynamic configuration of input / output dry contact function and level. This method not only improves the flexibility of the system, but also enables users to conveniently set the function and effective level of the dry contact through a graphical interface (such as a touch screen), meeting the diversified needs in different application scenarios.

[0038] Figure 1 is an optional flow diagram of the dry contact configuration method provided by the embodiment of the present application. The following will be described in combination with the steps shown in the figure. It should be noted that, Figure 1 the dry contact configuration method in the figure is described by taking an electronic control unit as an execution subject. The electronic control unit can be an industrial controller, a programmable logic controller (PLC), a power supply device or other embedded systems with input / output interfaces. In actual application, a user can set the function and effective level of the dry contact through a touch screen interface, and the configuration information is transmitted to the electronic control unit for processing through a communication bus or an internal register. Figure 1

[0039] Step 101, receiving a dry contact configuration instruction; wherein the dry contact configuration instruction includes configuration information and a first level corresponding to at least one dry contact respectively, and the configuration information at least includes a dry contact function bit identifier and an effective level identifier corresponding to the dry contact.

[0040] In the embodiment of the present application, the dry contact can be a passive switch input / output interface, which is commonly used to represent a certain state (such as fault, start, etc.), and does not have a power supply itself, but only reflects the state change of external devices. The type of dry contact can be an input type (reflecting external signals) or an output type (controlling external devices).

[0041] In the embodiment of the present application, the dry contact function bit identifier is used to identify the specific function of a certain dry contact in the system, such as EPO, battery ground abnormality, mains switch disconnection, maintenance bypass switch closure, battery discharge prohibition, bypass switch disconnection, battery charging prohibition, mains abnormality, inverter abnormality, bypass power supply, battery power supply, bypass abnormality, battery loop abnormality, Uninterruptible Power Supply (UPS) abnormality, etc. The function bit identifier is usually represented in the form of digital code and is mapped to a specific storage address or register bit.

[0042] In the embodiment of the present application, the effective level identifier can be the identifier of the effective level value corresponding to the dry contact when it is in an active state. The effective level value can be high (High) or low (Low). The effective level value determines the state in which the dry contact is recognized as triggering or effective by the system.

[0043] ​In the embodiments of the present application, the dry contact configuration instruction includes at least one configuration information corresponding to each dry contact and a first level, wherein the first level can be a detection level, and the first level can also be a function logic level. The first level is different for different types (including input type and output type) of dry contacts. Each configuration information includes at least a dry contact function bit identifier and a valid level identifier corresponding to the dry contact. The configuration information can be transmitted in a standard data format, such as 16-bit unsigned integer (Uint16) type data. Here, the lower 8 bits of the configuration information can be used to represent the dry contact function bit identifier, and the highest bit is used to represent the valid level identifier of the dry contact. Of course, the upper 8 bits of the configuration information can be used to represent the dry contact function bit identifier, and the lowest bit is used to represent the valid level identifier of the dry contact. The present application does not make specific limitations on this.

[0044] For example, if a certain dry contact is configured as EPO and the high level is valid, the configuration information of the dry contact can be 0x8003, wherein 0x03 represents the dry contact function bit identifier, and the highest bit in 0x80 represents the valid level as high level. The dry contact function bit identifier refers to the specific function corresponding to the dry contact in the system, such as EPO, battery ground abnormality, etc. Each function bit identifier is mapped to a specific storage address or register bit, so as to be used for subsequent logic judgment and state writing.

[0045] In some embodiments, the dry contact configuration instruction in step 101 is generated based on the touch operation of the user in the dry contact configuration interface. The dry contact configuration interface includes the function bit corresponding to the dry contact function bit identifier of a plurality of dry contacts and the parameter corresponding to the valid level identifier.

[0046] In the embodiments of the present application, the dry contact configuration interface refers to a graphical setting interface provided to the user through a touch screen or other touch devices, which is used to configure the specific function and valid level state of each dry contact. The interface usually displays the information of each dry contact in the form of a table or a list, such as number, function name (such as EPO, bypass, etc.), input / output type, and valid level selection (high level valid or low level valid), etc.

[0047] In the embodiments of the present application, the function bit refers to a binary bit used to represent whether a certain dry contact is activated or has a certain function in the system. For example, in a 16-bit register, if the lower 8 bits are set to the coding information corresponding to a certain function, it means that the dry contact is currently in an enabled state or has executed a specific function. The function bit is directly related to the function logic of the dry contact, and determines the behavior of the dry contact in the system.

[0048] In the embodiments of the present application, the effective level identifier refers to a level state (high or low) specified by a user in a configuration interface, which is used to determine under what condition a dry contact will be recognized as effective by the system. For example, if the user sets a dry contact as high level effective, the system will only consider it as an effective signal and trigger the corresponding function logic when the voltage of the dry contact is detected as high.

[0049] In the embodiments of the present application, the dry contact configuration instruction can be an input dry contact configuration instruction or an output dry contact configuration instruction. If the dry contact configuration instruction is an input dry contact configuration instruction, the first level can be the detection level of the function corresponding to the input dry contact; if the dry contact configuration instruction is an output dry contact configuration instruction, the first level can be the function logic level of the function corresponding to the output dry contact.

[0050] The dry contact configuration instruction is a set of configuration information generated by the user after operating on the dry contact configuration interface corresponding to the dry contact type. The dry contact type includes an input dry contact and an output dry contact. The configuration information is usually stored in the form of Uint16, wherein the lower 8 bits represent the function type code of the dry contact, and the highest bit represents the effective level state of the dry contact (high level is 1, and low level is 0).

[0051] In one implementable scenario, referring to Figure 2 , it is shown that Figure 2 is a schematic diagram of an interface for configuring multiple input dry contacts on an input dry contact configuration interface. For an input dry contact located in a channel number of 2, it is configured as EPO and high level effective. The configuration information (also referred to as configuration code) corresponding to the input dry contact is 0x8003. The target level obtained after the first logical operation can be stored in the storage address of the register corresponding to the function identifier bit of the input dry contact through the channel number (channel number = 2) in which the input dry contact is located. For an input dry contact located in a channel number of 3, it is configured as battery ground abnormality and low level effective. The configuration information (also referred to as configuration code) corresponding to the input dry contact is 0x0006. The target level obtained after the first logical operation can be stored in the storage address of the register corresponding to the function identifier bit of the input dry contact through the channel number (channel number = 3) in which the input dry contact is located.

[0052] In another implementable scenario, referring to Figure 3 , it is shown that Figure 3The interface schematic diagram is used for configuring a plurality of output dry contacts on an output dry contact configuration interface. For an output dry contact located in a channel number of 5, the output dry contact is configured as battery power supply and high level effective, and configuration information (also referred to as configuration code) corresponding to the input dry contact is 0x8003. The channel number (channel number = 5) of the output dry contact is used to store a target level obtained after a first logical operation to a storage address in a register corresponding to a function identification bit of the output dry contact. For an output dry contact located in a channel number of 8, the output dry contact is configured as UPS exception and low level effective, and configuration information (also referred to as configuration code) corresponding to the input dry contact is 0x0006. The channel number (channel number = 8) of the output dry contact is used to store a target level obtained after a first logical operation to a storage address in a register corresponding to a function identification bit of the output dry contact.

[0053] It should be noted that the registers corresponding to the output dry contact and the input dry contact are different, that is, the storage addresses are different.

[0054] In actual application, a user can enter a dry contact configuration interface corresponding to different dry contact types, such as an input dry contact configuration interface or an output dry contact configuration interface, select one or more dry contact channels in the interface, and assign a function type and an effective level to each dry contact channel, so as to generate configuration information of each dry contact according to the operation of the user, save the configuration information to a memory or a register, further obtain a first level (also referred to as an input level) corresponding to each dry contact, such as a detection level corresponding to an input dry contact or a function logic level corresponding to an output dry contact, and generate a dry contact configuration instruction of a plurality of dry contacts for subsequent input / output logical processing. In this way, the flexibility of the system is improved, and the on-site debugging and maintenance process is simplified.

[0055] As known from the above, the embodiment of the application provides a graphical dry contact configuration interface, and allows a user to flexibly define a function of each dry contact and an effective level state of the dry contact. In this way, quick adaptation to different project requirements can be achieved, so as to improve the universality and expandability of the system, and further improve the overall automation control level and user experience.

[0056] In step 102, for each dry contact, a first logical operation is performed based on the effective level identification and the first level, a target level of the dry contact is determined, and the target level is stored to a storage address corresponding to a function bit identification of the dry contact.

[0057] In the embodiment of the application, the target level can be a final level value obtained after the logical operation, and the target level can be written into the storage address corresponding to the function bit identification of the dry contact, to represent a current function logic state of the dry contact.

[0058] In the embodiments of the present application, the first logical operation can be a logical operation performed according to the effective level identifier and the first level (such as a detection level or a functional logic level), for judging whether the actual state of the dry contact meets the preset condition. The first logical operation can be a logical operation of XOR and then NOT, which can accurately judge whether the dry contact is in the expected effective state.

[0059] In the embodiments of the present application, after receiving the dry contact configuration instruction including the configuration information corresponding to at least one dry contact and the first level, the electronic control unit performs, for each dry contact, a logical operation of XOR and then NOT based on the effective level identifier in the configuration information and the input first level, determines the target level of the dry contact, and stores the target level to the storage address in the register corresponding to the dry contact function bit identifier carried in the configuration information.

[0060] In some embodiments, the dry contact function bit identifier is represented by a first number of bits, and the process of storing the target level to the storage address corresponding to the dry contact function bit identifier in step 102 can include steps 121 to 123.

[0061] Step 121, determining the dry contact group where the dry contact is located based on a first part of the value in the dry contact function bit identifier, wherein the first part of the value is determined based on a plurality of bits at a first position.

[0062] In the embodiments of the present application, the dry contact function bit identifier can be represented by a first number of bits, and the first number can be 8, i.e. the dry contact function bit identifier is represented by eight bits.

[0063] In the embodiments of the present application, the dry contact function bit identifier includes a first part of the value, wherein the first part of the value can be a part of the dry contact function bit identifier for indicating the dry contact group, and the first part of the value can be determined based on a plurality of bits at a first position, which is usually some bit positions in the high bits of the dry contact function bit identifier, such as the first part of the value can be determined based on the first four bits in the dry contact function bit identifier. For example, in the code 0x8003, the first part of the value can use the 8th to 11th bits to determine the dry contact group number.

[0064] In the embodiments of the present application, by analyzing the first part of the value of the dry contact function bit identifier, it can be determined which dry contact group the dry contact being processed belongs to. The dry contact group is a way of logically grouping a plurality of dry contacts, which is convenient for management and access. For example, each dry contact group can contain 16 dry contacts, so that a total of 16 dry contact groups can manage 256 dry contacts. In this way, the scalability and management efficiency of the system can be improved.

[0065] In the embodiments of the present application, the dry contact group can be determined by analyzing the first part of the value in the dry contact function bit identifier, so that a large number of dry contacts can be effectively classified and organized, thereby improving the flexibility and configurability of the system, and further supporting the input / output control requirements of up to 256 dry contacts.

[0066] In step 122, the dry contact bit position of the dry contact is determined based on the second part of the value in the dry contact function bit identifier, wherein the second part of the value is determined based on a plurality of bits at the second position.

[0067] In the embodiments of the present application, the dry contact function bit identifier further includes a second part of the value, which can be a part of the dry contact function bit identifier for indicating the specific bit position of the dry contact. The second part of the value can be determined based on a plurality of bits at the second position, which is usually some bit positions in the low bits of the dry contact function bit identifier, such as the last four bits in the dry contact function bit identifier. For example, in the code 0x8003, the second part of the value can use the 12th to 15th bits to determine the bit position of the dry contact in the group. By analyzing this part of the value, the specific position of the dry contact in the group can be located.

[0068] In the embodiments of the present application, there is a hierarchical relationship between the dry contact group and the dry contact bit position, that is, the dry contact group is determined according to the first part of the value, and the dry contact bit position is determined by analyzing the second part of the value in the dry contact function bit identifier, so that the specific position of the dry contact in the group can be accurately located, thereby realizing the fine control of the single dry contact, and further improving the accuracy and response speed of the system.

[0069] In step 123, the storage address corresponding to the dry contact is determined based on the dry contact group and the dry contact bit position, and the target level is stored in the storage address.

[0070] In the embodiments of the present application, after the dry contact group and the dry contact bit position are determined, the specific storage address of the dry contact in the memory corresponding to the dry contact type can be calculated according to the two parameters. For example, each dry contact group occupies 2 bytes (16 bit positions), so the storage address can be calculated by the following formula (1):

[0071] Storage address = dry contact group × size of each group + dry contact bit position (1)

[0072] In this way, once the storage address is determined, the target level (such as high level 1 or low level 0) can be written into the address, and the level state update of the function corresponding to the dry contact is completed. This method ensures that the level state of the function corresponding to each dry contact can be independently read and modified, thereby improving the controllability and flexibility of the system.

[0073] In a realizable scenario, taking the input dry contact as an example, the first level is the detection level (InputDryin) of the input dry contact, and the EPO protocol configuration code is 0x8003, as shown in FIG. 8A and FIG. 8B. In example one, 03 is the dry contact function bit identifier, also known as the function type, and the high level is valid. The dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 3, and the input dry contact detection level InputDryIn[OU].bit1 in channel 2 corresponds to the EPO input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level is moved to the 0th group bit3 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level. In example two, the battery ground abnormality protocol configuration code is 0x0006, 06 is the dry contact function bit identifier, the low level is valid, the dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 6, and InputDryIn[OU].bit2 in channel 3 corresponds to the battery ground abnormality input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level of the input dry contact is moved to the 0th group bit6 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level. Figure 2 and Figure 4 In example one, the EPO protocol configuration code is 0x8003, 03 is the dry contact function bit identifier, also known as the function type, and the high level is valid. The dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 3, and the input dry contact detection level InputDryIn[OU].bit1 in channel 2 corresponds to the EPO input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level is moved to the 0th group bit3 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level. In example two, the battery ground abnormality protocol configuration code is 0x0006, 06 is the dry contact function bit identifier, the low level is valid, the dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 6, and InputDryIn[OU].bit2 in channel 3 corresponds to the battery ground abnormality input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level of the input dry contact is moved to the 0th group bit6 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level. Figure 4 Figure 4 In example one, the EPO protocol configuration code is 0x8003, 03 is the dry contact function bit identifier, also known as the function type, and the high level is valid. The dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 3, and the input dry contact detection level InputDryIn[OU].bit1 in channel 2 corresponds to the EPO input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level is moved to the 0th group bit3 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level. In example two, the battery ground abnormality protocol configuration code is 0x0006, 06 is the dry contact function bit identifier, the low level is valid, the dry contact group u16TypeGroup where the input dry contact is located is 0, the dry contact bit value u16TypeBit where the input dry contact is located is 6, and InputDryIn[OU].bit2 in channel 3 corresponds to the battery ground abnormality input dry contact hardware signal. As shown in FIG. 8A and FIG. 8B, after the input dry contact corresponding logical operation strategy, the target level of the input dry contact is moved to the 0th group bit6 position of the InputDryctrl corresponding to the input dry contact according to the dry contact group value and the dry contact bit value where the input dry contact is located, and the target level of the input dry contact is the function logic level.

[0074] As described above, the dry contact group, the dry contact bit, and the storage address in the embodiments of the present application have a clear mapping relationship. The dry contact group and the bit are obtained by analyzing the dry contact function bit identifier, and the storage address is determined based on the dry contact group and the bit, and the target level is written to the address, so that the level state of a large number of dry contact corresponding functions can be efficiently managed, thereby realizing flexible input / output control, and further meeting the configurable requirements in different application scenarios.

[0075] In some embodiments, the dry contact function bit identifier is represented by a first number of bits, and the process of storing the target level to the storage address corresponding to the dry contact function bit identifier in step 102 can further include steps 124 to 125.

[0076] ​In step 124, a first mapping relationship is obtained, wherein the first mapping relationship includes a mapping relationship between the dry contact function bit identifier and the corresponding storage address.

[0077] In step 125, the storage address corresponding to the dry contact function bit identifier is searched from the first mapping relationship.

[0078] In the embodiment of the present application, first, the configuration information dry contact function bit identifier of each dry contact corresponding to different types is determined in advance, and the storage space corresponding to the dry contact of different types is determined; then, the one-to-one mapping relationship between the dry contact function bit identifier of each dry contact of the same type and a certain storage address in the storage space is established, thereby obtaining the first mapping relationship of the dry contact of the same type. Finally, the configuration information of each dry contact is obtained, the storage address corresponding to the dry contact function bit identifier in the configuration information is searched from the first mapping relationship, and thereby the target level of the dry contact is stored in the storage address.

[0079] In a realizable scenario, taking the dry contact as an output dry contact and the first level as the functional logic level (OutputDryin) of the output dry contact as an example, continuing to refer to Figure 3 and Figure 5 It is shown that, in example one, the protocol configuration battery power supply code is 0x8003, wherein 03 is the dry contact function bit identifier, and the high level is valid, the dry contact group u16TypeGroup where the output dry contact is located is 0, the dry contact bit value u16TypeBit where the output dry contact is located is 3, and the OutputDryIn[0U].bit4 of the output dry contact logic function level in channel 5 corresponds to the battery power supply output dry contact hardware signal. Continuing to refer to Figure 5 It is shown that, after the logical operation strategy corresponding to the output dry contact, the storage address corresponding to the dry contact function bit identifier of the output dry contact is searched according to the first mapping relationship, such as the 0th group bit4 position of OutoutDryout, and according to the channel number (channel number=5) where the output dry contact is located, the obtained target level of the output dry contact, such as the control level, is stored in the 0th group bit4 position of OutoutDryout. In example two, the UPS abnormal protocol configuration code is 0x0006, wherein 06 is the dry contact function bit identifier, and the low level is valid, the dry contact group u16TypeGroup where the output dry contact is located is 0, the dry contact bit value u16TypeBit where the output dry contact is located is 6, and OutoutDryIn[OU].bit7 in channel 8 corresponds to the UPS abnormal output dry contact hardware signal. Continuing to refer to Figure 5As shown, after the logical operation strategy corresponding to the output dry contact point is passed, the storage address corresponding to the dry contact function bit identifier of the output dry contact point is found according to the first mapping relationship, such as the 0th group bit7 position of OutputDryout, and the target level of the output dry contact point, such as the control level, is moved to the 0th group bit7 position of OutputDryout corresponding to the output dry contact point according to the number of channels (channel number = 3) where the output dry contact point is located.

[0080] As can be seen from the above, first, the storage address is directly located through the pre-defined mapping relationship, avoiding the time overhead of the traditional traversal search method, and significantly improving the response speed of the dry contact configuration. Especially in a large-scale system handling 256 dry contacts, the address search efficiency can be improved to O(1) time complexity. Second, the mapping relationship can be dynamically adjusted according to actual needs, supporting non-continuous allocation of storage addresses, which enables the system to more efficiently utilize memory space, such as storing frequently used dry contacts in the cache area to optimize system performance. Then, when a new dry contact type or extended function is needed, only the mapping relationship table needs to be updated, without modifying the core configuration logic, greatly reducing the complexity of system upgrade.

[0081] The dry contact configuration method provided by the embodiments of the present application receives a configuration instruction containing a function bit identifier and an effective level identifier, and performs logical operation according to the characteristics of the input / output dry contact, and finally writes the target level into the corresponding storage address. This method realizes the dynamic configuration of dry contact function and level, improves the flexibility and adaptability of the system, and meets the diversified needs in different application scenarios.

[0082] Figure 6 is an optional flowchart of the dry contact configuration method provided by the embodiments of the present application, wherein the dry contact configuration instruction is an input dry contact configuration instruction, the first level is a detection level, and the following will be described in combination with the steps shown in the figure. Figure 6

[0083] Step 601, receiving an input dry contact configuration instruction; wherein the input dry contact configuration instruction includes configuration information and a detection level corresponding to at least one input dry contact respectively, and the configuration information at least includes a dry contact function bit identifier and an effective level identifier corresponding to the input dry contact.

[0084] In the embodiments of the present application, the dry contact configuration instruction is an input dry contact configuration instruction, and the first level is the detection level of the function corresponding to the input dry contact.

[0085] In the embodiments of the present application, the detection level refers to the level state of the dry contact input signal actually detected by the hardware circuit, which reflects the current real state of the external device, such as whether a relay is closed or a button is pressed. ​

[0086] Step 602, for each input dry contact, determining an input logic level of the input dry contact based on a first logic operation between the active level identifier and the detection level.

[0087] In the embodiments of the present application, for each input dry contact, the input logic level of the input dry contact is determined according to the first logic operation between the active level identifier and the detection level of the input dry contact. It should be noted that the input logic level is an intermediate result, which is used for subsequent function judgment. If the operation result is high, it indicates that the dry contact is in an active state; if it is low, it indicates an inactive state. The intermediate variable provides a basis for subsequent function judgment. In this way, dynamic judgment of the input dry contact can be realized, so as to ensure that the system can correctly respond to the external input signal according to the user's configuration. In this way, errors caused by misjudgment can be avoided, and the stability and reliability of the system can be improved.

[0088] Step 603, determining a function logic level of the input dry contact based on the input logic level, wherein the target level includes the function logic level.

[0089] In the embodiments of the present application, after determining the input logic level of the input dry contact based on the first logic operation between the active level identifier and the detection level of the input dry contact, the function logic level of the input dry contact is determined based on the input logic level. In this way, the input logic level is obtained by logically operating the detection level and the active level identifier, and the function logic level is further derived, so as to realize dynamic judgment of the function state of the input dry contact. Compared with the prior art, the method can more accurately identify the validity of the input signal and avoid function errors caused by level misjudgment.

[0090] In some embodiments, step 603 of determining the function logic level of the input dry contact based on the input logic level can be implemented by step 631 or step 632.

[0091] Step 631, taking the input logic level as the function logic level of the input dry contact.

[0092] In the embodiments of the present application, the input logic level can be the high-low state of the dry contact input signal detected by hardware, which is usually used to represent the state of a certain external device or sensor. When the input logic level is consistent with the configured active level, the input logic level can be directly regarded as the function logic level, that is, the function logic level is equal to the input logic level, without further processing. For example, in the EPO function, if it is configured to be high level active, when the input is detected to be high level, it is directly determined that the dry contact triggers the EPO event. In this way, the processing flow can be simplified, unnecessary calculation overhead can be avoided, so that the response speed of the system can be improved, and thus the application scenarios with high real-time requirements can be met.

[0093] In step 632, a configuration result of the function bit corresponding to the dry contact function bit identifier is obtained, and a function logic level is obtained by performing a logic operation on the configuration result and the input logic level according to the input logic level.

[0094] In the embodiments of the present application, before the function bits corresponding to the plurality of input dry contacts are configured, it can be configured in advance whether to enable part or all of the plurality of function bits. Here, enabling part or all of the plurality of function bits includes: for the enabled function bit, the configuration result can be to configure in advance to enable the function bit corresponding to the dry contact function bit identifier, at this time, the configuration result of the function bit can be high, such as 1. Of course, for the unenabled function bit, the configuration result of the function bit can be low, such as 0.

[0095] In some embodiments, the step 632 of obtaining the function logic level by performing a logic operation on the configuration result and the input logic level according to the input logic level can include steps 6321-6322.

[0096] In step 6321, if the input logic level is a first value, a second logic operation is performed on the configuration result and the input logic level to obtain the function logic level.

[0097] In the embodiments of the present application, the second logic operation can refer to the logic processing mode of performing an or operation on the configuration level when the input logic level is high. Specifically, when the dry contact input is valid, the function logic level is calculated by the expression function logic level = configuration result | (~ (configuration valid level ^ input detection level)). This operation ensures that only when the input level is consistent with the configured valid level, the corresponding function bit is 1, thereby realizing accurate control of the function logic level.

[0098] In this way, by setting the second logic operation, the system can accurately determine whether the input signal meets the preset condition, and update the state of the function logic level accordingly, thereby improving the response accuracy and stability of the system.

[0099] In step 6322, if the input logic level is a second value, a third logic operation is performed on the configuration result and the input logic level to obtain the function logic level.

[0100] The first logic operation, the second logic operation and the third logic operation are all different.

[0101] In the embodiments of the present application, the third logic operation refers to a logic processing mode of performing AND operation with the configuration level when the input logic level is low. Specifically, when the dry contact input is invalid, the logic level is calculated by the expression function logic level = configuration result & (~ (configuration valid level ^ input detection level)). This operation ensures that the corresponding function bit will not be activated when the input level is inconsistent with the configured valid level, thereby avoiding false triggering.

[0102] In this way, by setting the third logic operation, the system can maintain the original state when the input signal does not meet the preset condition, prevent unnecessary function bits from being activated, and enhance the stability and reliability of the system.

[0103] It should be noted that the first logic operation, the second logic operation and the third logic operation are all different. The three logic operations are respectively applicable to different input states, ensuring that the system can flexibly adjust the output of the function logic level according to the change of the input signal, meeting the needs in different scenarios.

[0104] In the embodiments of the present application, by setting three different logic operation modes, the function logic level can be dynamically adjusted according to the different states of the input signal, so that the behavior of the dry contact can be accurately controlled, thereby the flexibility and adaptability of the system can be improved, meeting the diversified project configuration needs.

[0105] Figure 7 is an optional flowchart of the dry contact configuration method provided by the embodiments of the present application, wherein the dry contact configuration instruction is an output dry contact configuration instruction, the first level is a function logic level, and the following steps will be described in combination with the flowchart shown in Figure 7 .

[0106] Step 701, receiving an output dry contact configuration instruction; wherein the output dry contact configuration instruction includes configuration information and a function logic level corresponding to each output dry contact, and the configuration information at least includes a dry contact function bit identifier and a valid level identifier corresponding to the output dry contact.

[0107] Step 702, for each output dry contact, obtaining a configuration result of the function bit configured with the dry contact function bit identifier.

[0108] In the embodiments of the present application, before configuring the function bits corresponding to the plurality of output dry contacts respectively, it can be pre-configured whether to enable part or all of the plurality of function bits. Here, enabling part or all of the plurality of function bits includes: for the enabled function bit, the configuration result can be pre-configured to enable the function bit corresponding to the dry contact function bit identifier, at this time, the configuration result of the function bit can be high level, such as 1. Of course, for the unenabled function bit, the configuration result of the function bit can be low level, such as 0.

[0109] Step 703, performing a third logical operation on the configuration result and the function logic level to obtain an output logic level of the output dry contact.

[0110] In the embodiment of the present application, the third logical operation can be an AND logical operation.

[0111] In the embodiment of the present application, after obtaining the output dry contact configuration instruction, an AND operation is performed on the valid level identifier in the configuration information of each output dry contact and the configuration result to obtain the output logic level. This operation mode can ensure that when the configuration result is inconsistent with the function logic level, the output logic level is low (0), and when they are consistent, the output logic level is high (1). This design can realize flexible adjustment of the output control signal, so that it automatically switches between high and low level states according to the configuration requirements.

[0112] In actual application, for example, a certain output dry contact is configured as an UPS abnormal function, and is set to low level valid. If the function logic level is high (1) at this time, the configuration result is high (1), and the output logic level is high (1); otherwise, if the function logic level is low (0), the configuration result is high (1), and the output logic level is low (0).

[0113] Step 704, performing a first logical operation on the valid level identifier and the output logic level to obtain a control level of the output dry contact; wherein the target level includes the control level.

[0114] In the embodiment of the present application, the control level can be an electrical signal that finally determines the behavior of the output dry contact. The control level determines whether the external device is activated, for example, whether the relay is closed, whether the indicator light is on, etc. The target level is a more general concept, which includes all possible types of control levels, and the control level is one of the specific forms.

[0115] In the embodiment of the present application, for each output dry contact, the control level of the output dry contact is obtained based on the first logical operation between the valid level identifier and the output logic level.

[0116] From the above, in the embodiment of the present application, the output logic level of the output dry contact is generated based on the logical operation between the configuration result and the function logic level, and the control level of the output dry contact is generated based on the logical operation between the output logic level and the valid level identifier. In this way, dynamic control of the output dry contact can be realized, so as to adapt to the configuration requirements in various application scenarios, and thus the compatibility and maintainability of the system can be significantly improved.

[0117] Next, the implementation process of the embodiment of the present application in an implementable application scenario is introduced.

[0118] In order to meet the requirements of different projects for the number of input / output dry contact points, the embodiments of the present application provide a configurable number of input / output dry contact points, and the maximum number of input / output dry contact points is 256, and the function corresponding to each dry contact point and the effective voltage can be configured through a touch screen. The scheme of the present application is described below.

[0119] According to the functional requirements, the functions can be configured for different types of dry contact points. For input dry contact points, as shown in Figure 8 , the configuration information 801 of the input dry contact point and the detection voltage 802 of the input dry contact point can be subjected to logical processing 803 corresponding to the input dry contact point to obtain the functional logic voltage 804 of the input dry contact point. For output dry contact points, as shown in Figure 9 , the configuration information 805 of the output dry contact point and the functional logic voltage 806 of the output dry contact point can be subjected to logical processing 807 corresponding to the output dry contact point to obtain the control voltage 808 of the output dry contact point.

[0120] The scheme of the embodiments of the present application is that the configuration information of different types of dry contact points is issued from the touch screen, and the issued configuration information is Uint16 data, wherein the lower eight bits are the function type corresponding to the dry contact point, and the highest bit is the effective voltage. The function type corresponding to the dry contact point is fixedly coded, for example, the EPO code is 03, the bypass code is 06, and the effective voltage is high when the code is 1, and low when the code is 0.

[0121] For input dry contact points, refer to Figure 8 and Figure 10 , obtain the configuration information 801 of the input dry contact point, obtain the function type 902 corresponding to the input dry contact point and the input effective voltage 903 of the input dry contact point according to the configuration information, and determine whether to configure the function flag bit 904 corresponding to the function type according to the function type corresponding to the input dry contact point (corresponding to the configuration result described above); it should be noted that if configured, the function flag bit is 1, and if not configured, the function flag bit is 0. Further, the detection voltage 802 of the detected input dry contact point and the input effective voltage 903 of the corresponding input dry contact point are subjected to XOR and then inverted operation 906 to obtain the input logic voltage 907 of the input dry contact point. Further, it is judged whether the input logic voltage is high 908, if yes, the function flag bit and the input logic voltage are subjected to or operation 909 to obtain the function logic voltage 804, that is, the function logic voltage of the function corresponding to the input dry contact point is set to 1; if not, the function flag bit and the input logic voltage are subjected to and operation 911 to obtain the function logic voltage 804, that is, the function logic voltage of the function corresponding to the input dry contact point is set to 0.

[0122] Among them, when the detection voltage of the input dry contact point is inputted, the function logic voltage of the function corresponding to the input dry contact point can be represented by the following expression (1).

[0123] Function logic level = configuration function flag bit | (~ (configuration valid level ^ detection level)) (1)

[0124] Wherein, when the detection level input of the input dry contact is invalid, the function logic level of the input dry contact corresponding function can be expressed by the following expression (2).

[0125] Function logic level = configuration function flag bit & (~ (configuration valid level ^ input detection level)) (2)

[0126] For the output dry contact, referring to Figure 9 and Figure 11 , the configuration information 805 of the output dry contact is obtained, according to which the function type 1002 and the output valid level 1003 corresponding to the output dry contact are obtained, and according to the function type corresponding to the output dry contact, it is determined whether to configure the function flag bit 1004 corresponding to the function type (corresponding to the configuration result described above); it should be noted that if configured, the function flag bit is 1, and if not configured, the function flag bit is 0. Further, the function logic level 806 of the obtained output dry contact is ANDed with the function flag bit 1004 to obtain the output logic level 1007 of the output dry contact, and then the output logic level is XORed and inverted again with the output valid level 1003 to obtain the control level 808 of the output dry contact. Wherein, the control level of the output dry contact can be expressed by the following expression (3).

[0127] Output control level = ~ (configuration output valid level ^ (function logic level & corresponding function flag bit)) (3)

[0128] At the same time, in order to make the configuration information of the input dry contact be set from any position of the touch screen, the screen input dry contact setting interface channel 2 is configured EPO, and the high level is valid; the interface channel 3 is set to battery ground abnormality, and the low level is valid, as shown in Figure 2 .

[0129] The EPO protocol configuration code is 0x8003. Wherein, 03 is the function type corresponding to the dry contact, and the high level is valid, the type group value u16TypeGroup is 0, the type bit value u16TypeBit is 3, and the channel 2 InputDryIn[OU].bit1 corresponds to the EPO input dry contact hardware signal. In the process of input dry contact logic judgment, the judgment result is moved to the bit3 position of the function logic level InputDryctrl in the input dry contact according to the type group value and the type bit value.

[0130] The battery grounding anomaly protocol configuration code is 0x0006. Here, 06 represents the function type corresponding to the dry contact, active low, with a type group value u16TypeGroup of 0 and a type bit value u16TypeBit of 6. In channel 3, InputDryIn[OU].bit2 corresponds to the battery grounding anomaly input dry contact hardware signal. During the input dry contact logic judgment process, the judgment result is shifted to bit 6 of the InputDryctrl function logic level in the input dry contact according to the type group value and type bit value.

[0131] Similarly, refer to Figure 3 As shown, the screen output dry contact setting interface channel 5 is configured for battery power supply, active high level; interface channel 8 is configured for UPS abnormality, active low level.

[0132] The protocol configures the battery power supply code as 0x8003. Based on the number of channels where the dry contact is located (channel number = 5), the output dry contact control level result is stored in bit 4 of group 0 of OutoutDryout. Channel 8 is configured to be in UPS abnormal condition. Based on the number of channels where the dry contact is located (channel number = 8), the output dry contact control level result is stored in bit 7 of group 0 of OutoutDryout.

[0133] This solution can be implemented in the following ways in a project:

[0134] The first step is the usage steps. Add Aux_Dry_Func_V1_02.c and Aux_Dry_Func_V1_02.h to your project, and add Aux_Dry_Func_V1_02.h to your includes.h file; in your application file (APP), declare the structure corresponding to this data structure; and then call the algorithm within the corresponding APP function.

[0135] The second step is to call the method in the project. Locate the following macro definitions in Aux_Dry_Func_V1_02.h and modify them according to your actual needs.

[0136] #define DRYIN_NUM10U / *! <1≤Number of dry contacts≤256, [0x00,0xFF], 0x00 is disabled> * /

[0137] #define DRYOUT_NUM10U / *! <1≤Number of output dry contacts≤256, [0x00,0xFF], including 0x00 (disabled)> * /

[0138] Third step, input and output variables. To ensure the normal operation of the input / output dry joint function, some variables need to be assigned in real time, the function for some input dry joint related variables are placed in the structure ST INPUT DRY REG, the function for some output dry joint related variables are placed in the structure ST OUTPUT DRY REG, the following is the input and output parameters of the function, wherein, table 1 is the input dry joint input parameter, table 2 is the input dry joint output parameter, table 3 is the output dry joint input parameter, and table 4 is the output dry joint output parameter.

[0139] Table 1

[0140]

[0141] Table 2

[0142]

[0143] Table 3

[0144]

[0145] Table 4

[0146]

[0147] Fourth step, call function example.

[0148] The initialization function is placed in the corresponding initialization position;

[0149] Set the number of input dry joints DRYIN_NUM (1 ≤ input dry joint number ≤ 256, [0x00, 0xFF], including 0x00 prohibited), the number of output dry joints DRYOUT_NUM (1 ≤ input dry joint number ≤ 256, [0x00, 0xFF], including 0x00 prohibited);

[0150] Define the corresponding input and output dry joint type and effective level in the structure u16InPutCtrlRegs, u16OutPutCtrlRegs; The configuration information is Uint6 data, of which the lower eight bits are the dry joint type and the highest bit is the effective level. For example, input dry joint channel 2 is configured as EPO, and the configuration code is 0x8003; Output dry joint channel 8 is configured as UPS exception, and the configuration code is 0x0006; as shown in Figure 12 .

[0151] Assign the detection level bit1 of input dry joint channel 2 (EPO) InputDryIn [DRYIN_GROUP_NUM].

[0152] g_stAuxFuncReg.InputDry.InputDryIn[0U].bits.bBit1Flg = DRY_IN_8IN1_9TO16();

[0153] The function logic level OutputDryIn[DRYOUT_GROUP_NUM] of the output dry contact channel 8 is assigned a value of bit7.

[0154] p->OutputDry. OutputDryIn[0U].bits.bBit7Flg = RlyCtrlRegs.CtrlFlagCabOut.bits.bUPSError;

[0155] The output in the input dry contact is the function logic level InputDryCtrl. When the detection level of the input dry contact channel 2 (EPO) is high, which is consistent with the effective level configured in the screen for channel 2 (EPO), the output function logic level InputDryCtrl[0].bit3 of the input dry contact is 1; when the detection level of the input dry contact channel 2 (EPO) is low, which is inconsistent with the effective level configured in the screen for channel 2 (EPO), the output function logic level InputDryCtrl[0].bit3 of the input dry contact is 0.

[0156] The output in the output dry contact is the output dry contact control level OutputDryOut. When the function logic level of the output dry contact channel 8 (UPS exception) is high, which is inconsistent with the effective level configured in the screen for channel 8 (UPS exception), the output dry contact control level OutputDryOut[0].bit7 is 0; when the function logic level of the output dry contact channel 8 (UPS exception) is low, which is consistent with the effective level configured in the screen for channel 8 (UPS exception), the output dry contact control level OutputDryOut[0].bit7 is 1.

[0157] It should be noted that the dry contact function supports a maximum of 256 input / output dry contact signals, and if extension is required, corresponding changes need to be made; the input and output dry contact settings need to be configured, and the dry contact configuration information is Uint16 data, of which the lower eight bits are the dry contact type and the highest bit is the effective level; InputDryIn[DRYIN_GROUP_NUM].all needs to be assigned a value, which is the detected input dry contact detection level; OutputDryIn[DRYOUT_GROUP_NUM].all needs to be assigned a value, which is the function logic level of the output dry contact. Through the above implementation, flexible configuration and efficient processing of input / output dry contacts can be achieved.

[0158] In this way, the dry contact function configuration application upgrade can realize configuration of more dry contact numbers, and the maximum number can reach 256. The original code uses a single word to represent 8 input / output dry contacts, which is extended to an unsigned 16-bit array, that is, the original dry contact logic is compatible, and the input / output dry contacts can be flexibly configured. The scheme has been used in the subway bidirectional converter device project, and can be popularized for other products requiring dry contact configuration functions.

[0159] The embodiment of the present application provides a dry contact configuration device, referring to Figure 13 , a structure schematic diagram of a dry contact configuration device provided by the embodiment of the present application is shown, and the dry contact configuration device 12 comprises: Figure 13 , a structure schematic diagram of a dry contact configuration device provided by the embodiment of the present application is shown, and the dry contact configuration device 12 comprises:

[0160] The receiving module 1201 is configured to receive a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information and a first level corresponding to at least one dry contact respectively, and the configuration information at least comprises a dry contact function bit identifier and a valid level identifier corresponding to the dry contact;

[0161] The processing module 1202 is configured to perform a first logical operation on the valid level identifier and the first level for each dry contact, determine a target level of the dry contact, and store the target level to a storage address corresponding to the dry contact function bit identifier.

[0162] The embodiment of the present application provides a power supply device, and the power supply device comprises:

[0163] at least one processor; and,

[0164] The memory is in communication connection with the at least one processor; wherein the memory stores a computer program which can be executed by the at least one processor, and the computer program is executed by the at least one processor to realize part or all steps in the above method.

[0165] The embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to realize part or all steps in the above method. The storage medium can be transitory or non-transitory.

[0166] The embodiment of the present application provides a computer program, comprising computer readable code, and in the case that the computer readable code runs in the power supply device, the processor in the power supply device executes part or all steps in the above method.

[0167] The embodiment of the present application provides a computer program product, which comprises a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, part or all of the steps in the above method are implemented. The computer program product can be implemented by hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium, and in other embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.

[0168] It should be noted that the above description of various embodiments tends to emphasize the differences between various embodiments, and the same or similar parts can be referred to each other. The above description of the device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the device, storage medium, computer program and computer program product embodiments of the present application, please refer to the description of the method embodiments of the present application.

[0169] The embodiment of the present application provides a hardware entity schematic diagram of a power supply device. The power supply device can be a vehicle or a terminal, as shown in Figure 14 The hardware entity of the power supply device 13 includes:

[0170] at least one processor 1301; and

[0171] The memory 1302 is in communication connection with the at least one processor 1301; wherein the memory 1302 stores a computer program executable by the at least one processor 1301, and the computer program is executed by the at least one processor to implement the following steps:

[0172] receiving a dry contact configuration instruction; wherein the dry contact configuration instruction includes configuration information and a first level corresponding to each dry contact, and the configuration information at least includes a dry contact function bit identifier and an effective level identifier corresponding to the dry contact;

[0173] For each dry contact, performing a first logical operation based on the effective level identifier and the first level to determine a target level of the dry contact, and storing the target level to a storage address corresponding to the dry contact function bit identifier.

[0174] The processor 1301, the memory 1302, wherein the memory 1302 stores a computer program executable on the processor 1301, and the processor 1301 executes part or all of the steps in the above-mentioned dry contact configuration method.

[0175] The memory 1302 stores computer programs executable on the processor, and is configured to store instructions and applications executable by the processor 1301, and can also cache data (for example, image data, audio data, voice communication data and video communication data) to be processed by the processor 1301 and modules in the power supply device 13, which can be implemented by a FLASH or a Random Access Memory (RAM).

[0176] The processor 1301 implements the steps of any of the dry contact point configuration methods described above when executing the programs. The processor 1301 generally controls the overall operation of the power supply device 13.

[0177] The power supply device 13 can further include a communication bus and a communication interface.

[0178] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection and communication between the memory and at least one processor, etc.

[0179] The communication interface is used for communication between the power supply device and other devices, including a network interface and a user interface. Optionally, the network interface can include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between the power supply device and other power supply devices. The user interface can be a display, an input unit (such as a keyboard), and optionally, the user interface can also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, an Organic Light-Emitting Diode (OLED) touch, etc. The display can also be appropriately referred to as a display screen or a display unit, and is used to display information processed in the power supply device and to display a visualized user interface.

[0180] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments.

[0181] The processor can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that the electronic device for implementing the functions of the processor can also be other devices, and the embodiments of the present application are not limited.

[0182] The computer storage medium / memory can be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Ferromagnetic Random Access Memory (FRAM), a Flash Memory, a magnetic surface memory, an optical disc, a Compact Disc Read-Only Memory (CD-ROM), or the like. It can also be various terminals including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, and the like.

[0183] It should be understood that every feature, structure, or characteristic described in relation to one embodiment is applicable to at least one other embodiment. Therefore, the appearance of the phrase "in one embodiment" or "in an embodiment" in various places throughout the specification is not intended to be construed as necessarily referring to the same embodiment. Furthermore, it should be understood that the features, structures, or characteristics described in one embodiment can be applied to any other embodiment in any suitable combination. It should be understood that the size and order of the various steps / processes described above are not intended to be construed as a limitation on the order of execution. The order of execution of the steps / processes should be determined according to their functions and inherent logic, and should not be construed as any limitation on the embodiments of the present application. The above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0184] It should be noted that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by an occurrence of the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the element.

[0185] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The above-described device embodiments are only illustrative, for example, the division of the units is only a logical functional division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.

[0186] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units; they can be located in one place or distributed on multiple convolutional network units; part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0187] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or hardware plus software functional unit.

[0188] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, the foregoing program can be stored in a computer readable storage medium, and the program executes the steps of the method embodiments when executed; and the foregoing storage medium includes a mobile storage device, a read only memory (ROM), a magnetic disc or an optical disc, and various storage medium capable of storing program codes.

[0189] Alternatively, the integrated units of the present application can be stored in a computer readable storage medium if the integrated units are realized in the form of software function modules and sold or used as independent products. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, includes several instructions to make a vehicle terminal (which can be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes a mobile storage device, a ROM, a magnetic disc or an optical disc, and various storage medium capable of storing program codes.

[0190] The above is only an embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application.

Claims

1. A dry contact configuration method, characterized by, The method comprises: receiving a dry contact configuration instruction; wherein the dry contact configuration instruction comprises configuration information corresponding to each dry contact and a first level, and the configuration information at least comprises a dry contact function bit identifier and an effective level identifier corresponding to the dry contact; for each dry contact, performing a first logical operation based on the effective level identifier and the first level to determine a target level of the dry contact, and storing the target level to a storage address corresponding to the dry contact function bit identifier; wherein the dry contact configuration instruction is an input dry contact configuration instruction, the first level is a detection level, and the first logical operation based on the effective level identifier and the first level to determine the target level of the dry contact comprises: for each input dry contact, performing a first logical operation on the effective level identifier and the detection level to obtain an input logical level of the input dry contact; determining a function logical level of the input dry contact based on the input logical level, wherein the target level comprises the function logical level.

2. The method of claim 1, wherein, The determination of the function logical level of the input dry contact based on the input logical level comprises: taking the input logical level as the function logical level of the input dry contact; or obtaining a configuration result configured with a function bit corresponding to the dry contact function bit identifier; performing a logical operation on the configuration result and the input logical level according to the input logical level to obtain the function logical level.

3. The method of claim 2, wherein, The logical operation on the configuration result and the input logical level according to the input logical level to obtain the function logical level comprises: if the input logical level is a first value, performing a second logical operation on the configuration result and the input logical level to obtain the function logical level; if the input logical level is a second value, performing a third logical operation on the configuration result and the input logical level to obtain the function logical level; wherein the first logical operation, the second logical operation and the third logical operation are all different.

4. The method according to any one of claims 1 to 3, characterized in that, The first logical operation is an exclusive or and then negation operation.

5. The method according to any one of claims 1 to 3, characterized in that, The dry contact function bit identifier is represented by a first number of bits, and the storage of the target level to the storage address corresponding to the dry contact function bit identifier comprises: determining a dry contact group where the dry contact is located based on a first part of values in the dry contact function bit identifier, wherein the first part of values is determined based on a plurality of bits at a first position; determining a dry contact bit position where the dry contact is located based on a second part of values in the dry contact function bit identifier, wherein the second part of values is determined based on a plurality of bits at a second position; determining a storage address corresponding to the dry contact based on the dry contact group and the dry contact bit position, and storing the target level to the storage address; or obtaining a first mapping relationship, wherein the first mapping relationship comprises a mapping relationship between a dry contact function bit identifier and a corresponding storage address; and searching for the storage address corresponding to the dry contact function bit identifier from the first mapping relationship.

6. The method according to any one of claims 1 to 3, characterized in that, The dry contact point configuration instruction is generated based on a touch operation of a user on a dry contact point configuration interface, and the dry contact point configuration interface includes function bits corresponding to dry contact point function bit identifiers of a plurality of dry contact points and parameters corresponding to valid level identifiers.

7. A dry contact configuration method, characterized by, The method comprises: receiving a dry contact point configuration instruction; wherein the dry contact point configuration instruction includes configuration information and a first level corresponding to at least one dry contact point, and the configuration information at least includes a dry contact point function bit identifier and a valid level identifier corresponding to the dry contact point; for each dry contact point, performing a first logical operation based on the valid level identifier and the first level to determine a target level of the dry contact point, and storing the target level to a storage address corresponding to the dry contact point function bit identifier; wherein the dry contact point configuration instruction is an output dry contact point configuration instruction, the first level is a function logic level, and the operation of performing a first logical operation based on the valid level identifier and the first level to determine a target level of the dry contact point for each dry contact point comprises: for each output dry contact point, obtaining a configuration result of a function bit configured with the dry contact point function bit identifier; performing a third logical operation on the configuration result and the function logic level to obtain an output logic level of the output dry contact point; performing a first logical operation on the valid level identifier and the output logic level to obtain a control level of the output dry contact point; wherein the target level includes the control level.

8. The method of claim 7, wherein, The first logical operation is an exclusive or and then negation operation.

9. The method according to claim 7 or 8, characterized in that, The dry contact point function bit identifier is represented by a first number of bits, and the storing of the target level to the storage address corresponding to the dry contact point function bit identifier comprises: determining a dry contact point group where the dry contact point is located based on a first part of values in the dry contact point function bit identifier, wherein the first part of values is determined based on a plurality of bits at a first position; determining a dry contact point bit position where the dry contact point is located based on a second part of values in the dry contact point function bit identifier, wherein the second part of values is determined based on a plurality of bits at a second position; determining a storage address corresponding to the dry contact point based on the dry contact point group and the dry contact point bit position, and storing the target level to the storage address; or obtaining a first mapping relationship, wherein the first mapping relationship includes a mapping relationship between a dry contact point function bit identifier and a corresponding storage address; and searching for the storage address corresponding to the dry contact point function bit identifier from the first mapping relationship.

10. The method according to claim 7 or 8, characterized in that, The dry contact point configuration instruction is generated based on a touch operation of a user on a dry contact point configuration interface, and the dry contact point configuration interface includes function bits corresponding to dry contact point function bit identifiers of a plurality of dry contact points and parameters corresponding to valid level identifiers.

11. A dry contact configuration device, characterized by The apparatus comprises: a receiving module configured to receive a dry contact point configuration instruction; wherein the dry contact point configuration instruction includes configuration information and a first level corresponding to at least one dry contact point, and the configuration information at least includes a dry contact point function bit identifier and a valid level identifier corresponding to the dry contact point; The processing module is configured to, for each dry contact, perform a first logical operation based on the effective level identifier and the first level, determine a target level of the dry contact, and store the target level to a storage address corresponding to the dry contact function bit identifier. The processing module is further configured to, when the dry contact configuration instruction is an input dry contact configuration instruction and the first level is a detection level, perform a first logical operation on the effective level identifier and the detection level to obtain an input logical level of each input dry contact, and determine a function logical level of the input dry contact based on the input logical level, wherein the target level includes the function logical level.

12. A dry contact configuration device, characterized by The apparatus comprises: The receiving module is configured to receive a dry contact configuration instruction, wherein the dry contact configuration instruction includes configuration information corresponding to each dry contact and a first level, and the configuration information at least includes a dry contact function bit identifier and an effective level identifier corresponding to the dry contact; The processing module is configured to, for each dry contact, perform a first logical operation based on the effective level identifier and the first level, determine a target level of the dry contact, and store the target level to a storage address corresponding to the dry contact function bit identifier. The processing module is further configured to, when the dry contact configuration instruction is an output dry contact configuration instruction and the first level is a function logical level, obtain a configuration result of a function bit corresponding to the dry contact function bit identifier for each output dry contact, perform a third logical operation on the configuration result and the function logical level to obtain an output logical level of the output dry contact, perform a first logical operation on the effective level identifier and the output logical level to obtain a control level of the output dry contact, and wherein the target level includes the control level.

13. A power supply device characterized by comprising: The power supply device comprises: at least one processor; and The memory is in communication with the at least one processor, and stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement the dry contact configuration method in any one of claims 1 to 6 or any one of claims 7 to 10.

Citation Information

Patent Citations

  • Dry-contact controller and control method, devices and storage medium

    CN109525430A