LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My OPC client app hangs when the OPC server dissapears from the net

I have an application written in Labview 6i that uses Datasocket to write on a OPC Server under a TCP/IP net.
the typical URL is opc://MON1/Intellution.ABROPC/PLCL1:F15:12
The application works fine but if everything is OK in the network. But when Labview fails to find the URL Labview hangs. I tried by many ways to capture the error but I realized that Labview hangs inside an external Active X call (I guess).No errors reported.
I will appreciate if you can help me to solve this problem.

Thanks

Bernardo
0 Kudos
Message 1 of 21
(4,596 Views)

Bernardo,

First, are you using LabVIEW 6.0.0, or LabVIEW 6.0.2. If you are not using the latter, please download and install this free update. This resolves a number of issues with ActiveX and LabVIEW.
Second, are you using the DataSocket functions in LabVIEW, or the external DataSocket VIs from vi.lib\platform\dataskt.llb? If you are not using the latter, then I suggest doing so as they are more robust with OPC. There are also VIs that allow you to check if the connection has ben dropped or not. I would suggest using that and then reconnecting.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask

0 Kudos
Message 2 of 21
(4,594 Views)
Randy:
1.- My current version is 6.0.2
2.- I have tried both. I have ben looking into the dataskt.llb and found that Labview hangs when the program invokes "ConnectTo" method in INIDSCtl with a non-existing URL. You suggest that there is a method to check if the connection has been dropped out but my problem comes before establishing the connection. I would expect the activeX to generate something like "Failed to establish connection" but instead of it never returns from that situation.
Am I doing something wrong ?
Thank you for your help

Bernardo
0 Kudos
Message 3 of 21
(4,594 Views)
Bernardo,

I agree with you. I will continue to look into it.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 21
(4,594 Views)
Thank you Randy.
I will be anxiously waiting.
0 Kudos
Message 5 of 21
(4,594 Views)
Bernardo,

After doing some more digging, I found out that this was a known issue and is being fixed for a future release of the ActiveX control. So, this bug has been (and/or is being) fixed, but that does not solve today's issue. I tried playing with a watchdog VI, but that locked up as well. I do not have a workaround at this time, but if you find one, please post the solution. Thank you.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 6 of 21
(4,594 Views)
Randy:
I appreciate very much your efforts but I need to know at least when are you planning to release the new version. I am willing to test the corrected software even if it is not officialy released (if this is helpful).

Bernardo
0 Kudos
Message 7 of 21
(4,594 Views)
Bernardo,

I do not have that information or would I be allowed to release it if I did. My guess is that it will be part of LabVIEW 7 (in beta now), but the release date for this has not yet been set (things are still in work).

I did try searching for the version they said it was fixed in, but since I am not a developer, and this version is really new, I do not have access. I am sorry that I cannot be of more help right now.

You may try connecting with the DSWrite function in LabVIEW itself and it that returns without an error, you can then connect.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 8 of 21
(4,594 Views)
Randy:
Because this is a known bug may be I should have to talk with someone of the developing team to find a solution. If there is someone with rights to access this new information I would like to contact him.
My situation is that I sold an application based on your platform to a big International company. They requested me as a part of the specification that the software should made a connection with the existing supervising software. I proposed OPC technology based on your documentation and they accepted. But then, after setting up the system we faced with this problem and they are requesting me an immediate solution for a running system. They can not wait for the next version. I can not even tell them this story.
Please let m
e know who is the right person to open the locks. May be the president of the company ?

I hope you can help me to find a solution

Bernardo
0 Kudos
Message 9 of 21
(4,594 Views)
Bernardo,

The best person to talk to first would be your sales person. They can then escalate the issue up the chain faster than I can. If you know who your local sales rep is then please contact them. If you do not, then if you supply me with some contact info (e-mail and/or phone number and your zip code) then I can have them contact you.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 10 of 21
(4,595 Views)