Reading Serial Port Data using VISA in Labview

I had been feeling so sleepy today that I wanted to try VISA (Virtual Instrumentation Software Architecture) to read the data from my PIC16F877A microcontroller using the LabVIEW software. Well I did it in a whopping 5 minutes!

Well, the data that is being read is shown in the snapshot below:

LAbview serial port communication

The number of bytes to be read is controlled by the user. However, the data that is being read is displayed in a marquee sequence.

For e.g: When you choose to read a 4 byte data, the fourth byte of data is replaced by a byte with a  shift towards the right when the latest byte of  data arrives at the first bit (left side).

So your data hello would be read as : h –> he –> hel —> and so on. I captured a snapshot when the indicator read ‘hello’ 😉

However, my reading process was interrupted by an error log created everytime. I added an error out constant which made things smooth!

Woohoo!

I shall try adding some features to this VI in future.

Advertisements

One Response to Reading Serial Port Data using VISA in Labview

  1. Mazen says:

    Hello,
    I’m a first year engineer student from tunisia. I’m trying to use the visa in labview to send data continusly from a 16F887A via RS232 but I can’t figure it out how. Can you please clearify a little this tutorial or give me a hint.
    Best regards.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: