System, method and device for controlling multiple weightless scales and storage medium

文档序号:1555336 发布日期:2020-01-21 浏览:50次 中文

阅读说明:本技术 多台失重秤控制系统、方法、装置和存储介质 (System, method and device for controlling multiple weightless scales and storage medium ) 是由 郑贻端 于 2019-10-08 设计创作,主要内容包括:本申请涉及一种多台失重秤控制系统、方法、装置和存储介质。其中,多台失重秤控制系统包括多台失重秤和上位机。上位机包括控制组件和PLC。控制组件与PLC连接。PLC分别连接各失重秤。控制组件将获取到的物料数据发送给PLC。PLC分别给物料数据关联的各失重秤编写对应的物料配置指令,并以轮询的方式将各物料配置指令发送给对应的失重秤。失重秤根据物料配置指令进行物料配置。基于此,PLC和多台失重秤构成主从式的控制系统,PLC主站轮询各失重秤从站,发送请求,各从站根据主站请求作出响应,根据接收到的对应物料配置指令进行配料生产,多台失重秤同时作业,不需要人工单独设置各台失重秤的流量和配方,操作便捷,有效提高生产效率,减低故障率。(The application relates to a system, a method and a device for controlling a plurality of weightless scales and a storage medium. The multiple weightless scale control systems comprise multiple weightless scales and an upper computer. The host computer includes control assembly and PLC. The control assembly is connected with the PLC. The PLC is respectively connected with each weightless scale. And the control component sends the acquired material data to the PLC. And the PLC writes corresponding material configuration instructions for the weightless scales associated with the material data respectively, and sends the material configuration instructions to the corresponding weightless scales in a polling mode. And the weightless scale performs material allocation according to the material allocation instruction. Based on this, PLC and many weightless scales constitute master-slave mode control system, and PLC master station polls each weightless scale slave station, sends the request, and each slave station makes a response according to the master station request, carries out batching production according to the corresponding material configuration instruction that receives, and many weightless scales operate simultaneously, need not artifical flow and the prescription of setting up each weightless scale alone, and the simple operation effectively improves production efficiency, reduces the fault rate.)

1. A control system for multiple weightlessness scales is characterized by comprising:

a plurality of weightless scales;

the upper computer comprises a control component and a PLC; the control component is connected with the PLC; the PLC is respectively connected with the weightless scales;

the control component sends the acquired material data to the PLC; the PLC writes corresponding material configuration instructions for the weightless scales respectively according to the at least one weightless scale associated with the material data, and sends the material configuration instructions to the corresponding weightless scales in a polling mode; and the weightlessness scale carries out material configuration according to the obtained material configuration instruction.

2. The multiple weightlessness-scale control system of claim 1,

when the PLC sends each material configuration instruction, sending a corresponding reading instruction to each weightlessness scale in a polling mode;

the weightlessness scale sends a feedback instruction to the PLC according to the reading instruction; the feedback instruction comprises first flow data; the first flow data is actually received by the weightlessness scale;

the PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different; the second flow data is flow data corresponding to the weightless scale in the material data or flow configuration data in the material configuration instruction.

3. The system of claim 1, wherein the PLC is connected to each of the weightless scales via RS422 serial ports;

the PLC establishes communication with each weightless scale respectively by adopting a Modbus protocol; and the control component establishes communication with the PLC by adopting a UDP protocol.

4. The multiple weightlessness scale control system of claim 1, further comprising an alarm device; the alarm device is connected with the PLC.

5. The multiple weightlessness scale control system of any one of claims 1 to 4, wherein said control component is a touch screen; the PLC is FX5U PLC.

6. A control method of a plurality of weightless scales is characterized in that the method is applied to a control system of a plurality of weightless scales;

many weightlessness scale control system include:

a plurality of weightless scales;

the upper computer comprises a control component and a PLC; the control component is connected with the PLC; the PLC is respectively connected with the weightless scales;

the control method of the plurality of weightless scales comprises the following steps:

the PLC respectively writes corresponding material configuration instructions for each weightless scale according to at least one weightless scale associated with material data; the material data is obtained by the control component;

the PLC sends each material configuration instruction to the corresponding weightless scale in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

7. The method of controlling a plurality of weightlessness scales according to claim 6, wherein after the step of sending each material allocation command to the corresponding weightlessness scale in a polling manner by the PLC, the method further comprises:

when the PLC sends each material configuration instruction, sending a corresponding reading instruction to each weightlessness scale in a polling mode; the reading instruction is used for indicating the weightlessness scale to send a feedback instruction to the PLC; the feedback instruction comprises first flow data; the first flow data is actually received by the weightlessness scale;

the PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different; the second flow data is flow data corresponding to the weightless scale in the material data or flow configuration data in the material configuration instruction.

8. The method of controlling a plurality of weightlessness scales according to claim 7, wherein in the step of sending a corresponding reading instruction to each weightlessness scale by the PLC in a polling manner:

and the PLC starts timing when sending the reading instruction to the corresponding weightless scale, and generates an overtime fault signal to trigger alarm if not receiving a feedback instruction returned by the weightless scale within a preset time.

9. The method of claim 8, wherein the predetermined time is determined according to a maximum number of bytes commanded in the material placement command and the feedback command.

10. The method for controlling a plurality of weightlessness scales according to claim 8 or 9, wherein the plurality of weightlessness scale control systems further comprises an alarm device connected with the PLC;

the method for controlling the plurality of weightless scales further comprises the following steps:

and the PLC sends the overtime fault signal to the control component and/or the alarm equipment.

11. An apparatus based on the method for controlling a plurality of weightlessness scales according to any of claims 6 to 10, comprising:

the material configuration instruction compiling unit is used for compiling corresponding material configuration instructions for the weightless scales respectively according to at least one weightless scale associated with material data; the material data is obtained by the control component;

the material configuration instruction sending unit is used for sending each material configuration instruction to the corresponding weightless scale in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

12. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method of multiple weightless scale control according to any of claims 6 to 10.

Technical Field

The application relates to the technical field of weightlessness scales, in particular to a system, a method, a device and a storage medium for controlling a plurality of weightlessness scales.

Background

The weightless scale is one of the existing equipment for industrial raw materials, and is widely applied to continuous feeding production lines in the industries of chemical industry, food, rubber and plastic and the like. At present, when a weightlessness scale is used for production, a plurality of weightlessness scales are often used for matching work at the same time, and the flow and the formula of each weightlessness scale to be controlled are different.

In the implementation process, the inventor finds that at least the following problems exist in the conventional technology: in general, in a production line adopting a plurality of weightless scales for cooperation operation, an operator is required to control the flow and the formula of each weightless scale, the efficiency is low, and the traditional control mode cannot meet the production requirement along with the higher and higher requirement on the production and batching efficiency.

Disclosure of Invention

Based on this, it is necessary to provide a system, a method, a device and a storage medium for controlling multiple weightless scales, aiming at the problems of low efficiency and low flow and formula of each weightless scale controlled by the traditional operator.

A multiple weightless scale control system, comprising:

a plurality of weightlessness scales.

And (4) an upper computer. The host computer includes control assembly and PLC. The control assembly is connected with the PLC. The PLC is respectively connected with each weightless scale.

And the control component sends the acquired material data to the PLC. And the PLC writes corresponding material configuration instructions for the weightless scales respectively according to at least one weightless scale associated with the material data, and sends the material configuration instructions to the corresponding weightless scales in a polling mode. And the weightless scale performs material configuration according to the obtained material configuration instruction.

In one embodiment, when the PLC sends each material configuration instruction, the PLC sends a corresponding reading instruction to each weightless scale in a polling manner.

The weightlessness scale sends a feedback instruction to the PLC according to the reading instruction; the feedback instruction comprises first flow data; the first flow data is flow data actually received by the weightlessness scale.

The PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different; the second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

In one embodiment, the PLC is respectively connected with the weightless scales through RS422 serial ports.

The PLC establishes communication with each weightless scale respectively by adopting a Modbus protocol; the control component establishes communication with the PLC by adopting a UDP protocol.

In one embodiment, the device further comprises an alarm device; the alarm device is connected with the PLC.

In one embodiment, the control component is a touch screen; the PLC is FX5U PLC.

On the other hand, the embodiment of the application also provides a control method of multiple weightless scales, which is applied to a control system of multiple weightless scales.

Wherein, many weightlessness scale control system include:

a plurality of weightlessness scales.

The upper computer comprises a control component and a PLC; the control assembly is connected with the PLC; the PLC is respectively connected with each weightless scale.

The control method of the plurality of weightless scales comprises the following steps:

the PLC respectively compiles corresponding material configuration instructions for each weightless scale according to at least one weightless scale associated with the material data; the material data is obtained by the control component.

The PLC sends the material configuration instructions to the corresponding weightless scales in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

In one embodiment, after the step of sending each material configuration instruction to the corresponding weightless scale in a polling manner by the PLC, the method further includes:

when the PLC sends each material configuration instruction, sending a corresponding reading instruction to each weightless scale in a polling mode; the reading instruction is used for indicating the weightlessness scale to send a feedback instruction to the PLC; the feedback instruction comprises first flow data; the first flow data is flow data actually received by the weightlessness scale.

The PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different; the second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

In one embodiment, in the step of sending a corresponding reading instruction to each weightlessness scale by the PLC in a polling manner:

and when the PLC sends a reading instruction to the corresponding weightless scale, timing is started, and if a feedback instruction returned by the weightless scale is not received within a preset time, an overtime fault signal is generated to trigger alarm.

In one embodiment, the preset time is obtained according to the maximum byte number of the instruction in the material configuration instruction and the feedback instruction.

In one embodiment, the plurality of weightless scale control systems further comprise an alarm device connected with the PLC.

The control method of the plurality of weightless scales further comprises the following steps:

the PLC sends a timeout fault signal to the control component and/or the alarm device.

In one embodiment, there is provided an apparatus based on the above multiple weightless scale control methods, including:

the material configuration instruction compiling unit is used for compiling corresponding material configuration instructions for the weightless scales respectively according to the at least one weightless scale associated with the material data; the material data is obtained by the control component.

The material configuration instruction sending unit is used for sending each material configuration instruction to the corresponding weightless scale in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

In one embodiment, a computer storage medium is provided having a computer program stored thereon, which when executed by a processor, implements a method of multiple weightless scale control as described above.

One of the above technical solutions has the following advantages and beneficial effects:

through the multiple weightless scale control systems, the PLC and the multiple weightless scales form a master-slave control system, the PLC is used as a master station to actively send a request, and sends each material configuration instruction to a corresponding weightless scale slave station in a polling mode to control the flow and formula of each weightless scale slave station, and the multiple instruction polling mode can effectively shorten the communication period and reduce the failure rate; each weightless scale slave station responds according to the request of the PLC master station, and performs material configuration according to the received corresponding material configuration instruction, so that the logic control of simultaneous work of a plurality of weightless scales is realized, the flow, the formula and the like of each weightless scale do not need to be manually and independently set, a production line for the cooperation work of the plurality of weightless scales is further formed, the operation is more convenient, the communication period is effectively shortened, the production efficiency is improved, the fault rate is reduced, and the industrial production requirements can be met.

Drawings

The foregoing and other objects, features and advantages of the application will be apparent from the following more particular description of preferred embodiments of the application, as illustrated in the accompanying drawings. Like reference numerals refer to like parts throughout the drawings, and the drawings are not intended to be drawn to scale in actual dimensions, emphasis instead being placed upon illustrating the subject matter of the present application.

FIG. 1 is a first schematic block diagram of a multiple weightless scale control system in one embodiment;

FIG. 2 is a second schematic block diagram of a multiple weightless scale control system in one embodiment;

FIG. 3 is a third schematic block diagram of a multiple weightless scale control system in one embodiment;

FIG. 4 is a fourth schematic block diagram of a multiple weightless scale control system in one embodiment;

FIG. 5 is a first schematic flow diagram of a multiple weightless scale control method in one embodiment;

FIG. 6 is a second schematic flow diagram of a multiple weight loss scale control method in accordance with an embodiment;

fig. 7 is a schematic structural diagram of a plurality of weightless scale control devices in one embodiment.

Detailed Description

To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

The embodiment of the application can be applied to a production line for operating a plurality of weightless scales; on a production line for operating a plurality of weightless scales, the plurality of weightless scales are often required to be matched with each other to work, and the flow and the formula required to be set by each weightless scale are often different. Meanwhile, the traditional mode that an operator controls the flow and the formula of each weightless scale is low in efficiency, the requirement on production and batching efficiency is higher and higher, the requirement on industrial production cannot be met, and even the progress of the whole production can be influenced. Therefore, the embodiment of the application provides a control system for multiple weightless scales, which can realize that multiple weightless scales work on a production line simultaneously, does not need to manually and independently set the flow, the formula and the like of each weightless scale, is more convenient to operate, effectively improves the production efficiency, and can meet the industrial production requirements.

In one embodiment, there is provided a multiple weightless scale control system, as shown in fig. 1, comprising:

a plurality of weightlessness scales.

And (4) an upper computer. The host computer includes control assembly and PLC. The control assembly is connected with the PLC. The PLC is respectively connected with each weightless scale.

And the control component sends the acquired material data to the PLC. And the PLC writes corresponding material configuration instructions for the weightless scales respectively according to at least one weightless scale associated with the material data, and sends the material configuration instructions to the corresponding weightless scales in a polling mode. And the weightless scale performs material configuration according to the obtained material configuration instruction.

Specifically, the multiple weightlessness scale control systems comprise multiple weightlessness scales and an upper computer. The upper computer obtains material data, corresponding material configuration instructions are respectively compiled for the weightless scales according to at least one weightless scale associated with the material data, and the material configuration instructions are sent to the corresponding weightless scales so as to control the weightless scales to configure the materials. The material data may include addresses associated with the weightless scales, and flow, formula, temperature, status, and delay data corresponding to each weightless scale address.

Specifically, the upper computer comprises a control assembly and a PLC, and the PLC and the control assembly are matched to be used as the upper computer to establish communication with each weightless scale. The control assembly is connected with the PLC. The PLC is respectively connected with each weightless scale. The control assembly acquires required material data and sends the material data to the PLC, and man-machine interaction is achieved. Illustratively, the control component may send the material data to the PLC in the form of a production instruction. And the PLC is used as a master station to compile corresponding material configuration instructions for the weightless scale slave stations respectively according to at least one weightless scale associated with the material data, and sends the material configuration instructions to the corresponding slave stations in a polling mode so as to control the corresponding slave stations to work.

In the embodiment of the application, the corresponding material configuration instructions are compiled for the weightless scales, and the communication is carried out in a polling mode of a plurality of instructions, so that the communication period is effectively shortened, and the traditional mode that one communication instruction is shared to continuously change parameters is not adopted for communication. Furthermore, in the embodiment of the application, a blank scanning period for not executing communication is kept between two instruction transmissions, so that the last communication is ensured to be completely exited, sufficient interval time is formed, the situation that two communication instructions are overlapped at the same time is avoided, and the communication failure rate can be effectively reduced. The upper computer is connected with the weightless scale and mainly carries out communication in a walking mode, the difficulty of communication is that errors are reduced and the speed is accelerated, and in a traditional communication mode sharing one communication instruction, communication is carried out in a mode of continuously changing parameters, so that the communication period is longer, and the communication efficiency is influenced. In addition, in the conventional communication mode, the next instruction operation is started when the previous communication is completed but the specified interval time is not reached, so that communication conflict occurs and communication interruption failure occurs. It should be noted that the material data at least includes flow rate and/or formula data corresponding to the weightless scale address.

According to the embodiment of the application, the PLC and the control assembly are matched to serve as an upper computer, and the communication is established with each weightless scale through the PLC respectively. The control assembly is used for sending the obtained material data to the PLC, and man-machine interaction is achieved. Illustratively, the control component includes an input component and an output component. Optionally, the input component comprises at least one of a keyboard, a mouse, and a touch screen; alternatively, the output component may be a touch screen or a display screen.

The material data may be obtained from the recipe number or may be obtained from setting the dosing data on the control assembly. In one example, based on a plurality of sets of preset material data pre-stored in the PLC, an operator selects a recipe number corresponding to the set of preset material data through the control component to determine the corresponding preset material data. And calling material data corresponding to the formula number by the PLC, and compiling corresponding material configuration instructions for the weightless scales respectively according to at least one weightless scale associated with the material data so as to control the plurality of weightless scales to configure the materials. Each set of preset material data comprises data such as an address of the associated weightlessness scale, flow, formula, temperature and state corresponding to the address of the weightlessness scale. In one example, an operator sets desired material data via a control component, which sends the acquired material data to the PLC as material data input. Taking the set flow data as an example, if the total flow is set to be 100KG/H through the control component, the corresponding three weightless scale addresses are respectively set to be 20%, 30% and 50% according to the formula ratio corresponding to each weightless scale address, the control component sends the material data to the PLC, the PLC respectively compiles corresponding material configuration instructions for each weightless scale according to the three weightless scales associated with the material data, so as to control the flow configurations corresponding to the three weightless scales to be 20KG/H, 30KG/H and 50KG/H respectively. Further, in the embodiment of the present application, the flow data of the weightless scale corresponding to the material data may be adjusted by changing the recipe ratio or the total flow corresponding to each weightless scale address.

The PLC uses a programmable memory, stores therein instructions for performing operations such as logic operation, sequence control, timing, counting, and arithmetic operation, and controls various types of mechanical devices or production processes through digital or analog input/output. Because PLC computing power is stronger, can handle a large amount of data fast, effectively improve the communication efficiency of host computer and each weightless balance. In the traditional communication mode of the upper computer and the weightless scales, the upper computer is matched with the upper computer software through the industrial personal computer and the upper computer software to establish communication with each weightless scale, so that the problems that the upper computer software is expensive and cannot write a large number of script programs exist, even the system runs slowly, and the requirement of industrial control on quick response is not met.

Based on the structure, the control assembly sends the acquired material data to the PLC master station, the PLC master station actively writes corresponding material configuration instructions for the weightless scale slave stations respectively according to at least one weightless scale associated with the material data, and sends the material configuration instructions to the corresponding weightless scale slave stations in a polling mode, and the communication period can be effectively shortened and the fault rate can be reduced in a multi-instruction polling mode. Each weightless scale responds to the PLC request, and material configuration is carried out according to the obtained material configuration instruction, so that the logic control of the PLC master station on a plurality of weightless scale slave stations is realized, a production line with a plurality of weightless scales working simultaneously is formed, and the production efficiency is effectively improved.

In one embodiment, when the PLC sends each material configuration instruction, the PLC sends a corresponding reading instruction to each weightless scale in a polling manner.

And the weightlessness scale sends a feedback instruction to the PLC according to the reading instruction. The feedback instructions include first traffic data. The first flow data is flow data actually received by the weightlessness scale.

And the PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different. The second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

Specifically, when the PLC sends each material configuration instruction, the PLC sends a corresponding reading instruction to each weightlessness scale in a polling mode. The reading instruction is used for indicating the corresponding weightlessness scale to send a feedback instruction to the PLC. The PLC can compare the data actually received by the weightless scale in each feedback instruction with the corresponding data in the material data or the material configuration instruction so as to verify whether the material configuration instruction received by the weightless scale is correctly written. Wherein the feedback instruction may include data actually received by the weightlessness scale; optionally, the feedback instructions may include at least one of recipe, flow rate, temperature, delay time, weight, and the like. The material data or the corresponding data in the material configuration command may include at least one of recipe, flow rate, temperature, delay time, weight, and the like.

Specifically, the feedback instruction includes first flow data, and the first flow data is flow data actually received by the weightlessness scale. And the PLC compares the first flow data with the second flow data to check whether the received flow data is correctly written into each weightlessness scale, and generates a prompt instruction to prompt a fault when the comparison result is different. In one example, the PLC compares the first flow data with the flow data of the weightless scale corresponding to the material data, and generates a prompt instruction to prompt a fault when the comparison result is different; in one example, the PLC compares the first flow rate data with the flow rate configuration data in the material configuration instruction, and when the comparison result is different, generates a prompt instruction to prompt an operator that the material configuration instruction is not normally written into the corresponding weightless scale at present, and timely removes the fault, so that the safety of the control system of the multiple weightless scales can be improved.

In one embodiment, when the PLC sends a reading instruction to the corresponding weightlessness scale, timing is started, and if a feedback instruction returned by the weightlessness scale is not received within a preset time, an overtime fault signal is generated to trigger an alarm.

In one embodiment, as shown in fig. 2, the PLC is connected to each weightless scale through RS422 serial ports.

Specifically, the PLC can adopt RS422 serial ports to respectively carry out half-duplex communication with each weightless scale.

In one embodiment, the PLC uses the Modbus protocol to establish communication with each weightless scale separately. The control component establishes communication with the PLC by adopting a UDP protocol.

Specifically, the PLC establishes communication with each weightlessness scale through a Modbus protocol, and the PLC is used as a Modbus master station to communicate with each weightlessness scale in a command polling mode.

The Modbus protocol has the advantages of strong debugging capability, large data transmission quantity, good real-time property, low hardware requirement cost and the like. The protocol supports multiple electrical interfaces, such as RS422, RS485, and can also be transmitted over various media, such as fiber, wireless, etc. The Modbus protocol is a master/slave serial communication protocol, only one master station in the network is a slave station, and two transmission modes of RTU and ASCII are supported.

The control component establishes communication with the PLC by using a User Datagram Protocol (UDP).

In one embodiment, as shown in fig. 3, the multiple weightless scale control system further comprises an alarm device. The alarm device is connected with the PLC.

Specifically, the alarm device includes at least one of an LED (light Emitting Diode) lamp, a sound device, and a touch screen.

In one embodiment, as shown in FIG. 4, the control component is a touch screen.

Specifically, the control component is a touch screen. The touch screen acquires material data, the acquired material data are sent to the PLC, and the PLC is triggered to write a material configuration instruction for the weightless scale corresponding to the material data. In the control process of the plurality of weightless scales through the PLC, the touch screen can monitor the material distribution condition in real time, and the different batching states of the weightless scales are displayed on the interface of the touch screen.

In one embodiment, as shown in FIG. 4, the PLC is FX5U PLC.

Specifically, the PLC is FX5U PLC. FX5U PLC has the advantages of high cost performance and high reaction speed, the scanning period of the PLC of the same level in the industry is generally dozens of milliseconds, the scanning period of the PLC only needs three to four milliseconds, the reaction speed is very high, and the PLC is suitable for a control system of a plurality of weightless scales. In one embodiment, a method for controlling multiple weightlessness scales is provided and applied to a control system of multiple weightlessness scales.

Many weightless balance control system include:

a plurality of weightlessness scales.

And (4) an upper computer. The host computer includes control assembly and PLC. The control assembly is connected with the PLC. The PLC is respectively connected with each weightless scale.

As shown in fig. 5, the method for controlling a plurality of weightless scales includes:

s100, respectively writing corresponding material configuration instructions for each weightless scale by the PLC according to at least one weightless scale associated with the material data; the material data is obtained by the control component.

Step S200, the PLC sends the material configuration instructions to the corresponding weightless scales in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

Specifically, the PLC receives the material data acquired by the control assembly, and writes a material configuration instruction for the corresponding weightless scale according to at least one weightless scale associated in the material data. The material data comprises associated weightlessness scale addresses, flow and formula data corresponding to the weightlessness scale addresses. And the PLC sends each material configuration instruction to the corresponding weightless scale in a multi-instruction polling mode, and each weightless scale responds to the corresponding material configuration instruction to perform material configuration according to the corresponding material configuration instruction.

In one embodiment, as shown in fig. 6, after the step of sending each material configuration instruction to the corresponding weightless scale in a polling manner by the PLC, the method further includes:

step S300, when the PLC sends the material configuration instructions, the PLC sends corresponding reading instructions to the weightless scales in a polling mode; the reading instruction is used for indicating the weightlessness scale to send a feedback instruction to the PLC; the feedback instruction comprises first flow data; the first flow data is actually received by the weightless scale;

step S400, the PLC compares the first flow data with the second flow data, and generates a prompt instruction to prompt a fault when the comparison result is different; the second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

Specifically, after the PLC sends all the material configuration instructions, the PLC sends corresponding reading instructions to the weightlessness scales in a polling mode. And the reading instruction is used for controlling the corresponding weightless scale to return a feedback instruction to the PLC. And the PLC compares the data in the feedback instructions with the corresponding data in the material data or the material configuration instructions to verify whether the data volume in the weightlessness scale is normally written. When the comparison results are different, the PLC generates a prompt instruction to prompt faults. Since the embodiment of the method of the present application is applied to the above-mentioned multiple weightlessness scale control system, specific contents may be referred to the description in the embodiment of the system of the present application, and are not described herein again.

Specifically, the feedback instruction includes first flow data; the first flow data is flow data actually received by the weightlessness scale. And the PLC compares the first flow data with the second flow data to check whether the received flow data is correctly written into each weightlessness scale, and generates a prompt instruction to prompt a fault when the comparison result is different.

It should be understood that although the various steps in the flowcharts of fig. 5 and 6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 5 and 6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

In one embodiment, in the step of sending a corresponding reading instruction to each weightlessness scale by the PLC in a polling manner:

and when the PLC sends a reading instruction to the corresponding weightless scale, timing is started, and if a feedback instruction returned by the weightless scale is not received within a preset time, an overtime fault signal is generated to trigger alarm.

Specifically, the PLC sends a reading instruction to the corresponding weightlessness scale in a polling mode, and the weightlessness scale is required to return a feedback instruction so as to check whether the material configuration instruction of the weightlessness scale is written correctly. And when the PLC sends a reading instruction to the corresponding weightless scale, timing is started, if a feedback instruction returned by the weightless scale is received within a preset time, one-time complete polling is finished, and the PLC automatically polls a slave station of the next weightless scale. And if the PLC does not receive a feedback instruction returned by the weightlessness scale within the preset time, the PLC judges that a fault occurs and generates an overtime fault signal to trigger alarm. According to the embodiment of the application, the whole polling period is effectively shortened by setting the preset time, the communication times in unit time can be increased, and the communication efficiency is further improved. And improper setting of the preset time will cause communication errors or an overlong whole communication period. The predetermined time is determined by the transmission mode of the communication protocol, the number of bytes in the command, the buffering time, and the interval time between frames. In one example, the slave station maximum response time is obtained by individually detecting the response time of each weightless scale slave station to the PLC command, and is taken as the preset time.

In one embodiment, the preset time is obtained according to the maximum byte number of the instructions in the material configuration instruction and the feedback instruction.

Specifically, in the Modbus protocol, the preset time is obtained according to the maximum byte number of the instruction in the material configuration instruction and the feedback instruction, in this embodiment, the corresponding data transmission time is obtained according to the maximum byte number of the transmission instruction at the current communication baud rate by determining the maximum byte number of the instruction in the material configuration instruction and the feedback instruction, so as to set the preset time. Under normal conditions, the preset time should be longer than the time from the time when the PLC master station sends a request to the time when the corresponding weightlessness scale feedback instruction is received. If the feedback instruction of the corresponding weightlessness scale is not received within the appointed preset time, the overtime fault is determined to occur, and the PLC generates an overtime fault signal to give an alarm.

In one example, the preset time is determined by the maximum number of bytes of the material configuration command and the feedback command at the corresponding communication baud rate. The preset time is twice the maximum transmission time, and the maximum transmission time is the communication time for transmitting the maximum byte. Under normal conditions, the sending time of each material configuration instruction does not exceed the preset time. When the PLC master station polls the corresponding weightless scales, timing is started, if the PLC does not send the material configuration instruction to the corresponding weightless scales within the preset time, and if the sending time is longer than the preset time, an overtime fault is determined to occur; if the PLC does not receive the data returned by each weightless scale within the preset time and the receiving is overtime, the PLC is determined to have overtime fault. If the current communication baud rate is set to 9600bps, the data frame includes 8-bit data bits, no check, and 1-bit stop bit, and a frame of data is 10 bits, taking read operation as an example, assuming that the maximum byte number of the instructions in the material configuration instruction and the feedback instruction is 8, the communication time corresponding to transmission of the maximum byte is 8 × 10 bits × 1000/9600 — 8.33ms, and the preset time is twice the maximum transmission time, i.e., 16.66ms, so as to obtain the preset time.

In one example, the preset time is determined by the maximum number of bytes of the material configuration command and the feedback command at the corresponding communication baud rate. Specifically, the preset time is the sum of twice the maximum transmission time and the inter-frame interval time, and the maximum transmission time is the communication time for transmitting the maximum byte. If the current communication baud rate is set to 9600bps, a data frame includes 8-bit data bits, no check, and a 1-bit stop bit, and a frame of data is 10 bits, for example, in a read operation, assuming that the maximum byte number of the commands in the material configuration command and the feedback command is 8, the communication time for transmitting the corresponding maximum byte is 8 × 10 bits × 1000/9600 — 8.33ms, twice the maximum transmission time is 16.66ms, while based on the Modbus RTU communication method, there is 3.5 character interval time between frames, and under 9600bps, the inter-frame interval time is about 4ms, so the sum of the maximum transmission time and the inter-frame interval time, which is twice the preset time, is 19.66 ms. If the number of bytes sent by the current PLC is 8, the sending time of the corresponding material configuration instruction may be calculated as 8 × 10bit × 1000/9600 ═ 8.33ms, and if the number of bytes of the corresponding returned feedback instruction is 7, the required return time is: the 7 × 10bit × 1000/9600 is 7.29ms, and the time required for one communication is 15.62ms, which is less than the preset time. Under normal conditions, the actual communication time of the PLC polling the weightless scale slave station should not exceed the preset time.

In one example, the preset time is obtained from the maximum byte number of the instruction in the material configuration instruction and the maximum byte number of the instruction in the feedback instruction at the corresponding communication baud rate. The preset time is the sum of twice the maximum transmission time, the interval time between frames and the buffer time. Wherein the maximum transmission time is the communication time of the maximum byte of the transmission instruction. The buffering time may be 4ms to 5ms as summarized by long theoretical studies and practical experience.

Due to the fact that the Modbus protocol is good in universality, the communication speed and the communication period cannot be adjusted in a self-adaptive mode. By setting the preset time, the communication times in unit time is increased, and the whole polling period is shortened, so that the communication efficiency is improved. If the preset time is set unreasonably, communication errors or the whole communication period is too long.

In one embodiment, the plurality of weightless scale control systems further comprise an alarm device connected with the PLC.

The control method of the plurality of weightless scales further comprises the following steps:

the PLC sends a timeout fault signal to the control component and/or the alarm device.

Specifically, in the multiple weightless scale control systems, when an overtime fault occurs, the PLC sends an overtime fault signal to the control component and/or the alarm device. In one embodiment, the PLC sends an overtime fault signal to the alarm device, and the alarm device timely reminds an operator of the overtime fault. Optionally, the device comprises at least one of an audible device, a touch screen, and a notification light.

In one embodiment, there is provided an apparatus based on the above-mentioned multiple weightlessness-scale control method, as shown in fig. 7, including:

the material configuration instruction compiling unit is used for compiling corresponding material configuration instructions for the weightless scales respectively according to the at least one weightless scale associated with the material data; the material data is obtained by the control component.

The material configuration instruction sending unit is used for sending each material configuration instruction to the corresponding weightless scale in a polling mode; and the material configuration instruction is used for indicating the corresponding weightless scale to perform material configuration.

Specifically, the device writes corresponding material configuration instructions for each weightless scale according to material data through a material configuration instruction writing unit; and the material configuration instruction sending unit is used for sending the material configuration instruction to the corresponding weightless scale in a polling manner.

In one embodiment, the plurality of weightless scale control devices further comprises:

the reading instruction sending unit is used for sending corresponding reading instructions to the weightlessness scales in a polling mode when the material configuration instructions are sent; the reading instruction is used for indicating the weightlessness scale to send a feedback instruction to the PLC; the feedback instruction comprises first flow data; the first flow data is flow data actually received by the weightlessness scale.

In one embodiment, the plurality of weightless scale control devices further comprises:

the data comparison unit is used for comparing the first flow data with the second flow data and generating a prompt instruction to perform fault prompt when the comparison result is different; the second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

For specific limitations of the multiple weightlessness scale control devices, reference may be made to the above limitations of the multiple weightlessness scale control method, and details thereof are not repeated here. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation. All or part of the modules in the weightless scale control devices can be realized by software, hardware and the combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer storage medium is provided having a computer program stored thereon which, when executed by a processor, implements a method of multiple weightless scale control as described above.

In one embodiment, after the step of sending each material configuration instruction to the corresponding weightless scale in a polling manner is executed by the processor, the following steps are further implemented:

when the material configuration instructions are sent, sending corresponding reading instructions to the weightlessness scales in a polling mode; the reading instruction is used for indicating the weightlessness scale to send a feedback instruction to the PLC; the feedback instruction comprises first flow data; the first flow data is flow data actually received by the weightlessness scale.

In one embodiment, after the step of sending each material configuration instruction to the corresponding weightless scale in a polling manner is executed by the processor, the following steps are further implemented:

comparing the first flow data with the second flow data, and generating a prompt instruction to prompt a fault when the comparison result is different; the second flow data is the flow data corresponding to the weightless scale in the material data or the flow configuration data in the material configuration instruction.

For the specific definition of the storage medium, reference may be made to the above definition of the method for controlling multiple weightlessness scales, and details are not described here. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种航天员质量测量方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类