CN107678344A - Switch gearing control method and device - Google Patents
Switch gearing control method and device Download PDFInfo
- Publication number
- CN107678344A CN107678344A CN201710952558.3A CN201710952558A CN107678344A CN 107678344 A CN107678344 A CN 107678344A CN 201710952558 A CN201710952558 A CN 201710952558A CN 107678344 A CN107678344 A CN 107678344A
- Authority
- CN
- China
- Prior art keywords
- button
- switch
- linkage
- instruction
- type
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25257—Microcontroller
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention discloses a kind of switch gearing control method and device, and the touch operation of monitoring switch button is scanned by switch key;When monitoring the touch operation of switch key, button operation type is judged;If the button operation type is switching manipulation, inquiry linkage list carries out switching manipulation;If the button operation type is combined operation, corresponding linkage is carried out according to the instruction of the combined operation operation is set.The present invention uses electric power carrier communication technology, realizes the combined operation between multiple switch, and a control is more, control one more, Synchronization Control between multiple switch.Whole setting up procedure does not use host computer, is all completed by Macintosh, simple to operate and reliable and stable.
Description
Technical field
The present invention relates to switch gearing technical field, more particularly to a kind of switch gearing control method and device.
Background technology
For traditional switch when realizing multi-joint cross complaint, the switch routing model of use is complex, it usually needs through walls big
Amount wiring, and linkage function is single, it is impossible to display switch state etc., made troubles to user.
The content of the invention
Present invention offer is a kind of to save the switch gearing control method and device largely connected up.
To achieve the above object, the present invention provides a kind of switch gearing control method, comprises the following steps:
The touch operation of monitoring switch button is scanned by switch key;
When monitoring the touch operation of switch key, button operation type is judged;
If the button operation type is switching manipulation, inquiry linkage list carries out switching manipulation;
If the button operation type is combined operation, corresponding linkage is carried out according to the instruction of the combined operation and set
Put operation.
Wherein, it is described by switch key scan monitoring switch button touch operation the step of include:
Communication frame caused by the touch operation of monitoring switch button is scanned by switch key;It is invalid that the communication frame includes
Communication frame, switching manipulation communication frame, combined operation communication frame.
Wherein, if the button operation type is switching manipulation, the step of linkage list carries out switching manipulation bag is inquired about
Include:
If the button operation type is switching manipulation, inquiry linkage list controls are controlled button and performed accordingly accordingly
On or off operation.
Wherein, if the button operation type is combined operation, carried out according to the instruction of the combined operation corresponding
Linkage sets the step of operation to include:
If the button operation type is combined operation, the type of the instruction of the combined operation is judged;
If the type of the instruction of the combined operation starts combined operation, set current to set combined operation to instruct
Touch key-press is master control button;
The touch operation of monitoring switch button again, if the duration of touch operation, which reaches, adds the combined operation time,
Current touch button is then arranged to controlled button, and this key assignments is added into linkage list;
The touch operation of monitoring switch button again, if the duration of touch operation, which reaches to link, confirms the operating time,
Then confirm master control button, complete linkage and operation is set.
Wherein, the instruction of the combined operation touches the length of time according to button and exports different key assignments, realizes switch
Action, the master control button, controlled button and confirmation button of linkage are set.
Wherein, if the button operation type is combined operation, the type of the instruction of the combined operation is judged
The step of after, in addition to:
If the type of the instruction of the combined operation is linkage deletion action instruction, referred to according to the linkage deletion action
Order selection needs to delete the button of linkage, and confirms to complete to need the button for deleting linkage.
Wherein, the linkage deletion action, which instructs, is:Linkage deletion state, Ran Housong are entered with preset time long-press button
Open button, again long-press confirmed.
Wherein, if the button operation type is combined operation, the type of the instruction of the combined operation is judged
The step of after, in addition to:
If the type of the instruction of the combined operation is grasped to set fully closed button operation instruction according to the fully closed button
Making instruction selection needs the button of fully closed linkage, and confirms to complete the button for needing fully closed linkage.
Wherein, the instruction of the combined operation is:Fully closed setting state is entered with preset time long-press button, then unclamped
Button, again long-press confirmed.
The present invention proposes a kind of switch gearing control device, including memory, processor and is stored in the memory
On computer program, the step of computer program realizes method as described above when being run by the processor.
Switch gearing control method and device proposed by the present invention, using electric power carrier communication technology, realize multiple switch
Between combined operation, a control is more, control one more, Synchronization Control between multiple switch.Whole setting up procedure does not use host computer,
All completed by Macintosh, it is simple to operate and reliable and stable.
Compared with prior art, have the characteristics that:
1st, this method can be communicated using wireless radio-frequency, can also be communicated using PLC technology,
Recommendation is communicated using PLC technology, so can be easily through walls, not by other air interferences, no electromagnetic radiation.
2nd, directly set and linked by button operation, linkage cross complaint is set, it is simple to operate, it is convenient.
The 3rd, the idle button of increase and decrease, the linkage cross complaint for switch can be set by button.
4th, substantially compatible traditional switch routing model, than traditional wiring compare, it is necessary to one zero line of more cloth to switch.
5th, most 6 buttons, 3 tunnels output, can easily realize multi-joint cross complaint, compare, can save with traditional multi-joint cross complaint
Substantial amounts of wiring.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of switch gearing control method first embodiment proposed by the present invention;
Fig. 2 is present system port initialization schematic flow sheet;
Fig. 3 is the initialization schematic flow sheet of power carrier communication module of the present invention;
Fig. 4 is key scan thread schematic diagram of the present invention;
Fig. 5 is communication frame detecting thread schematic diagram of the present invention;
Fig. 6 and Fig. 7 is that the present invention sets combined operation schematic diagram;
Fig. 8 is that the present invention deletes combined operation schematic diagram;
Fig. 9 is that the present invention sets fully closed operation schematic diagram;
Figure 10 is the specific handling process schematic diagram that the present invention sets combined operation;
Figure 11 is the specific handling process schematic diagram of communication frame monitoring of the present invention;
Figure 12 is the specific handling process schematic diagram that the present invention deletes combined operation;
Figure 13 is the specific handling process schematic diagram that the present invention sets fully closed operation.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Specifically, Fig. 1 is refer to, Fig. 1 is a kind of switch gearing control method proposed by the present invention, is comprised the following steps:
Step S101, the touch operation of monitoring switch button is scanned by switch key;
The circuit structure that the present invention program is related to includes:Main control singlechip, power carrier communication module, button/LED/ after
Electrical apparatus driving circuit etc..
In the present invention, any one switch panel on power network can receive the electric power that other switch panels are sent
Carrier communication frame, and dissection process is carried out to content frame, to realize the operation of switch gearing, set, delete, confirm etc..
After electrifying startup initializes single-chip microcomputer and power carrier communication module, it is divided to two threads to enter line program management, presses
Key scanning thread and communication frame detecting thread.Two threads are respectively completed the parsing of button operation and communication frame.
First, the touch operation of thread monitoring switch button is detected by key scan thread and communication frame.Especially by
Communication frame caused by the touch operation of switch key scanning monitoring switch button;The communication frame includes invalid communication frame, switch
Operate communication frame, combined operation communication frame.
Step S102, when monitoring the touch operation of switch key, judge button operation type;
When monitoring the touch operation of switch key, judge button operation type for switching manipulation, combined operation still
Invalid operation.
Step S103, if the button operation type is switching manipulation, inquiry linkage list carries out switching manipulation;
Step S104, if the button operation type is combined operation, phase is carried out according to the instruction of the combined operation
The linkage answered sets operation.
If the button operation type is switching manipulation, inquiry linkage list controls are controlled button and performed accordingly accordingly
On or off operation.
If the button operation type is combined operation, the type of the instruction of the combined operation is judged;
If the type of the instruction of the combined operation starts combined operation, set current to set combined operation to instruct
Touch key-press is master control button;
The touch operation of monitoring switch button again, if the duration of touch operation, which reaches, adds the combined operation time,
Current touch button is then arranged to controlled button, and this key assignments is added into linkage list;
The touch operation of monitoring switch button again, if the duration of touch operation, which reaches to link, confirms the operating time,
Then confirm master control button, complete linkage and operation is set.
Wherein, the instruction of the combined operation touches the length of time according to button and exports different key assignments, realizes switch
Action, the master control button, controlled button and confirmation button of linkage are set.
If the type of the instruction of the combined operation is linkage deletion action instruction, referred to according to the linkage deletion action
Order selection needs to delete the button of linkage, and confirms to complete to need the button for deleting linkage.
Wherein, the linkage deletion action, which instructs, is:Linkage deletion state, Ran Housong are entered with preset time long-press button
Open button, again long-press confirmed.
If the type of the instruction of the combined operation is grasped to set fully closed button operation instruction according to the fully closed button
Making instruction selection needs the button of fully closed linkage, and confirms to complete the button for needing fully closed linkage.
Wherein, the instruction of the combined operation is:Fully closed setting state is entered with preset time long-press button, then unclamped
Button, again long-press confirmed.
Scheme of the embodiment of the present invention is described in detail below:
The present invention uses the common linked switch of PLC technology, mainly using electric power carrier communication technology, realizes more
Combined operation between individual switch, a control is more, control one more, Synchronization Control between multiple switch.Whole setting up procedure does not use electricity
Brain server, all completed by Macintosh, it is simple to operate and reliable and stable.
(1) system initialization operation is carried out first:
Specifically include:Mainly the timer to single-chip microcomputer, COM1 (serial ports), button/LED/ relay drivings etc. are held
Mouth is initialized, as shown in Figure 2;And the initialization of power carrier communication module, as shown in Figure 3.
(2) specific handling process:
Specific handling process is divided into two threads:After electrifying startup initializes single-chip microcomputer and power carrier communication module, point
Two threads enter line program management, key scan thread and communication frame detecting thread.Two threads be respectively completed button operation and
The parsing of communication frame.
Wherein, key scan thread is as shown in Figure 4;Communication frame detecting thread is as shown in Figure 5.
Specific processing operation of the invention includes:Set the process of combined operation, the process of deletion combined operation, setting fully closed
The process of operation.
Wherein, the process of combined operation is set as shown in FIG. 6 and 7;The process for deleting combined operation is as shown in Figure 8;If
The process for putting fully closed operation is as shown in Figure 9.
Specifically, for setting combined operation, set the function of combined operation to realize and time length is touched according to button
Length exports different key assignments, and realizes switch motion, sets the master control button of linkage, sets controlled button, confirms button etc.
Etc. function.Specific handling process is as shown in Figure 10.
In communication frame monitoring, any one switch panel on power network can receive what other switch panels were sent
Power line carrier, PLC frame.And dissection process is carried out to content frame, to realize the operation of switch gearing, sets, deletes, confirm etc.
Deng.Specific handling process is as shown in figure 11.
For deleting combined operation, in order to prevent keystroke mis-operation, deleting combined operation needs a point two big steps to carry out, first
Long-press enters linkage deletion state, then, unclamps button, long-press is confirmed again.Specific handling process is as shown in figure 12.
For setting fully closed operation, it is possible to achieve the fully closed attribute of a certain button sets operation, should after setting fully closed attribute
Button can only send out pass shutdown signal, to realize fully closed function, in order to prevent keystroke mis-operation, set fully closed property operations to need to divide
Two big steps are carried out, and first long-press enters fully closed setting state, then, unclamp button, long-press is confirmed again.Specific processing stream
Journey is as shown in figure 13.
In addition, the present invention also proposes a kind of switch gearing control device, including memory, processor and it is stored in described
Computer program on memory, the method being performed as described above described in example is realized when the computer program is run by the processor
The step of.
In addition, the present invention also proposes a kind of computer-readable storage medium, the computer-readable storage medium is stored with computer journey
Sequence, the step of method described in example is performed as described above is realized when the computer program is run by the processor.
Compared with prior art, the invention has the characteristics that:
1st, this method can be communicated using wireless radio-frequency, can also be communicated using PLC technology,
Recommendation is communicated using PLC technology, so can be easily through walls, not by other air interferences, no electromagnetic radiation.2、
Directly set and linked by button operation, linkage cross complaint is set, it is simple to operate, it is convenient.
The 3rd, the idle button of increase and decrease, the linkage cross complaint for switch can be set by button.
4th, substantially compatible traditional switch routing model, than traditional wiring compare, it is necessary to one zero line of more cloth to switch.
5th, most 6 buttons, 3 tunnels output, can easily realize multi-joint cross complaint, compare, can save with traditional multi-joint cross complaint
Substantial amounts of wiring.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, every utilization
Equivalent structure or the flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of switch gearing control method, it is characterised in that comprise the following steps:
The touch operation of monitoring switch button is scanned by switch key;
When monitoring the touch operation of switch key, button operation type is judged;
If the button operation type is switching manipulation, inquiry linkage list carries out switching manipulation;
If the button operation type is combined operation, corresponding linkage is carried out according to the instruction of the combined operation behaviour is set
Make.
2. switch gearing control method according to claim 1, it is characterised in that described scanned by switch key monitors
The step of touch operation of switch key, includes:
Communication frame caused by the touch operation of monitoring switch button is scanned by switch key;The communication frame includes invalid communication
Frame, switching manipulation communication frame, combined operation communication frame.
3. switch gearing control method according to claim 1, it is characterised in that if the button operation type is switch
Operation, then the step of inquiry linkage list progress switching manipulation include:
If the button operation type is switching manipulation, inquiry linkage list controls are controlled button execution and opened accordingly accordingly
Or close operation.
4. switch gearing control method according to claim 1, it is characterised in that if the button operation type is linkage
Operation, then carrying out the step of corresponding linkage sets operation according to the instruction of the combined operation includes:
If the button operation type is combined operation, the type of the instruction of the combined operation is judged;
If the type of the instruction of the combined operation starts combined operation, sets current touch to set combined operation to instruct
Button is master control button;
The touch operation of monitoring switch button again, will if the duration of touch operation, which reaches, adds the combined operation time
Current touch button is arranged to controlled button, and this key assignments is added into linkage list;
The touch operation of monitoring switch button again, if the duration of touch operation, which reaches to link, confirms the operating time, really
Recognize master control button, complete linkage and operation is set.
5. switch gearing control method according to claim 4, it is characterised in that the instruction of the combined operation is according to pressing
The length that key touches the time exports different key assignments, realizes switch motion, sets the master control button, controlled button and confirmation of linkage
Button.
6. switch gearing control method according to claim 4, it is characterised in that if the button operation type is
Combined operation, then judge the combined operation instruction type the step of after, in addition to:
If the type of the instruction of the combined operation is linkage deletion action instruction, according to the linkage deletion action instruction choosing
The button for needing to delete linkage is selected, and confirms to complete to need the button for deleting linkage.
7. switch gearing control method according to claim 6, it is characterised in that the linkage deletion action, which instructs, is:
Linkage deletion state is entered with preset time long-press button, then unclamps button, long-press is confirmed again.
8. switch gearing control method according to claim 4, it is characterised in that if the button operation type is
Combined operation, then judge the combined operation instruction type the step of after, in addition to:
If the type of the instruction of the combined operation refers to set fully closed button operation instruction according to the fully closed button operation
Order selection needs the button of fully closed linkage, and confirms to complete the button for needing fully closed linkage.
9. switch gearing control method according to claim 8, it is characterised in that the instruction of the combined operation is:With
Preset time long-press button enters fully closed setting state, then unclamps button, long-press is confirmed again.
10. a kind of switch gearing control device, it is characterised in that including memory, processor and be stored in the memory
On computer program, when the computer program is run by the processor realize such as any one institute in claim 1-9
The step of method stated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710952558.3A CN107678344B (en) | 2017-10-13 | 2017-10-13 | Switch linkage control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710952558.3A CN107678344B (en) | 2017-10-13 | 2017-10-13 | Switch linkage control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107678344A true CN107678344A (en) | 2018-02-09 |
CN107678344B CN107678344B (en) | 2020-09-11 |
Family
ID=61140820
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710952558.3A Active CN107678344B (en) | 2017-10-13 | 2017-10-13 | Switch linkage control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107678344B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114496599A (en) * | 2021-12-31 | 2022-05-13 | 浙江慧居智能物联有限公司 | Intelligent switch and local linkage control method |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202306291U (en) * | 2011-10-26 | 2012-07-04 | 东莞市中凌电子科技有限公司 | Intelligent control switch |
CN103199871A (en) * | 2013-02-26 | 2013-07-10 | 无锡飞翎电子有限公司 | Method for controlling self-adaptive function replacement of control button |
CN105022362A (en) * | 2014-04-29 | 2015-11-04 | 深圳市君鹏物联科技有限公司 | Coordinated control system and coordinated control method of smart home equipment |
US20160026259A1 (en) * | 2014-07-23 | 2016-01-28 | Sony Computer Entertainment Inc. | Inputting device |
CN105953371A (en) * | 2016-05-18 | 2016-09-21 | 珠海格力电器股份有限公司 | Multi-connected air-conditioning unit as well as method and device for controlling communication thereof |
CN106184069A (en) * | 2016-07-07 | 2016-12-07 | 苏州大学 | Automotive electronics micro-controller communications method based on CAN LIN network |
CN106444543A (en) * | 2016-11-21 | 2017-02-22 | 重庆帅星科技有限公司 | Method for wirelessly controlling low-voltage switch |
CN106656145A (en) * | 2017-03-08 | 2017-05-10 | 上海小燕科技有限公司 | Switch device supporting various key modes |
CN106935020A (en) * | 2017-04-25 | 2017-07-07 | 福建省光速达物联网科技股份有限公司 | A kind of intelligent switch and its control method for sensing coordinated signals |
CN106950886A (en) * | 2017-04-20 | 2017-07-14 | 上海紫光乐联物联网科技有限公司 | Intelligent switch is long-range and local inter-linked controlling method |
-
2017
- 2017-10-13 CN CN201710952558.3A patent/CN107678344B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202306291U (en) * | 2011-10-26 | 2012-07-04 | 东莞市中凌电子科技有限公司 | Intelligent control switch |
CN103199871A (en) * | 2013-02-26 | 2013-07-10 | 无锡飞翎电子有限公司 | Method for controlling self-adaptive function replacement of control button |
CN105022362A (en) * | 2014-04-29 | 2015-11-04 | 深圳市君鹏物联科技有限公司 | Coordinated control system and coordinated control method of smart home equipment |
US20160026259A1 (en) * | 2014-07-23 | 2016-01-28 | Sony Computer Entertainment Inc. | Inputting device |
CN105953371A (en) * | 2016-05-18 | 2016-09-21 | 珠海格力电器股份有限公司 | Multi-connected air-conditioning unit as well as method and device for controlling communication thereof |
CN106184069A (en) * | 2016-07-07 | 2016-12-07 | 苏州大学 | Automotive electronics micro-controller communications method based on CAN LIN network |
CN106444543A (en) * | 2016-11-21 | 2017-02-22 | 重庆帅星科技有限公司 | Method for wirelessly controlling low-voltage switch |
CN106656145A (en) * | 2017-03-08 | 2017-05-10 | 上海小燕科技有限公司 | Switch device supporting various key modes |
CN106950886A (en) * | 2017-04-20 | 2017-07-14 | 上海紫光乐联物联网科技有限公司 | Intelligent switch is long-range and local inter-linked controlling method |
CN106935020A (en) * | 2017-04-25 | 2017-07-07 | 福建省光速达物联网科技股份有限公司 | A kind of intelligent switch and its control method for sensing coordinated signals |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114496599A (en) * | 2021-12-31 | 2022-05-13 | 浙江慧居智能物联有限公司 | Intelligent switch and local linkage control method |
CN114496599B (en) * | 2021-12-31 | 2023-09-01 | 绿碳智能建筑(杭州)有限公司 | Intelligent switch and local linkage control method |
Also Published As
Publication number | Publication date |
---|---|
CN107678344B (en) | 2020-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101505386B (en) | Implementing method for transferability of household electrical appliance user operation interface | |
CN101639973B (en) | Management method for remote controller | |
CN202050483U (en) | Remote controller | |
CN103428799A (en) | WIFI network module configuring method | |
CN102902476A (en) | Electronic equipment control method and system comprising touch terminal | |
CN102902406A (en) | Touch terminal and electronic equipment control system comprising same | |
CN201689407U (en) | Device adopting user's gestures to replace exit key and enter key of terminal unit | |
CN105612759A (en) | Display apparatus and control method thereof | |
CN202956653U (en) | Smart home remote control system | |
CN110349396A (en) | Intelligent interactive system, interactive terminal and control platform | |
CN103677702B (en) | A kind of display methods and electronic equipment | |
CN202197354U (en) | Remote controller | |
CN103577027B (en) | The method that industrial human-computer interface is used interchangeably with entity button | |
CN203445921U (en) | Separating type mobile phone | |
CN107678344A (en) | Switch gearing control method and device | |
CN105138182B (en) | Touch-control display module, touch-control input unit and touch control input method | |
CN203788040U (en) | Touch screen power source automatic switching cabinet | |
US20150009151A1 (en) | Touch keyboard | |
CN205897445U (en) | But pluralism plug air purifier | |
CN208636697U (en) | A kind of conveying equipment Communication Control board and communication control system | |
CN202939580U (en) | Visual control switch system in multicomputer environment | |
CN205545383U (en) | Remote control system of intelligent household electrical appliance | |
CN207268826U (en) | A kind of switch based on terminal box | |
CN210895089U (en) | Man-machine interaction device connected with numerical control system through bus and numerical control equipment | |
CN102340898B (en) | Drive control system of electric heating appliance |
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 |