WO2023050231A1 - 用于plc的图形化编程方法及装置 - Google Patents

用于plc的图形化编程方法及装置 Download PDF

Info

Publication number
WO2023050231A1
WO2023050231A1 PCT/CN2021/121956 CN2021121956W WO2023050231A1 WO 2023050231 A1 WO2023050231 A1 WO 2023050231A1 CN 2021121956 W CN2021121956 W CN 2021121956W WO 2023050231 A1 WO2023050231 A1 WO 2023050231A1
Authority
WO
WIPO (PCT)
Prior art keywords
hardware
graphical programming
hardware devices
plc
hardware device
Prior art date
Application number
PCT/CN2021/121956
Other languages
English (en)
French (fr)
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
Application filed by 西门子(中国)有限公司 filed Critical 西门子(中国)有限公司
Priority to CN202180102014.2A priority Critical patent/CN117980985A/zh
Priority to PCT/CN2021/121956 priority patent/WO2023050231A1/zh
Publication of WO2023050231A1 publication Critical patent/WO2023050231A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators

Definitions

  • the invention mainly relates to the field of computer software, in particular to a graphical programming method and device for PLC.
  • the present invention provides a PLC graphical programming method and device, so that the PLC can be quickly reconfigured and is suitable for flexible manufacturing scenarios.
  • the present invention proposes a graphical programming method for PLC, the graphical programming method includes: obtaining the hardware device configuration file and the external action of the hardware device contained in the hardware device configuration file library; determine a plurality of unused hardware devices from the hardware configuration file, and determine actions corresponding to the plurality of unused hardware devices from the external action library; arrange the plurality of unused hardware devices along a first direction A hardware device, each of the standby hardware devices forms a plurality of timing channels along a second direction perpendicular to the first direction; in response to arranging each of the standby hardware devices on the timing channels of each of the standby hardware devices.
  • the actions corresponding to the hardware devices and the flow charts formed by the connection operations of the actions, and the PLC codes corresponding to the flow charts are generated. For this reason, programming with equipment as the basic object can directly understand the actions of each equipment at each point in time, and users can quickly reconfigure equipment and actions, significantly improving the efficiency of reconfiguration.
  • the graphical programming method further includes: displaying the physical interface of the PLC, and converting the physical interface of the PLC into a perspective with hardware devices as objects. Therefore, the user interface with the hardware device as the basic object can be displayed, and the interface information of each hardware device can be intuitively understood.
  • arranging the actions corresponding to each of the hardware devices to be used on the timing channel of each hardware device to be used includes: determining a plurality of time nodes along the second direction, and arranging between the plurality of time nodes Actions corresponding to each hardware device to be used.
  • the actions that each hardware device needs to perform in different time periods can be clearly defined, and the logic of graphical programming can be improved.
  • the graphical programming method further includes: providing a developer tool for editing the hardware configuration file and the external action library.
  • providing a developer tool for editing the hardware configuration file and the external action library is provided.
  • the graphical programming method further includes: detecting preset events of the hardware devices in the flowchart by using each of the hardware devices as objects, recording current events of the hardware devices, and storing the preset events and the current event is fed back to the query for the hardware device. For this reason, managing preset events and current events' implementation of preset events with devices as basic objects can improve the tracking efficiency of device execution events.
  • the present invention also proposes a graphical programming device for PLC, the graphical programming device includes: an acquisition module, which acquires the hardware device configuration file and the external action library of the hardware device contained in the hardware device configuration file; determines A module for determining a plurality of unused hardware devices from the hardware configuration file, and determining actions corresponding to the plurality of unused hardware devices from the external action library; a configuration module for arranging the multiple unused hardware devices along a first direction A hardware device to be used, each of the hardware devices to be used forms a plurality of timing channels along a second direction perpendicular to the first direction; a generating module, in response to the timing channels of each of the hardware devices to be used Arranging the actions corresponding to each of the hardware devices to be used, and the flow chart formed by the connection operation of the actions, and generating the PLC code corresponding to the flow chart.
  • the graphical programming device further includes: displaying the physical interface of the PLC, and converting the physical interface of the PLC into a perspective with hardware devices as objects.
  • arranging actions corresponding to each of the hardware devices to be used on the timing channel of each hardware device to be used includes: determining a plurality of time nodes along the second direction, and at the plurality of times Actions corresponding to each hardware device to be used are arranged between the nodes.
  • the graphical programming device further includes: providing a developer tool for editing the hardware configuration file and the external action library.
  • the graphical programming device further includes: using each of the hardware devices as an object to detect preset events of the hardware devices in the flowchart, recording current events of the hardware devices, and storing the preset events and the current event is fed back to the query for the hardware device.
  • the present invention also proposes an electronic device, including a processor, a memory, and instructions stored in the memory, wherein the instructions implement the method as described above when executed by the processor.
  • the present invention also proposes a computer-readable storage medium on which computer instructions are stored, the computer instructions execute the method according to the above when executed.
  • Fig. 1 is a flow chart of a graphical programming method according to an embodiment of the present invention
  • Fig. 2 is the schematic diagram of a kind of PLC programming system according to an embodiment of the present invention.
  • 3A-3B are schematic diagrams of a user interface in a graphical programming method according to an embodiment of the present invention.
  • Fig. 4 is a schematic diagram of a graphical programming method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another graphical programming method according to an embodiment of the present invention.
  • Fig. 6 is a schematic diagram of a device-based event scheduling management according to an embodiment of the present invention.
  • Fig. 7 is a schematic diagram of a graphical programming device according to an embodiment of the present invention.
  • Fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a graphical programming method 100 according to an embodiment of the present invention. As shown in FIG. 1 , the graphical programming method 100 includes:
  • Step 110 acquiring the hardware device configuration file and the external action library of the hardware device included in the hardware device configuration file.
  • the hardware device configuration file includes configuration files related to each hardware device, such as configuration, etc.
  • hardware devices can be added, deleted or edited, and the external action library includes actions corresponding to these hardware devices. Correspondingly, these Actions can also be added, deleted or edited.
  • FIG. 2 is a schematic diagram of a PLC programming system 200 according to an embodiment of the present invention. As shown in FIG. 2 , the PLC programming system includes a hardware configuration tool 210 , a code editor 240 and an execution engine 250 .
  • the hardware configuration tool 200 includes a hardware configuration module 210A and a device interface configuration module 210B based on a device perspective.
  • the hardware configuration module 210A includes hardware configuration files, which include configuration files related to each hardware device, from which the user can call the required Hardware devices such as robotic arms, drivers, motors, sensors, etc.
  • the device interface configuration module 210B can configure an interface perspective.
  • the graphical programming method further includes: displaying the physical interface of the PLC, and converting the physical interface of the PLC into a perspective with hardware devices as objects.
  • 3A-3B is a schematic diagram of a user interface in a graphical programming method according to an embodiment of the present invention. This function can be implemented in the device interface configuration module 210B in FIG. 2 , and FIG. 3A is a traditional PLC physical interface.
  • Display interface which uses digital signal input interface DI (Digital Input), digital signal output interface DO (Digital Output), analog signal input interface AI (Analog Input) and analog signal output interface AO (Analog Input) as basic objects to display various Interfaces and usage of each interface.
  • DI Digital Input
  • DO Digital Output
  • analog signal input interface AI Analog Input
  • AO Analog Input
  • Figure 3B is a user interface from the perspective of a hardware device, which takes the hardware device as the basic object, and shows the digital signal input interface DI (Digital Input), digital signal output interface DO (Digital Output) used in each hardware device, The information of the analog signal input interface AI (Analog Input) and the analog signal output interface AO (Analog Input).
  • This user interface takes hardware devices as the basic objects, and can intuitively understand the interface information of each hardware device.
  • Step 120 determine multiple hardware devices to be used from the hardware configuration file, and determine actions corresponding to the multiple hardware devices to be used from an external action library.
  • the hardware configuration file includes multiple hardware devices, and multiple hardware devices to be used can be determined from the multiple hardware devices. This step can be realized through user input, for example, the user can select multiple hardware devices to be used through the hardware configuration interface, or Select the preset workflow template, and the workflow template will automatically push the multiple standby hardware devices involved, and the user can also adjust the multiple standby hardware devices that are automatically pushed. Actuators, sensors and cameras. After determining multiple devices to be used, determine the actions corresponding to multiple hardware devices to be used from the external action library, such as selecting the preset track movement of the robotic arm, hovering, rising, falling, etc., and selecting the opening and closing of the end effector. open, close etc.
  • the external action library 220 includes actions of hardware devices, and the user can select an action corresponding to the hardware device to be used from the external action library 220 .
  • the graphical programming method further includes: providing a developer tool for editing the hardware configuration file and the external action library. Referring to FIG. 2, the user can use the developer tool 230 to edit and import the hardware configuration file and the external action library 220 in the hardware configuration module 210A, so as to enrich the hardware devices that can be called and the corresponding actions.
  • Step 130 arrange a plurality of standby hardware devices along a first direction, and each standby hardware device forms a plurality of timing channels along a second direction perpendicular to the first direction.
  • the first direction can be a horizontal direction or a vertical direction
  • each standby hardware device A plurality of timing channels are formed along a second direction perpendicular to the first direction.
  • FIG. 4 is a schematic diagram of a graphical programming method according to an embodiment of the present invention.
  • the hardware devices to be used include hardware device D1, hardware device D2, hardware device D3, hardware device Dn, etc., hardware device D1, hardware device D2, hardware device D3, and hardware device Dn are arranged in sequence along the horizontal direction.
  • Device D1, hardware device D2, hardware device D3, and hardware device Dn form their respective timing channels in the vertical direction, that is, hardware device D1 forms timing channel L1, hardware device D2 forms timing channel L2, and hardware device D3 forms timing channel In the channel L3, the hardware device Dn forms the timing channel Ln.
  • Step 140 In response to arranging the corresponding actions of each standby hardware device on the timing channel of each standby hardware device and the flow chart formed by the connection operation of the actions, generate the PLC code corresponding to the flow chart.
  • Action 1 is the default action triggered by the user.
  • the user arranges Action 2 and Action 6 of the hardware device D1 at the specified timing position in the timing channel L1, and sets Action 3, Action 4 and Action 7 of the hardware device D2 Arranged at the specified timing position in the timing channel L2, arrange the action 5 of the hardware device D3 at the specified timing position in the timing channel L3, the relative action sequence relationship between the actions is solidified, and the user will follow the desired logic
  • the relationship is connected, so that the device is used as the basic object to program, and the actions of each device at each time point can be directly understood, and the user can quickly reconfigure the device and actions, which significantly improves the efficiency of reconfiguration.
  • arranging the actions corresponding to the hardware devices to be used on the timing channels of the hardware devices to be used includes: determining multiple time nodes along the second direction, and arranging the hardware devices to be used between the multiple time nodes corresponding action.
  • a plurality of time nodes T1, T2 and T3 are arranged in the second direction, action 1 is located before time node T1, action 2, action 3 and action 4 are located between time node T1 and time node T2, and action 5 Located between time node T2 and time node T3, action 7 is located after time node T3, which clearly defines the actions that each hardware device needs to perform in different time periods.
  • Fig. 5 is a schematic diagram of another graphical programming method according to an embodiment of the present invention, the schematic diagram provides a specific example, the hardware equipment to be used includes a mechanical arm, grippers and a camera, and the action of the mechanical arm is point-to-point movement , linear movement, delay operation, the action of the gripper is to open and close, the action of the camera is to take pictures, the execution action of the mechanical arm at the time node T1 and T2 moves point to point, the gripper performs the opening action at the same time, and the camera at the time node T2 After that, the camera action is performed, and then the mechanical arm performs linear movement and delay operation actions, and then the gripper performs a closing action after the time node T3, for which graphical programming of the pick is realized.
  • the hardware equipment to be used includes a mechanical arm, grippers and a camera
  • the action of the mechanical arm is point-to-point movement , linear movement, delay operation
  • the action of the gripper is to open and close
  • the graphical programming method further includes: using each hardware device as an object to detect preset events of the hardware devices in the flowchart, recording the current events of the hardware devices, and feeding back the preset events and the current events to the hardware device ask.
  • FIG. 6 is a schematic diagram of device-based event scheduling management according to an embodiment of the present invention, and this function is executed in the event manager 251 in FIG. 2 .
  • the device-based event scheduling management includes an event detector 610, a scheduling manager 620, an event arrangement unit 621, an event registration manager 622, an event execution manager 623, an event processing unit 630, and a distribution manager 640.
  • Distribution processor 650 internal memory 660, event detector 610 detects the code that code editor 240 generates, and these codes are based on equipment and classify object, such as the event D1E (device1 event) of hardware device D1 and the event of hardware device D2 D2E (device2 event), or predefined, such as predefined event PE1 (predefined event1) and predefined event PE2 (predefined event2), after these events are detected, they are arranged in the event arrangement unit 621, in the event registration management
  • the event registration management is performed by the controller 622, the time execution management is performed by the event execution manager 623, and then the event processing unit 630 is executed, and the event processing unit 630 feeds back to the distribution manager 640, and the distribution processor 650 can call the program in the memory 660 Fragment PS (program section), which feeds back preset events and current events to inquiries for hardware devices, such as predefined event distributor PE1H (predefined event1 handler) and predefined event distributor PE2H (predefined event2 handler), hardware
  • the embodiment of the present invention proposes a graphical programming method, programming with equipment as the basic object, can directly understand the actions of each equipment at each time point, and the user can quickly reconfigure the equipment and actions, significantly improving the reconfiguration process. configuration efficiency.
  • FIG. 7 is a schematic diagram of a graphical programming device 700 according to an embodiment of the present invention. As shown in FIG. 7 , the graphical programming device 700 includes:
  • the obtaining module 710 is to obtain the hardware device configuration file and the external action library of the hardware device included in the hardware device configuration file.
  • the determination module 720 determines multiple hardware devices to be used from the hardware configuration file, and determines actions corresponding to the multiple hardware devices to be used from an external action library.
  • the configuration module 730 arranges a plurality of standby hardware devices along a first direction, and each standby hardware device forms a plurality of timing channels along a second direction perpendicular to the first direction.
  • the generation module 740 generates PLC codes corresponding to the flow chart formed by arranging the corresponding actions of each standby hardware device on the timing channel of each standby hardware device and the flow chart formed by the connection operation of the actions.
  • the graphical programming device 700 further includes: displaying the physical interface of the PLC, and converting the physical interface of the PLC into a perspective with hardware devices as objects.
  • arranging the actions corresponding to the hardware devices to be used on the timing channels of the hardware devices to be used includes: determining multiple time nodes along the second direction, and arranging the hardware devices to be used between the multiple time nodes corresponding action.
  • the graphical programming device 700 further includes: providing a developer tool for editing hardware configuration files and external action libraries.
  • the graphical programming device 700 further includes: taking each hardware device as an object to detect preset events of the hardware devices in the flowchart, recording the current events of the hardware devices, and feeding back the preset events and current events to the hardware device inquiry.
  • FIG. 8 is a schematic diagram of an electronic device 800 according to an embodiment of the present invention.
  • the electronic device 800 includes a processor 810 and a memory 820 , and the memory 820 stores instructions, wherein the instructions are executed by the processor 810 to implement the method 100 as described above.
  • the present invention also proposes a computer-readable storage medium on which computer instructions are stored, and when executed, the computer instructions execute the method 100 as described above.
  • Some aspects of the method and apparatus of the present invention may be entirely implemented by hardware, may be entirely implemented by software (including firmware, resident software, microcode, etc.), or may be implemented by a combination of hardware and software.
  • the above hardware or software may be referred to as “block”, “module”, “engine”, “unit”, “component” or “system”.
  • the processor can be one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DAPDs), Programmable Logic Devices (PLCs), Field Programmable Gate Arrays (FPGAs), processors , a controller, a microcontroller, a microprocessor, or a combination thereof.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DAPDs Digital Signal Processing Devices
  • PLCs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • processors a controller, a microcontroller, a microprocessor, or a combination thereof.
  • aspects of the present invention may be embodied as a computer product comprising computer readable program code on one or more computer readable media.
  • computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disk, floppy disk, magnetic tape, ...), optical disks (e.g., compact disk (CD), digital versatile disk (DVD) %), smart cards And flash memory devices (eg, cards, sticks, key drives).

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Programmable Controllers (AREA)

Abstract

一种用于PLC的图形化编程方法,所述图形化编程方法包括:获取硬件设备配置文件和所述硬件设备配置文件中包含的硬件设备的外部动作库;从所述硬件配置文件中确定多个待用硬件设备,以及从所述外部动作库中确定与所述多个待用硬件设备对应的动作;沿第一方向排列所述多个待用硬件设备,各所述待用硬件设备在沿与所述第一方向垂直的第二方向上形成多个时序通道;响应于在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作,以及对所述动作的连接操作形成的流程图,生成所述流程图对应的PLC代码。

Description

用于PLC的图形化编程方法及装置 技术领域
本发明主要涉及计算机软件领域,尤其涉及一种用于PLC的图形化编程方法及装置。
背景技术
随着制造业的升级和转型,批量制造已经逐步转向灵活制造,灵活制造的需求频繁发生变化,导致工业控制系统需要相应地重新进行配置。然而,由于时间原因,需要在短期内完成对工业控制系统的重新配置,这就要求受控设备(例如驱动器,传感器等)需要易于重新配置,并且控制程序能够在短期内完成修改。
一种方式是引入知识图谱,通过知识图谱自动生成PLC代码,以缩短重新配置的时间,然而很难实施和升级知识图谱,尤其是对于新的设备;另一种方式是引入高级语言,开发者可以使用高级语言进行编辑和编译,然后下载至PLC中,然而该方式依然高度依赖于开发者,对开发者的编程水平要求比较高,需要开发者去修补高级语言中的漏洞。
发明内容
为了解决上述技术问题,本发明提供一种PLC的图形化编程方法及装置,以使PLC可以快速重新配置,适用于灵活制造的场景。
为实现上述目的,本发明提出了一种一种用于PLC的图形化编程方法,所述图形化编程方法包括:获取硬件设备配置文件和所述硬件设备配置文件中包含的硬件设备的外部动作库;从所述硬件配置文件中确定多个待用硬件设备,以及从所述外部动作库中确定与所述多个待用硬件设备对应的动作;沿第一方向排列所述多个待用硬件设备,各所述待用硬件设备在沿与所述第一方向垂直的第二方向上形成多个时序通道;响应于在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作,以及对所述动作的连接操作形成的流程图,生成所述流程图对应的PLC代码。为此,以设备为基本对象进行编程,可以直接地了解各个设备在各个时间点的动作,并且用户可以快速地重新配置设备和动作,显著地提高重新配置的效率。
优选地,所述图形化编程方法还包括:显示所述PLC的物理接口,将所述PLC的物理接口转换为以硬件设备为对象的视角。为此,可以显示以硬件设备为基本对象的用户界面,可以直观地了解各硬件设备的接口信息。
优选地,在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作包 括:沿所述第二方向确定多个时间节点,在所述多个时间节点之间布置各所述待用硬件设备对应的动作。由此,可以清晰定义各硬件设备在不同时间段需要执行的动作,提高图形化编程的逻辑性。
优选地,所述图形化编程方法还包括:提供一开发者工具,所述开发者工具用于对所述硬件配置文件和所述外部动作库进行编辑。为此,提高了硬件配置文件和外部动作库的可配置性。
优选地,所述图形化编程方法还包括:以各所述硬件设备为对象检测所述流程图中所述硬件设备的预设事件,记录所述硬件设备的当前事件,将所述预设事件和所述当前事件反馈至针对所述硬件设备的询问。为此,以设备为基本对象管理预设事件和当前事件对预设事件的执行情况,可以提高设备执行事件的追踪效率。
本发明还提出了一种用于PLC的图形化编程装置,所述图形化编程装置包括:获取模块,获取硬件设备配置文件和所述硬件设备配置文件中包含的硬件设备的外部动作库;确定模块,从所述硬件配置文件中确定多个待用硬件设备,以及从所述外部动作库中确定与所述多个待用硬件设备对应的动作;配置模块,沿第一方向排列所述多个待用硬件设备,各所述待用硬件设备在沿与所述第一方向垂直的第二方向上形成多个时序通道;生成模块,响应于在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作,以及对所述动作的连接操作形成的流程图,生成所述流程图对应的PLC代码。
优选地,所述图形化编程装置还包括:显示所述PLC的物理接口,将所述PLC的物理接口转换为以硬件设备为对象的视角。
优选地,其特征在于,在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作包括:沿所述第二方向确定多个时间节点,在所述多个时间节点之间布置各所述待用硬件设备对应的动作。
优选地,所述图形化编程装置还包括:提供一开发者工具,所述开发者工具用于对所述硬件配置文件和所述外部动作库进行编辑。
优选地,所述图形化编程装置还包括:以各所述硬件设备为对象检测所述流程图中所述硬件设备的预设事件,记录所述硬件设备的当前事件,将所述预设事件和所述当前事件反馈至针对所述硬件设备的询问。
本发明还提出了一种电子设备,包括处理器、存储器和存储在所述存储器中的指令,其中所述指令被所述处理器执行时实现如上文所述的方法。
本发明还提出了一种计算机可读存储介质,其上存储有计算机指令,所述计算机指令在被运行时执行根据上文所述的方法。
附图说明
以下附图仅旨在于对本发明做示意性说明和解释,并不限定本发明的范围。其中,
图1是根据本发明的一实施例的一种图形化编程方法的流程图;
图2是根据本发明的一实施例的一种PLC编程系统的示意图;
图3A-3B是根据本发明的一实施例的一种图形化编程方法中用户界面的示意图;
图4是根据本发明的一实施例的一种图形化编程方法的示意图;
图5是根据本发明的一实施例的另一种图形化编程方法的示意图;
图6是根据本发明的一实施例的一种基于设备的事件调度管理的示意图;
图7是根据本发明的一实施例的一种图形化编程装置的示意图;
图8是根据本发明的一实施例的一种电子设备的示意图。
附图标记说明
100 图形化编程方法
110-140 步骤
200 PLC编程系统
210 硬件配置工具
210A 硬件配置模块
210B 设备接口配置模块
220 外部动作库
230 开发者工具
240 代码编辑器
241 通道编辑器
242 通道数据库
243 IEC61131-3编辑器
244 IEC61131-3数据库
250 执行引擎
251 事件管理器
252 编译/下载器
253 漏洞修复/监控器
610 事件检测器
620 调度管理器
621 事件排列单元
622 事件注册管理器
623 事件执行管理器
630 事件消费单元
640 分发管理器
650 分发处理器
660 内存
700 图形化编程装置
710 获取模块
720 确定模块
730 配置模块
740 生成模块
800 电子设备
810 处理器
820 存储器
具体实施方式
为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图说明本发明的具体实施方式。
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是本发明还可以采用其它不同于在此描述的其它方式来实施,因此本发明不受下面公开的具体实施例的限制。
如本申请和权利要求书中所示,除非上下文明确提示例外情形,“一”、“一个”、“一种”和/或“该”等词并非特指单数,也可包括复数。一般说来,术语“包括”与“包含”仅提示包括已明确标识的步骤和元素,而这些步骤和元素不构成一个排它性的罗列,方法或者设备也可能包含其他的步骤或元素。
本发明提出了一种用于PLC的图形化编程方法,图1是根据本发明的一实施例的一种图形化编程方法100的流程图,如图1所示,图形化编程方法100包括:
步骤110,获取硬件设备配置文件和硬件设备配置文件中包含的硬件设备的外部动作库。
硬件设备配置文件包括各硬件设备相关的配置文件,例如组态等,硬件设备配置文件 中可以增加、删除或编辑其中的硬件设备,外部动作库中包括与这些硬件设备对应的动作,相应地这些动作也可以增加、删除或编辑。图2是根据本发明的一实施例的一种PLC编程系统200的示意图,如图2所示,PLC编程系统包括硬件配置工具210、代码编辑器240和执行引擎250。
硬件配置工具200包括硬件配置模块210A和基于设备视角的设备接口配置模块210B,硬件配置模块210A中包括硬件配置文件,这些硬件配置文件中包括各硬件设备相关的配置文件,用户可以从中调用所需的硬件设备,例如机械臂、驱动器、电机、传感器等。设备接口配置模块210B可以配置接口视角。
在一些实施例中,图形化编程方法还包括:显示PLC的物理接口,将PLC的物理接口转换为以硬件设备为对象的视角。图3A-3B是根据本发明的一实施例的一种图形化编程方法中用户界面的示意图,该功能可以在图2中的设备接口配置模块210B中实现,图3A是传统的PLC物理接口的显示界面,其以数字信号输入接口DI(Digital Input)、数字信号输出接口DO(Digital Output)、模拟信号输入接口AI(Analog Input)和模拟信号输出接口AO(Analog Input)为基本对象展示了各接口以及各接口的使用情况。图3B是以硬件设备为对象的视角的用户界面,其以硬件设备为基本对象,展示了各硬件设备中使用的数字信号输入接口DI(Digital Input)、数字信号输出接口DO(Digital Output)、模拟信号输入接口AI(Analog Input)和模拟信号输出接口AO(Analog Input)的信息,该用户界面以硬件设备为基本对象,可以直观地了解各硬件设备的接口信息。
步骤120,从硬件配置文件中确定多个待用硬件设备,以及从外部动作库中确定与多个待用硬件设备对应的动作。
硬件配置文件中包括多个硬件设备,可以从多个硬件设备中确定多个待用硬件设备,该步骤可以通过用户输入实现,例如用户可以通过硬件配置界面从中选取多个待用硬件设备,或者选择预设的工作流模板,工作流模板自动推送涉及到的多个待用硬件设备,用户还可以对自动推送的多个待用硬件设备进行调整,例如确定的待用设备包括机械臂、末端执行器、传感器和摄像头。在确定多个待用设备之后,从外部动作库中确定与多个待用硬件设备对应的动作,例如选择机械臂的预设轨迹移动,悬停,上升,下降等,选择末端执行器的张开、闭合等。
图2中,外部动作库220中包括硬件设备的动作,用户可以从外部动作库220中选取与待用硬件设备对应的动作。在一些实施例中,图形化编程方法还包括:提供一开发者工具,开发者工具用于对硬件配置文件和外部动作库进行编辑。参考图2所示,用户可以使用开发者工具230对硬件配置模块210A中的硬件配置文件和外部动作库220进行编辑和 导入,以丰富可以调用的硬件设备和与之对应的动作。
步骤130,沿第一方向排列多个待用硬件设备,各待用硬件设备在沿与第一方向垂直的第二方向上形成多个时序通道。
在确定多个待用设备之后,沿第一方向排列多个待用硬件设备,第一方向可以是水平方向或垂直方向,多个待用硬件设备沿第一方向排列之后,各待用硬件设备在沿与第一方向垂直的第二方向上形成多个时序通道。
图4是根据本发明的一实施例的一种图形化编程方法的示意图。如图4所示,待用硬件设备包括硬件设备D1,硬件设备D2,硬件设备D3,硬件设备Dn等,硬件设备D1,硬件设备D2,硬件设备D3,硬件设备Dn沿水平方向依次排列,硬件设备D1,硬件设备D2,硬件设备D3,硬件设备Dn在垂直方向上形成了各自的时序通道,即硬件设备D1形成了时序通道L1,硬件设备D2形成了时序通道L2,硬件设备D3形成了时序通道L3,硬件设备Dn形成了时序通道Ln。
步骤140,响应于在各待用硬件设备的时序通道上布置各待用硬件设备对应的动作,以及对动作的连接操作形成的流程图,生成流程图对应的PLC代码。
继续参考图4,动作1是用户触发的默认动作,用户将硬件设备D1的动作2和动作6布置在时序通道L1中的指定时序位置处,将硬件设备D2的动作3、动作4和动作7布置在时序通道L2中的指定时序位置处,将硬件设备D3的动作5布置在时序通道L3中的指定时序位置处,各动作之间的相对动作顺序关系固化,用户将各个动作按照期望的逻辑关系连接起来,由此以设备为基本对象进行编程,可以直接地了解各个设备在各个时间点的动作,并且用户可以快速地重新配置设备和动作,显著地提高重新配置的效率。
在一些实施例中,在各待用硬件设备的时序通道上布置各待用硬件设备对应的动作包括:沿第二方向确定多个时间节点,在多个时间节点之间布置各待用硬件设备对应的动作。在图4中,在第二方向布置了多个时间节点T1、T2和T3,动作1位于时间节点T1之前,动作2、动作3和动作4位于时间节点T1和时间节点T2之间,动作5位于时间节点T2和时间节点T3之间,动作7位于时间节点T3之后,清晰地定义了各硬件设备在不同时间段需要执行的动作。
图5是根据本发明的一实施例的另一种图形化编程方法的示意图,该示意图提供了一个具体的示例,待用硬件设备包括机械臂、夹爪和摄像头,机械臂的动作为点对点移动、线性移动、延迟操作,夹爪的动作为张开、闭合,摄像头的动作为拍照,机械臂在时间节点T1和T2的执行动作点对点移动,夹爪同时执行张开动作,摄像头在时间节点T2之后执行拍照动作,随后机械臂执行线性移动和延迟操作动作,随后在时间节点T3之后夹爪 执行闭合动作,为此实现了抓取(pick)的图形化编程。
在一些实施例中,图形化编程方法还包括:以各硬件设备为对象检测流程图中硬件设备的预设事件,记录硬件设备的当前事件,将预设事件和当前事件反馈至针对硬件设备的询问。图6是根据本发明的一实施例的一种基于设备的事件调度管理的示意图,该功能在图2的事件管理器251中执行。如图6所示,基于设备的事件调度管理包括事件检测器610,调度管理器620,事件排列单元621,事件注册管理器622,事件执行管理器623,事件处理单元630,分发管理器640,分发处理器650,内存660,事件检测器610检测代码编辑器240生成的代码,这些代码是基于设备为对象进行分类的,例如硬件设备D1的事件D1E(device1 event)和硬件设备D 2的事件D2E(device2 event),或预定义的,例如预定义事件PE1(predefined event1)和预定义事件PE2(predefined event2),这些事件被检测到之后,在事件排列单元621中进行排列,在事件注册管理器622进行事件注册管理,在事件执行管理器623进行时间执行管理,然后在事件处理单元630进行执行,事件处理单元630反馈至分发管理器640中,分发处理器650可以调用内存660中的程序片段PS(program section),将预设事件和当前事件反馈至针对硬件设备的询问,例如预定义事件分发器PE1H(predefined event1 handler)和预定义事件分发器PE2H(predefined event2 handler),硬件设备D1的事件分发器D1EH(device1 event handler)和硬件设备D 2的事件分发器D2EH(device2 event handler),其中包括了预设事件和当前事件对预设事件的执行情况,可以提高设备执行事件的追踪效率。
本发明的实施例提出了一种图形化编程方法,以设备为基本对象进行编程,可以直接地了解各个设备在各个时间点的动作,并且用户可以快速地重新配置设备和动作,显著地提高重新配置的效率。
本发明还提出一种用于PLC的图形化编程装置,图7是根据本发明的一实施例的一种图形化编程装置700的示意图,如图7所示,图形化编程装置700包括:
获取模块710,获取硬件设备配置文件和硬件设备配置文件中包含的硬件设备的外部动作库。
确定模块720,从硬件配置文件中确定多个待用硬件设备,以及从外部动作库中确定与多个待用硬件设备对应的动作。
配置模块730,沿第一方向排列多个待用硬件设备,各待用硬件设备在沿与第一方向垂直的第二方向上形成多个时序通道。
生成模块740,响应于在各待用硬件设备的时序通道上布置各待用硬件设备对应的动作,以及对动作的连接操作形成的流程图,生成流程图对应的PLC代码。
在一些实施例中,图形化编程装置700还包括:显示PLC的物理接口,将PLC的物理接口转换为以硬件设备为对象的视角。
在一些实施例中,在各待用硬件设备的时序通道上布置各待用硬件设备对应的动作包括:沿第二方向确定多个时间节点,在多个时间节点之间布置各待用硬件设备对应的动作。
在一些实施例中,图形化编程装置700还包括:提供一开发者工具,开发者工具用于对硬件配置文件和外部动作库进行编辑。
在一些实施例中,图形化编程装置700还包括:以各硬件设备为对象检测流程图中硬件设备的预设事件,记录硬件设备的当前事件,将预设事件和当前事件反馈至针对硬件设备的询问。
本发明还提出一种电子设备800。图8是根据本发明的一实施例的一种电子设备800的示意图。如图8所示,电子设备800包括处理器810和存储器820,存储器820存储中存储有指令,其中指令被处理器810执行时实现如上文所述的方法100。
本发明还提出一种计算机可读存储介质,其上存储有计算机指令,计算机指令在被运行时执行如上文所述的方法100。
本发明的方法和装置的一些方面可以完全由硬件执行、可以完全由软件(包括固件、常驻软件、微码等)执行、也可以由硬件和软件组合执行。以上硬件或软件均可被称为“数据块”、“模块”、“引擎”、“单元”、“组件”或“系统”。处理器可以是一个或多个专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理器件(DAPD)、可编程逻辑器件(PLC)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器或者其组合。此外,本发明的各方面可能表现为位于一个或多个计算机可读介质中的计算机产品,该产品包括计算机可读程序编码。例如,计算机可读介质可包括,但不限于,磁性存储设备(例如,硬盘、软盘、磁带……)、光盘(例如,压缩盘(CD)、数字多功能盘(DVD)……)、智能卡以及闪存设备(例如,卡、棒、键驱动器……)。
在此使用了流程图用来说明根据本申请的实施例的方法所执行的操作。应当理解的是,前面的操作不一定按照顺序来精确地执行。相反,可以按照倒序或同时处理各种步骤。同时,或将其他操作添加到这些过程中,或从这些过程移除某一步或数步操作。
应当理解,虽然本说明书是按照各个实施例描述的,但并非每个实施例仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施例中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
以上所述仅为本发明示意性的具体实施方式,并非用以限定本发明的范围。任何本领 域的技术人员,在不脱离本发明的构思和原则的前提下所作的等同变化、修改与结合,均应属于本发明保护的范围。

Claims (12)

  1. 一种用于PLC的图形化编程方法(100),其特征在于,所述图形化编程方法(100)包括:
    获取硬件设备配置文件和所述硬件设备配置文件中包含的硬件设备的外部动作库(110);
    从所述硬件配置文件中确定多个待用硬件设备,以及从所述外部动作库中确定与所述多个待用硬件设备对应的动作(120);
    沿第一方向排列所述多个待用硬件设备,各所述待用硬件设备在沿与所述第一方向垂直的第二方向上形成多个时序通道(130);
    响应于在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作,以及对所述动作的连接操作形成的流程图,生成所述流程图对应的PLC代码(140)。
  2. 根据权利要求1所述的图形化编程方法(100),其特征在于,所述图形化编程方法(100)还包括:显示所述PLC的物理接口,将所述PLC的物理接口转换为以硬件设备为对象的视角。
  3. 根据权利要求1所述的图形化编程方法(100),其特征在于,在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作包括:沿所述第二方向确定多个时间节点,在所述多个时间节点之间布置各所述待用硬件设备对应的动作。
  4. 根据权利要求1所述的图形化编程方法(100),其特征在于,所述图形化编程方法(100)还包括:提供一开发者工具,所述开发者工具用于对所述硬件配置文件和所述外部动作库进行编辑。
  5. 根据权利要求1所述的图形化编程方法(100),其特征在于,所述图形化编程方法(100)还包括:以各所述硬件设备为对象检测所述流程图中所述硬件设备的预设事件,记录所述硬件设备的当前事件,将所述预设事件和所述当前事件反馈至针对所述硬件设备的询问。
  6. 一种用于PLC的图形化编程装置(700),其特征在于,所述图形化编程装置(700)包括:
    获取模块(710),获取硬件设备配置文件和所述硬件设备配置文件中包含的硬件设备的外部动作库;
    确定模块(720),从所述硬件配置文件中确定多个待用硬件设备,以及从所述外部动作库中确定与所述多个待用硬件设备对应的动作;
    配置模块(730),沿第一方向排列所述多个待用硬件设备,各所述待用硬件设备在沿与所述第一方向垂直的第二方向上形成多个时序通道;
    生成模块(740),响应于在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作,以及对所述动作的连接操作形成的流程图,生成所述流程图对应的PLC代码。
  7. 根据权利要求6所述的图形化编程装置(700),其特征在于,所述图形化编程装置(700)还包括:显示所述PLC的物理接口,将所述PLC的物理接口转换为以硬件设备为对象的视角。
  8. 根据权利要求6所述的图形化编程装置(700),其特征在于,在各所述待用硬件设备的时序通道上布置各所述待用硬件设备对应的动作包括:沿所述第二方向确定多个时间节点,在所述多个时间节点之间布置各所述待用硬件设备对应的动作。
  9. 根据权利要求6所述的图形化编程装置(700),其特征在于,所述图形化编程装置(700)还包括:提供一开发者工具,所述开发者工具用于对所述硬件配置文件和所述外部动作库进行编辑。
  10. 根据权利要求6所述的图形化编程装置(700),其特征在于,所述图形化编程装置(700)还包括:以各所述硬件设备为对象检测所述流程图中所述硬件设备的预设事件,记录所述硬件设备的当前事件,将所述预设事件和所述当前事件反馈至针对所述硬件设备的询问。
  11. 一种电子设备(800),包括处理器(810)、存储器(820)和存储在所述存储器(820)中的指令,其中所述指令被所述处理器(810)执行时实现如权利要求1-5任一项所述的方法。
  12. 一种计算机可读存储介质,其上存储有计算机指令,所述计算机指令在被运行时执行根据权利要求1-5中任一项所述的方法。
PCT/CN2021/121956 2021-09-29 2021-09-29 用于plc的图形化编程方法及装置 WO2023050231A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180102014.2A CN117980985A (zh) 2021-09-29 2021-09-29 用于plc的图形化编程方法及装置
PCT/CN2021/121956 WO2023050231A1 (zh) 2021-09-29 2021-09-29 用于plc的图形化编程方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/121956 WO2023050231A1 (zh) 2021-09-29 2021-09-29 用于plc的图形化编程方法及装置

Publications (1)

Publication Number Publication Date
WO2023050231A1 true WO2023050231A1 (zh) 2023-04-06

Family

ID=85781113

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121956 WO2023050231A1 (zh) 2021-09-29 2021-09-29 用于plc的图形化编程方法及装置

Country Status (2)

Country Link
CN (1) CN117980985A (zh)
WO (1) WO2023050231A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020126151A1 (en) * 2000-06-13 2002-09-12 National Instruments Corporation System and method for graphically creating a sequence of motion control, machine vision, and data acquisition (DAQ) operations
CN104217068A (zh) * 2014-08-22 2014-12-17 深圳市汇川控制技术有限公司 一种plc图形化组态设计系统和方法
CN109542422A (zh) * 2018-11-21 2019-03-29 成都聚维合科技有限公司 一种实现可视图形化编程的方法
CN111124393A (zh) * 2019-12-31 2020-05-08 曙光信息产业股份有限公司 一种算法逻辑的编辑方法、平台、电子设备及存储介质
CN113126977A (zh) * 2019-12-31 2021-07-16 深圳市赛元微电子有限公司 图形化编程系统及实现单片机的图形化编程的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020126151A1 (en) * 2000-06-13 2002-09-12 National Instruments Corporation System and method for graphically creating a sequence of motion control, machine vision, and data acquisition (DAQ) operations
CN104217068A (zh) * 2014-08-22 2014-12-17 深圳市汇川控制技术有限公司 一种plc图形化组态设计系统和方法
CN109542422A (zh) * 2018-11-21 2019-03-29 成都聚维合科技有限公司 一种实现可视图形化编程的方法
CN111124393A (zh) * 2019-12-31 2020-05-08 曙光信息产业股份有限公司 一种算法逻辑的编辑方法、平台、电子设备及存储介质
CN113126977A (zh) * 2019-12-31 2021-07-16 深圳市赛元微电子有限公司 图形化编程系统及实现单片机的图形化编程的方法

Also Published As

Publication number Publication date
CN117980985A (zh) 2024-05-03

Similar Documents

Publication Publication Date Title
JP6757386B2 (ja) プログラマブルロジックコントローラおよびプログラム作成支援装置
US11188048B2 (en) Programmable logic controller and main unit
JP3943635B2 (ja) コンピュータ制御型ディスプレイシステムにおいてセッションの再生ポイントを制御する方法
US7992129B2 (en) System and method for programmatically generating a graphical program based on a sequence of motion control, machine vision, and data acquisition (DAQ) operations
JP5099251B1 (ja) Plcのcpuユニット、plc用のシステムプログラム、plc用のシステムプログラムを格納した記録媒体、plcシステム、plcサポート装置、plcサポートプログラム、および、plcサポートプログラムを格納した記録媒体
JP4622611B2 (ja) 信号処理装置
US9639330B2 (en) Programming interface
US20090144665A1 (en) Systems, methods and computer program products for graphical user interface presentation to implement filtering of a large unbounded hierarchy to avoid repetitive navigation
US7318203B2 (en) Selecting image processing functions
JP2020134984A (ja) プログラマブルロジックコントローラ及びそのログデータ保存方法
JP7273935B2 (ja) 外部設定機器、ロギング設定方法およびプログラム
WO2023050231A1 (zh) 用于plc的图形化编程方法及装置
WO2022012371A1 (zh) 一种半导体设备建模方法及装置
WO2012155844A1 (zh) 自动移除代码的方法及装置
JP7173826B2 (ja) プログラマブルロジックコントローラシステム、プログラム作成支援装置およびコンピュータプログラム
CN112987605A (zh) 程序生成设备、程序生成方法以及信息存储介质
JP3930255B2 (ja) システム仕様情報処理装置、システム仕様情報処理方法及びプログラム
TWI738216B (zh) 事件處理文件的開發方法與裝置
JP6948450B2 (ja) プログラマブルロジックコントローラおよびメインユニット
TWI528267B (zh) 可程式顯示器用畫面資料編輯裝置
JP7412076B2 (ja) プログラマブルロジックコントローラ用のエンジニアリングツール
JP2020191141A (ja) プログラマブルロジックコントローラおよびメインユニット
JP2020177712A (ja) 外部設定機器
Schacher et al. The SpatDIF library–Concepts and Practical Applications in Audio Software
JP2020177713A (ja) プログラマブルロジックコントローラ

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: 21958817

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180102014.2

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE