OPC and C++

M

Thread Starter

Marius

I have an existing OPC Server (Kepware) communicating with a Mitsubishi PLC. I want to write a C++ program to access the registers in the PLC trough the OPC Server. I don't have much experience on C++ programming. And want to know if I can find a C++ program example that shows me how to read and write to registers listet in the OPC Server. I would be really grateful for all help!
 
R

Rufus V. Smith

I was going to suggest the obvious: "Go to the Kepware site" but out of curiousity I went there myself, and found when I did a search for "example" all I got was Visual Basic examples.

When you bought the server from Kepware it didn't come with C++ examples? I'm a little surprised.

From the sound of your post, you don't want to simply live with a Visual Basic version, I guess.

I'm pretty sure you can write Visual Basic programs that are callable from C++, if that's an option.

Rufus

Rufus V. Smith
Software/Hardware Design (esp. Automation) Recently available for full, part-time, or contract work.
Home Page: <A HREF="http://members.aol.com/rufusvs">http://members.aol.com/rufusvs</A>
Looking for work? Check my Job Search Links.
 
M

Mark Hensley (Kepware)

Hi Marius,

Please contact me at Kepware using [email protected].

We offer the source to our OPC Quick Client to any one that needs to see how to use OPC servers in Visual C++. The code is well commented but I have to tell you up front its not for the casual C++ developer. There's some fairly complicated bit of kit that needs to be understood to use and manage an OPC connection in Visual C++. I would suggest that you look at the Visual Basic exmples that we supply directly with the server. You will find them in the "Examples" directory within your server installation.

These examples give you both a simple and quick example as well as a complex example that includes things like a full tag browser all in VB code. The VB examples are currently for VB5 and VB6.

If you still want the C++ code please let me know.

Mark Hensley
Kepware Technologies
 
M

Mark Hensley (Kepware)

Hi Rufus,

You're right we do need to simply include the C++ source code for our OPC Quick Client as part of the install. Consider it done for our next release which will be within the next week or so.

To date I have asked people to contact us directly to get the source code but the question does seem to be coming up more often. So good suggestion.
 
Top