Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert a VB code(Comm1.Output=Chr$(7)+"R"+Chr$(13)) to labview code

Hi,

I have a question about serial communication.

The code was written by VB, and I want to transform them to labview.

One of the code in VB is: Comm1.Output=Chr$(7)+"R"+Chr$(13), it means 'bell+R+carriage return' were sent to com1 port.

But I don't know how to write this code in labview.

Could anyone help me?

Great thanks

0 Kudos
Message 1 of 3
(6,636 Views)

Hi cctt126,

 

I would recommend you re-post this question in either the LabVIEW forum or the GPIB/Serial forum. Those forums are much more active and more likely to get you a response. Also, since VB is a less commonly used language and there’s probably not a direct translation into LabVIEW, you might provide more of a description of what you are trying to accomplish with your code. Thanks!

That said, LabVIEW has several built-in examples for serial communication that should help you get started. You can find them by navigating to Help>>Find Examples in LabVIEW, then Hardware Input and Output>>GPIB. If you don’t have the NI-VISA driver installed (or if you installed LabVIEW after installing the driver) the examples may not show up.

 

Regards,

Kelsey Johnson

Applications Engineer

National Instruments

0 Kudos
Message 2 of 3
(6,625 Views)

Thanks.

 

Type cast could be used to realize the function of Chr$(7) and Chr$(13).

Just be careful about the data precision of Type cast input.

0 Kudos
Message 3 of 3
(6,540 Views)