LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i program for data acquisition using RS-232 on Labview

Hi, sorry if this question have been asked before, tried searching through but couldn't find what i need... I am a beginner on this software, still in the midst of figuring out how to use this program but couldn't really grasp the essense of it yet.

I need to do a VI that actually reads data coming in from RS-232 Serial Port... but have no idea how to go about doing it, anyone here can help me with a comprehensive tutorial? Thank you in advance 😄 
0 Kudos
Message 1 of 12
(21,896 Views)

Hi Simmy.

Try searching the Examples of LabView. There should be some good ones for RS232 also......

Best Regards BCL

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
Message 2 of 12
(21,892 Views)

Hi Simmy,

if you use your example finder and search for "RS-232" you will find the "Basic Serial Write and Read.vi" and the "Advanced Serial Write and Read.vi" and some others. I think this should help you to start.

Mike

0 Kudos
Message 3 of 12
(21,890 Views)
Have a look at these threads.  They contain info that may help you.

Thread 1:  Configuring the serial port:

http://forums.ni.com/ni/board/message?board.id=170&message.id=99660&query.id=0#M99660

 

Thread 2:  Getting MAX to recognize the COM port..

This one required a modification to an ini file.. 

http://forums.ni.com/ni/board/message?board.id=170&message.id=19045&query.id=0#M19045

 

You may also want to look at the Knowledge Based information:

search:

http://search.ni.com/nisearch/nisearchservlet?nistype=default&filter=+%2BLanguageType%3AEnglish+%2Bn...

info:

http://digital.ni.com/public.nsf/allkb/57C21F04AC7FFFCA86256877007996E3

 

Message 4 of 12
(21,855 Views)
Message 5 of 12
(21,852 Views)
thanks to everyone who contributed for the help, but sad to say, i still don't understand alot of things, been researching, and reading up lots of books and reference, but i get more and more confused, as of now, i need to have read only functionality from RS-232, instrument is not confirmed yet... But i need to get the functionality up and be able to do a test using 2 computers via RS-232.

It's my first time using this software and i have to say i'm really stumbled on how much functionality this program offers, would be very glad if someone can point me to somewhere that offers step by step explantion on what is VISA, and how to use it... and how to configure COM1 to work.

Once again thanks a bunch everyone! this community is indeed helpful 😃
0 Kudos
Message 6 of 12
(21,815 Views)
First, you really need to determine the make and model of instrument? There are so many variations in serial communication that it's impossible to give step-by-step instructions. There are many existing drivers at the Instrument Driver Network. If a driver exists, then you can save a tremendous amount of time. Second, what exactly do you mean by '2 computers via RS-232'? Two different computers each with an instrument? Third, you need to have a programming manual for the instrument? This will be required. Does the vendor of the instrument provide a test program for you to verify that the com port is configured correctly and you have the right cable? Doing this type of verification is important to do before you even think about using LabVIEW. If there is no provided program, you should use the windows program Hyperterminal before doing any programming. Once you've verified communication works, then maybe some of the links will make more sense. If not, post back with answers to these questions and the results of the verification.
Message 7 of 12
(21,805 Views)

Hi Simmy.

Another approach could be using a RS232 crossover cable (RX/TX crossed) plugging this into COM1 and COM2 on the same computer.

Using Labview to Send Charecters from COM1 and using Hyperterminal on COM2 to recieve the charecters.

That way You can confirm the settings for your system.

About the instrument: Dennis is absolutely right. You defenitely need at least the manual for the instrument to know what commands You are going to send. Some instruments use their own "protocol" so You might have to "simulate" that protocol for that particular instrument.

Regards BCL

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
Message 8 of 12
(21,768 Views)

Hi again.

Sorry i've seem to have lost it......What i ment was of course using Hyperterminal to SEND and LabView to RECEIVE Characters.......(After all it was what You asked for)

Smiley Wink

Regards BCL

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 9 of 12
(21,764 Views)


Dennis Knutson wrote:
you should use the windows program Hyperterminal before doing any programming. Once you've verified communication works, then maybe some of the links will make more sense.

I agree with Dennis.  You need to be able to communicate with the instrument manually before attempting to automate it. 
 
You should be able to find the manual over the internet with the make /  model of the instrument.  Find some basic commands and try them using Hyperterminal.  I'm not sure what more you would accomplish by communicating between two PC's other than seeing that the serial ports work.  They should be okay.
Try to focus on communicating with the instrument.
What is the instrument (Manufacturere & model), or did I miss that in the previous posts?
0 Kudos
Message 10 of 12
(21,738 Views)