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.

Reading in Lazarus

More
17 Mar 2018 15:57 #6154 by support
Replied by support on topic Reading in Lazarus
Thank you very much.

I have worked further on this. I can confirm that many of QuickOPC do not work from Lazarus, but I unfortunately I was not able to figure out why. The same methods work from other OLE Automation hosts that I have tried.

What's worse, I thought that maybe the problem is caused by the particular new version of Lazarus (1.8.2). But during my tests today, I was not able to make our stuff fully work with Lazarus 1.6.2 (which is what we have tested earlier) either. And that was with QuickOPC 2016.2, and 2018.1.

Sadly, I am unable to help you further at this point. The problem is not on your side. It is either in Lazarus (I believe that's most likely), in QuickOPC, or in a particular incompatibility between the two. But Lazarus is low on the list of tools we target, and we do not currently have resources to investigate this deeper.

Regards

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

More
16 Mar 2018 12:53 - 16 Mar 2018 12:59 #6149 by oleg.rosa@seznam.cz
a) I have 64-bit Win7.


b)
1)

2)


c)





BR
Olin
Last edit: 16 Mar 2018 12:59 by oleg.rosa@seznam.cz.

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

More
16 Mar 2018 10:42 #6148 by support
Replied by support on topic Reading in Lazarus
I have started looking to this. I am also getting problems under Lazarus 1.8.2, but they seem somewhat different from what you reported. What is interesting is that *some* of our examples work, but most don't. The one for Read, for example, does not work, and gives EOleException. So far I can only suspect that methods that accept more than one parameter have a problem, but that's just a wild hypothesis. Note that the same methods can be called from other OLE automayion hosts (such as VBScript).

Can you please also answer these questions:

A ) Are you using 32-bit or 64-bit Lazarus?

B ). What happens if you attempt to run specifically following two of our examples? Do they work? If not, what kind of error you get?
- 1) "_ComputerBrowserDialog.ShowDialog.Main"
- 7) "_EasyUAClient.DiscoverServers.Main"

C ) Can you please go to <ProgramFiles>\OPC Labs QuickOPC 2018.1\ExamplesCom\VBScript\WSH\UADocExamples\_EasyUAClient, and type
cscript Read.Main.vb
Does it work? If not, what kind of error you get?

Many thanks

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

More
15 Mar 2018 13:19 #6147 by oleg.rosa@seznam.cz
OK, thank you very much.
BR
Olin

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

More
15 Mar 2018 12:35 #6146 by support
Replied by support on topic Reading in Lazarus
Thank you. Our examples ran OK with the Free Pascal/Lazarus versions indicated in the article.

I will therefore install the version that *you* have, and test on our side.

Please give me some time. I will reply here when I have some update.

Best regards

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

More
15 Mar 2018 12:31 #6145 by oleg.rosa@seznam.cz
Hello,
I tried all your ideas and I tried run your example "UADocExamples.lpr".
Unfortunately with the same error.
BR
Olin

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

More
13 Mar 2018 15:10 #6144 by support
Replied by support on topic Reading in Lazarus
Actually, we do have these directives in the main program, but not in the units (which contain the actual execution code). Still, it's worth trying.

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

More
13 Mar 2018 15:08 #6143 by support
Replied by support on topic Reading in Lazarus
Thank you for the details.

We are no Free Pascal/Lazarus experts here either. In fact, QuickOPC can be (and is) used from so many tools/languages that it is impossible to cover them all in full.

I can try to install the precise version of Lazarus that you are using, and see if I can reproduce the problem. I actually think that the method does not even get called; but it is weird that the compiler/runtime lists the whole statement as a method name.

Before I do that, may I ask you why you have the directives there?:
{$mode objfpc}{$H+}
And, even if you do have reason to use them in your program later, can you remove them for now, and re-test? This is practically the only thing (besides compiler version) in which your program differs from our example, so I want to rule out that they are the cause. I have read their descriptions and there are some things that look a bit suspicious (= possibly related) about them, I must say.

Best regards

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

More
13 Mar 2018 14:57 #6142 by oleg.rosa@seznam.cz
Hello,
1) Yes, I have installed QuickOPC 2018.1 in OS (in TurboDelphi2006 I have no problems)
2) Done :-)
3) Code see bellow, it is only the first simple try:
unit unit1;
 
{$mode objfpc}{$H+}
 
interface
 
uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
  ExtCtrls, StdCtrls, ComCtrls, OpcLabs_EasyOpcUA_5_52_TLB, Windows, LCLType, Types;
.
.
.
procedure TForm1.PanelMainClick(Sender: TObject);
var
    Client: EasyUAClient;
begin
  try
    Client:= CoEasyUAClient.Create;
    Value:= Client.ReadValue('opc.tcp:\\172.25.15.66:4840', 'nsu=http://www.boschrexroth.com/IndraLogic;s=.bErrTest');
    PanelMain.Caption:= String(Value);
  except
    on E : Exception do
      ShowMessage(E.ClassName+' error 1 raised, with message : '+E.Message);
  end;
end; 
I'm a beginner in Lazarus.
Description from the picture bellow is from the debugger.
I do not think he describes the cause.
I think the debugger cannot read right cause from component QuickOPC.
Thank you for help
BR
Olin

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

More
13 Mar 2018 13:46 - 13 Mar 2018 13:54 #6141 by support
Replied by support on topic Reading in Lazarus
Hello,
I have some additional questions:

1) Are you sure that you have installed QuickOPC including one of the for "COM development" options (if not, re-run the installer and select the proper option on the 2nd page of the Wizard)

2) Have you followed the steps described here? kb.opclabs.com/First_experiences_using_QuickOPC_with_Free_Pascal_(Lazarus)
[edited: Oh, I see, you did]

3) Can you please show more of your program? Specifically, how is the Client variable declared?

Thank you
Last edit: 13 Mar 2018 13:54 by support.

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

Moderators: support
Time to create page: 0.073 seconds