Datasocket write and close / remote OPC server / PC freeze when no connection

[Labview 8.21, Windows XP SP2]
Hello
I am getting data from a remote OPC server using the Datasocket techniques. Depending on the DS family of routine that I use the behavior is different when the OPC server shuts down or Ethernet link is cut.
In the NOK application attached, as soon as the link to the OPC server is cut the application and the whole Labview environment gets stalled, either in the DS Write or in the DS Close icon. Never in the DS Read icon.
Also the Timeout to read or write does not work in neither application. Whatever the number I set it will never be taken into account.
Is there some sort of 'miracle' setting in the Labview.ini file that can make the NOK application to work correctly and step out of the DS Write or Close vi when such link cut occur? More generally could someone explain why the behavior is different between the two applications, if there are new Datasocket routines that would handle these kind of communication in a clean way?
Thanks
Christophe
Attachments:
Datasocket - OK version.vi ‏19 KB
Datasocket - NOK version.vi ‏19 KB

I am desesperate. The Datasocket - OK version.vi 19 KB that seemed to work so well (no freeze at all) creates a huge memory leakage as you can see in the attached file. I am only reading a tag (local OPC tag, not even remote tag on another PC's OPC server) and the word document attached shows the issue:
After 15-20min during which no increase of memory is noticed (first picture) the situation starts to worsen. In 12 hours (about 7200 read operations) it reaches a consumption of 65Mb ! (to read everytime the same OPC tag). Something that I never noticed with the Datasocket - NOK version.vi 19 KB that had the freezing issue...
I really do not know what to do.
Thanks for your prompt feedback
Christophe
Attachments:
Benchmark Datasokets.vi ‏38 KB
Benchmark Datasocket Memory Consumption.doc ‏392 KB

Similar Messages

  • Problems connecting to a remote OPC server in write mode using CWDataSocket control

    Hi.
    I have been struggling with an odd feature when trying to connect to a remote OPC server using CWDataSocket control, though I'm not sure if it's a CWDataSocket related problem. But anyway, the following error occurs: "Active: Can't write data." Error number: "-2147467259". Now, when I connect to a local OPC server
    and write some data and then again connect to the remote server, no errors occure and reading and writing work fine. The same error occurs when I try the same in LabVIEW. What could be the problem?
    No errors occure when I connect to the server with some other OPC client application.
    Thanks in advance.
    - Asko -

    The ConnectTo operation (as are all DataSocket operations) is asynchronous. In order for it to complete, you must process Windows messages after calling it and before calling another operation. Is it possible that you are trying to write data before the connection operation is complete?
    One easy way to test this would be to put the ConnectTo and the Write in separate control callbacks, cause ConnectTo to be called, wait a while, then cause the Write to be called. Alternatively, you could do something like the following:
    dsWrite.ConnectTo txtUrl.Text, cwdsWrite
    While Not ((dsWrite.Status = cwdsConnectionActive) Or (dsWrite.Status = cwdsConnectionIdle))
    DoEvents
    Wend
    If this is the problem, then you'll probably want to go with the
    second option. In a production system, you should include a timeout in the While loop so that if the connection actually cannot be made, you are not stuck in an infinite loop.

  • Problem with connecting remote OPC Server

    Today, when I opened my labveiw 8 program which worked properly yesterday, it couldn't connect to the Items on remote OPC server anymore thought I can still browse those items in Server Explorer.  In the NI published variable monitor, quality for those items is "Server failure", Then I added a new variable which bind to a local OPC item, it works properly. What's the difference between labview8 and Server Explorer when they are used to view a OPC Item?
    LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
    欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn

    I've solved the problem,  the reason is that the NI variable engine log on as the system account, I changed it to the specified user which I used it in DCOM config, then it's ok
    the  method is:   computer management->Services->NI variable Engine->log on->this user...
    LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
    欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn

  • Can TestStand open, read, write and close binary files?

    From a TestStand sequence, I need to open, read, write and close binary files. Does TestStand support this capability?

    Christine -
    In the past I have used the C/C++ Adapter to call directly into the CVI RTE functions. The CVI functions I have used are OpenFile, WriteFile and CloseFile. The functions are exported from the DLL as CVI_OpenFile, CVI_WriteFile, and CVI_CloseFile. I just had to make sure that on termination of the sequence, that the integer handle was properly released by calling the close function.
    If you are using LabVIEW, you could call directly into the low level VIs to do a similar set of operations.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • I tried to install the new iOs 7 on my iphone 4, but it wasn't completed (showing error 4005). Now, my iphone is stuck on the itunes' logo with the usb cord, and I can't use my phone. And itunes doesn't detect my iphone when I connect it on my computer.

    Hi everyone! I tried to install the new iOs 7 on my iphone 4, but it wasn't completed (showing error 4005). Now, my iphone is stuck on the itunes' logo with the usb cord, and I can't use my phone. And itunes doesn't detect my iphone when I connect it on my computer, so I can't put it in recovery mode or someting like that... What can I do?? I tried everything they tell me to do in the apple support but nothing seems to work. Thank you!

    No problem, glad to help!
    Update: my PC USB hub was connected to a USB 3 port, I connected the 30 pin cable directly to my PC, And the restore worked just fine. Restored phone from iCloud backup and seems to be working fine.

  • I have deleted all my videos songs and photos from my iphone 4 but when i connect to itunes it still shows 17gb free. how can I solve this issue without restore. Total storage of my iphone is 32 gb.

    I have deleted all my videos songs and photos from my iphone 4 but when i connect to itunes it still shows 17gb free. how can I solve this issue without restore. Total storage of my iphone is 32 gb.

    I don't see an issue, but if you mean why didn't you get most of your memory back you need to see what else is using storage. Go to Settings/General/Usage. Wait a bit for it to calculate storage allocation, then when it finishes you can see how much storage each app uses.

  • I recently bought an Ipod touch 2nd gen, (Ebay). It's in great shape and seemed to be wiped clean.  When I connect (via windows computer) to Itunes with usb cord the Ipod icon shows, but the only function you can do is eject. When its in the upper right h

    I recently bought an Ipod touch 2nd gen, (Ebay). It's in great shape and seemed to be wiped clean.
    When I connect (via windows computer) to Itunes with usb cord the Ipod icon shows, but the only function you can do is eject. When its in the upper right hand corner and you click on it all you get is a done button, when it's in the side bar right click and your only option is eject, left click has no effect. If I go to "file">devices it's as if there are no devices connected.
    I purchased a song with Itunes on the Ipod itself, and it transferred to my library on the computer automatically .
    I have an Iphone 5 and a nano that are still functioning with Itunes thru computer so I'm thinking the issue is with the Ipod touch. I've reset it several times, rebooted it, with no change.
    nothing on the internet has helped, I called tech support and got disconnected. Should I take it to a retail store? I just don't know where to go next, I'm of course willing to pay for tech or repair. looking for suggestions.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer          
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • Hi, my iphone 5 encountered an unknown error while updating to iOS 7 via itunes and is now stuck in recovery mode and prompts me to restore the phone when I connect it to itunes but then I would lose all my data. Any suggestions please?

    Hi, my iphone 5 encountered an unknown error while updating to iOS 7 via itunes and is now stuck in recovery mode and prompts me to restore the phone when I connect it to itunes but then I would lose all my data. I DO NOT have any back ups on itunes. Is there anyway to get out of recovery mode without restoring or recover data after a restore?
    Or any other suggestions please? Thanks

    As pdroth said, you should have gotten a backup made when you started the update of iOS. If you cannot find a backup, and the phone is in recovery mode, there are no futher suggestions to make. To get the phone working again you have to restore. You cannot force a backup at this time since it is already in recovery mode. It will not allow anything else but a restore at this point.

  • My iPhone 5 keeps freezing when I connect to wifi, not just freeze the wifi, but freezes the whole phone and have to hold home and lock button. Locks up completely and instantly when I turn on wifi and connect. Solutions?

    My iPhone 5 keeps freezing when I connect to wifi, not just freeze the wifi, but freezes the whole phone and have to hold home and lock button. Locks up completely and instantly when I turn on wifi and connect. Solutions?

    1.  If you are really on iOS 7.1, you may wish to try upgrading to 8.1.2 which is the latest (basing this on your signature).
    2.  If updating the phone doesn't help, is this only when you connect to a specific wifi network?  Or all wifi networks (including public with no password)?  If it is ALL wifi networks, you may have a hardware problem.  Genius bar would be the next step.
    Make a Genius Bar Reservation (or cancel an existing reservation)
    http://www.apple.com/retail/geniusbar/
    Sign in using your Apple ID

  • I have restored my iPod classic and everything has been wiped off, now when I connect it to the laptop, iTunes doesn't recognise it and windows won't format it, an error message comes up "unable to format"

    I have restored my iPod classic and everything has been wiped off, now when I connect it to the laptop, iTunes doesn't recognise it and windows won't format it, an error message comes up "unable to format". Can someone please help me sort this problem, it's so frustrating!!!!!!

    It could be an indication or a damaged or dying hard drive.  I would recommend doing a disk diagnostic on the iPod's HD using the instructions given by turingtest2 in this older thread.  He also covers what the resulting numbers indicate.
    https://discussions.apple.com/thread/3784647?start=0&tstart=0
    B-rock

  • IPod and iTunes freeze when I connect my 80gb iPod Classic

    Ok so I've had the 80gb Classic since August 08 and I recently got a new PC (Installed drivers recently, good spec). When I connect my iPod it freezes, so does iTunes and so does My Computer. I've uninstalled and reinstalled, downloaded latest update, reset iPod, updated drivers.
    When I disconnect it says it needs to be reformatted and sometimes it offers me this option when I connect without iTunes open, but then I press OK and it crashes. How can I reformat it easily?
    Don't care about loosing files on my iPod.

    I had an issue once where iTunes wouldn't see the iPod, and the iPod would act like its trying to connect but would never complete (On a Windows Based PC).
    The only way I got around that issue with my 80GB Video iPod was to do a reset on the iPod (menu and center for a few seconds until it rebooted). After that the device was good and would sync fine.
    However, if your device is saying otherwise like the format option then I'd be concerned... And I would recommend doing a restore first before a format... Try the reset, and connect.... If you are concerned once you get it syncronized then do the restore option through iTunes!

  • I had a hard drive blow out and lost my itunes library. Now when I connect my ipod itunes tells me it is not sync'd. I am not permited to delete or add any songs. I do not want to loose my ipod songs if I reset. Any ideas? Thanks.

    I had a hard drive blow out and lost my itunes library. Now when I connect my ipod itunes tells me it is not sync'd. I am not permited to delete or add any songs. I do not want to loose my ipod songs if I reset. Any ideas? Thanks.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • I am using apple iPod-suffle model and I am unable to upload music into iPod and 3 lights(green,orange and red) keeps blinking for few seconds when I connect my iPod to my PC and after few seconds its turn to unresponce mode,Plz help to find out solution

    I am using apple iPod-suffle model,I am unable to upload music into iPod and 3 lights(green,orange and red) keeps blinking for few seconds when I connect my iPod to my PC and after few seconds its turn to unresponce mode,Plz help to find out solution.

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • I have a 4s with the latest 6.0.1 update and windows 7 with iTunes 11. When I connect the phone, windows can see but iTunes doesn't. Have tried re-installs and re-starts. Anybody else have this problem

    I have a 4s with the latest 6.0.1 update and windows 7 with iTunes 11. When I connect the phone, windows can see but iTunes doesn't. Have tried re-installs and re-starts. Anybody else have this problem?

    Did you go through all the options?
    Also this:
    Also, third-party security software may conflict with iOS devices connecting to iTunes. Follow this article to troubleshoot issues that may be caused by your security software. After resolving any issues you may have with your security software, you may need to try the steps in this article again.

  • DVI ADAPTOR  iPad air crashes and resets after 5 or 30 minutes when i connect dvi adaptor

    DVI ADAPTOR  iPad air crashes and resets after 5 or 30 minutes when i connect dvi adaptor   I don't know the reason Sometimes its ok for more than 30 min and suddenly then crashes and the iPad resets

    For those still wondering how to install ios 6.1 on 5th gen iPod, you need to download it off of apples official website and then shift click restore from backup and choose the downloaded ios 6.1
    apples one year warrant covers any hardware problems like these right?

Maybe you are looking for