WO2016155660A1 - Physical programming instruction module and programming method and application thereof in robot field - Google Patents

Physical programming instruction module and programming method and application thereof in robot field Download PDF

Info

Publication number
WO2016155660A1
WO2016155660A1 PCT/CN2016/078280 CN2016078280W WO2016155660A1 WO 2016155660 A1 WO2016155660 A1 WO 2016155660A1 CN 2016078280 W CN2016078280 W CN 2016078280W WO 2016155660 A1 WO2016155660 A1 WO 2016155660A1
Authority
WO
WIPO (PCT)
Prior art keywords
programming
program
physical
module
instruction module
Prior art date
Application number
PCT/CN2016/078280
Other languages
French (fr)
Chinese (zh)
Inventor
赵敬双
王志坚
Original Assignee
苏州乐派特机器人有限公司
赵敬双
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
Priority claimed from CN201510153330.9A external-priority patent/CN104898456B/en
Priority claimed from CN201610140066.XA external-priority patent/CN105589341B/en
Application filed by 苏州乐派特机器人有限公司, 赵敬双 filed Critical 苏州乐派特机器人有限公司
Publication of WO2016155660A1 publication Critical patent/WO2016155660A1/en

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
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Definitions

  • the invention belongs to the field of human-computer interaction, and particularly relates to an instruction module of physical programming, a programming method and an application thereof in the field of robots.
  • the difference from graphical programming is that the operation of the program for the program goes beyond the limitations of the computer screen.
  • Physical programming interacts with the real thing through techniques such as touch and physical perception, and then converts the physical logic into program logic for programming. It is easier for children to create children by manipulating physical objects than directly allowing children to control computers. Throughout the process. Through the physical programming system, children can have a more intuitive understanding of the logic of the programming language. The program is no longer a boring code, but a combination of a group of images and even a set of objects. Through the splicing and combination of the objects, the children can complete the work done by the normal programming language through the keyboard input code. The characteristics of physical programming determine that it is more suitable for children to perform programming operations.
  • the prior art Chinese patent CN 102136208A discloses a physical programming method and system for acquiring a surface identification code of a physical programming block by an image, and then converting it into a corresponding functional semantic sequence, and the user places a physical module having an identification code in the imaging area.
  • this kind of materialized programming method is still a tedious program, but it is not a good stimulating interest for children and novices.
  • the program can only be used in computers. The established procedures can't let children and novices open their minds to create their own, without further educational significance.
  • the object of the present invention is to provide a materialized programming instruction module, a programming method and an application thereof in the field of robots, so that children and novices can get rid of the tedious syntax of the programming language and better learn and understand the logic of the programming itself.
  • the technical solution of the present invention is: a materialized programming instruction module, the main structure comprising a casing and a circuit board disposed inside the casing, the side of the casing being provided with an interface, and the output and the input end of the circuit board are disposed in the interface.
  • the shape of the outer casing is a single hexagonal, octagonal or circular symmetrical structure, or a plurality of hexagonal, octagonal or circular composite structures;
  • the circuit board is provided with a selection mechanism to satisfy parallel commands and inputs. / Output port and selection of values and variables.
  • the parallel instruction includes a plurality of conditional instructions and a serialized execution instruction; and the corresponding selection mechanism includes one or more of a dial switch, a knob switch, and a push switch; the dial switch type
  • the selection mechanism is a combination of a plurality of multi-selection dial switches; there are two types of knob switches, one is a multi-select switch, and the other is an 8421 code knob switch.
  • dial switch and the knob switch are provided with a fixed indication on the surface of each gear position, and the push switch is an “8” type dynamic indication, and the specific display number varies with the number of times of pressing.
  • the interface has a magnetic touch type, a spring pin type, a spring type interface, and a USB interface, an RJ11, an RJ12, and an RJ45 interface.
  • connection mode adopts a male port on the interface structure of the signal output, and the interface structure of the signal input adopts a female port; in addition, each physical module has at least one male port, and the female port may have one or more. Some assignments or conditions on the module can also have no female port.
  • a method of materialized programming the steps of which are:
  • the CPU in the main control board parses and detects whether the physical logic program is correct
  • the instruction module internally includes a single-chip computer storing a unique ID identified by the instruction module through the memory; or the instruction module internally includes a chip and is stored by the dial switch as a unique ID identified by the instruction module. .
  • the loading program described in the step (4) starts from the first connected physical programming instruction module by the circuit signal, sequentially reads the unique ID in each physical programming instruction module, and simultaneously reads the physical object.
  • the linear or networked connection relationship of the programming instruction module is stored in the memory in the main control board.
  • the manner in which the main control board returns information to the wrong instruction module in step (6) is preferably: setting an LED light on the instruction module, and outputting a signal after the main control board detects an error, and the LED on the corresponding instruction module The light will light up.
  • the main body of the robot comprises a main control board, a sensor and an audible lighting module;
  • Robot operation The main control board parses and controls the robot to execute the above program.
  • the present invention has the following advantages and technical effects:
  • the present invention simplifies the complex syntax of a conventional programming language into a splicing of programming instruction modules, enabling children and novices to easily learn programming.
  • the invention controls the operation of the robot through physical programming, so that children and novices can more intuitively understand the program, design the program, and modify the program.
  • the invention can be applied in the field of robots and supports most sensors. Children can understand the application principle of various sensors by operating sensors, which greatly increases the interest of programming.
  • the polygonal symmetrical structure of the physical instruction module of the present invention is very reasonable, the outer casing is easy to process, and the module structure is assembled quickly.
  • the interface of the physical instruction module of the invention is reliable, and the modules can be connected or disassembled at random during programming to meet various requirements of programming.
  • the physical instruction module of the present invention has a parallel selection mechanism, can implement a multi-purpose, reduce the cost, reduce the number of modules used for programming, and make the programming flexible and compact.
  • FIG. 1 is a schematic diagram of an instruction module according to the present invention.
  • FIG. 2 is an exemplary view of the shape of the outer casing of the command module of the present invention
  • FIG. 2a single octagonal structure
  • FIG. 2b double octagonal combined structure
  • FIG. 2c three octagonal combined structure
  • Fig. 2d four eight sides Shape combination mechanism
  • FIG. 3 is a schematic diagram of a dial switch of the command module according to the present invention.
  • FIG. 4 is a schematic diagram of a rotary switch of the instruction module according to the present invention.
  • FIG. 5 is a schematic diagram of a push switch of the instruction module according to the present invention.
  • FIG. 6 is a schematic diagram of an instruction module of a plurality of selection switch combinations according to the present invention.
  • FIG. 7, FIG. 9, and FIG. 10 are schematic diagrams of a single octagonal structure instruction module according to the present invention.
  • FIG. 8 is a schematic diagram of an internal circuit board of a single octagonal structure command module according to the present invention.
  • FIG. 11 is a schematic diagram of a single octagonal structure opening/closing output port instruction module according to the present invention.
  • FIG. 12 is a schematic diagram of a parallel selection mechanism of a delay type instruction module of the single octagonal structure of the present invention.
  • FIG. 13 and FIG. 14 are schematic diagrams of instruction modules of the double octagon combined structure according to the present invention.
  • 15 is a schematic diagram of an internal circuit board of a double octagon combined structure instruction module according to the present invention.
  • 16 is a schematic diagram of a repeating instruction module of the double octagon combined structure according to the present invention.
  • 17 is a schematic diagram of a parallel selection mechanism of a motor running module command of the double octagonal combined structure according to the present invention.
  • Figure 18 is a schematic diagram of the connection between the instruction modules of the present invention.
  • FIG. 20 is a schematic diagram of a conditional instruction module according to the present invention.
  • FIG. 20a - if the instruction is judged, FIG. 20b - repeats the instruction, and FIG. 2c - the waiting condition is satisfied;
  • 21 is a schematic diagram of a delay type instruction module according to the present invention.
  • 22 is a schematic diagram of a music output type instruction module according to the present invention.
  • FIG. 23 is a schematic diagram of an instruction module dedicated to a patrol robot according to an example of the present invention; wherein FIG. 23a - the robot advances Command, Figure 23b - Robot left turn command, Figure 23c - Robot right turn command, Figure 23d - Robot back command, Figure 23e - Robot stop command;
  • FIG. 24 is a schematic diagram of the internal instruction ID storage of the physical instruction module of the present invention
  • FIG. 24a is a switch mode storage instruction ID of the chip plus coding
  • FIG. 24b is a mode storage instruction ID of the single chip plus the memory
  • Figure 25 is a block diagram showing the relationship between an example patrol robot and a black line according to the present invention.
  • 26 is a flow chart of a running program of an exemplary patrol robot of the present invention.
  • Figure 27 is a physical logic program for an exemplary patrol robot of the present invention.
  • Figure 29 is a flow chart showing the working principle of the loading program of the present invention.
  • FIG. 30 is a flow chart showing the working principle of the main control board parsing program according to the present invention.
  • the main body structure of the instruction module of the physical programming comprises: a casing 1 and a circuit board 2 disposed inside the casing, and an interface is provided on a side of the casing ("public mouth” 12, "female port” 13 ), the output and input of the board are set in the interface.
  • the shape of the outer casing of the above instruction module is generally polygonal or circular, preferably hexagonal or octagonal symmetrical structure, which is convenient for processing and programming connection; as shown in FIG. 2a to FIG. 2d, the shape of the outer casing of the instruction module can be set individually.
  • the angle shape may also be a combined structure such as double octagon or multi-octagon; and the connection between the interface and the interface is mainly to ensure electrical connection, and the connection manner is "magnetic touch type", “spring pin type”, “spring piece type”,
  • the interface can also use the USB interface, RJ11, RJ12, RJ45 and other interfaces that can ensure electrical connection and structural connection, but from the aspects of appearance, firmness and reliability, etc., it is preferably "magnetic touch type", “spring pin type”, "shrap-type” connection; among them, the interface structure of the signal output usually adopts "public port”, and the interface structure of the signal input usually adopts "female port”; according to the type and specific content of the instruction represented by the physical module, the physical module There are many interface forms, but each physical module has at least one "public port", and the "female port” can have one or more, some "assignment” or “article” The module can also have no "mother port”. It should be noted that the descriptions
  • a selection mechanism may be disposed in the foregoing instruction module to satisfy parallel command, input/output port, and selection of values and variables in the instruction module.
  • the parallel instruction includes selection of a plurality of conditional instructions, serialization of execution instruction selection (such as delay time, forward time, back time, utterance time, action time, etc.); as shown in FIG. 3 to FIG. 5, selection of an instruction module
  • the mechanism has: a dial switch, a knob switch, a push switch, and the like.
  • the "dial switch” type selection mechanism may be a combination of "dial switches”: as shown in Fig.
  • a vertical row of 2 selection 1 dial switches and a horizontal row The combination of the 4 selection and 1 dial switch can select one of the horizontal 1, 2, 3, 4 commands when the vertical shift switch is turned to the top. If the vertical switch is turned to the bottom, then Choose one of 5, 6, 7, 8; as shown in Figure 3b, it is a combination of a vertical 3-switch 1 switch and a horizontal 3-to-1 switch.
  • the command selection is 9 kindss, and so on, there are 10, 12, and 15 types of instructions.
  • the knob switch can be a multi-select switch, and the other is the 8421 code rotary switch (as shown in Figure 4).
  • the selection mechanism of one command module may have multiple “dial switches”, “knob switches” or “push switches”, or may be “dial switches”, “knob switches”, “presses” Two or three combinations of switches.
  • the dial switch and the knob switch are provided with a fixed indication on the surface of each gear position, and the push switch is an "8" type dynamic indication, and the specific display number varies with the number of pressing, as shown in FIG.
  • the physical module has two digital tubes and two push switches. Each switch has two buttons, the up button is the up number, the down button is the down number, and the two sides are pressed to select the command.
  • FIG. 7 to FIG. 10 are diagrams showing an example of a single octagonal command module having a housing 1 in which a circuit board 2 is placed, and a parallel selection mechanism 3 disposed on the circuit board 2, and a housing 11 has a switch cap 11 that matches it.
  • the two sides of the outer casing 1 are provided with an interface, and the interface of the module mainly adopts a "spring pin type” supplemented by a "magnetic touch type” connection mode, and the interface is further divided into a "public mouth” 12 and a "female port” 13, the "public The port "12" is connected to the output end 21 of the circuit board 2, and the “female port” 13 is connected to the input end 22 of the circuit board 2.
  • connection between the "public port” and the “female port” can ensure the electrical connection between the command modules.
  • a magnetic piece 14 is provided on both sides of the "public port” and the “female port” for sucking and fixing the connection of the module.
  • the circuit board 2 is further provided with a selection mechanism 3.
  • the selection mechanism 3 is a dial switch.
  • FIG. 11 is a schematic diagram of a selection mechanism of an open/close output port command of a single octagonal structure, which has four shift switches of Out1, Out2, Out3, and Out4, and each has two upper and lower gears, and the upward dialing indicates that the port is opened. To dial down, the port is closed. The position of the dial as shown in Figure 11 indicates that the four output ports Out, Out2, Out3, and Out4 are simultaneously turned on to output a signal.
  • FIG. 11 is a schematic diagram of a selection mechanism of an open/close output port command of a single octagonal structure, which has four shift switches of Out1, Out2, Out3, and Out4, and each has two upper and lower gears, and the upward dialing indicates that the port is opened. To dial down, the port is closed. The position of the dial as shown in Figure 11 indicates that the four output ports Out, Out2, Out3, and Out4 are simultaneously turned on to output a signal
  • FIG. 12 is a schematic diagram of a selection mechanism of a delay type instruction of a single octagonal structure, which has a shift switch of four stages of 0.1 s, 0.5 s, 1 s, and 5 s.
  • the switch When the switch is set to 0.1 s, the command is
  • the module represents an instruction with a delay of 0.1 s.
  • there can be multiple output port parallel command modules, a variety of music parallel command modules, multiple input port parallel command modules, and so on are the same principle.
  • FIG. 13 to FIG. 15 are diagrams showing an example of an instruction module of the double octagonal combined structure according to the present invention.
  • the module has a casing 1 in which the circuit board 2 is placed, and the parallel selection mechanism 3 is disposed on the circuit board 2.
  • Upper, the housing has a switch cap 11 that matches it.
  • the side of the outer casing 1 is provided with an interface.
  • This embodiment mainly adopts a "spring pin type” supplemented by a "magnetic touch type” connection, and the interface is further divided into a "public mouth” 12 and a “female port” 13, and the "public mouth” 12 Connected to the output end 21 of the circuit board 2, the "female port” 13 is connected to the input end 22 of the circuit board 2, and the connection between the "public port” and the “female port” can ensure the electrical connection between the command modules;
  • a magnetic piece 14 is provided on both sides of the "public mouth” and the "female port” for sucking and fixing the connection of the module.
  • each physical module has at least one "public port", and the "female port” may have one or more.
  • Some “assignment” or “conditional” modules may also have no "mother port", and Figures 13-15
  • the illustrated double octagon command module has three "female ports”.
  • the circuit board 2 is provided with a selection mechanism 3, although only one is shown in the figure, but this is only an example. It is to be understood that there is not only one selection mechanism, but it may be provided with a plurality of selection mechanisms as needed.
  • Figure 16 is a schematic diagram of the repeated instruction module of the octagonal combined structure, which can select the number of cycles through the middle dial switch, the arrow shown is the direction of the command signal output/input; for example, the dial shown in the figure The position indicates that this command module has an infinite loop function.
  • FIG. 17 is a schematic diagram of a selection mechanism of a motor running module command of a double octagonal combined structure. The dialing of FIG. 15 indicates that both the left and right motors of the running object are in a high-speed running in a positive direction.
  • each instruction module is connected in the manner shown in the figure.
  • the symmetrical structure of the physical programming instruction module of the invention is reasonable, the shell processing is convenient, the module structure is assembled quickly, the interface connection mode is reliable, and the modules can be freely and quickly connected or disassembled during programming to meet various programming requirements. Claim.
  • FIG. 19 is a flowchart of a physical programming method according to the present invention, and the specific steps are as follows:
  • a running object with a main control board, which may be a running robot, a sweeping robot, etc., which can implement any running object of the program.
  • the main control board has a CPU, a memory, and an input/output port therein, and has a function of loading a program of the physical programming module, analyzing the program, and executing the program.
  • In interface is used to connect various inputs, such as sensors (buttons, photoelectric sensors, sound sensors, infrared sensors, ultrasonic sensors, etc.), music U disk, robot, motor, etc.; Motor interface is used to connect DC motor; Out interface Used to connect various outputs such as LED lights, speakers, servos, relays, networks, etc.
  • the programming instructions include conditional control instructions, delay type instructions, sensor type instructions, and other instructions.
  • conditional control class instructions which in turn include:
  • Figure 20a is the following instruction if the judgment command: the dial position is indicated in the figure, if the In1 input port has a signal, the condition is satisfied, the next instruction whose execution condition is satisfied, otherwise the condition is not satisfied, and the execution condition is not satisfied;
  • Figure 20b is a repeated instruction: the dial switch in the figure can select the number of cycles, when the number of cycles is satisfied, the condition is satisfied, the next instruction that the execution condition is satisfied, otherwise, the loop condition is jumped out;
  • Figure 20c is a wait condition fulfillment instruction: the wait condition satisfaction instruction can be used in conjunction with the above conditional instruction, and waits until the In1 input port has a signal input, and continues to execute the next instruction;
  • Figure 21 is a schematic diagram of the delay command:
  • Figure 21a is a schematic diagram of the instruction module with a delay of X seconds A.
  • the delay time value can be selected by the dial switch for 0.1s, 0.5s, 1s, 5s;
  • Figure 21b is the delay X seconds B
  • 22 is a schematic diagram of a music-like instruction module:
  • FIG. 22a is a music ringing command module, and has four music selections of greeting, alarm, joy, and robot dance.
  • the instruction can control the running object to output music, and the music stop instruction is relatively Module ( Figure 22b)
  • Robot advance command (Fig. 23a): The robot advances at a fixed speed set by the system. When you are done, then execute the next instruction.
  • Robot left turn command (Fig. 23b): The robot turns left at a fixed speed set by the system. When you are done, then execute the next instruction.
  • Robot right turn command (Fig. 23c): The robot turns right at the fixed speed set by the system. After the completion, the next command is executed.
  • Robot back command (Fig. 23d): The robot moves backward at a fixed speed set by the system. When you are done, then execute the next instruction.
  • Robot stop command (Fig. 23e): The robot stops. When you are done, then execute the next instruction.
  • the physicalized programming instruction module (shown in FIG. 1 to FIG. 18) of the above-mentioned programming instruction materialization, the foregoing modularizing the instructions, facilitates the subsequent understanding and use of the physical programming instruction module.
  • each physical programming instruction module internally contains a single chip or a chip, and each instruction module stores a unique ID identified by each instruction module through a dial switch or a memory.
  • the internal ID storage principle of the module is as shown in FIG. 24: Figure 24a is a chip-encoded switching mode, storing the unique ID of the programming building block; Figure 24b is a single-chip plus memory, using EEPROM memory to store the unique ID of the programming block module.
  • Figure 28 shows the connection between the physical logic program and the main control board and the internal functional structure of the main control board.
  • the main control board is connected to the first physical programming module of the physical logic program. Start the loader in the main control board to turn the materialization logic The program is loaded into the memory of the main control board;
  • the loading program is located in the main control module.
  • the loading button When the loading button is pressed, the loading program in the main control board is started, and then the loading program passes the circuit signal, starting from the first connected physical programming module, and sequentially reading each one.
  • the ID of the programming instruction module and its connection order are stored, and the ID network connection relationship of the read physical programming module is stored in the CPU memory.
  • Figure 28 is a flow chart of the working principle of the loading program. The working principle is as follows: 1 read the unique ID in the first module; 2 issue the instructions in turn to select each port in the first module as the next step to read. Object, and read the unique ID of the next module corresponding to each port; 3 according to the method of the previous step, sequentially read the unique ID of each module connected to the next level through the recursive algorithm until all the connected ones are read The unique ID of the module.
  • the CPU in the main control board parses the program and determines whether the program is correct
  • the CPU of the main control board recognizes the instruction ID loaded in the memory and executes the program logic according to each instruction.
  • the infrared sensor of the equipment and the action of the robot have a logical relationship as shown in Fig. 26: when the robot moves along the black line, when the left side of the robot detects black When the line is detected, the black line is also detected on the right side, then it stops returning and re-detects the left side infrared ray. If not, it turns left and returns to re-detect the left side. When the left side of the robot does not detect the black line, the right side detects the black line and turns right. Return to re-detect the left side, if not, go forward and return to re-detect the left side; this logical relationship enables the robot to walk along the black line.
  • the physical instruction module built together is the physical logic program of the patrol robot, wherein if the 1 conditional instruction module is to In1 The signal of the sensor 1 on the input port is judged. If there is a signal, the condition is satisfied, and the execution condition satisfies the next instruction of the interface. Otherwise, the execution condition does not satisfy the next instruction of the interface; if the 2 conditional instruction module is the sensor on the input port of the In1 The signal of 2 is judged. If there is a signal, the condition is satisfied, and the execution condition satisfies the next instruction of the interface. Otherwise, the execution condition does not satisfy the next instruction of the interface.
  • the first command module is connected to the main control board, and the load program is located in the main control module.
  • the load button When the load button is pressed, the system starts the load program, and then loads the program through the circuit signal from the first connection.
  • the physical programming instruction module starts, sequentially reads the ID in each instruction module, and stores the network connection relationship of the read physical programming instruction module into the CPU memory.
  • the following table shows the correspondence between ID and instructions:
  • Robot operation The CPU in the main control board recognizes the instruction ID loaded in the memory and controls the robot to execute the above program.
  • the above-mentioned patrol robot is only a simple typical example. According to the technical solution of the present invention, more and more complex physical instruction modules can be used to build a larger physical materialization program.

Abstract

A physical programming instruction module and a programming method and an application thereof in the robot field. The method is: (1) building a running object having a main control board; (2) using physical programming instruction modules to build a logic program; (3) connecting the physical logic program to the main control board; (4) loading the program into a memory of the main control board; (5) parsing the program and detecting whether the program is correct; (6) if the program is correct, executing the program, and verifying whether the program is correctly executed; if the program is incorrect, feeding back information to an erroneous instruction module, performing correction and then returning to and continuing with step (3) until the program is correct; and (7) if the running object runs correctly, ending the process; otherwise, correcting the program, and continuing with step (3) until the running object runs correctly. By visually reflecting a program spliced by physical instruction modules to running of a running object such as a robot, kids and green hands can understand, design and correct the program more concretely.

Description

实物化编程的指令模块、编程方法及其在机器人领域的应用Instruction module, programming method of physical programming and its application in robot field
相关申请Related application
本发明申请要求2015年04月02日申请的,申请号为201510153330.9,名称为“实物化编程的方法及其在机器人领域的应用”,以及2016年03月11日申请的,申请号为201610140066.X,名称为“实物化编程的指令模块”的中国专利申请的优先权,在此将其全文引入作为参考。The application of the present invention claims to be applied for on April 2, 2015, the application number is 201510153330.9, the name is "physical programming method and its application in the field of robotics", and the application on March 11, 2016, the application number is 201610140066. The priority of the Chinese Patent Application, entitled "Instructive Modules for Physical Programming," is hereby incorporated by reference in its entirety.
技术领域Technical field
本发明属于人机交互领域,具体涉及到实物化编程的指令模块,编程方法及其在机器人领域的应用。The invention belongs to the field of human-computer interaction, and particularly relates to an instruction module of physical programming, a programming method and an application thereof in the field of robots.
背景技术Background technique
进入21世纪,信息技术推动下知识社会的形成及其对技术创新的影响进一步被认识,科学界进一步反思对创新的认识:技术创新是一个科技、经济一体化过程,是技术进步与应用创新“双螺旋结构”(创新双螺旋)共同作用催生的产物,而且知识社会条件下以需求为导向、以人为本的创新2.0模式(创客)进一步得到关注。在这个世纪里,创客将成为世界的领导者,引领世界走向更加辉煌的一页。In the 21st century, the formation of knowledge society driven by information technology and its impact on technological innovation are further recognized. The scientific community further reflects on the understanding of innovation: technological innovation is a process of integration of science and technology and economy, and it is technological progress and applied innovation. The double helix structure (innovative double helix) works together to produce products, and the demand-oriented, people-oriented innovation 2.0 model (Maker) under the knowledge society has received further attention. In this century, Maker will become the world leader and lead the world to a more brilliant page.
伴随着当代中国乃至世界对创客的越来越关注,全民创客时代已经来临。在互联网时代的今天,计算机和网络已经成为人们生活中必不可缺少的一部分。作为创客,也必须掌握一项基础技能,就是“编程”。程序是计算机的大脑,也只有掌握“编程”的技能,然后才能够参与到计算机创新制作过程中来。With the increasing attention of makers in contemporary China and the world, the era of universal Maker has arrived. Today in the Internet age, computers and networks have become an indispensable part of people's lives. As a maker, you must also master a basic skill, which is "programming." The program is the brain of the computer, and only master the skills of "programming" before it can participate in the process of computer innovation.
传统的编程通常是通过键盘输入文本语言来完成。这种编程方式对于计算机初学者而言,理解和使用起来很不方便,主要原因是传统编程语言中的语法和复杂指令,难以被理解和记忆,同时还需要进行大量输入工作。而一般儿童和新手很难记住和理解程序语言的语法、逻辑关系和程序架构等非常专业的知识。此外,对文字掌握得还不成熟的儿童来说,程序的文本编辑方式缺乏直观性,儿童无法采用传统的编程方式来创作自己的程序。图形化编程向儿童提供了一种编程的可行途径。它将各种编程的概念转化为显示在屏幕上的各种图形,儿童只需要对于各种图形进行拖动,就可以完成编程的整个过程。而实物编程被认为是图形化编程的一个分支。与图形化编程不同之处在于,实物编程对于程序的操作超越了计算机屏幕的限制。实物编程通过触觉、物理感知等技术与实物交互,再将实物逻辑转化为程序逻辑来进行编程。与直接让儿童操控电脑相比,让儿童通过操纵实物来进行创作,更容易让儿童投入 到整个过程当中。通过实物编程系统,儿童可以对程序语言的逻辑有更加直观的理解。程序不再是一行行枯燥的代码,而是一组形象甚至一组实物的组合,儿童通过对实物的拼接组合,就可以完成普通程序语言通过键盘输入代码完成的工作。实物编程的特点决定了它更适合儿童进行编程操作。Traditional programming is usually done by typing a text language through the keyboard. This kind of programming is very inconvenient for computer beginners to understand and use. The main reason is that the grammar and complex instructions in the traditional programming language are difficult to understand and memorize, and a lot of input work is needed. It is difficult for children and novices to remember and understand the very professional knowledge of the grammar, logical relationship and program architecture of the programming language. In addition, for children who are still immature in writing, the text editing method of the program lacks intuitiveness, and children cannot use traditional programming methods to create their own programs. Graphical programming provides a viable way for children to program. It converts various programming concepts into various graphics that are displayed on the screen. Children only need to drag various graphics to complete the whole process of programming. Physical programming is considered a branch of graphical programming. The difference from graphical programming is that the operation of the program for the program goes beyond the limitations of the computer screen. Physical programming interacts with the real thing through techniques such as touch and physical perception, and then converts the physical logic into program logic for programming. It is easier for children to create children by manipulating physical objects than directly allowing children to control computers. Throughout the process. Through the physical programming system, children can have a more intuitive understanding of the logic of the programming language. The program is no longer a boring code, but a combination of a group of images and even a set of objects. Through the splicing and combination of the objects, the children can complete the work done by the normal programming language through the keyboard input code. The characteristics of physical programming determine that it is more suitable for children to perform programming operations.
现有技术中国专利CN 102136208A公开了一种实物编程方法和系统,通过图像采集实物编程块的表面识别码,再转换为对应的功能语义序列,用户通过在摄像区域摆放具有识别码的实物模块来进行简单编程,这种实物化的编程方法虽然简单,但其仍然是一种乏味的程序,并不能很好地激发儿童及新手的学习兴趣;同时,该方案只能使用已经在计算机中设定好的程序,无法让儿童以及新手展开开放性思维去自己创建,不具有更深远的教育意义。The prior art Chinese patent CN 102136208A discloses a physical programming method and system for acquiring a surface identification code of a physical programming block by an image, and then converting it into a corresponding functional semantic sequence, and the user places a physical module having an identification code in the imaging area. For simple programming, this kind of materialized programming method is still a tedious program, but it is not a good stimulating interest for children and novices. At the same time, the program can only be used in computers. The established procedures can't let children and novices open their minds to create their own, without further educational significance.
发明内容Summary of the invention
本发明的目的在于提供一种实物化编程的指令模块、编程方法以及其在机器人领域的应用,使得儿童和新手可以摆脱编程语言繁冗的语法,能更好地学习和理解程序设计本身的逻辑。The object of the present invention is to provide a materialized programming instruction module, a programming method and an application thereof in the field of robots, so that children and novices can get rid of the tedious syntax of the programming language and better learn and understand the logic of the programming itself.
本发明的技术方案为:一种实物化编程的指令模块,其主体结构包括外壳以及置于外壳内部的线路板,外壳的侧面设有接口,线路板的输出和输入端设置在接口内。其中,外壳的形状为单个六角形、八角形或圆形的对称结构,或者多个六角形、八角形或圆形的组合结构;所述线路板上设置有选择机构,可满足并行指令、输入/输出口以及值与变量的选择。The technical solution of the present invention is: a materialized programming instruction module, the main structure comprising a casing and a circuit board disposed inside the casing, the side of the casing being provided with an interface, and the output and the input end of the circuit board are disposed in the interface. Wherein, the shape of the outer casing is a single hexagonal, octagonal or circular symmetrical structure, or a plurality of hexagonal, octagonal or circular composite structures; the circuit board is provided with a selection mechanism to satisfy parallel commands and inputs. / Output port and selection of values and variables.
进一步地,所述并行指令包括多条条件指令和系列化执行指令;相应的选择机构包括拨档开关、旋钮开关和按压开关这三种方式中的一种或多种;所述拨档开关式的选择机构是多种多选一的拨档开关的组合;所述旋钮开关有两种,一种是多选一开关,一种是8421编码旋钮开关。Further, the parallel instruction includes a plurality of conditional instructions and a serialized execution instruction; and the corresponding selection mechanism includes one or more of a dial switch, a knob switch, and a push switch; the dial switch type The selection mechanism is a combination of a plurality of multi-selection dial switches; there are two types of knob switches, one is a multi-select switch, and the other is an 8421 code knob switch.
进一步地,所述拨档开关和旋钮开关在各档位位置的表面附有固定式指示说明,所述按压开关则为“8”字式动态指示说明,具体显示数字随按压的次数而变化。Further, the dial switch and the knob switch are provided with a fixed indication on the surface of each gear position, and the push switch is an “8” type dynamic indication, and the specific display number varies with the number of times of pressing.
更进一步地,所述接口有磁碰式、弹簧针式、弹片式的接口,另还有USB接口,RJ11、RJ12、RJ45接口。Further, the interface has a magnetic touch type, a spring pin type, a spring type interface, and a USB interface, an RJ11, an RJ12, and an RJ45 interface.
更进一步地,所述连接方式在信号输出的接口结构上采用公口,信号输入的接口结构上采用母口;此外,每个实物模块至少有一个公口,母口可以有一个或多个,一些赋值或条件上模块也可以没有母口。Further, the connection mode adopts a male port on the interface structure of the signal output, and the interface structure of the signal input adopts a female port; in addition, each physical module has at least one male port, and the female port may have one or more. Some assignments or conditions on the module can also have no female port.
一种实物化编程的方法,其步骤为:A method of materialized programming, the steps of which are:
(1)搭建带有主控板的运行对象;(1) Build a running object with a main control board;
(2)选取权利要求前述的实物编程指令模块搭建线性或网络状连接的实物化逻辑程序; (2) selecting the physical programming instruction module of the foregoing claim to construct a physical or logical connection of the physical or logical connection;
(3)连接实物化逻辑程序与主控板;(3) connecting the physical logic program and the main control board;
(4)启动主控板内的装载程序把实物化逻辑程序装载到主控板的存储器中;(4) Start the loading program in the main control board to load the physical logic program into the memory of the main control board;
(5)主控板内CPU解析并检测实物化逻辑程序是否正确;(5) The CPU in the main control board parses and detects whether the physical logic program is correct;
(6)如果程序正确,则执行程序,并验证程序的执行是否正确;如果程序不正确,则向错误的实物编程指令模块反馈信息,修改搭建后的实物化逻辑程序,返回上述步骤(3)继续,直到正确为止;(6) If the program is correct, execute the program and verify that the program is executed correctly; if the program is not correct, feedback the information to the wrong physical programming command module, modify the constructed physical logic program, and return to the above step (3) Continue until it is correct;
(7)如果运行对象运行正确,就结束任务;否则,移动和更换实物编程指令模块来修改程序,继续上述步骤(3),直到运行对象运行正确为止。(7) If the running object runs correctly, the task ends; otherwise, move and replace the physical programming command module to modify the program, continue with the above step (3) until the running object runs correctly.
进一步地,所述指令模块内部含有一个单片机通过存储器存储为该指令模块标识的一个唯一的ID;或者,所述指令模块内部含有芯片并通过拨码开关存储为该指令模块标识的一个唯一的ID。Further, the instruction module internally includes a single-chip computer storing a unique ID identified by the instruction module through the memory; or the instruction module internally includes a chip and is stored by the dial switch as a unique ID identified by the instruction module. .
进一步地,步骤(4)所述的装载程序通过电路信号,从第一个连接的实物编程指令模块开始,依次读取每一个实物编程指令模块中的唯一ID,一并把读取到的实物编程指令模块的线性或网络状连接关系存储到主控板内的存储器中。Further, the loading program described in the step (4) starts from the first connected physical programming instruction module by the circuit signal, sequentially reads the unique ID in each physical programming instruction module, and simultaneously reads the physical object. The linear or networked connection relationship of the programming instruction module is stored in the memory in the main control board.
更进一步地,步骤(6)所述主控板向错误的指令模块反馈信息的方式优选为:在指令模块上装置LED灯,主控板检测到错误之后输出信号,对应的指令模块上面的LED灯就会亮起。Further, the manner in which the main control board returns information to the wrong instruction module in step (6) is preferably: setting an LED light on the instruction module, and outputting a signal after the main control board detects an error, and the LED on the corresponding instruction module The light will light up.
前述实物化编程的编程方法在机器人领域的应用步骤为:The application steps of the aforementioned programming method of materialized programming in the field of robotics are:
(1)构思与设计将要搭建的机器人;(1) conceiving and designing the robot to be built;
(2)搭建机器人,机器人主体包含主控板、传感器和发声发光模块;(2) Build a robot, the main body of the robot comprises a main control board, a sensor and an audible lighting module;
(3)根据步骤(1)中所构思的机器人,选取实物编程指令模块来搭建线性或网络状连接的实物化逻辑程序;(3) selecting a physical programming instruction module to construct a physical or logical connection of the physical logic program according to the robot conceived in the step (1);
(4)将搭建后的实物化逻辑程序与机器人主体内的主控板连接;(4) connecting the constructed physical logic program with the main control board in the robot body;
(5)启动主控板内的装载程序将实物化逻辑程序下载到主控板存储器中;(5) Start the loading program in the main control board to download the physical logic program to the main control board memory;
(6)机器人运行:主控板解析并控制机器人执行上述程序。(6) Robot operation: The main control board parses and controls the robot to execute the above program.
与现有技术相比,本发明具有如下的优点和技术效果:Compared with the prior art, the present invention has the following advantages and technical effects:
1、本发明将传统编程语言的复杂语法简单化为编程指令模块的拼接,使儿童以及新手能够容易地学习编程。1. The present invention simplifies the complex syntax of a conventional programming language into a splicing of programming instruction modules, enabling children and novices to easily learn programming.
2、本发明通过实物化的编程控制机器人运行,让儿童以及新手能够更形象具体地理解程序,设计程序,修改程序。2. The invention controls the operation of the robot through physical programming, so that children and novices can more intuitively understand the program, design the program, and modify the program.
3、实物编程本身是在开放的空间完成编程过程,所以多个用户可以在开放的空间内对于同一个任务展开协作。 3. Physical programming itself completes the programming process in an open space, so multiple users can collaborate on the same task in an open space.
4、本发明可应用在机器人领域,并支持大部分传感器,儿童可以通过操作传感器了解各种传感器的应用原理,这大大增加了编程的趣味性。4. The invention can be applied in the field of robots and supports most sensors. Children can understand the application principle of various sensors by operating sensors, which greatly increases the interest of programming.
5、本发明所述实物指令模块的多边形对称结构非常合理,外壳加工方便,模块结构组装快捷。5. The polygonal symmetrical structure of the physical instruction module of the present invention is very reasonable, the outer casing is easy to process, and the module structure is assembled quickly.
6、本发明所述实物指令模块的接口连接方式可靠,编程时模块之间可以随意、快速连接或拆卸,满足编程的各种要求。6. The interface of the physical instruction module of the invention is reliable, and the modules can be connected or disassembled at random during programming to meet various requirements of programming.
7、本发明所述实物指令模块因为具有并行选择机构,可实行一物多用,降低成本,减少编程所用模块的数量,使编程灵活、紧凑。7. The physical instruction module of the present invention has a parallel selection mechanism, can implement a multi-purpose, reduce the cost, reduce the number of modules used for programming, and make the programming flexible and compact.
附图说明DRAWINGS
图1为本发明所述指令模块的示意图;1 is a schematic diagram of an instruction module according to the present invention;
图2为本发明所述指令模块的外壳形状的示例图;图2a-单八边结构,图2b-双八边形组合结构,图2c-三八边形组合结构,图2d-四八边形组合机构;2 is an exemplary view of the shape of the outer casing of the command module of the present invention; FIG. 2a - single octagonal structure, FIG. 2b - double octagonal combined structure, FIG. 2c - three octagonal combined structure, Fig. 2d - four eight sides Shape combination mechanism;
图3为本发明所述指令模块的拨档开关示意图;3 is a schematic diagram of a dial switch of the command module according to the present invention;
图4为本发明所述指令模块的旋转开关示意图;4 is a schematic diagram of a rotary switch of the instruction module according to the present invention;
图5为本发明所述指令模块的按压开关示意图;5 is a schematic diagram of a push switch of the instruction module according to the present invention;
图6为本发明所述多种选择开关组合的指令模块的示意图;6 is a schematic diagram of an instruction module of a plurality of selection switch combinations according to the present invention;
图7、图9、图10为本发明所述单八边形结构指令模块的示意图;7, FIG. 9, and FIG. 10 are schematic diagrams of a single octagonal structure instruction module according to the present invention;
图8为本发明所述单八边形结构指令模块内部线路板的示意图;8 is a schematic diagram of an internal circuit board of a single octagonal structure command module according to the present invention;
图11为本发明所述单八边形结构打开/关闭输出口指令模块的示意图;11 is a schematic diagram of a single octagonal structure opening/closing output port instruction module according to the present invention;
图12本发明所述单八边形结构的延时类指令模块的平行选择机构的示意图;12 is a schematic diagram of a parallel selection mechanism of a delay type instruction module of the single octagonal structure of the present invention;
图13、图14为本发明所述双八边形组合式结构的指令模块示意图;13 and FIG. 14 are schematic diagrams of instruction modules of the double octagon combined structure according to the present invention;
图15为本发明所述双八边形组合式结构指令模块内部线路板的示意图;15 is a schematic diagram of an internal circuit board of a double octagon combined structure instruction module according to the present invention;
图16为本发明所述双八边形组合式结构的重复做指令模块的示意图;16 is a schematic diagram of a repeating instruction module of the double octagon combined structure according to the present invention;
图17为本发明所述双八边形组合式结构的马达运行模块指令的平行选择机构的示意图;17 is a schematic diagram of a parallel selection mechanism of a motor running module command of the double octagonal combined structure according to the present invention;
图18为本发明所述指令模块之间的连接示意图;Figure 18 is a schematic diagram of the connection between the instruction modules of the present invention;
图19为本发明所述实物化编程方法的流程图;19 is a flowchart of a physical programming method according to the present invention;
图20为本发明所述条件类指令模块示意图;图20a—如果判断指令,图20b—重复做指令,,图2c—等待条件满足;20 is a schematic diagram of a conditional instruction module according to the present invention; FIG. 20a - if the instruction is judged, FIG. 20b - repeats the instruction, and FIG. 2c - the waiting condition is satisfied;
图21为本发明所述延时类指令模块示意图;21 is a schematic diagram of a delay type instruction module according to the present invention;
图22为本发明所述音乐输出类指令模块示意图;22 is a schematic diagram of a music output type instruction module according to the present invention;
图23为本发明示例所述巡迹机器人专用的指令模块的示意图;其中图23a—机器人前进 指令,图23b—机器人左转指令,图23c—机器人右转指令,图23d—机器人后退指令,图23e—机器人停止指令;23 is a schematic diagram of an instruction module dedicated to a patrol robot according to an example of the present invention; wherein FIG. 23a - the robot advances Command, Figure 23b - Robot left turn command, Figure 23c - Robot right turn command, Figure 23d - Robot back command, Figure 23e - Robot stop command;
图24为本发明的实物指令模块内部指令ID存储原理图;图24a为芯片加编码的开关方式存储指令ID,图24b是单片机加存储器的方式方存储指令ID;24 is a schematic diagram of the internal instruction ID storage of the physical instruction module of the present invention; FIG. 24a is a switch mode storage instruction ID of the chip plus coding, and FIG. 24b is a mode storage instruction ID of the single chip plus the memory;
图25为本发明示例巡迹机器人与黑线关系框图;Figure 25 is a block diagram showing the relationship between an example patrol robot and a black line according to the present invention;
图26为本发明示例巡迹机器人运行程序流程图;26 is a flow chart of a running program of an exemplary patrol robot of the present invention;
图27为本发明示例巡迹机器人用实物化逻辑程序;Figure 27 is a physical logic program for an exemplary patrol robot of the present invention;
图28为本发明所述主控板内部组成以及其与实物编程指令模块的连接的结构图;28 is a structural diagram of the internal composition of the main control board of the present invention and its connection with the physical programming instruction module;
图29为本发明所述装载程序工作原理流程图;Figure 29 is a flow chart showing the working principle of the loading program of the present invention;
图30为本发明所述主控板解析程序工作原理流程图。FIG. 30 is a flow chart showing the working principle of the main control board parsing program according to the present invention.
其中,图中所示标记的含义为:1-外壳,2-线路板,3-并行选择机构,11-盖帽,12-“公头”,13-“母头”,14-磁片,21-输出端,22-输入端。The meanings of the marks shown in the figure are: 1-shell, 2-circuit board, 3-parallel selection mechanism, 11-cap, 12-"male", 13-"female", 14-magnet, 21 - Output, 22-input.
具体实施方式detailed description
下面结合具体实例和附图对本发明技术方案作进一步说明。所举的实施例仅是对本发明产品或方法作概括性例示,有助于更好地理解本发明。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明技术原理的前提下,还可以作出若干改进和变型,这些改进和变型也应该视为落在本发明的保护范围之内。具体详述如下:The technical solution of the present invention will be further described below with reference to specific examples and drawings. The examples are merely illustrative of the products or methods of the present invention and are intended to provide a better understanding of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention. These improvements and modifications should also be considered to fall within the scope of the present invention. . The details are as follows:
实物化编程的指令模块:Instruction module for materialized programming:
如图1所示,本发明所述实物化编程的指令模块主体结构包括:外壳1以及置于外壳内部的线路板2,外壳的侧面设有接口(“公口”12,“母口”13),线路板的输出和输入端设置在接口内。上述指令模块的外壳的形状一般为多边形或圆形,优选六角形或八角形对称结构,便于加工和编程连接;如图2a~图2d所示,该指令模块的外壳的形状可以单个设置的八角形也可以是双八角形或多八角形等组合式结构;而且,接口与接口之间主要是保证电连接,连接方式有“磁碰式”、“弹簧针式”、“弹片式”,此外,接口还可以使用USB接口、RJ11、RJ12、RJ45等能够保证电连接和结构连接的接口,但是从外观和牢固可靠等多方面的考虑,优选为“磁碰式”、“弹簧针式”、“弹片式”的连接;其中,信号输出的接口结构上通常采用“公口”,信号输入的接口结构上通常采用“母口”;根据实物模块所代表的指令类型和具体内容,实物模块的接口形式有很多,但是,每个实物模块至少有一个“公口”,“母口”可以有一个或多个,一些“赋值”或“条件上”模块也可以没有“母口”。需要说明的是,“公口”与“母口”的描述是相对的,也可以颠倒过来,重点是每个实物模块的输出端至少有一个,输入端根据模块需求,可以有一个或多个,甚至没有。 As shown in FIG. 1, the main body structure of the instruction module of the physical programming according to the present invention comprises: a casing 1 and a circuit board 2 disposed inside the casing, and an interface is provided on a side of the casing ("public mouth" 12, "female port" 13 ), the output and input of the board are set in the interface. The shape of the outer casing of the above instruction module is generally polygonal or circular, preferably hexagonal or octagonal symmetrical structure, which is convenient for processing and programming connection; as shown in FIG. 2a to FIG. 2d, the shape of the outer casing of the instruction module can be set individually. The angle shape may also be a combined structure such as double octagon or multi-octagon; and the connection between the interface and the interface is mainly to ensure electrical connection, and the connection manner is "magnetic touch type", "spring pin type", "spring piece type", The interface can also use the USB interface, RJ11, RJ12, RJ45 and other interfaces that can ensure electrical connection and structural connection, but from the aspects of appearance, firmness and reliability, etc., it is preferably "magnetic touch type", "spring pin type", "shrap-type" connection; among them, the interface structure of the signal output usually adopts "public port", and the interface structure of the signal input usually adopts "female port"; according to the type and specific content of the instruction represented by the physical module, the physical module There are many interface forms, but each physical module has at least one "public port", and the "female port" can have one or more, some "assignment" or "article" The module can also have no "mother port". It should be noted that the descriptions of “public port” and “mother port” are relative and can be reversed. The focus is that there is at least one output of each physical module. The input terminal can have one or more according to the module requirements. Not even.
进一步地,前述指令模块内可设置有选择机构,可满足指令模块内并行指令、输入/输出口以及值与变量的选择。所述并行指令包括多条条件指令的选择,系列化执行指令的选择(如延迟时间、前进时间、后退时间、发声时间、动作时间等);如图3~图5所示,指令模块的选择机构有:拨档开关,旋钮开关,按压开关等。然而,当指令的选择比较多时,“拨档开关”式的选择机构可以是“拨档开关”的组合形式:如图3a所示,为一个竖排的2选1拨档开关与一个横排的4选1拨档开关的组合,当竖排的拨档开关拨到上面时,就可从横排1,2,3,4指令中选择一种,若竖排的开关拨到下面,则从5,6,7,8中选择一种;如图3b所示,则是为一竖排的3选1拨档开关与横排3选1拨档开关的组合,指令的选择则有9种,以此类推,可有10种、12种、15种等多种指令的选择。其中,旋钮开关可以是一种多选一的开关,另一种是8421编码旋转开关(如图4所示)。另外,如图6所示,一个指令模块的选择机构可以有多个“拨档开关”、“旋钮开关”或“按压开关”,也可以是“拨档开关”,“旋钮开关”,“按压开关”中的两种或三种的组合。优选地,拨档开关和旋钮开关在各档位位置的表面附有固定式指示说明,按压开关则为“8”字式动态指示说明,具体显示数字随按压的次数而变化,如图5所示,实物模块因内置有两根数码管,有两个按压开关,每个开关具有上下两个按钮,向上按钮为上调数字,向下按钮为下调数字,通过按压改变两边数字来选择指令。Further, a selection mechanism may be disposed in the foregoing instruction module to satisfy parallel command, input/output port, and selection of values and variables in the instruction module. The parallel instruction includes selection of a plurality of conditional instructions, serialization of execution instruction selection (such as delay time, forward time, back time, utterance time, action time, etc.); as shown in FIG. 3 to FIG. 5, selection of an instruction module The mechanism has: a dial switch, a knob switch, a push switch, and the like. However, when there are more choices of commands, the "dial switch" type selection mechanism may be a combination of "dial switches": as shown in Fig. 3a, a vertical row of 2 selection 1 dial switches and a horizontal row The combination of the 4 selection and 1 dial switch can select one of the horizontal 1, 2, 3, 4 commands when the vertical shift switch is turned to the top. If the vertical switch is turned to the bottom, then Choose one of 5, 6, 7, 8; as shown in Figure 3b, it is a combination of a vertical 3-switch 1 switch and a horizontal 3-to-1 switch. The command selection is 9 Kinds, and so on, there are 10, 12, and 15 types of instructions. Among them, the knob switch can be a multi-select switch, and the other is the 8421 code rotary switch (as shown in Figure 4). In addition, as shown in FIG. 6, the selection mechanism of one command module may have multiple "dial switches", "knob switches" or "push switches", or may be "dial switches", "knob switches", "presses" Two or three combinations of switches. Preferably, the dial switch and the knob switch are provided with a fixed indication on the surface of each gear position, and the push switch is an "8" type dynamic indication, and the specific display number varies with the number of pressing, as shown in FIG. The physical module has two digital tubes and two push switches. Each switch has two buttons, the up button is the up number, the down button is the down number, and the two sides are pressed to select the command.
实施例1Example 1
如图7~图10为本发明所述一种单八边形的指令模块示例图,该模块具有外壳1,线路板2置于外壳1内,平行选择机构3设置于线路板2上,外壳11上具有与其相匹配的开关盖帽11。外壳1的两侧面设置有接口,此模块的接口主要采用“弹簧针式”辅以“磁碰式”连接方式,接口又分为“公口”12与“母口”13,所述“公口”12与线路板2的输出端21相连,“母口”13与线路板2的输入端22相连,此“公口”与“母口”的连接方式能够保证指令模块之间的电连接;另外,“公口”与“母口”的两侧各设置有磁片14用于吸住并固定模块的连接。7 to FIG. 10 are diagrams showing an example of a single octagonal command module having a housing 1 in which a circuit board 2 is placed, and a parallel selection mechanism 3 disposed on the circuit board 2, and a housing 11 has a switch cap 11 that matches it. The two sides of the outer casing 1 are provided with an interface, and the interface of the module mainly adopts a "spring pin type" supplemented by a "magnetic touch type" connection mode, and the interface is further divided into a "public mouth" 12 and a "female port" 13, the "public The port "12" is connected to the output end 21 of the circuit board 2, and the "female port" 13 is connected to the input end 22 of the circuit board 2. The connection between the "public port" and the "female port" can ensure the electrical connection between the command modules. In addition, a magnetic piece 14 is provided on both sides of the "public port" and the "female port" for sucking and fixing the connection of the module.
所述线路板2上还设有选择机构3,本实施例中该选择机构3为拨档开关。如图11为单八边形结构的打开/关闭输出口指令的选择机构示意图,它具有Out1、Out2、Out3、Out4四个拨档开关,且各有上下两档,往上拨表示开启该端口,往下拨表示关闭该端口,如图11所示的拨档位置表示:Out1、Out2、Out3、Out4四个输出口同时开启,可输出信号。如图12为单八边形结构的延时类指令的选择机构的示意图,它具有0.1s、0.5s、1s、5s四个档的拨档开关,当开关拨到0.1s档时,此指令模块表示延时0.1s的指令。以此类推,可以有多个输出口并行指令模块啊,多种音乐并行响起指令模块、多个输入口并行指令模块等等都是同样的原理。 The circuit board 2 is further provided with a selection mechanism 3. In the embodiment, the selection mechanism 3 is a dial switch. FIG. 11 is a schematic diagram of a selection mechanism of an open/close output port command of a single octagonal structure, which has four shift switches of Out1, Out2, Out3, and Out4, and each has two upper and lower gears, and the upward dialing indicates that the port is opened. To dial down, the port is closed. The position of the dial as shown in Figure 11 indicates that the four output ports Out, Out2, Out3, and Out4 are simultaneously turned on to output a signal. FIG. 12 is a schematic diagram of a selection mechanism of a delay type instruction of a single octagonal structure, which has a shift switch of four stages of 0.1 s, 0.5 s, 1 s, and 5 s. When the switch is set to 0.1 s, the command is The module represents an instruction with a delay of 0.1 s. By analogy, there can be multiple output port parallel command modules, a variety of music parallel command modules, multiple input port parallel command modules, and so on are the same principle.
实施例2Example 2
参见图13~图15,具为本发明所述双八边形组合式结构的指令模块示例图,该模块具有外壳1,线路板2置于外壳1内,平行选择机构3设置于线路板2上,外壳上具有与其相匹配的开关盖帽11。外壳1的侧面设置有接口,此实施例主要采用“弹簧针式”辅以“磁碰式”连接,接口又分为“公口”12与“母口”13,所述“公口”12与线路板2的输出端21相连,“母口”13与线路板2的输入端22相连,此“公口”与“母口”的连接方式能够保证指令模块之间的电连接;另外,“公口”与“母口”的两侧各设置有磁片14用于吸住并固定模块的连接。由上述可知,每个实物模块至少有一个“公口”,“母口”可以有一个或多个,一些“赋值”或“条件上”模块也可以没有“母口”,图13~图15所示的双八边形的指令模块就具有三个“母口”。13 to FIG. 15 are diagrams showing an example of an instruction module of the double octagonal combined structure according to the present invention. The module has a casing 1 in which the circuit board 2 is placed, and the parallel selection mechanism 3 is disposed on the circuit board 2. Upper, the housing has a switch cap 11 that matches it. The side of the outer casing 1 is provided with an interface. This embodiment mainly adopts a "spring pin type" supplemented by a "magnetic touch type" connection, and the interface is further divided into a "public mouth" 12 and a "female port" 13, and the "public mouth" 12 Connected to the output end 21 of the circuit board 2, the "female port" 13 is connected to the input end 22 of the circuit board 2, and the connection between the "public port" and the "female port" can ensure the electrical connection between the command modules; A magnetic piece 14 is provided on both sides of the "public mouth" and the "female port" for sucking and fixing the connection of the module. As can be seen from the above, each physical module has at least one "public port", and the "female port" may have one or more. Some "assignment" or "conditional" modules may also have no "mother port", and Figures 13-15 The illustrated double octagon command module has three "female ports".
上述线路板2上设置有选择机构3,虽然图中只画了一个,但这只是示范,需要明白的是其选择机构不仅仅只有一个,根据需要它可以设置有多个选择机构。如图16为八边形组合式结构的重复做指令模块的示意图,其可通过中间的拨档开关选择循环次数,所示箭头为指令信号输出/输入的方向;例如,图中所示拨档位置表示此指令模块具有无限循环功能。如图17为双八边形组合式结构的马达运行模块指令的选择机构的示意图,如图15的拨档表示运行对象左边与右边马达都是正方位高速运行。The circuit board 2 is provided with a selection mechanism 3, although only one is shown in the figure, but this is only an example. It is to be understood that there is not only one selection mechanism, but it may be provided with a plurality of selection mechanisms as needed. Figure 16 is a schematic diagram of the repeated instruction module of the octagonal combined structure, which can select the number of cycles through the middle dial switch, the arrow shown is the direction of the command signal output/input; for example, the dial shown in the figure The position indicates that this command module has an infinite loop function. FIG. 17 is a schematic diagram of a selection mechanism of a motor running module command of a double octagonal combined structure. The dialing of FIG. 15 indicates that both the left and right motors of the running object are in a high-speed running in a positive direction.
如图18所示,上述实施例中所述指令模块在使用时,按照图中所示方式连接各指令模块。As shown in FIG. 18, when the instruction module in the above embodiment is used, each instruction module is connected in the manner shown in the figure.
由上述可知,本发明所述实物化编程指令模块对称结构合理,使外壳加工方便,模块结构组装快捷;接口连接方式可靠,编程时模块之间可以随意、快速连接或拆卸,满足编程的各种要求。It can be seen from the above that the symmetrical structure of the physical programming instruction module of the invention is reasonable, the shell processing is convenient, the module structure is assembled quickly, the interface connection mode is reliable, and the modules can be freely and quickly connected or disassembled during programming to meet various programming requirements. Claim.
实物化编程的编程方法及其在机器人领域的应用:The programming method of material programming and its application in the field of robotics:
如图19为本发明的实物化编程方法的流程图,其具体步骤为:FIG. 19 is a flowchart of a physical programming method according to the present invention, and the specific steps are as follows:
(1)搭建带有主控板的运行对象,该运行对象可以是巡迹机器人,扫地机器人等可以实现程序运行的任何运行对象。(1) Build a running object with a main control board, which may be a running robot, a sweeping robot, etc., which can implement any running object of the program.
如图27中所示,主控板内部具有CPU、存储器、输入/输出口,具有装载实物编程模块的程序、解析程序、执行程序的功能。其中,In接口用于连接各种输入,如传感器(按键、光电传感器、声音传感器、红外传感器、超声波传感器等等)、音乐U盘、机械手,马达等;Motor接口用于连接直流电机;Out接口用于连接各种输出,比如:LED灯、扬声器、舵机、继电器、网络等等。As shown in FIG. 27, the main control board has a CPU, a memory, and an input/output port therein, and has a function of loading a program of the physical programming module, analyzing the program, and executing the program. Among them, In interface is used to connect various inputs, such as sensors (buttons, photoelectric sensors, sound sensors, infrared sensors, ultrasonic sensors, etc.), music U disk, robot, motor, etc.; Motor interface is used to connect DC motor; Out interface Used to connect various outputs such as LED lights, speakers, servos, relays, networks, etc.
(2)选取前述合适的实物编程指令模块搭建线性或网络状的实物化逻辑程序;(2) selecting the appropriate physical programming instruction module to construct a linear or networked physical logic program;
所述编程指令包括条件控制类指令、延时类指令、传感器类指令和其他指令。如图20所 示为条件控制类指令,该类指令又包括:The programming instructions include conditional control instructions, delay type instructions, sensor type instructions, and other instructions. As shown in Figure 20 Shown as conditional control class instructions, which in turn include:
图20a为如果判断指令:图中拨档位置表示,如果In1输入口有信号则条件满足,执行条件满足的下一条指令否则条件不满足,执行条件不满足的下一条指令;Figure 20a is the following instruction if the judgment command: the dial position is indicated in the figure, if the In1 input port has a signal, the condition is satisfied, the next instruction whose execution condition is satisfied, otherwise the condition is not satisfied, and the execution condition is not satisfied;
图20b为重复做指令:图中拨档开关可选择循环次数,当满足该循环次数时条件满足,执行条件满足的下一条指令,否则,跳出循环条件;Figure 20b is a repeated instruction: the dial switch in the figure can select the number of cycles, when the number of cycles is satisfied, the condition is satisfied, the next instruction that the execution condition is satisfied, otherwise, the loop condition is jumped out;
图20c为等待条件满足指令:此等待条件满足指令可与上述条件指令配合使用,一直等待直到In1输入口有信号输入,继续执行下一条指令;Figure 20c is a wait condition fulfillment instruction: the wait condition satisfaction instruction can be used in conjunction with the above conditional instruction, and waits until the In1 input port has a signal input, and continues to execute the next instruction;
图21为延时指令示意图:图21a为延时X秒A的指令模块示意图,延时时间值可通过拨档开关选择0.1s、0.5s、1s、5s;图21b为延时X秒B的指令模块示意图,延时时间值可通过拨档开关选择0.01s、0.05s、0.031s、0.05s。图22为音乐类指令模块示意图:图22a为音乐响起指令模块,有问候、报警、欢快、机器人之舞四个音乐选择,通过该指令可控制运行对象输出音乐,相对的,还有音乐停止指令模块(如图22b)Figure 21 is a schematic diagram of the delay command: Figure 21a is a schematic diagram of the instruction module with a delay of X seconds A. The delay time value can be selected by the dial switch for 0.1s, 0.5s, 1s, 5s; Figure 21b is the delay X seconds B Schematic diagram of the command module, the delay time value can be selected by the dial switch for 0.01s, 0.05s, 0.031s, 0.05s. 22 is a schematic diagram of a music-like instruction module: FIG. 22a is a music ringing command module, and has four music selections of greeting, alarm, joy, and robot dance. The instruction can control the running object to output music, and the music stop instruction is relatively Module (Figure 22b)
然而,根据实际编程的需要还会有其它扩展的指令。例如根据巡迹机器人运行的特点,则需要有机器人专用的运行指令,如图25:However, there are other extended instructions depending on the actual programming needs. For example, according to the characteristics of the running robot, a robot-specific running command is required, as shown in Figure 25:
机器人前进指令(图23a):机器人以系统设定的固定速度前进。完事后,然后执行下一条指令。Robot advance command (Fig. 23a): The robot advances at a fixed speed set by the system. When you are done, then execute the next instruction.
机器人左转指令(图23b):机器人以系统设定的固定速度左转。完事后,然后执行下一条指令。Robot left turn command (Fig. 23b): The robot turns left at a fixed speed set by the system. When you are done, then execute the next instruction.
机器人右转指令(图23c):机器人以系统设定的固定速度右转,完事后,然后执行下一条指令。Robot right turn command (Fig. 23c): The robot turns right at the fixed speed set by the system. After the completion, the next command is executed.
机器人后退指令(图23d):机器人以系统设定的固定速度后退。完事后,然后执行下一条指令。Robot back command (Fig. 23d): The robot moves backward at a fixed speed set by the system. When you are done, then execute the next instruction.
机器人停止指令(图23e):机器人停止。完事后,然后执行下一条指令。Robot stop command (Fig. 23e): The robot stops. When you are done, then execute the next instruction.
以上所述编程指令实物化后的实体——实物化编程指令模块(如图1~图18所示),前述将指令进行模块化分区,有利于之后对实物化编程指令模块的理解和使用。此外,每个实物化编程指令模块内部含有一个单片机或芯片,每个指令模块通过拨码开关或者存储器存储为每一个指令模块标识的一个唯一的ID,模块内部ID存储原理如图24所示:图24a是以芯片加编码的开关方式,储存编程积木模块的唯一ID;图24b是以单片机加存储器的方式,用EEPROM存储器储存编程积木模块唯一ID。The physicalized programming instruction module (shown in FIG. 1 to FIG. 18) of the above-mentioned programming instruction materialization, the foregoing modularizing the instructions, facilitates the subsequent understanding and use of the physical programming instruction module. In addition, each physical programming instruction module internally contains a single chip or a chip, and each instruction module stores a unique ID identified by each instruction module through a dial switch or a memory. The internal ID storage principle of the module is as shown in FIG. 24: Figure 24a is a chip-encoded switching mode, storing the unique ID of the programming building block; Figure 24b is a single-chip plus memory, using EEPROM memory to store the unique ID of the programming block module.
(3)连接实物化逻辑程序与主控板;(3) connecting the physical logic program and the main control board;
(4)如图28为实物化逻辑程序与主控板的连接以及主控板内部功能结构示意图,主控板与实物化逻辑程序的第一个实物编程模块相连接。启动主控板内的装载程序把实物化逻辑 程序装载到主控板的存储器中;(4) Figure 28 shows the connection between the physical logic program and the main control board and the internal functional structure of the main control board. The main control board is connected to the first physical programming module of the physical logic program. Start the loader in the main control board to turn the materialization logic The program is loaded into the memory of the main control board;
装载程序位于主控模块内,当按下装载按键后,就会启动主控板内的装载程序,然后装载程序通过电路信号,从第一个连接的实物化编程模块开始,依次读取每一个实物化编程指令模块内的ID及其连接顺序,并将读取到的实物化编程模块的ID网络连接关系存储到CPU存储器中。如图28为装载程序工作原理流程图,其工作原理如下:①读取第一个模块中的唯一ID;②依次下发指令选取第一个模块中的每一个端口作为下一步要读取的对象,并读取每一个端口对应的下一个模块的唯一ID;③按照上一步骤的方法,通过递归算法依次读取下一级连接的各个模块的唯一ID,直到读完整个被连接的所有模块的唯一ID。The loading program is located in the main control module. When the loading button is pressed, the loading program in the main control board is started, and then the loading program passes the circuit signal, starting from the first connected physical programming module, and sequentially reading each one. The ID of the programming instruction module and its connection order are stored, and the ID network connection relationship of the read physical programming module is stored in the CPU memory. Figure 28 is a flow chart of the working principle of the loading program. The working principle is as follows: 1 read the unique ID in the first module; 2 issue the instructions in turn to select each port in the first module as the next step to read. Object, and read the unique ID of the next module corresponding to each port; 3 according to the method of the previous step, sequentially read the unique ID of each module connected to the next level through the recursive algorithm until all the connected ones are read The unique ID of the module.
(5)主控板内CPU解析程序并判断程序是否正确;(5) The CPU in the main control board parses the program and determines whether the program is correct;
如图30为主控板解析程序工作原理流程图,主控板内的CPU识别存储器中装载的指令ID并按照各个指令执行程序逻辑。As shown in FIG. 30, the CPU of the main control board recognizes the instruction ID loaded in the memory and executes the program logic according to each instruction.
(6)如果程序正确,则执行程序,并验证程序的执行是否正确;否则,对应出错的实物化编程指令模块的红色LED灯就会亮起,修改搭建后的实物化逻辑程序,返回上述步骤(3)继续,直到正确为止;(6) If the program is correct, execute the program and verify that the program is executed correctly; otherwise, the red LED of the physical programming command module corresponding to the error will light up, modify the constructed physical logic program, and return to the above steps. (3) continue until it is correct;
(7)如果运行对象运行正确,就结束任务;否则,移动和更换实物编程指令模块来修改程序后继续上述步骤(3),直到运行对象运行正确为止。(7) If the running object runs correctly, the task ends; otherwise, move and replace the physical programming command module to modify the program and continue with the above step (3) until the running object runs correctly.
此外,本发明上述的实物化编程方法可以应用于机器人领域,下面结合示例巡迹机器人(以沿黑线行走的机器人为例)对此作进一步地说明:In addition, the above-described physical programming method of the present invention can be applied to the field of robots, and is further explained below with reference to an example patrol robot (for example, a robot walking along a black line):
(1)构思与设计将要搭建的巡迹机器人:如图25,在机器人沿黑线行走的运动中,机器人与黑线之间一共有五种情况,分别是:机器人完全在线上、机器人左偏、机器人右偏、机器人完全左偏、机器人完全右偏,需要根据不同情况来编程。(1) Conception and design The patrol robot to be built: As shown in Fig. 25, in the movement of the robot along the black line, there are five situations between the robot and the black line, namely: the robot is completely online, and the robot is left. The robot is right-biased, the robot is completely left-biased, and the robot is completely right-handed. It needs to be programmed according to different situations.
(2)搭建巡迹机器人,内置主控板以及红外线传感器:要实现一个沿黑线走的机器人,则需要在这个机器人的下面安装两个红外线传感器,左右两个,正好骑在黑线上,用于检测是否有黑线,有黑线则反馈为1,无则反馈为0,该巡迹机器人主控板有两个输入口,左侧红外线接在主控板的In1输入口,右侧红外线接在主控板的In2输入口上。(2) Build a patrol robot, built-in main control board and infrared sensor: To realize a robot walking along the black line, you need to install two infrared sensors under the robot, two left and right, just riding on the black line. It is used to detect whether there is a black line. If there is a black line, the feedback is 1 and if there is no feedback, the feedback signal is 0. The main control board of the patrol robot has two input ports, and the left side infrared ray is connected to the In1 input port of the main control board. Infrared is connected to the In2 input of the main control board.
(3)根据巡迹机器人的特点,选取合适的实物化编程指令模块来搭建逻辑程序;(3) According to the characteristics of the patrol robot, select the appropriate physical programming command module to build the logic program;
根据沿黑线机器人的特点,为使其保持在黑线内行走,其装备的红外线传感器与机器人的行动有如图26的逻辑关系:在机器人沿黑线活动中,当机器人左侧检测到有黑线时,右侧也检测到黑线,则停止返回重新检测左侧红外线,没有则左转并返回重新检测左侧;当机器人左侧没有检测到黑线,右侧检测到黑线则右转返回重新检测左侧,没有则前进并返回重新检测左侧;通过此逻辑关系就能够实现使机器人沿黑线行走。According to the characteristics of the robot along the black line, in order to keep it walking in the black line, the infrared sensor of the equipment and the action of the robot have a logical relationship as shown in Fig. 26: when the robot moves along the black line, when the left side of the robot detects black When the line is detected, the black line is also detected on the right side, then it stops returning and re-detects the left side infrared ray. If not, it turns left and returns to re-detect the left side. When the left side of the robot does not detect the black line, the right side detects the black line and turns right. Return to re-detect the left side, if not, go forward and return to re-detect the left side; this logical relationship enables the robot to walk along the black line.
根据此逻辑关系需要选取合适的实物化指令模块(巡迹机器人专用的执行指令、条件指 令、循环指令等),通过指令模块得拼接来搭建程序,如图27所示,搭建在一起的实物化指令模块就是巡迹机器人的实物化逻辑程序,其中,如果1条件指令模块是对In1输入口上的传感器1的信号进行判断,如有信号则条件满足,执行条件满足接口的下一条指令,否则,执行条件不满足接口的下一条指令;如果2条件指令模块是对In1输入口上的传感器2的信号进行判断,如有信号则条件满足,执行条件满足接口的下一条指令,否则,执行条件不满足接口的下一条指令。According to this logical relationship, it is necessary to select a suitable physical instruction module (the execution instruction and condition of the patrol robot) Orders, loop instructions, etc., through the instruction module to splicing to build the program, as shown in Figure 27, the physical instruction module built together is the physical logic program of the patrol robot, wherein if the 1 conditional instruction module is to In1 The signal of the sensor 1 on the input port is judged. If there is a signal, the condition is satisfied, and the execution condition satisfies the next instruction of the interface. Otherwise, the execution condition does not satisfy the next instruction of the interface; if the 2 conditional instruction module is the sensor on the input port of the In1 The signal of 2 is judged. If there is a signal, the condition is satisfied, and the execution condition satisfies the next instruction of the interface. Otherwise, the execution condition does not satisfy the next instruction of the interface.
(4)连接实物化逻辑程序与巡迹机器人内的主控板,启动主控板内的装载程序将程序下载到主控板的存储器中;(4) connecting the physical logic program and the main control board in the patrol robot, starting the loading program in the main control board to download the program to the memory of the main control board;
如图28,第一个指令模块与主控板相连接,装载程序位于主控模块内,当按下装载按键后,系统就会启动装载程序,然后装载程序通过电路信号,从第一个连接的实物编程指令模块开始,依次读取每一个指令模块中的ID,同时把读取到的实物编程指令模块的网络连接关系存储到CPU存储器中。下表为ID与指令之间的对应关系:As shown in Figure 28, the first command module is connected to the main control board, and the load program is located in the main control module. When the load button is pressed, the system starts the load program, and then loads the program through the circuit signal from the first connection. The physical programming instruction module starts, sequentially reads the ID in each instruction module, and stores the network connection relationship of the read physical programming instruction module into the CPU memory. The following table shows the correspondence between ID and instructions:
Figure PCTCN2016078280-appb-000001
Figure PCTCN2016078280-appb-000001
(5)机器人运行:主控板内的CPU识别存储器中装载的指令ID并控制机器人执行上述程序。(5) Robot operation: The CPU in the main control board recognizes the instruction ID loaded in the memory and controls the robot to execute the above program.
上述巡迹机器人只是一个简单的典型示例,根据本发明所述技术方案,可运用更多更复杂的实物化指令模块来搭建更加庞大的实物化程序。 The above-mentioned patrol robot is only a simple typical example. According to the technical solution of the present invention, more and more complex physical instruction modules can be used to build a larger physical materialization program.

Claims (15)

  1. 实物化编程的指令模块,其特征在于:该模块主体结构包括外壳以及置于外壳内部的线路板,外壳的侧面设有接口,线路板的输出和输入端设置在接口内。The instruction module of the materialized programming is characterized in that: the main structure of the module comprises a casing and a circuit board placed inside the casing, and an interface is arranged on a side of the casing, and an output and an input end of the circuit board are disposed in the interface.
  2. 根据权利要求1所述的实物化编程的指令模块,其特征在于:所述外壳的形状为单个六角形、八角形或圆形的对称结构,或者多个六角形、八角形或圆形的组合结构。The instruction module of the materialized programming according to claim 1, wherein the outer casing has a single hexagonal, octagonal or circular symmetrical structure, or a plurality of hexagonal, octagonal or circular combinations. structure.
  3. 根据权利要求1或2所述的实物化编程的指令模块,其特征在于:所述线路板上设置有选择机构,可满足并行指令、输入/输出口以及值与变量的选择。The instruction module of the materialized programming according to claim 1 or 2, wherein the circuit board is provided with a selection mechanism for satisfying parallel commands, input/output ports, and selection of values and variables.
  4. 根据权利要求3所述的实物化编程的指令模块,其特征在于:所述并行指令包括多条条件指令和系列化执行指令;所述选择机构包括拨档开关、旋钮开关和按压开关这三种方式中的一种或多种。The instruction module of the physical programming according to claim 3, wherein the parallel instruction comprises a plurality of conditional instructions and a serialized execution instruction; the selection mechanism comprises a dial switch, a knob switch and a push switch. One or more of the ways.
  5. 根据权利要求4所述的实物化编程的指令模块,其特征在于:所述拨档开关式的选择机构是多种多选一的拨档开关的组合。The instruction module of the materialized programming according to claim 4, wherein the dial switch type selection mechanism is a combination of a plurality of multiple selected ones.
  6. 根据权利要求4所述的实物化编程的指令模块,其特征在于:所述旋钮开关有两种,一种是多选一开关,一种是8421编码旋钮开关。The instruction module of the materialized programming according to claim 4, wherein the rotary switch has two types, one is a multi-select switch, and the other is an 8421 coded rotary switch.
  7. 根据权利要求4所述的实物化编程的指令模块,其特征在于:所述拨档开关和旋钮开关在各档位位置的表面附有固定式指示说明,所述按压开关则为“8”字式动态指示说明,具体显示数字随按压的次数而变化。The instruction module of the materialized programming according to claim 4, wherein the dial switch and the knob switch are provided with a fixed indication on the surface of each gear position, and the push switch is "8". The dynamic indication indicates that the specific display number varies with the number of presses.
  8. 根据权利要求1所述的实物化编程的指令模块,其特征在于:所述接口有磁碰式、弹簧针式、弹片式的接口,另还有USB接口,RJ11、RJ12、RJ45接口。The instruction module of the materialized programming according to claim 1, wherein the interface has a magnetic touch type, a spring pin type, a spring type interface, and a USB interface, an RJ11, an RJ12, and an RJ45 interface.
  9. 根据权利要求8所述的实物化编程的指令模块,其特征在于:所述连接方式在信号输出的接口结构上采用公口,信号输入的接口结构上采用母口。The instruction module of the materialized programming according to claim 8, wherein the connection mode adopts a male port on the interface structure of the signal output, and the interface structure of the signal input adopts a female port.
  10. 根据权利要求9所述的实物化编程的指令模块,其特征在于:每个实物模块至少有一个公口,母口可以有一个或多个,一些赋值或条件上模块也可以没有母口。The instruction module of the materialized programming according to claim 9, wherein each physical module has at least one male port, and the female port may have one or more, and some of the assigned or conditionally the modules may also have no female port.
  11. 一种实物化编程的编程方法,其特征在于其步骤为:A programming method of materialized programming, characterized in that the steps are:
    (1)搭建带有主控板的运行对象;(1) Build a running object with a main control board;
    (2)选取权利要求1至10任意一项所述的实物编程指令模块搭建线性或网络状连接的实物化逻辑程序;(2) selecting the physical programming instruction module according to any one of claims 1 to 10 to construct a physical or logical connection of the physical or logical connection;
    (3)连接实物化逻辑程序与主控板;(3) connecting the physical logic program and the main control board;
    (4)启动主控板内的装载程序把实物化逻辑程序装载到主控板的存储器中;(4) Start the loading program in the main control board to load the physical logic program into the memory of the main control board;
    (5)主控板内CPU解析并检测实物化逻辑程序是否正确;(5) The CPU in the main control board parses and detects whether the physical logic program is correct;
    (6)如果程序正确,则执行程序,并验证程序的执行是否正确;如果程序不正确,则向 错误的实物编程指令模块反馈信息,修改搭建后的实物化逻辑程序,返回上述步骤(3)继续,直到正确为止;(6) If the program is correct, execute the program and verify that the program is executed correctly; if the program is incorrect, then The wrong physical programming instruction module feedback information, modify the constructed physical logic program, return to the above step (3) to continue until it is correct;
    (7)如果运行对象运行正确,就结束任务;否则,移动和更换实物编程指令模块来修改程序,继续上述步骤(3),直到运行对象运行正确为止。(7) If the running object runs correctly, the task ends; otherwise, move and replace the physical programming command module to modify the program, continue with the above step (3) until the running object runs correctly.
  12. 根据权利要求11所述的一种实物化编程的编程方法,其特征在于:所述指令模块内部含有一个单片机通过存储器存储为该指令模块标识的一个唯一的ID;或者,所述指令模块内部含有芯片并通过拨码开关存储为该指令模块标识的一个唯一的ID。The programming method of the materialized programming according to claim 11, wherein the instruction module internally comprises a single-chip computer storing, by means of a memory, a unique ID identified by the instruction module; or the instruction module internally contains The chip is stored by the dial switch as a unique ID identified by the command module.
  13. 根据权利要求11所述的一种实物化编程的编程方法,其特征在于:步骤(4)所述的装载程序通过电路信号,从第一个连接的实物编程指令模块开始,依次读取每一个实物编程指令模块中的唯一ID,一并把读取到的实物编程指令模块的线性或网络状连接关系存储到主控板内的存储器中。A programming method of physical programming according to claim 11, wherein the loading program of step (4) sequentially reads each of the first connected physical programming instruction modules by a circuit signal. The unique ID in the physical programming instruction module stores the linear or network connection relationship of the read physical programming instruction module into the memory in the main control board.
  14. 根据权利要求11所述的一种实物化编程的编程方法,其特征在于:步骤(6)所述主控板向错误的指令模块反馈信息的方式优选为:在指令模块上装置LED灯,主控板检测到错误之后输出信号,对应的指令模块上面的LED灯就会亮起。A programming method of physical programming according to claim 11, wherein the manner in which the main control board feeds back information to the wrong instruction module in step (6) is preferably: setting an LED light on the instruction module, the main When the control board detects an error and outputs a signal, the LED on the corresponding command module will light up.
  15. 权利要求11至14任意一项所述的实物化编程的编程方法在机器人领域的应用,其特征在于应用步骤为:The application of the programming method of the materialized programming according to any one of claims 11 to 14 in the field of robots, characterized in that the application steps are:
    (1)构思与设计将要搭建的机器人;(1) conceiving and designing the robot to be built;
    (2)搭建机器人,机器人主体包含主控板、传感器和发声发光模块;(2) Build a robot, the main body of the robot comprises a main control board, a sensor and an audible lighting module;
    (3)根据步骤(1)中所构思的机器人,选取实物编程指令模块来搭建线性或网络状连接的实物化逻辑程序;(3) selecting a physical programming instruction module to construct a physical or logical connection of the physical logic program according to the robot conceived in the step (1);
    (4)将搭建后的实物化逻辑程序与机器人主体内的主控板连接;(4) connecting the constructed physical logic program with the main control board in the robot body;
    (5)启动主控板内的装载程序将实物化逻辑程序下载到主控板存储器中;(5) Start the loading program in the main control board to download the physical logic program to the main control board memory;
    (6)机器人运行:主控板解析并控制机器人执行上述程序。 (6) Robot operation: The main control board parses and controls the robot to execute the above program.
PCT/CN2016/078280 2015-04-02 2016-04-01 Physical programming instruction module and programming method and application thereof in robot field WO2016155660A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201510153330.9A CN104898456B (en) 2015-04-02 2015-04-02 The method of material objectization programming and its application in robot field
CN201510153330.9 2015-04-02
CN201610140066.X 2016-03-11
CN201610140066.XA CN105589341B (en) 2016-03-11 2016-03-11 Instruction module for physical programming

Publications (1)

Publication Number Publication Date
WO2016155660A1 true WO2016155660A1 (en) 2016-10-06

Family

ID=57004755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078280 WO2016155660A1 (en) 2015-04-02 2016-04-01 Physical programming instruction module and programming method and application thereof in robot field

Country Status (1)

Country Link
WO (1) WO2016155660A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708535A (en) * 2017-01-09 2017-05-24 苏州乐派特机器人有限公司 Custom editing system and method applied to entity programming module

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101037901B1 (en) * 2011-03-21 2011-05-30 권대용 Robot system based on tangible programming bricks
CN102136208A (en) * 2011-03-30 2011-07-27 中国科学院软件研究所 Material object programming method and system
CN103456203A (en) * 2013-09-12 2013-12-18 中国科学院软件研究所 Portable physical programming method and system
CN104898456A (en) * 2015-04-02 2015-09-09 赵敬双 Physical programming method and applications of method in robot field
CN105137887A (en) * 2015-09-24 2015-12-09 苏州乐派特机器人有限公司 Materialized programming method based on programming plate and application thereof in robot field

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101037901B1 (en) * 2011-03-21 2011-05-30 권대용 Robot system based on tangible programming bricks
CN102136208A (en) * 2011-03-30 2011-07-27 中国科学院软件研究所 Material object programming method and system
CN103456203A (en) * 2013-09-12 2013-12-18 中国科学院软件研究所 Portable physical programming method and system
CN104898456A (en) * 2015-04-02 2015-09-09 赵敬双 Physical programming method and applications of method in robot field
CN105137887A (en) * 2015-09-24 2015-12-09 苏州乐派特机器人有限公司 Materialized programming method based on programming plate and application thereof in robot field

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708535A (en) * 2017-01-09 2017-05-24 苏州乐派特机器人有限公司 Custom editing system and method applied to entity programming module

Similar Documents

Publication Publication Date Title
CN105137887B (en) The material objectization programmed method of plate and its application in robot field based on programming
CN106528142A (en) Tree-like combined instruction materialized programming method, application and materialized programming module.
CN104898456B (en) The method of material objectization programming and its application in robot field
CN102136208B (en) Material object programming method and system
CN106708535B (en) User-defined editing system and method applied to physical programming module
CN108777100B (en) Programming education system based on tangible programming instruction building blocks
CN106095438A (en) Picture mosaic and image capture analysis is utilized to carry out method and the application thereof of material objectization programming
CN106095096A (en) Utilize the method for block in kind programming and in the application of robot field
CN103197929A (en) System and method for graphical programming facing children
CN105589341B (en) Instruction module for physical programming
CN205867595U (en) Formula programming concatenation module in kind is inhaled to magnetism
CN110585744B (en) Physical programming building block system
WO2016155660A1 (en) Physical programming instruction module and programming method and application thereof in robot field
US11727824B2 (en) System and method for teaching computer programming
WO2019184487A1 (en) Robot control method and device, and robot
CN205600737U (en) Material object programming module of robot dance
CN105242781A (en) Interactive gesture scanning matrix and control method therefor
CN213159402U (en) Programming language materialized building block programming system
US20190227775A1 (en) Mobile robot including programmable input module
CN109830141A (en) A kind of entity command programmed method and entity command programing system
CN205563132U (en) Instruction module of material object programming
CN202096722U (en) Programmable learning robot
IL246551A (en) 3d multi-threaded, parameter layered, physical programming interface
CN109089143A (en) A kind of universal remote controller and its learning control method
CN111803914B (en) Automatic file learning and APP communication read-write method and device for game handle

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16771415

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16771415

Country of ref document: EP

Kind code of ref document: A1