FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the OPC Client (VC++ example program) to work? Having DataSocket problems...

I'm trying to get our custom software (written in C++ by someone else) to talk with a NI FieldPoint device. The device works fine, and can communicate perfectly with the FieldPoint Explorer.

Our software uses the ComponentWorks DataSocket ActiveX control (cwds.ocx) to talk with an OPC Server which in turn communicates with the FieldPoint device. (I think this is what happens, but my detective work is far from complete). The call to Create the datasocket results in an error:
Can't connect to URL step 4 (0x800c000d)
I think this error comes from our code and I believe that the URL is not the problem.

This led me to investigate whether the DataSocket is working at all.
I downloaded the sample application called OPC Client, compiled it into a Release version executable ran it on my client machine.

I believe the Browse button is supposed to bring up a list of OPC servers, but instead i get the error message:

OPC Client, Member not found.

I have installed and registered every possibly related .dll and .ocx file I could find, but believe that I am still missing something. If anyone could help me get this example program working, I think it would go a long way towards solving my overall problem.

Thanks,

Eric
Process Instruments, Inc.
0 Kudos
Message 1 of 5
(5,863 Views)
Eric,

First a question, what version of FieldPoint Explorer are you using? I ask because versions 1.6 and 1.7 did not install the FieldPoint OPC Server by default and you had to run a custom install in order to get the OPC Server. This was changed with version 2.0 (started shipping November 99) but I still see occasional older versions popping up so I thought I would mention it since the error you are seeing indicates that there may not be any OPC Servers registered on your computer.
Another possible cause is that you installed FieldPoint Explorer not logged in as an Administrator and may not have been successful in creating the registry keys that identifies the FieldPoint OPC Server. I recommend a re-install of FieldPoint Explorer, choosing the custom insta
ll option and verifying that the OPC Server option is selected. The current version of FieldPoint Explorer can be found at:
ftp://ftp.ni.com/support/fieldpoint/Server/nifp30.exe

For general DataSocket connection to OPC Client information, I recommend Application Note 139, "Developing an OPC Client Application for Visual Basic." The information, albeit not the syntax of the commands, is very applicable to any ComponentWorks/OPC Client application and the specific examples utilize the FieldPoint OPC Server.

Regards,
Aaron
LabVIEW Champion, CLA, CPI
0 Kudos
Message 2 of 5
(5,863 Views)
I was using FieldPoint Explorer 2.0 and I had checked to see that the OPC Server was installed. Just to be sure, I went back and reinstalled with no effect. Then I went ahead and installed FP Explorer 3.0 but no luck. I don't think I'm logged in as Administrator but this computer with Win98 is set up without the login screen coming up at all...Do I need to do something special in order to get these files to register? Any other ideas?

Thanks much,

Eric
0 Kudos
Message 3 of 5
(5,863 Views)
Could it have something to do with the fact that the OPC Client example and my application code are compiled on an NT machine and the client machine is Win98?
0 Kudos
Message 4 of 5
(5,863 Views)
Another clue: In reading the KB article called "Redistributing a ComponentWorks Application Built with DataSocket" (Document ID: DIRECT-45GPQQ) I came across this line:

"If you want to use OPC browsing, include BVOPCClient.dll."

This seemed like the thing to do, but I couldn't find it on my client or development machine. However I did find it on an old development machine that was used to develop the original software that I am working on, and happens to be the only machine on which the OPC Client example program works. (I can't test my code on this machine because the instrument isn't connected to it.)

I copied the file BVOPCClient.dll into the C:\WINDOWS\SYSTEM directory on my client machine and then tried to register it with regsvr32.exe. I go
t the following error message:

c:\windows\system\BVOPCClient.dll was loaded, but the DllRegisterServer entry point was not found. DllRegisterServer may not be exported, or a corrupt version of c:\windows\system\BVOPCClient.dll may be in memory. Consider using PView to detect and remove it.

I then found a newer version of BVOPCClient.dll on your site and downloaded that with the same result.

I then reinstalled FieldPoint Explorer 3.0 with all options checked AND ComponentWorks 2.01 with all options checked to see if the .dll would show up and be registered that way. No dice.

Do you think this .dll may be the key to getting my OPC Server communicating? And if so, what is my problem with registration? I am a newbie when it comes to regsvr32.

Thanks,

Eric
0 Kudos
Message 5 of 5
(5,863 Views)