How can I programmatically determine if a TCP port is still open

I use STM to go from communication between a GUI and a reat-time target. Everything works great except if the TCP connection is terminated at each end for a reason any. How I can programitcally queries the port to see if the connection is still valid with on a read or write on the port?

LabVIEW is not any sort of TCP 'polling' VI. You will need to perform an operation of TCP and get the error provided to indicate that the connection has been lost. What did you do once you have discovered if the connection is no longer valid? Did you want to open a new connection and start using that one? If so, the best way to handle this is by trapping the error conditions in your code. If you get the error "connection interrupted" you open a new connection and try the operation again. I don't know how your code is structured, so I couldn't really tell you the best way to implement this in your code.

Tags: NI Software

Similar Questions

  • How can I programmatically determine the super-type of RepositoryItem

    I have a bunch of point-descriptors that share a common supertype of 'product' as below...

    < name point-descriptor = "visualmedia" super-type 'product' = display-name = 'Visual Media' sub-sub-type-value = "visualmedia" >
    < name point-descriptor = 'application' supertype 'product' = display-name = "Application" sub-sub-type-value = "application" >

    .

    In my code, it is pretty easy to get kind of a RepostitoryItem as...

    String itemType = item.getItemDescriptor () .getItemDescriptorName ();
    gives "visualmedia" or "application".

    .. .but what I really need, is the RepositoryItem super-type value of 'product '. Does anyone know how to do this?

    Bob

    It is always better to write code using the repository API, if possible, rather than dive into implementation of the particular repository as the GSA. The atg.repository.RepositoryUtils class is your friend. He takes care of some instanceof checks and casts are needed. It probably has the methods you need. Here are some options related to your question.

    RepositoryItemDescriptor getBaseItemDescriptor(RepositoryItemDescriptor pItemDesc) - if pItemDesc is not a GSAItemDescriptor, it will be returned to you. If it's a GSAItemDescriptor, you will get back GSAItemDescriptor.getBaseItemDescriptor. The base is the root of a multilevel inheritance tree. If the input parameter has no supertypes, it will be returned. In other words, you won't get back to a null value.

    RepositoryItemDescriptor getParentItemDescriptor(RepositoryItemDescriptor pItemDesc) - This returns an immediate supertype or null if the input type without a supertype.

    Boolean isTypeOfItemDesc (RepositoryItem, RepositoryItemDescriptor pSuper pItem) - returns true if pItem is a pSuper or pSuper anywhere in its supertype tree. This is analogous to java instanceof. There is an overloaded version of this method where you can spend in a RepositoryItemDescriptor for the first parameter, if this happens to be most convenient for you. If you start with a RepositoryItem, there is no need to get his ItemDescriptor your own.

    The code in GSAItemDescriptor.getSuperTypeDescriptor isin was exactly the same as getParentItemDescriptor, and I'm not enough to know if they would give you different answers, an expert of GSA. I doubt it. My guess is that isTypeOfItemDesc is what you really want.

  • How do I programmatically determine the version OMIVV

    How can I programmatically retrieve the version of OMIVV (OpenManage for VMware vCenter integration)?

    That's how I do it manually
    1. connect to https://
    2. in the left menu, select the DEVICE MANAGEMENT
    3 version is displayed under the DEVICE UPDATE

    There is no url in the hyperlink for the management of the unit. This is a javascript action.
    I prefer not to have to hack all the javascript and html to find the source of the information, as this could easily change in a future version, this hack of rendering obsolete.

    There is no SNMP agent
    You can't SSH to the IMO

    I would like to write a script to collect this information on a regular basis as part of the State of my management of environment report.

    Hello

    There is not a way to side plugin to collect the version. You may be able to use other methods of Vcenter for version. PowerCLI should be able to get a list or the specific version of the plugin with the Get-vCenterPlugin command

    https://my.VMware.com/Web/VMware/details?downloadGroup=PCLI550&ProductID=352

  • How can I do a quick preview (thumbnails?) of all open tabs in a window (Safari has a function for the display of open tabs)?

    How can I do a quick preview (thumbnails?) of all open tabs in a window (Safari has a function for the display of open tabs)?

    Maybe look into this extension instead:

  • How can I get a query in the search field to open in a new tab or a new window, and the current window?

    How can I get a query in the search field to open in a new tab or a new window, and the current window?

    If you are looking through the search bar in the Navigation toolbar, this preference can be changed to research it open in a tab.

    Type of topic: config in the address bar and press ENTER. Then answer "I'll be careful." Type this pref in the search at the top.

    Browser.Search.openintab = double click to switch to true

  • How can I make Firefox automatically show my homepage when you open a new tab (instead of a blank page now)?

    How can I make Firefox automatically show my homepage when you open a new tab (instead of a blank page now)?
    (version 3.6.6 on Windows7 64-bit platform)

    New tab homepage extension:
    https://addons.Mozilla.org/en-us/Firefox/addon/777

  • How can one Iput a java folder on my desktop to open files iwant to put in it?

    original title: java

    How can one Iput a java folder on my desktop to open files iwant to put in it?

    How can one Iput a java folder on my desktop to open files iwant to put in it?

    Right-click on the java folder > click send to > click Desktop (create shortcut) for the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • HP dc 7800 how can I install the driver for serial port pci Windows 8.1

    HP dc 7800 how can I install the driver for serial port pci Windows 8.1 Please help

    Hello:

    Download and install the W7 AMT driver.

    http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3459243&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dvc_78665_1%257CswEnvOID%253D4059%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

  • When I go to a favorite websight how can I get the user id and the password to open the view without having to put in me? Barry was soon

    When I go to a favorite websight how can I get the user id and the password to open the view without having to put in me? Barry was soon

    Hi Barry,.

    Please contact Microsoft Community.

    It would be great if you can answer the following question:

    What browser you use on the computer?

    If you are using Internet explorer, I suggest you to follow these steps to turn on the AutoComplete feature and check if it helps:

    (a) open Internet Explorer.

    (b) click on the Tools button and then click on Internet Options.

    (c) click on the content tab.

    (d) under AutoComplete , click settings.

    (e) check the address bar, Forms, usernames and passwords on formsand ask me before saving passwords check boxes.

    (f) click OKand then click OK again.

    Let us know if this can help, and if you need further assistance.

  • How can I set a certain web page automatically start and open when I connect Windows?

    How can I set a certain web page automatically start and open when I connect Windows?  My company as a "Home Page" that I would like it to appear when I connect Windows.

    Hello.

    Yes, you can do it. The only way to do this is to create a startup items.

    STEP 1- Make sure that the home page is set correctly

    Second STEP- Creating a startup items

    How to create a startup items:

    1. Right click on the shortcut of browser (Internet Explorer, Mozilla Firefox, Google Chrome), then click on copy.
    2. Open the start menu, click all programs.
    3. Right click on the startup folder, click Explore.
    4. Right-click on an empty area of the Windows Explorer, click Paste shortcut.

    STEP 3- Restart the computer to apply the changes and see the effect

    Response to see if it helps.

  • How can I fix the problem of not being able to open files by double clicking with photoshop

    How can I fix the problem of not being able to open files with photoshop by double-clicking it in windows Explorer?

    This problem affects psd, jpg, and png files.  I get an error saying "the program can't start because adbeape.dll is missing on your computer.  I can open all these types of files in the menu 'open' in photoshop.  It is not a matter of them not having no not extensions.  I use windows 7.

    Thank you

    Thanks for the update.

    Just for test, could you please rename Photoshop.exe to Photoshop CC2015.exe location: C:\Program Files\Adobe\Adobe Photoshop CC2015

    then change the file association to the new renamed exe file and let us know if this helps or not.

  • How can I get Photoshop 11 (Camera Raw 7.4) to open and process the images of my Canon 70 d CR2?

    How can I get Photoshop 11 (Camera Raw 7.4) to open and process taken with my Canon EOS 70 d CR2 files? I downloaded camera Raw 9.2, but it doesn't connect.  The list compatible camera says that Canon EOS 70 d is compatible with CS2 files, but mine are CR2.  Any research I do just seems to run in circles.

    susank35683264 wrote:

    How can I get Photoshop 11 (Camera Raw 7.4) to open and process taken with my Canon EOS 70 d CR2 files? I downloaded camera Raw 9.2, but it doesn't connect.  The list compatible camera says that Canon EOS 70 d is compatible with CS2 files, but mine are CR2.  Any research I do just seems to run in circles.

    CR2 does not define a raw format, it is the family of Canon raw file. All Canon cameras has its own format.

    FAQ: Photoshop Elements will work with my camera, or why does not open my raw files?

    Thus, PSE11 can not be updated to the required version of ACR, 8.2.

    Version 9.2 of ACR does not work with PSE11.

    If you don't upgrade to a recent version of PSE, your free option would be to download the program of DNGconverter, mentioned in the faq above.

    This independent software is capable of converting all of a folder from your CR2 files for raw format DNG PSE11 can read and modify.

  • How can I configure Adobe Acrobat 10.1.0 Pro to open a document at 100% (page level ' ")?

    How can I configure Adobe Acrobat 10.1.0 Pro to open a document at 100% (page level ' ")? Whenever I open a PDF attachment, she open viewing at 198%.

    It is only possible if the author of the PDF file has not set an initial view, which will replace the default display of the applications.

    You can set a default view by changing the default view requires Acrobat/Reader, "Edit-preferences online => Page Display.

  • How can I configure Adobe Flash Player as default program to open SWF files?

    Overview of basic

    I have this work very well to my laptop at home, but I need this working for school projects.

    Whenever I want to open a SWF file at home, I just double click it and open it in Adobe Flash Player (Adobe Flash Player 10.0 r22) and I have no problem!

    However, when I'm at school I have to run in Internet Explorer, the file SWF, Adobe Flash Player IS installed, but the SWF files are opened directly, they are opened in Internet Explorer.

    At home

    If I right click on a SWF file at home and select 'Open with', and then "choose default program...". ", Adobe Flash Player is already there under the name" Adobe Flash Player 10.0 r22 ", so I can select the default value. (On my laptop at home)

    At the school

    In school, so go to "Open with", then "choose default program... ", Adobe Flash Player IS NOT there, only Internet Explorer and other programs in the box of other programs. (On my laptop to school)

    Question

    How can I assign Adobe Flash Player as default program to open SWF files (on my laptop to school)? If I select "Browse...". "and go to C:\WINDOWS\System32\Macromed\Flash there is no file with a description of" Adobe Flash Player 10.0 r22 ", is the file for the program located somewhere else, or I'm just not properly looked into the record?

    I really need these files open in Adobe Flash Player directly and not in Internet Explorer (I know that you can set the view to 100% and do it properly sized)

    Thanks to all who help!
    -Charlie! (Yes I know, that I need not write this in a forum)

    The standard Flash Player is a browser add-on and not a standalone player.  So what in fact opens when you open a SWF file at home?  Flash Player projector?

    If so, you must also download in your school, to http://www.adobe.com/support/flashplayer/downloads.html, then make the file association.

  • How can I programmatically set the delay of a feedback node?

    I'm generating a sine wave using the vi simulate Signal Express. I then use a feedback node to delay the signal of a specific amount. The front displays 2 charts: one of the original signal and another of the delayed signal.

    The problem is that I will determine the amount of delay based Boolean user entry rather than having to set by using the configuration box (the time will be 4000 if the user chooses "real" and 2000 if the user chooses "fake". I do this with a box structure. How can I use the delay printed by the case structure to control the delay of feedback node?

    I'm relatively new to Labview, so maybe there is a better way to reach my goal of using a Feedback node. Any ideas are appreciated!

    Take a look at this response, "Is there a period of dynamic for nodes of z comments?"

Maybe you are looking for