LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data at Serial Port

 Hi all,

 

First let me explain setup :

 

I am communicating between 2 PCs through RS 232.

now my ques is :

 

I want to implement like, if the serial port gets the data then only read and only those many bytes which are on the seial port,

 

Now i am doing it, as read the serial port but if data is not there then timeout error comes.

 

 

If anyone can share some thought on it.

 

Regards,

 

Shrekt

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

Hey Shrekt,

 

Im a little bit confused on exactly what you are trying to do, could you attach a print screen of your code maybe?

Regards

Andrew George @ NI UK
Message 2 of 6
(3,112 Views)

I mean I want to read the port only when there is some data on the it, until then wait and check if data is there.

 

Regards,

 

Shrek

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

Simply use the VISA Bytes at Serial Port.

0 Kudos
Message 4 of 6
(3,087 Views)

Hey Shrekt,

 

For what I can tell there is no particularly easy way to do this. I have found a relevant post one of my colleagues has created which might just be useful to you and help you on your way a little. The link is posted below, you may need to copy and paste it into your browser address bar. Failing that you can always go onto the ni website (ni.com) -> developer zone -> examples -> in search bar type "message bus" and it should be the first result.

 

http://decibel.ni.com/content/docs/DOC-12159

 

Hope this helps!

Regards

Andrew George @ NI UK
0 Kudos
Message 5 of 6
(3,081 Views)

Andrew,

 

I don't see the relevance or the difficulty. The function I mentioned is used in the shipping examples and in in hundreds of other posted serial examples.

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