Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

how to reference the assemblies?

More
09 May 2012 22:46 #856 by ffrige
Excellent, it works! Thank you so much, you are the best!
I really hope my customers will buy your product in the future to communicate with my plcs.

Please Log in or Create an account to join the conversation.

More
09 May 2012 11:20 #850 by support
Hello,
thanks for compliments...
In C++ with Visual Studio 2010, here are the steps to the simplest Console application:

Select File -> New -> Project. Select Visual C++ / CLR / CLR Console Application, enter Name (e.g. test1), OK.
Select Project -> References. Press "Add New Reference" button. Under the .NET tab, scroll to the right assembly/assemblies - just as in C# Quick Start document. Press OK, OK.
You now have the assembly referenced. The remainder is just in editing the source code. At the bottom of test1.cpp, add:


using namespace OpcLabs::EasyOpc::DataAccess;
using namespace System;

int main(array ^args)
{
EasyDAClient^ client = gcnew EasyDAClient();
Console::WriteLine("Reading item...");
Console::WriteLine(client->ReadItemValue("", "OPCLabs.KitServer.2", "Demo.Ramp"));
Console::WriteLine("Press Enter to continue...");
Console::ReadLine();
return 0;
}


This should do it. Let me know if you need anything else.
Best regards

Please Log in or Create an account to join the conversation.

More
09 May 2012 04:30 #847 by ffrige
Hello and congratulations for the fantastic product! I was able to setup a small opc client in a couple of minutes using the windows forms and following the quick start document. However, I am having a hard time doing the same with a console application. The quick start document says: "simply reference the Opclabs... assembly". It is the first time I use VC++ and I have no idea how to do that "simple" task. Can you please provide more specific information? I searched the net but it looks like there are millions of different ways and none seems to work for me. I have VS2010, no .lib files, only the .dlls... how do I do that? I tried to open the consoleapplication1 that came with the package but VS2010 says it cannot be converted, there are a few errors in the logger. So I can't see what settings I need to add to my project in order to link the dll. I hope you can help me. Thank you!!!

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.064 seconds