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
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?
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
Simply use the VISA Bytes at Serial Port.
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!
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.