Is there a way to read TCPIP data so that it doesn't hang when there is no data present?

Hi,
I've got a loop in my code that uses a TCP read function. My problem is that the loop hangs if there is no data available. What I would like to do is check if there is data available, then do the read otherwise move on to the rest of the code if no data is available and then try again on the next loop.
Thanks,
Ryan
Solved!
Go to Solution.

In addition to using a non-standard timeout, such as 100ms or so, one can also play with the Read Mode input of the TCP Read. Those modes are a bit pesky and not always trivial to understand but they can be useful. Read the documentation to the TCP Read function that explains these modes a bit and then start to make small experiments to verify your understanding of those operations.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Is there any way to set a password so that txt messages only open when the password is entered

    Is there any way to set a password so that txt messages only open when the password is entered?
    Please help! Thanks for reading:)

    Hello Damien,
    There is an option to set a passcode for the entire iPhone.  You can use the following steps to set this up:
    You can configure a passcode for your iPhone, iPad, or iPod touch using Settings > General > Passcode Lock.
    Once enabled, you will be prompted for the passcode whenever you:
    Turn on or restart the device
    Wake the device
    Unlock the screen
    Note: You can specify the amount of time the screen must be locked before requiring a passcode.
    You can find the full article here:
    iOS: Understanding passcodes
    http://support.apple.com/kb/ht4113
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT5919 My company will not allow us to download iOS 7 due to software / security issues on our end. The problem is I need to download numbers but it says I need iOS 7. Is there any way to get an earlier update that's doesn't require ios7?

    My company will not allow us to download iOS 7 due to software / security issues on our end. The problem is I need to download numbers but it says I need iOS 7. Is there any way to get an earlier update of numbers that's doesn't require ios7?

    Thank you so much! It's updating now. I'm hoping that once the update is finished that it will sync like normal as well. Of course I'm still a bit confused/concerned about how it refused to update on it's own, but for now that's not a problem. Hopefully from now on there won't be any more problems.

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?

    Hi, Im not a frequent forum poster, as most of my questions can be found already answered on them!
    This is a question Ive had for a long time and it amazes me that no-one else seems to ask it. I check at each OS upgrade but its never there...
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    I was able to do this years ago in MS Outlook, and utilized it all the time when I needed to push things back, now I have to open the event and select an new date in the drop-down calendar for each & every event I want to move to a new month at the end of the month.
    If its definitely not possible, how to you ask apple to consider including it - it doesnt seem like a particularly difficult task.
    Thankyou
    Andrew.

    Andrew,
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    No, but you can use cut/paste. Cut (⌘X) the event, then click on the week where you want to move the event, and Paste (⌘V).
    If you have a suggestion for Apple to change that method use: Apple - Mac OS X - Feedback.

  • Is there any way to read XML directly from a Web Page ??

    i have a url, which on sending request, shows XML in browser.
    Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
    actually the process is. :
    1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
    2.)then i have to read the Xml and show it in according to my requirements.
    Is there any way to read XML directly from a Web Page ??
    is their logic to accomplish this.
    e.g in Servlet i can do somewhat like this :
    String wholeXml=Somemethod(url);
    Please Advice

    the average Java XML parser will accept an InputStream, so just open an URLConnection to the webpage, get the inputstream from it and feed that inputstream to the XML parser. If the URL has valid XML data, it will get parsed without problems.

  • Is there any way to set up reminders so that they are in due date order?

    On the ipad, reminders are organized in the order of the dates they are due under "scheduled". Is there any way for it to show like that on the Mac?
    Updtae: I found the answer in my preferences. Under view.
    Message was edited by: KRB02

    No ability to change those settings.

  • Is there any way to read to dynamic configuration using abap mappings?

    Hi,
      Is there any way to read dynamic configuration suppouse filename using abap mappings, I mean using abap code?
    Appreciate for your response.
    Regards,
    Daniel.LA

    Daniel,
    Yes it's possible. Please refer Henrique Pinto's reply in this thread -Re: Abap mapping and variable substitution in File adapter
    raj.

  • Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?

    Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
    TIA,
    Nancy

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • Is there a way to create a new Calendar that replicates all events

    Is there a way to create a new Calendar that replicates all events from a subscribed calendar ? Mobile Me is great but my most important Calendar is technically in the "Subscriptions" category so it doesn't get pushed to me iPhone. I want to create a new Calendar and have it just automatically copy all the events from the subscribed calendar and keep up to date with that one.

    lincolnroadjeff,
    I subscribed to a Holiday calendar that I also wanted to be published, and the only workaround that I found was to export the calendar, delete the subscription, and then import the calendar.
    This obviously will only work with a subscription that is not often updated/subject to change.
    ;~)

  • Is there a way to recover a .pages document that was thrown in the trash and emptied Saturday, May 3, 2014?

    Is there a way to recover a .pages document that was thrown in the trash and then the trash was emptied Saturday, May 3, 2014?

    Shut the Mac down immediately (may already be too late) and buy some data recovery software, you may have a chance of recovering it.
    I assume that you're asking because you don't back up?

  • HT1386 After syncing my iphone I found that all of my notes were erased from the phone.  Is there any way to retrieve the notes now that they have been erased?

    After syncing my iphone I found that all of my notes were erased from the phone.  Is there any way to retrieve the notes now that they have been erased?  I had some very important notes that I have to be able to find.  Anyone know how?

    I think those contacts still in iphone database. So you can back up you iphone with itunes to get iphone database off your iphone. Then access the SQLite batabse.
    http://support.apple.com/kb/HT1766
    All data included with the backup is stored in a SQLite database format with the data within various folders not easily accessible.There are some 3rd party utilities that provide for extracting select data from an iPhone's backup and iphone database such as this one.
    http://www.datarecoveryforiphone.com/

  • I work on dual screens on a new mac pro but when I do the 4 finger swipe it moves both screens, is there a way to move just the screen that is active?

    I work on dual screens on a new mac pro but when I do the 4 finger swipe it moves both screens, is there a way to move just the screen that is active?

    Multiple desktops and dual screens really aren't meant to work together. Apple came up with this multiple desltops feature and never really thought about users that use a dual monitor setup. So use either multiple desktops OR dual monitors but not both. Also don't try to use any App in Full Screen Mode as that doesn't work with dual screen setups either.

  • I have an external server that stores all my movies and music, is there a way to stream it to my apple tv? If not is there a way I can link the folders to itunes (without downloading files to computer) and will that make them view-able for the apple TV?

    I have an external server that stores all my movies and music, is there a way to stream it to my apple tv?
    If not is there a way I can link the folders to itunes (without downloading files to computer) that will make them view-able for the apple TV?
    If none of that works is there a way to get it working alternativly?
    Additional Information:
    Everything is linked via ethernet cable.
    I'm using a PC to set it up.
    If you have any other questions feel free to ask and I'll help where I can.
    Thank you for any help

    (I think the daughter got he better end of the deal!)   I believe if you change the password and user id one of the devices it will stop that from occurring. But I'm not the one to tell you how to do it; someone like "Illaass" (Illaass seems to know how to correct / fix almost anything!) will know how if you don't. Just look for the "cat" icon.

  • Is there a way to create forms where certain fields would become required only if there was a certain choice made in a dropdown box in another field?

    Is there a way to create forms where certain fields would become required only if there was a certain choice made in a dropdown box in another field?

    Yes but you will have to create some custom JavaScript to do this.
    Also you should be aware that the "Required" property is only processed when the form is submitted to a scripted web page or "mailto:" process.

Maybe you are looking for