CN110597176B - Soft address changing method - Google Patents

Soft address changing method Download PDF

Info

Publication number
CN110597176B
CN110597176B CN201911124113.1A CN201911124113A CN110597176B CN 110597176 B CN110597176 B CN 110597176B CN 201911124113 A CN201911124113 A CN 201911124113A CN 110597176 B CN110597176 B CN 110597176B
Authority
CN
China
Prior art keywords
address
module
sensor
execution element
input channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911124113.1A
Other languages
Chinese (zh)
Other versions
CN110597176A (en
Inventor
吴主峰
王凯
姜华
陶小军
王李苏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dashu Intelligence Technology Co Ltd
Original Assignee
Nanjing Dashu Intelligence Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Dashu Intelligence Technology Co Ltd filed Critical Nanjing Dashu Intelligence Technology Co Ltd
Priority to CN201911124113.1A priority Critical patent/CN110597176B/en
Publication of CN110597176A publication Critical patent/CN110597176A/en
Application granted granted Critical
Publication of CN110597176B publication Critical patent/CN110597176B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1115Avoid to give two different addresses to same I-O, no duplicate

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention discloses a soft address changing method, which comprises the steps of establishing an address library; the serial number of each input channel of the I/O module is matched with a unique PLC address; connecting a sensor or an execution element with an input channel on the I/O module, matching an address in the PLC control system according to the input channel number of the I/O module, and identifying the corresponding sensor or execution element by the PLC control system through the address; replacing the address: when an input channel of the I/O module connected with the sensor or the execution element is damaged, the sensor or the execution element is connected to other normal input channels of the I/O module, and an address in the PLC control system is matched according to the input channel number of the I/O module connected with the sensor or the execution element at the moment, so that the PLC control system can identify the corresponding sensor or execution element. The invention shortens the time of troubleshooting, reduces the consumption of spare parts and does not need to change the program address.

Description

Soft address changing method
Technical Field
The invention relates to a soft address changing method, belonging to the technical field of control.
Background
The soft address function is an important function in the control system. For a conventional PLC, after each sensor or actuator is connected to an I/O module of the PLC, its address is fixed in the program, and when a certain channel on a certain I/O module is damaged, if it is desired to move the sensor connected to the channel to another channel, the address of the sensor in the program must be modified. If the user side does not have the condition of modifying the program, the problem can be solved only by replacing the I/O module of the whole PLC, and spare parts are wasted.
Disclosure of Invention
In order to solve the technical problem, the invention discloses a soft address changing method, which comprises the following specific technical scheme:
a soft address changing method for realizing the real-time connection of a PLC control system changing sensor or an executive component and an I/O module comprises the following operation steps:
the method comprises the following steps: establishing an address library: defining a plurality of addresses in a PLC control system to form an address library;
step two: I/O module matching address library: the I/O module is provided with a plurality of input channels, the input channels are numbered in sequence, the number of each input channel is matched with one PLC address in the step I, and all the input channel numbers of the I/O module are matched in sequence;
step three: sensor or actuator connection address: connecting a sensor or an execution element with an input channel on an I/O module, matching an address in a PLC control system according to the input channel number of the I/O module connected with the sensor or the execution element at the moment, and identifying the corresponding sensor or execution element by the PLC control system through the address;
step four: replacing the address: when the input channel of the I/O module connected with the sensor or the execution element in the third step is damaged, the sensor or the execution element is connected to other normal input channels of the I/O module, and the address in the PLC control system is matched according to the number of the input channel, so that the PLC control system can identify the corresponding sensor or execution element.
Further, the PLC control system is connected with an upper computer, the serial number of an input channel connected with the sensor or the execution element is displayed in the upper computer, the matching result of the serial number and the PLC is displayed, and when the matching is successful, the address is displayed to be effective.
Furthermore, after the I/O module channel connected with the sensor or the execution element is changed, the number of the I/O module newly connected with the sensor or the execution element is selected through the operation of the upper computer, the PLC control system matches the current number of the I/O module to the corresponding PLC address again, and the matching of the sensor or the execution element and the PLC address is completed.
The invention has the beneficial effects that:
the address of each sensor or execution element is set on the PLC control system, when a certain channel used by the I/O module is damaged, a maintainer only needs to move the sensor or execution element connected to the channel to other idle normal input channels and change the number of the input channel of the current I/O module on the upper computer, and the PLC control system can normally identify the sensor or execution element according to the number matched with the corresponding address, so that the time for fault removal is shortened, the consumption of spare parts is reduced, and other risks caused by changing the program address are avoided.
Drawings
Figure 1 is a page view of the operation of the present invention to replace addresses,
FIG. 2 is a schematic diagram of an I/O module according to an embodiment of the present invention.
Detailed Description
The present invention is further illustrated by the following figures and specific examples, which are to be understood as illustrative only and not as limiting the scope of the invention, which is to be given the full breadth of the appended claims and any and all equivalent modifications thereof which may occur to those skilled in the art upon reading the present specification.
As shown in fig. 1 and 2, the soft address changing method includes the following operation steps:
the method comprises the following steps: establishing an address library: defining a plurality of addresses in a PLC control system to form an address library;
step two: I/O module matching address library: the I/O module is provided with a plurality of input channels, the input channels are numbered in sequence, the number of each input channel is matched with the address of the PLC in the step one, and all the input channel numbers of the I/O module are matched in sequence;
step three: sensor or actuator connection address: connecting a sensor or an execution element with an input channel on an I/O module, matching an address in a PLC control system according to the input channel number of the I/O module connected with the sensor or the execution element at the moment, and identifying the corresponding sensor or execution element by the PLC control system through the address;
step four: replacing the address: when the input channel of the I/O module connected with the sensor or the execution element in the third step is damaged, the sensor or the execution element is connected to other normal input channels of the I/O module, and the address in the PLC control system is matched according to the number of the input channel, so that the PLC control system can identify the corresponding sensor or execution element.
The method realizes that the PLC control system changes the channel address of the real-time connection between the sensor or the execution element and the I/O module.
With reference to fig. 2, the following describes an implementation process of the present invention by taking an I/O module with 16 input channels as an example:
1. the PLC software defines a set of 16-bit arrays: the INPUT [1.... 16] is a PLC software address variable, namely 16 INPUT [ X ], which is the INPUT [1.... 16] in turn. Each bit of the array is then associated with each input channel of the I/O module, i.e.: the PLC software address variable is associated with the actual channel number of the I/O module, the software address variable INPUT [1] is associated with the actual position INPUT1 of the I/O module, and so on, the INPUT [16] is associated with the INPUT 16;
2. an integer variable is defined by programming the PLC software: INT is X;
3. the defined integer variable X is associated with the INPUT array, such as: INPUT [ X ], 'X' can be 1-16, and the value of 'X' can be changed by the upper computer, so that the address can be modified only by the upper computer (the upper computer and the PLC are connected by a standard communication protocol to transmit data), and the address of the PLC can be changed without modifying PLC software.
Such as: when the INPUT1 port is damaged and the INPUT16 is a spare port, the connection of the INPUT1 port is connected to the INPUT16 port, and then the corresponding value of X is changed by the host computer as shown in fig. 1, for example, "X" is 16, i.e., INPUT [16], and the original sensor signal corresponding to the INPUT1 port can be INPUT through the INPUT16 port.
In step 1, when one PLC control system is associated with a plurality of I/O modules at the same time, the address value in the PLC control system may not be consistent with the input channel number value of the I/O module, and only a certain rule is required to match, that is, one PLC address corresponds to the input channel number of only one I/O module.
This embodiment is represented in code as:
1. defining an array in the PLC control system, namely address values: p _ BOOL _ DiBit AT% I ARRAY [1..16] OF BOOL;
each bit array corresponds to an input channel of a unique I/O module, such as: p _ BOOL _ DiBit [1] corresponds to INPUT1, and so on;
2. the variables defined are: b1, BOOL;
X:INT;
3. the defined variable is associated with a bit of the array: b1 = P _ boost _ DiBit [ X ], "X" is the address that the PLC can modify, and when "X" is 2, the corresponding sensor or actuator is switched into INPUT2 position.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (3)

1. A soft address changing method realizes that a PLC control system changes the address of a sensor or an execution element connected with an I/O module in real time, and is characterized in that: the method comprises the following operation steps:
the method comprises the following steps: establishing an address library: defining a plurality of addresses in a PLC control system to form an address library;
step two: I/O module matching address library: the I/O module is provided with a plurality of input channels, the input channels are numbered in sequence, the number of each input channel is matched with one PLC address in the step I, and all the input channel numbers of the I/O module are matched in sequence;
step three: sensor or actuator connection address: connecting a sensor or an execution element with an input channel on the I/O module, and matching an address in the PLC control system according to the serial number of the input channel of the I/O module connected with the sensor or the execution element at the moment, wherein the PLC control system identifies the corresponding sensor or execution element through the address;
step four: replacing the address: when the input channel of the I/O module connected with the sensor or the execution element in the third step is damaged, the sensor or the execution element is connected to other normal input channels of the I/O module, and the corresponding address in the PLC control system is matched according to the number of the input channel, so that the PLC control system can identify the corresponding sensor or execution element.
2. A soft change of address method according to claim 1, characterized in that: the PLC control system is connected with an upper computer, the serial number of an input channel of an I/O module connected with a sensor or an execution element is displayed in the upper computer, the matching result of the serial number and the address of the PLC is displayed, and when the matching is successful, the address is displayed to be effective.
3. A soft change of address method according to claim 2, characterized in that: and when the input channel of the I/O module connected with the sensor or the execution element is changed, the number of the input channel of the I/O module newly connected with the sensor or the execution element is selected through the operation of the upper computer, and the PLC control system matches the number of the input channel of the current I/O module to the corresponding PLC address again to complete the matching of the sensor or the execution element and the PLC address.
CN201911124113.1A 2019-11-18 2019-11-18 Soft address changing method Active CN110597176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911124113.1A CN110597176B (en) 2019-11-18 2019-11-18 Soft address changing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911124113.1A CN110597176B (en) 2019-11-18 2019-11-18 Soft address changing method

Publications (2)

Publication Number Publication Date
CN110597176A CN110597176A (en) 2019-12-20
CN110597176B true CN110597176B (en) 2020-03-31

Family

ID=68852427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911124113.1A Active CN110597176B (en) 2019-11-18 2019-11-18 Soft address changing method

Country Status (1)

Country Link
CN (1) CN110597176B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160034864A (en) * 2016-03-08 2016-03-30 주식회사 로제타텍 Process management system for distributed programmable logic controllers adopting internet-of-things configuration, and operating method thereof
CN105487429A (en) * 2014-09-19 2016-04-13 中联重科股份有限公司 Method and device for controlling input and output of controller, and controller
CN205539996U (en) * 2015-12-12 2016-08-31 重庆川仪自动化股份有限公司 Redundant control system of controller, IO communication bus and communication module

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487429A (en) * 2014-09-19 2016-04-13 中联重科股份有限公司 Method and device for controlling input and output of controller, and controller
CN205539996U (en) * 2015-12-12 2016-08-31 重庆川仪自动化股份有限公司 Redundant control system of controller, IO communication bus and communication module
KR20160034864A (en) * 2016-03-08 2016-03-30 주식회사 로제타텍 Process management system for distributed programmable logic controllers adopting internet-of-things configuration, and operating method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PLC控制系统常见故障的分布及维护研究;陈鹏;《化工管理》;20160531;第109页 *

Also Published As

Publication number Publication date
CN110597176A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
CN101127191B (en) LED matrix screen parameter calibration system and method
CN107391211B (en) Universal detection traceability system and method for intelligent switch group
US20200359094A1 (en) Screen parameter configuration system
US20070220131A1 (en) Apparatus and method for field device management
CN102306122A (en) Automated testing method and equipment
CN201185074Y (en) System for correcting LED dot array screen parameter
CN102890453A (en) Systems and methods for function block instantiation
CN102595184A (en) Intelligent television automation test method and system
CN107430837A (en) Display device
CN102097015A (en) Operation instruction processing system and method
CN112560370A (en) Chip design code generation method, terminal and storage medium
CN113409722A (en) Display method and receiving card of LED display screen with special-shaped structure
CN104932875A (en) Image processing device, managing system, and managing method
CN110597176B (en) Soft address changing method
CN101873439A (en) Method, system and decoder for switching monitoring channel
CN113285841B (en) Configuration method of industrial gateway data transmission protocol
CN101551698B (en) Memory voltage regulating method and computer motherboard
CN112732556B (en) Automatic testing method, device, equipment and storage medium of distributed system
CN112309313B (en) Module controller configuration method, device and system and computer readable storage medium
DE102017219002A1 (en) An installation support apparatus and method for supporting an installation process for an automation system
CN205091732U (en) Automatic switching device for USB interface
CN104423310A (en) Apparatus and method for updating operating system in programmable logic controller
CN1276561A (en) Apparatus and method for reconfiguration of functional circuit load distribution in microcontroller
CN111710357A (en) MTP unit read-write control circuit of MCU
CN112528354B (en) Simulation design method and system based on LCD (liquid crystal display) segment screen, server and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant