10-13-2013 10:59 PM
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
10-14-2013 04:02 PM
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
11-01-2013 05:45 AM
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.