Learning to realize serial communication programming in MSComm in LabVIEW

Publisher:翅膀小鹰Latest update time:2015-10-20 Source: eefocusKeywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
   Problem description: For general applications, LabVIEW can be implemented directly using the VISA serial port API function, which is convenient and fast. However, for serial communication that requires the use of interrupts, the MSComm control must be used to implement it.
   MSComm control: To operate ActiveX control, the most important thing is to use its properties, method functions, and handle the callback of interrupt events. LabVIEW provides 8 functions in "ActiveX" of "Interconnect Interface" for the control set for ActiveX: Automation Open, Close Reference, To Variant, Variant to Data, Invoke Node, Property Node, Register Event Callback, UnRegister Event Callback.
   Using the MSComm control in LabVIEW:
   First, you need to add MSComm to LabVIEW. In "Tools"--"Import"--"ActiveX to Palette", add MSComm to the LabVIEW environment and select the default path.
   Then you can find mscomm in ".Net and ActiveX" on the front panel and drag it to the front panel. You can also place an ActiveX container on the front panel first, then right-click and select the mscomm control:
[MSComm] Learning to implement serial communication programming with MSComm in LabVIEW
   Call the ActiveX control to create a client application:
   Mainly use 8 functions in "interconnection interface" -- "ActiveX":
[MSComm] Learning to implement serial communication programming with MSComm in LabVIEW
   ActiveX event registration related: using event callbacks to handle interrupt events, etc.
[MSComm] Learning to implement serial communication programming with MSComm in LabVIEW
   Programming Notes:
   For the MSComm control, its automation reference is used during programming, that is, LabVIEW treats the ActiveX control as an object. Connect a property node to the control to view all properties. When connecting a call node, MSComm does not provide any methods, so it will be displayed as no method. The following are the properties of MSComm seen in LabVIEW:
[MSComm] Learning to implement serial communication programming with MSComm in LabVIEW
   In addition, the callback event registration must first determine what kind of data needs to be transmitted. If it contains multiple data types, a cluster can be used to solve it. The callback function will automatically create event parameters with the same data type and provide a reference to the ActiveX control.

Keywords:LabVIEW Reference address:Learning to realize serial communication programming in MSComm in LabVIEW

Previous article:Basic issues that should be considered when creating a virtual channel
Next article:Registering the MSComm Control for Use in LabVIEW

Recommended ReadingLatest update time:2024-11-16 21:58

Data Acquisition System Based on LabVIEW and MCU Serial Port
1LabVIEW part design 1.1 Introduction to VISA LabVIEW provides a powerful VISA library. VISA (Virtual Instrument Software Architecture) is a virtual instrument software specification, which is a general term for standard I/O function libraries and related specifications used for instrument programming. The VISA librar
[Test Measurement]
Data Acquisition System Based on LabVIEW and MCU Serial Port
Key Technical Points of LabView Embedded Development Module
Regardless of the design language used, poor programming techniques can negatively impact the performance of an application, especially an embedded application. While efficient programming techniques are important for most applications, the resource-starved environments in which embedded applications operate require s
[Test Measurement]
Creating a Microcontroller Test System Using LabVIEW and FPGA
  For our previous application testbed, we used a controller board developed in-house, but this board required a separate compatible toolchain to download the applications. In addition, the user interface of these toolchains was difficult to navigate, forcing us to use additional test and measurement equipment.     
[Test Measurement]
Creating a Microcontroller Test System Using LabVIEW and FPGA
Using LabVIEW and PXI Hardware to Adjust the Position of the Primary Mirror of the European Very Large Telescope
  The Challenge:   Develop an electronic device and embedded control software to control and adjust the prototype of three position adjustment actuators of the main mirror of the European Extremely Large Telescope (E-ELT), so as to adjust the position of a 90Kg weight with nanometer precision. This will serve as a c
[Test Measurement]
Using LabVIEW and PXI Hardware to Adjust the Position of the Primary Mirror of the European Very Large Telescope
Delphi uses Labview and CompactRIO to develop power steering simulation feedback system
“We developed a steering reaction force simulation system with complex algorithms using NI CompactRIO hardware and NI LabVIEW software in just two months.” challenge: Develop a steering reaction force simulation system that can collect data from different sensors, perform calculations, match information, and gener
[Test Measurement]
Delphi uses Labview and CompactRIO to develop power steering simulation feedback system
Labview relative path problem
Made such a topic: Generate 10 data from 0 to 9, and then write them line by line into a text file in the same path as the VI. Requirements: 1.             Each value occupies one line; 2.             The text file and the VI are in the same path; The difficulty is that the text file must be in the same path as the
[Test Measurement]
Linear Algebra in LabVIEW 8.2
  The linear algebra operation node of LabVIEW 8.2 is located in "Mathematics → Linear Algebra" in the function palette, which contains matrices, equations, etc., as shown in the figure.     Linear Algebra sub-palette   Compared with the general equations above, the following table lists the icons, terminals ,
[Test Measurement]
Linear Algebra in LabVIEW 8.2
Virtual Vibration Test and Analysis System Based on LabVIEW
Preface In the field of modern engineering technology, there are a lot of vibration problems. For example, the vibration caused by vehicles driving on uneven roads; the vibration of rotating machinery during operation due to mass imbalance, etc. In most cases, vibration is harmful. It will affect the normal oper
[Test Measurement]
Virtual Vibration Test and Analysis System Based on LabVIEW
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号