xEOS white paper
Background
At present, industrial transformation and digital transformation are booming worldwide. As a product of the deep integration of the new generation of information technology and manufacturing industry, the Industrial Internet has increasingly become the key support for the new industrial revolution and an important cornerstone for deepening the "Internet + advanced manufacturing industry". More and more industrial enterprises hope to use the Industrial Internet as a starting point to improve production efficiency, yield rate, and realize intelligent production management. Leading enterprises in various industries have achieved some results in the research and application of key technologies of the Industrial Internet (such as edge computing, low-latency technology, network and business security capabilities), and the relevant achievements have become relevant technological evolution and industry trends. The vane of development, such as industrial fieldbus, industrial optical network, passive ONU, optical switching, 5G/network slicing technology, etc.Through the study of a large number of typical application cases of heads and small and medium-sized enterprises, in order to realize the automation control scene in the industrial field, it is necessary to realize the data collection and transmission between the production factors, the data understanding and induction between the transmission information, and the realization of industrial Internet-related Man-machine, material, law, and even the upstream and downstream of the enterprise, smart products, users and other all elements, the production automation and management informatization and knowledge decision-making of the whole industry chain, realize the complete integration of IT/OT.In order to connect all links from the production layer to the application layer, we must focus on the technical requirements of all levels in the end-to-end chain, and we must consider the high requirements of new terminals in the industrial intranet network architecture for bandwidth, capacity, and delay. ; Diversified stock of non-IP terminals needs to be converted to IP through protocols; needs for efficient and orderly real-time data collection, and collect data to the data center according to unified data standards, and transmit the data interface to the upper layer of the enterprise information network entity. It is also necessary to consider the current situation of small and micro enterprises with insufficient funds, insufficient development personnel and generally low quality level (not attractive to high-level personnel) compared with leading enterprises. While providing end-to-end full-tech "prefabricated dishes", Meet its needs for easy operation and maintenance, easy development and customization.
Based on domestic and foreign technology and industry background, focusing on laser equipment, intelligent mechanical equipment and flexible system FMS industry sectors, the industrial-grade edge cloud operating system xEOS came into being. As a "software-defined" innovative application ecosystem that drives future development, xEOS expects to usher in the explosive growth of digital transformation scenarios for the laser industry.
1.Introduce
1.1 What is xEOS
xEOS (Edge Operating System, Empower OS, Empower Openlaser System) is customized based on open source Linux, oriented to the field of industrial control and information technology, integrating motion control core technology, low-code programming technology, virtual container technology, management science and technology, etc., to manage industrial Computer programs that control hardware and business resources. The positioning of xEOS is to become an "industrial Android system for the cross integration of optoelectronic automation".1.2 Who xEOS serves
The xEOS operating system is based on customer needs and currently mainly solves:Automation/Opto-Mechatronic Equipment Manufacturer In the manufacturing process of CNC machine tools, industrial robots, injection molding machinery, textile machinery and printing machinery automation equipment, the platform of technology suppliers is not unified, the investment in self-developed core technology is high and risky, and the homogeneity of competing products is serious; market response is slow; cloud Meerkat networking is low; data is siled, etc.Automation/Opto-Mechatronics Solution ProviderIn the process of providing automation solutions such as CNC machining production line, automatic feeding, assembly, testing, packaging, etc., there is a lack of product core technology, and the solution requires a large number of external devices to achieve extended functions, and the integration level is low; the degree of cloud network is low; the market response speed Slow; high cost of customized development; homogenization of solution products and other issues.
Automation/Opto-Mechatronic downstream equipment Machinery, automobiles, electronics, injection molding, textiles, aviation and shipbuilding and other industry expert think tanks (universities, etc.)
Rich proprietary experience, but lack of implementation platform, cooperative promotion channels, lack of market information, and no effective carrier for scientific research and achievement transformation.End users of manufacturing equipment production lines and equipment
In the production unit equipment control, precise dynamic operation, equipment predictive maintenance, process maintenance; inspection and monitoring; production process traceability, production energy efficiency control, etc. There are needs, but there is a lack of IT/OT fusion team, limited IT resources, more customization needs, and rapid delivery exists. difficulties etc.
1.3 Why use xEOS
xEOS helps users achieve technological leaps and enhance equipment competitiveness. The innovation models obtained in different industries will be quickly replicated in different industries due to the platform characteristics of xEOS, and industry innovation will be greatly accelerated. As an industrial-grade open source operating system, xEOS is based on open IoT development technology, supports multi-source heterogeneity, and data access of multiple protocols (MQTT, HTTP/HTTPS, WebSocket, OPC/OPC UA, etc.) , support the acquisition, storage, and processing of large-scale data, transform the digital construction of the manufacturing industry into a public capability for efficient access, and provide intelligent services for the production end-side nearby through edge computing, improving the production efficiency of enterprises; based on agile The micro-service system and open software architecture have realized the integration of the automation control system and the information service system. Users can choose to use a variety of IT programming languages, independently scale the key functions of the application, and dynamically adjust the service capabilities. It can be flexibly taken over from simple Capture all tasks of high-performance motion control; based on the design starting from reliability, high throughput, low-latency processing and dynamic scalability, making full use of Docker container technology, it can be effectively expanded to support the load required by large-scale IOT projects; The service is built using a clearly defined API framework method, which can be organically integrated with various new-generation information and communication technologies such as artificial intelligence, digital twins, cloud computing, AR, and VR with the development of the IoT ecosystem, and innovate various new models. New ecology, new scenarios, connect IT and OT, help enterprises solve difficulties, pain points and blocking points in the process of digital transformation, and achieve quality improvement, cost reduction, efficiency increase, green and safe development.2.xEOS Architecture
xEOS is the edge brain of modern equipment in the era of Industry 4.0. It connects the past independent world into a continuous open modular system in a simple way: machine control, information technology (IT) and Internet of Things (IoT). xEOS is a complete industrial-grade edge operating system composed of three parts: Linux server and virtualization technology base, xStudio edge automation platform and xSuite edge data application suite.
2.1 system environment
2.1.1 operating system
2.1.2 Application Container Engine
Allows developers to package their applications and dependencies into a portable image, and then distribute it to any popular Linux or Windows operating system machine for virtualization. Docker is a lightweight container technology; Docker supports compiling software into a mirror; then configure various software in the mirror, and release the mirror, so that other users can directly use the mirror; the running mirror is called Containers, container startup is very fast.2.1.3 ECAT/UPON standard
The development of industrial Internet services has made the network in the factory show a trend of integration, openness, and flexibility. Big data analysis, edge computing services, and new node devices added at any time all require more efficient and stable field-level real-time data collection and communication between layers. The standardized model of ECAT+UPON=EtherCAT+Universal PON introduced by API will meet the needs of the times and become the infrastructure of the future industrial Internet. The ECAT/UPON standard is established on the physical layer, the data link layer and runs through the network layer and the transport layer. While realizing the flattening of the network structure, the network will be more open and management-friendly, and its reliability and security will also be greatly improved. The EtherCAT bus protocol is the most characteristic open bus standard at present. It has the characteristics of low hardware cost, rich compatible protocols, full coverage topology, and short cycle time, which are accepted by many manufacturing companies. The industrial optical network represented by Universal PON has the characteristics of high bandwidth, low latency, easy operation and maintenance, and anti-interference, which will redefine the physical infrastructure between factory-level equipment, equipment, host computer, and even cloud equipment.2.2 Automation platform xStudio
xStudio is an open distributed automation control system programming development platform developed in accordance with the IEC61131-3 standard and the IEC61499 standard. The development system combines classic programming of controller applications with professional automation software development functions in the industry 4.0/IOT environment, allowing users to use the xStudio automation platform to easily implement functions such as logic control, motion control, and communication.2.2.1 xStudio IDE Suite
xPLC is a PLC editor that conforms to the IEC61131-3 standard and is the core component of the xStudio automation platform. xPLC allows the creation of tasks with different periods, and supports the attachment of variable programs to each task. Programs can be developed in one or more of the following languages:- IL (Instruction List)- LD (ladder diagram)
- FBD (Function Block Diagram)
- SFC (Sequential Function Chart)
- ST (Structured Text)
In addition, xPLC also includes a wealth of fault finding functions, making it very easy to solve problems no matter on site or through remote maintenance. The specific debugging functions are as follows:
- monitoring
- Single cycle monitoring
- debug assignment
- mandatory assignment
- Hierarchical call debugging
xConfig
xConfig is an important component of XStudio, responsible for importing the xPLC project and connecting the pins and axis variables with the EtherCAT slave pins. The specific content is as follows:
- IO configuration: Automatically scan and manually add slave stations that support the EtherCAT protocol, configure communication protocol details, configure the number of pins, etc.
- PLC configuration: Import the compiled xPLC project, assign the actual hardware pins corresponding to the pin variables, assign the NC axis, the drive corresponding to the CNC axis, the secondary configuration task cycle, etc.
- NCI Configuration: Support parameter configuration of NC axis functions, assign axis variables and channel variables obtained from xPLC project to actual NC available resources.
- CNC Configuration: Supports parameter configuration of CNC axis functions, assigns axis variables and channel variables obtained from xPLC projects to actual CNC available resources.
2.2.2 xPLC runtime system
The PLC runtime system uses RT-Linux real-time operating system, which can provide stable and reliable deterministic real-time functions, rich task configuration, large variable pool, complex logic operations, powerful standard library, and convenient hardware configuration and mapping. It also supports multi-PLC, multi-task, and multi-cycle functions, and the shortest cycle can support 125us.2.2.3 motion control core
As the core of motion control, the motion control kernel includes a series of single-axis and multi-axis high-precision control functions, which are highly compatible with actual industrial scenarios, and includes three parts: xNCI, xCNC and xRNC. NCIxNCI is a motion control kernel developed based on the IEC61131-3 PLCopen standard. It includes basic PTP position control, high-speed coupling follow, multi-axis interpolation corner smoothing and many other motion control interfaces. It can be applied to various automation scenarios. Realized high speed, high precision, high fluency control. The specific functions are as follows:Integrates various basic PTP motion modules, such as relative motion, absolute motion, superposition motion, jogging and other motion modulesIntegrates a variety of multi-axis linkage control motion modules, such as electronic gears, electronic cams, flying shears, etc. In addition to the standard following function, a pulse following function is added, which can realize high-precision master-slave axis coupling and perfectly meet various complex application requirements
In addition to standard function blocks, it integrates laser processing industry-specific motion control modules such as follow-up control, leapfrog control, non-inductive perforation, automatic calibration, real-time calibration, and intelligent obstacle avoidance.CNCxCNC is a CNC numerical control system kernel developed based on the IEC61131-3 PLCopen standard. It covers all commonly used CNC trajectory control functions, including high-end systems for complex motion control and operational requirements. The specific functions are as follows:
Support 3-axis interpolation and 9-axis linkage control, which can realize high-speed and high-precision machining
Support breakpoint, rollback processing
Rich kinematics modules, such as Cartesian coordinate system, five-axis 3D, gantry, RTCP, etc.
Linear interpolation, circular interpolation, spline interpolation
Support G code, M code, subroutine
Code pre-reading and speed-forward planning pre-processing, the acceleration process is continuous when there are many small line segments in the distance look-ahead
Corner smoothing and multiple filter functions are suitable for various high and low grade machine tools
Backlash compensation, tool compensation, etc.
RNC Based on xCNC, xRNC provides robot kinematics and dynamics models such as SCARA, DELTA, and six-axis series.
2.2.4 Protocol
In order to support more application scenarios, xStudio supports a variety of standard communication protocols commonly used in industries, including the real-time field bus EtherCAT protocol, OPCUA, Modbus-TCP, SSH, FTP and other protocols. The EtherCAT protocol is responsible for connecting IO modules, servo drives and other bus devices into the kernel layer. The protocol ensures the accurate execution of program control commands at the kernel layer, and periodically feeds back signals from the device. EtherCAT also has flexible configuration features, and the expansion and reduction of slave stations are very simple. Users can also realize cross-platform transmission through OPCUA, Modbus-TCP, SSH, FTP and other protocols to complete complex data exchange. These protocols are independent of manufacturers and are open-ended standard protocols that are widely used in industrial control systems and have good scalability. In addition, the servers of some protocols also integrate security mechanisms for authentication and data encryption, and the system can protect the security of data communication between two nodes in the network.2.2.5 Graphical programming xBlock
Use snap-together graphic blocks to represent code concepts such as variables, logical expressions, loops, and more. Users can program directly according to the programming principles without paying attention to the syntax details. Designers can easily execute the required application programs without writing or only needing to write very little program code, making the development and design of Internet of Things programs faster and easier.2.3 Edge Application Suite xSuite
2.3.1 Edge IoT agent
Based on the design concept of "hardware virtualization, business APP", the equipment installed on site for the first time is pre-installed with xEOS and edge agent daemon process, and uses the local communication interface of the equipment to access and manage all kinds of sensors, PLCs, terminals and other equipment in a unified manner. It is easy to extract, aggregate, forward or store data through the xEOS edge proxy application, and use its xEOS to visualize the data to the Web. At the same time, it can be extended to apps and desktop applications, and supports front-end frameworks such as Bootstrap, jQuery, Vue.js, etc., so that gorgeous and rich UI interfaces can be developed.2.3.2 database management system
The xEOS database application provides equipment metadata management and production process data management for the system. xEOS adopts time series database and relational database management system, integrates data sources of various heterogeneous communication protocols, and forms a unified database access interface. Complete the storage and calculation of time series data, support time series data read and write operations and efficient query of historical data, and provide stream computing, real-time analysis and processing and other functions.2.3.3 Production Management System
It serves for the production operation and production management of manufacturing enterprises. The production management system mainly includes core management systems such as order management, production plan management, cost management, material demand planning, procurement management, inventory management, and quality management, which can improve the quality of all organizational departments. The accuracy and timeliness of management, accurately guide the ordering of raw materials, timely control the data information of all parties, optimize the rational use of funds, save production costs and improve production efficiency.2.3.4 Event-driven programming xNode
xNode is a flow-based programming tool. It has a visual editor that allows nodes to be connected together to create a flow. Users only need to drag nodes into the flow editor and set these nodes with different functions. After being combined, the required application program can be easily executed, making the development and design of the Internet of Things program faster and easier. xNode can easily collect data from industrial PLC, SCADA, and MES systems through MQTT and OPC UA nodes, and use its Dashboard and other modules to visualize the data to the Web. At the same time, front-end frameworks such as Bootstrap, jQuery, and Vue.js can be extended, so that gorgeous and rich UI interfaces can be developed.2.4 Application ecology xSmart
2.4.1 Mobile xAPP (Android or IOS)
The remote monitoring and control system based on the Industrial Internet of Things can bring more economic benefits to the equipment. Through the mobile app, the equipment can be monitored, managed and controlled remotely, and the real-time alarm can be issued through the equipment alarm, which can greatly improve the safety of equipment operation and reduce unnecessary losses of equipment. Users can view the real-time operation status and historical data of the equipment on the mobile terminal, and can troubleshoot in time to improve the efficiency of maintenance.2.4.2 Web-based application
xEOS integrates rich H5 applications, H5 is the next generation HTML standard. Web applications exist in the form of web pages, which are composed of various Web components that complete specific tasks and display services to the outside world through the Web. Users only need to have a browser and do not need to install other software. Web applications only need to be installed on the server. Once installed on the Internet, it can be shared with all clients through the network. If you want to modify the web application in the future, you only need to modify the web application on the server, and all the clients will be automatically updated.2.4.3 Configure the xHMI application
xEOS supports traditional HMI and common desktop applications, and uses a graphically displayed computer-operated user interface. Graphical user interface is an interface display format for human-computer communication, allowing users to use input devices such as a mouse to manipulate icons or menu options on the screen to select commands, call files, start programs, or perform other daily tasks. Compared to web applications, the main difference is the relative position between the application itself and its user interface.2.4.4 Development ToolsxInventor
xInventor is an Android programming tool software that adopts the browser + cloud service mode to complete Apps development through graphical building block drag-and-drop components. Different types of component modules have been pre-set, such as motors, sensors, and even or robot components. All development codes are stored on the cloud server, which is convenient for developers to develop on any machine, and ensures the consistency and security of the source code, and provides a powerful debugging function. The code changes during debugging will be automatically synchronized to There is no need to reinstall the app on the phone or emulator for debugging.3.1 application authorization
Authorize to obtain code
Access address: http://HOST:PORT/auth/authorize?client_id=client_id&redirect_uri=redirect_uri
client_id: website address redirect_uri: the callback address of the same source as client_id client_id and redirect_uri need encode conversion, such as:
"http://host/auth/authorize?client_id=" + encodeURIComponent(client_id) + "&redirect_uri=" + encodeURIComponent(redirect_uri);
After authorization and login, the page will jump to redirect_uri with code in the address bar
Exchange tokenAccess address through code: http://HOST:PORT/auth/authorize?client_id=client_id&redirect_uri=redirect_uri
client_id: website address redirect_uri: the callback address of the same source as client_id client_id and redirect_uri need encode conversion, such as:
"http://host/auth/authorize?client_id=" + encodeURIComponent(client_id) + "&redirect_uri=" + encodeURIComponent(redirect_uri);
After authorization and login, the page will jump to redirect_uri with code in the address bar
Request address: http://host/auth/token
Request method: POST
Request header: Content-Type: application/x-www-form-urlencoded
parameter:
Field Type Required Description
grant_type String true fixed value authorization_code
code String true The cod obtained in the previous step
3.2 data subscription
3.2.1 OPC/UA subscription
The main subscription information of laser processing equipment includes: IO status, equipment status, alarm information, etc.endpoint: opc.tcp://IP:PORT/abcAction: subscribe
Interval: The time interval for receiving subscription data for the client
Item (NodeId): Subscribed OPC UA address, such as ns=2;i=4 or ns=3;s=MyVariable Sample subscription data:
- IOstate:
ioSignal | Axis | double[] |
AxisDes | string[] | |
AI | double[] | |
AIDes | string[] | |
AO | double[] | |
AODes | string[] | |
Pwm | double[] | |
PwmDes | string[] | |
DI | double[] | |
DIDes | string[] | |
DO | double[] | |
DODes | string[] |
- Device Status Information:
deviceStatus | dCoordinateX | X坐标 | double |
dCoordinateY | Y coordinate | double | |
dCoordinateZ | Z coordinate | double | |
dWeldingPower | welding power | double | |
dWeldingSpeed | welding speed | double | |
bEnableState | enable state | bool | |
bShutterState | Shutter status | bool | |
bRedLightState | red state | bool | |
bSpottingState | Burst state | bool | |
bAirKnifeState | Air Knife Status | bool | |
bLaserResetState | Laser Reset Status | bool | |
bCoaxialProtectionState | Coaxial shielding gas status | bool | |
bStepState | stepping state | bool | |
dStepValue | step value | double | |
nSystemStatus | Interface state, 2: running state, 3: emergency stop, 4: ready state, 5: pause state, | int | |
bAllAxisHomed | Return to zero state | bool | |
bFastSpeed | fast | bool | |
dSpeedRate | speed multiplier | double |
- alarm information:
alarmInfo | ID | alarm ID | int |
TimeStamp | time | string |
3.2.2 MQTT topic subscription
service address: ws://xxxmqtt configuration item: options:{ clientId, username, password, reconnectPeriod, ... }
clientId: The server uses ClientId to identify the client. Each client connecting to the server has a unique ClientId . Both the client and the server must use the ClientId to identify the state related to the MQTT session between them. A ClientId MUST be present, but a server MAY allow a client to provide a ClientId of zero bytes. If this is done, the server MUST treat this as a special case and assign a unique ClientId to that client. Then process the CONNECT message normally.
username/password: MQTT can perform relevant authentication and authorization by sending the username and password, but if this information is not encrypted, the username and password are sent in clear text
reconnectPeriod: reconnection interval
Connection service: mqtt.connect()
Subscribe topic: mqtt.client#subscribe()
import mqtt from 'mqtt' var options = { clientId: '', username: 'xxxxx', password: 'xxxx', reconnectPeriod: 30*1000, } var client = mqtt.connect('ws://xxxxx', options) client.on('connect', ()=>{ client.subscribe("subject address", { qos:0 }) }).on('message', (topic, message)=>{})
3.3 resource read
Restful GET
A set of development styles based on the concept of Rest, which uses URLs to transfer resources as the entrance for user interaction. For example, obtain user data: http://localhost:8080/user/${userId}user is the interface method for obtaining user data, and userId is the user id.3.4 remote control
3.4.1 MQTT make an announcement
topic:The topic data of the published message: the published dataclient.publish(topic, data)
3.4.2 POST publish resources
url: Request address data: Request payload Request header: Content-Type: application/json; Example:$.ajax({ url: 'xxxx', type: 'POST', data: data, contentType: 'application/json; charset=utf-8', }) .done(function (data, textStatus, xhr) { }) .fail(function (xhr, textStatus, err) { })
3.4.3 JSON-RPC interface
jsonrpc:Specify the JSON-RPC version, which must be set to 2.0, id: call identifier, used to mark a remote call process, and the value must contain a string and a value. method: the string of the method name to be called params:: the parameter passed in by the method, if there is no parameter, pass in empty [] Example:{ "jsonrpc": "2.0", "method": "call", "id": 563297835, "params": { "model": "sale.order", "method": "web_search_read", "args": [ [["state","=","draft"]], ["name"] ], "kwargs": { "limit": 1, "offset": 0, "context": { "lang": "zh_CN", "tz": "Asia/Shanghai" } } } }
3.5 related agreement
3.5.1 MQTT
The MQTT (Message Queuing Telemetry Transport) protocol is an instant messaging protocol and an important part of the Internet of Things. The MQTT protocol is a protocol designed for the communication of a large number of remote sensors and control devices with limited computing power and working in low-bandwidth, unreliable networks. It has the following main characteristics:Use the publish/subscribe message mode to provide one-to-many message publishing and decouple application programs;message transmission for payload content masking;
Provide network connectivity using TCP/IP;
Small transfers with little overhead (fixed-length headers are 2 bytes), and protocol exchanges are minimized to reduce network traffic;
Mechanisms for notifying interested parties of client aborts using the Last Will and Testament features;
There are three messaging qualities of service:
"At most once", the message is sent at most once.
"at least once", ensures that the message arrives, but message duplication may occur.
"only once", ensures that the message arrives once.
3.5.2 OPC/UA
OPC UA (OPC Unified Architecture) refers to the OPC unified architecture, which is a service-based, cross-platform solution. OPC UA has the following characteristics:Expanded the application platform of OPC. The traditional OPC technology based on COM/DCOM can only be based on the Windows operating system, while OPC UA support is extended to Linux and Unix platforms. This enables OPC UA-based standard products to better achieve factory-level data collection and management;OPC UA defines a unified data and service model, making data organization more flexible, enabling interactive communication of alarms and events, data access, historical data access, control commands, and complex data;
The data transmitted by OPC UA can be encrypted, and security control can be implemented for both the communication connection and the data itself. The new security model ensures the reliable transmission of data from original equipment to MES, ERP system, automation and information systems at all levels from local to remote;
OPC UA can pass through the firewall to realize Internet communication.
OPC UA is an application layer protocol based on tcp. Its url is usually opc.tcp://127.0.0.1:4840/abc, which is often called endpoint in opcua. opcua supports c/s mode, and also supports a publish-subscribe mode similar to mqtt. Usually, various devices provide various services as opcua servers. Opcua adopts an object-oriented design idea, using objects (objects) as the basis of the process system to represent data and activities. Objects contain variables, events, and methods, which are connected to each other by reference.
3.5.3 WebSocket
The WebSocket protocol is a new network protocol based on TCP. It implements full-duplex communication between the browser and the server, which allows the server to actively send information to the client. Therefore, in WebSocket, the browser and the server only need to complete a handshake, and a persistent connection can be created directly between the two, and two-way data transmission can be performed, making the data exchange between the client and the server easier. In order to realize push technology, many websites use Ajax polling. Polling is at a specific time interval (such as every 1 second), the browser sends an HTTP request to the server, and then the server returns the latest data to the client's browser. This traditional mode brings obvious disadvantages, that is, the browser needs to continuously send requests to the server. However, the HTTP request may contain a long header, and the real valid data may be only a small part, which obviously wastes a lot of bandwidth and other resources. The advantages of the WebSocket protocol defined by HTML5 are as follows:Small Header: The headers that communicate with each other are very small, only about 2Bytes.The server no longer returns data after passively receiving the browser's request, but actively pushes it to the browser when there is new data.
The WebSocket protocol can better save server resources and bandwidth, and enable more real-time communication.