Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Serial port communication device and method based on LabVIEW

A serial port communication and serial port technology, applied in the field of serial port communication, can solve the problems of tedious and time-consuming parsing of data frame programs, data loss, etc., to achieve the effect of simple and clear programs, stable operation, and solving the problems of complicated and time-consuming programs.

Active Publication Date: 2014-08-13
哈尔滨工业大学人工智能研究院有限公司
View PDF3 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to solve the problems of data loss and redundant and time-consuming analysis of data frame programs in the existing serial communication based on LabVIEW programming, and provide a serial communication device and method based on LabVIEW

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Serial port communication device and method based on LabVIEW
  • Serial port communication device and method based on LabVIEW
  • Serial port communication device and method based on LabVIEW

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment approach 1

[0059] Specific implementation mode one: the following combination figure 1 and figure 2 Illustrate this embodiment, the serial port communication device based on LabVIEW described in this embodiment, described communication device realizes the communication with lower computer as host computer, and it comprises:

[0060] A UI event generating module 1 for sensing the actions of the controls on the human-computer interaction interface, generating events, and sending the generated events to the event message queue in the form of strings as a producer;

[0061] Used as a consumer to receive strings in the event message queue, frame the corresponding events represented by the strings to generate data frames, and then send the generated data frames to the command queue as a producer for UI event processing module 2;

[0062] It is used as a consumer to receive the data frame of the instruction queue, and send the data frame serial port to the lower computer; at the same time, it...

specific Embodiment approach 2

[0065] Specific implementation mode two: the following combination figure 1 and figure 2 Describe this implementation mode, this implementation mode will further describe the first implementation mode, and the UI event generation module 1 specifically includes:

[0066] An application event structure function used to perceive the actions of controls on the human-computer interaction interface, generate events, and identify the events through value changes;

[0067] It is used to use the action of each control as an event branch, and store the event command corresponding to each event branch into the element queue function of the event message queue in the form of a character string.

[0068] In this embodiment, the UI event generation module 1 uses the event structure function to identify the actions of each control on the human-computer interaction interface panel through the value change event. The action of each control is used as an event branch, and each branch generate...

specific Embodiment approach 3

[0069] Specific implementation mode three: the following combination figure 1 and figure 2 Describe this implementation mode, this implementation mode will further explain the implementation mode 1 or 2, and the UI event processing module 2 specifically includes:

[0070] The element dequeue function used to obtain the event message queue;

[0071] It is used to correspond the event branch with the conditional branch, and frame according to the requirements of the protocol frame. After passing the CRC16 check, it becomes the data frame to be sent, and the data frame to be sent is bundled with the command string and sent to the element of the command queue. queue function.

[0072] In this embodiment, the UI event processing module 2 obtains the data of the event message queue through the element dequeuing function in LabVIEW. At this time, the UI event processing module 2 acts as a consumer and uses a conditional structure function to realize that each event corresponds to ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a serial port communication device and method based on LabVIEW, and belongs to the technical field of serial port communication. The serial port communication device and method based on the LabVIEW aim to solve the problems that in existing serial port communication based on LabVIEW programming, data are lost, and the data frame analyzing process is cumbersome and wastes time. The device comprises a UI event generation module, a UI event processing module, a data sending and receiving module, a data analyzing module and a data display module. In the method, four layers of producer and consumer frameworks are formed and all modules are executed in parallel. In the data analyzing step, data received by a serial port are analyzed by means of a state machine analyzing method according to an analyzing frame protocol to obtain a complete analyzing data frame. Integrity of communication data transmission is guaranteed, programs are concise and clear, high in execution speed and stable in operation. The device and the method are used for serial port communication between an upper computer and a lower computer.

Description

technical field [0001] The invention relates to a serial communication device and method based on LabVIEW, and belongs to the technical field of serial communication. Background technique [0002] The serial port is a very common device communication protocol on the computer, and it is a data transmission channel between the commonly used computer and external serial devices. Composing a virtual instrument system with a PC computer through the serial port bus is one of the current virtual instrument configuration methods. The interface is simple and easy to use. [0003] In the field of virtual instruments, NI's LabVIEW, as a programming language specially designed for test and measurement, is becoming more and more attractive. It overcomes the disadvantages of VC, VB, C#, Java and other traditional high-level language programs such as lengthy program codes and inconvenient function expansion. , has the advantages of simple and intuitive graphical programming, friendly huma...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F13/38G06F13/42
Inventor 薛红琳王强吴钊君罗晶
Owner 哈尔滨工业大学人工智能研究院有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products